diff --git a/dpp-backend/digitalproductpass/src/main/java/org/eclipse/tractusx/digitalproductpass/core/models/negotiation/request/TransferRequest.java b/dpp-backend/digitalproductpass/src/main/java/org/eclipse/tractusx/digitalproductpass/core/models/negotiation/request/TransferRequest.java index c851d52a5..b334f2582 100644 --- a/dpp-backend/digitalproductpass/src/main/java/org/eclipse/tractusx/digitalproductpass/core/models/negotiation/request/TransferRequest.java +++ b/dpp-backend/digitalproductpass/src/main/java/org/eclipse/tractusx/digitalproductpass/core/models/negotiation/request/TransferRequest.java @@ -44,8 +44,6 @@ public class TransferRequest extends DidDocument { /** ATTRIBUTES **/ - @JsonProperty("assetId") - String assetId; @JsonProperty("counterPartyAddress") String counterPartyAddress; @JsonProperty("contractId") @@ -66,9 +64,8 @@ public class TransferRequest extends DidDocument { public TransferRequest() { } - public TransferRequest(String id, String type, String assetId, String counterPartyAddress, String contractId, DataDestination dataDestination, Boolean managedResources, String protocol, String transferType, List callbackAddresses) { + public TransferRequest(String id, String type, String counterPartyAddress, String contractId, DataDestination dataDestination, Boolean managedResources, String protocol, String transferType, List callbackAddresses) { super(id, type); - this.assetId = assetId; this.counterPartyAddress = counterPartyAddress; this.contractId = contractId; this.dataDestination = dataDestination; @@ -78,8 +75,7 @@ public TransferRequest(String id, String type, String assetId, String counterPar this.callbackAddresses = callbackAddresses; } - public TransferRequest(String assetId, String counterPartyAddress, String contractId, DataDestination dataDestination, Boolean managedResources, String protocol, String transferType, List callbackAddresses) { - this.assetId = assetId; + public TransferRequest(String counterPartyAddress, String contractId, DataDestination dataDestination, Boolean managedResources, String protocol, String transferType, List callbackAddresses) { this.counterPartyAddress = counterPartyAddress; this.contractId = contractId; this.dataDestination = dataDestination; @@ -89,9 +85,8 @@ public TransferRequest(String assetId, String counterPartyAddress, String contra this.callbackAddresses = callbackAddresses; } - public TransferRequest(String id, String type, JsonNode context, String assetId, String counterPartyAddress, String contractId, DataDestination dataDestination, Boolean managedResources, String protocol, String transferType, List callbackAddresses) { + public TransferRequest(String id, String type, JsonNode context, String counterPartyAddress, String contractId, DataDestination dataDestination, Boolean managedResources, String protocol, String transferType, List callbackAddresses) { super(id, type, context); - this.assetId = assetId; this.counterPartyAddress = counterPartyAddress; this.contractId = contractId; this.dataDestination = dataDestination; @@ -101,9 +96,8 @@ public TransferRequest(String id, String type, JsonNode context, String assetId, this.callbackAddresses = callbackAddresses; } - public TransferRequest(String type, String assetId, String counterPartyAddress, String contractId, DataDestination dataDestination, Boolean managedResources, String protocol, String transferType, List callbackAddresses) { + public TransferRequest(String type, String counterPartyAddress, String contractId, DataDestination dataDestination, Boolean managedResources, String protocol, String transferType, List callbackAddresses) { super(type); - this.assetId = assetId; this.counterPartyAddress = counterPartyAddress; this.contractId = contractId; this.dataDestination = dataDestination; @@ -113,9 +107,8 @@ public TransferRequest(String type, String assetId, String counterPartyAddress, this.callbackAddresses = callbackAddresses; } - public TransferRequest(JsonNode context, String assetId, String counterPartyAddress, String contractId, DataDestination dataDestination, Boolean managedResources, String protocol, String transferType, List callbackAddresses) { + public TransferRequest(JsonNode context, String counterPartyAddress, String contractId, DataDestination dataDestination, Boolean managedResources, String protocol, String transferType, List callbackAddresses) { super(context); - this.assetId = assetId; this.counterPartyAddress = counterPartyAddress; this.contractId = contractId; this.dataDestination = dataDestination; @@ -125,9 +118,8 @@ public TransferRequest(JsonNode context, String assetId, String counterPartyAddr this.callbackAddresses = callbackAddresses; } - public TransferRequest(JsonNode context, String type, String assetId, String counterPartyAddress, String contractId, DataDestination dataDestination, Boolean managedResources, String protocol, String transferType, List callbackAddresses) { + public TransferRequest(JsonNode context, String type, String counterPartyAddress, String contractId, DataDestination dataDestination, Boolean managedResources, String protocol, String transferType, List callbackAddresses) { super(context, type); - this.assetId = assetId; this.counterPartyAddress = counterPartyAddress; this.contractId = contractId; this.dataDestination = dataDestination; @@ -139,12 +131,6 @@ public TransferRequest(JsonNode context, String type, String assetId, String cou /** GETTERS AND SETTERS **/ - public String getAssetId() { - return assetId; - } - public void setAssetId(String assetId) { - this.assetId = assetId; - } public String getCounterPartyAddress() { return counterPartyAddress; } diff --git a/dpp-backend/digitalproductpass/src/test/java/managers/ProcessManagerTest.java b/dpp-backend/digitalproductpass/src/test/java/managers/ProcessManagerTest.java index d8daadb9e..269b0fb78 100644 --- a/dpp-backend/digitalproductpass/src/test/java/managers/ProcessManagerTest.java +++ b/dpp-backend/digitalproductpass/src/test/java/managers/ProcessManagerTest.java @@ -571,7 +571,6 @@ void saveTransferRequestAndTransfer() { String connectorId = UUID.randomUUID().toString(); transferRequest.setProtocol("HTTP"); transferRequest.setContractId(contractId); - transferRequest.setAssetId(assetId); transferRequest.setCounterPartyAddress("connectorAddress"); String transferId = UUID.randomUUID().toString(); diff --git a/dpp-backend/digitalproductpass/src/test/java/services/DataTransferServiceTest.java b/dpp-backend/digitalproductpass/src/test/java/services/DataTransferServiceTest.java index b30d1261c..bb7ab2b77 100644 --- a/dpp-backend/digitalproductpass/src/test/java/services/DataTransferServiceTest.java +++ b/dpp-backend/digitalproductpass/src/test/java/services/DataTransferServiceTest.java @@ -325,7 +325,6 @@ void initiateTransferAndSeeTransfer() { List callbackAddresses = List.of(CallbackAddress.builder().transactional(false).uri("http://test.endpoint/4546").events(List.of("transfer.process")).build()); TransferRequest transferRequest = new TransferRequest( jsonUtil.toJsonNode(Map.of("odrl", "http://www.w3.org/ns/odrl/2/")), - dataSet.getAssetId(), status.getEndpoint(), negotiation.getContractAgreementId(), null,