Skip to content

Commit

Permalink
compile errors
Browse files Browse the repository at this point in the history
  • Loading branch information
paullatzelsperger committed Mar 20, 2024
1 parent 54cdbdb commit 84bd04b
Show file tree
Hide file tree
Showing 10 changed files with 100 additions and 361 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -247,20 +247,18 @@ private StatusResult<Void> fireTransferProcess(EndpointDataReferenceEntry entry)
if (transferProcess == null) {
return StatusResult.failure(ResponseStatus.FATAL_ERROR, format("Failed to find transfer process %s", entry.getTransferProcessId()));
}
var dataRequest = transferProcess.getDataRequest();

var transferRequest = TransferRequest.Builder.newInstance()
.assetId(dataRequest.getAssetId())
.contractId(dataRequest.getContractId())
.protocol(dataRequest.getProtocol())
.counterPartyAddress(dataRequest.getConnectorAddress())
.dataDestination(dataRequest.getDataDestination())
.assetId(transferProcess.getAssetId())
.contractId(transferProcess.getContractId())
.protocol(transferProcess.getProtocol())
.counterPartyAddress(transferProcess.getCounterPartyAddress())
.dataDestination(transferProcess.getDataDestination())
.callbackAddresses(transferProcess.getCallbackAddresses())
.build();

var result = transferProcessService.initiateTransfer(transferRequest);
if (result.failed()) {
var msg = format("Failed to initiate a transfer for contract %s and asset %s, error: %s", dataRequest.getContractId(), dataRequest.getAssetId(), result.getFailureDetail());
var msg = format("Failed to initiate a transfer for contract %s and asset %s, error: %s", transferProcess.getContractId(), transferProcess.getAssetId(), result.getFailureDetail());
monitor.severe(msg);
return StatusResult.failure(ResponseStatus.ERROR_RETRY, result.getFailureDetail());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
import org.eclipse.edc.connector.contract.spi.types.negotiation.ContractRequest;
import org.eclipse.edc.connector.spi.contractnegotiation.ContractNegotiationService;
import org.eclipse.edc.connector.spi.transferprocess.TransferProcessService;
import org.eclipse.edc.connector.transfer.spi.types.DataRequest;
import org.eclipse.edc.connector.transfer.spi.types.ProvisionedResourceSet;
import org.eclipse.edc.connector.transfer.spi.types.TransferProcess;
import org.eclipse.edc.connector.transfer.spi.types.TransferProcessStates;
Expand All @@ -31,6 +30,7 @@
import org.eclipse.edc.spi.query.QuerySpec;
import org.eclipse.edc.spi.result.ServiceResult;
import org.eclipse.edc.spi.result.StoreResult;
import org.eclipse.edc.spi.types.domain.DataAddress;
import org.eclipse.tractusx.edc.edr.spi.store.EndpointDataReferenceCache;
import org.eclipse.tractusx.edc.edr.spi.types.EndpointDataReferenceEntry;
import org.junit.jupiter.api.BeforeEach;
Expand Down Expand Up @@ -254,30 +254,21 @@ private EndpointDataReferenceEntry.Builder edrEntryBuilder() {

private TransferProcess.Builder createTransferProcessBuilder() {
var processId = UUID.randomUUID().toString();
var dataRequest = createDataRequestBuilder()
.processId(processId)
.protocol("protocol")
.connectorAddress("http://an/address")
.build();

return TransferProcess.Builder.newInstance()
.provisionedResourceSet(ProvisionedResourceSet.Builder.newInstance().build())
.type(CONSUMER)
.id("test-process-" + processId)
.state(TransferProcessStates.COMPLETED.code())
.dataRequest(dataRequest);
}

private DataRequest.Builder createDataRequestBuilder() {
return DataRequest.Builder.newInstance()
.id(UUID.randomUUID().toString())
.contractId(UUID.randomUUID().toString())
.assetId(UUID.randomUUID().toString())
.destinationType("test-type");
.protocol("protocol")
.dataDestination(DataAddress.Builder.newInstance().type("test-type").build())
.counterPartyAddress("http://an/address");
}

private Criterion[] stateIs(int state) {
return aryEq(new Criterion[] {hasState(state)});
return aryEq(new Criterion[]{ hasState(state) });
}

}

This file was deleted.

Loading

0 comments on commit 84bd04b

Please sign in to comment.