Skip to content

Commit

Permalink
chore: upgrade to EDC 0.1.2
Browse files Browse the repository at this point in the history
  • Loading branch information
paullatzelsperger committed Jun 23, 2023
1 parent 7be1012 commit 9d84d58
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,13 @@
import java.util.Set;

import static org.assertj.core.api.Assertions.assertThat;
import static org.eclipse.edc.connector.api.management.contractnegotiation.model.NegotiationInitiateRequestDto.ASSET_ID;
import static org.eclipse.edc.connector.api.management.contractnegotiation.model.ContractOfferDescription.ASSET_ID;
import static org.eclipse.edc.connector.api.management.contractnegotiation.model.ContractOfferDescription.OFFER_ID;
import static org.eclipse.edc.connector.api.management.contractnegotiation.model.ContractOfferDescription.POLICY;
import static org.eclipse.edc.connector.api.management.contractnegotiation.model.NegotiationInitiateRequestDto.CALLBACK_ADDRESSES;
import static org.eclipse.edc.connector.api.management.contractnegotiation.model.NegotiationInitiateRequestDto.CONNECTOR_ADDRESS;
import static org.eclipse.edc.connector.api.management.contractnegotiation.model.NegotiationInitiateRequestDto.CONNECTOR_ID;
import static org.eclipse.edc.connector.api.management.contractnegotiation.model.NegotiationInitiateRequestDto.OFFER;
import static org.eclipse.edc.connector.api.management.contractnegotiation.model.NegotiationInitiateRequestDto.OFFER_ID;
import static org.eclipse.edc.connector.api.management.contractnegotiation.model.NegotiationInitiateRequestDto.POLICY;
import static org.eclipse.edc.connector.api.management.contractnegotiation.model.NegotiationInitiateRequestDto.PROTOCOL;
import static org.eclipse.edc.connector.api.management.contractnegotiation.model.NegotiationInitiateRequestDto.PROVIDER_ID;
import static org.eclipse.edc.jsonld.spi.JsonLdKeywords.TYPE;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
import org.eclipse.edc.spi.EdcException;
import org.eclipse.edc.spi.event.Event;
import org.eclipse.edc.spi.message.RemoteMessageDispatcher;
import org.eclipse.edc.spi.response.ResponseStatus;
import org.eclipse.edc.spi.response.StatusResult;
import org.eclipse.edc.spi.types.domain.message.RemoteMessage;
import org.eclipse.tractusx.edc.spi.cp.adapter.callback.InProcessCallbackRegistry;

Expand All @@ -41,13 +43,13 @@ public String protocol() {
}

@Override
public <T, M extends RemoteMessage> CompletableFuture<T> send(Class<T> responseType, M message) {
public <T, M extends RemoteMessage> CompletableFuture<StatusResult<T>> dispatch(Class<T> responseType, M message) {
if (message instanceof CallbackEventRemoteMessage) {
var result = registry.handleMessage((CallbackEventRemoteMessage<? extends Event>) message);
if (result.succeeded()) {
return CompletableFuture.completedFuture(null);
return CompletableFuture.completedFuture(StatusResult.success(null));
} else {
return CompletableFuture.failedFuture(new EdcException(result.getFailureDetail()));
return CompletableFuture.completedFuture(StatusResult.failure(ResponseStatus.FATAL_ERROR, result.getFailureDetail()));
}
}
return CompletableFuture.failedFuture(new EdcException(format("Message of type %s not supported", message.getClass().getSimpleName())));
Expand Down
6 changes: 3 additions & 3 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
group=org.eclipse.tractusx.edc
version=0.5.0-SNAPSHOT
# configure the build:
annotationProcessorVersion=0.1.1
edcGradlePluginsVersion=0.1.1
metaModelVersion=0.1.1
annotationProcessorVersion=0.1.2
edcGradlePluginsVersion=0.1.2
metaModelVersion=0.1.2
txScmConnection=scm:git:[email protected]:eclipse-tractusx/tractusx-edc.git
txWebsiteUrl=https://github.com/eclipse-tractusx/tractusx-edc.git
txScmUrl=https://github.com/eclipse-tractusx/tractusx-edc.git
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
format.version = "1.1"

[versions]
edc = "0.1.1"
edc = "0.1.2"
postgres = "42.6.0"
awaitility = "4.2.0"
nimbus = "9.31"
Expand Down

0 comments on commit 9d84d58

Please sign in to comment.