Skip to content

Commit

Permalink
fix: removed assetid from transfer, so no error is raising
Browse files Browse the repository at this point in the history
  • Loading branch information
Mathias Brunkow Moser committed Jul 22, 2024
1 parent 032c2e9 commit 97f39a4
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,6 @@
public class TransferRequest extends DidDocument {

/** ATTRIBUTES **/
@JsonProperty("assetId")
String assetId;
@JsonProperty("counterPartyAddress")
String counterPartyAddress;
@JsonProperty("contractId")
Expand All @@ -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<CallbackAddress> callbackAddresses) {
public TransferRequest(String id, String type, String counterPartyAddress, String contractId, DataDestination dataDestination, Boolean managedResources, String protocol, String transferType, List<CallbackAddress> callbackAddresses) {
super(id, type);
this.assetId = assetId;
this.counterPartyAddress = counterPartyAddress;
this.contractId = contractId;
this.dataDestination = dataDestination;
Expand All @@ -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<CallbackAddress> callbackAddresses) {
this.assetId = assetId;
public TransferRequest(String counterPartyAddress, String contractId, DataDestination dataDestination, Boolean managedResources, String protocol, String transferType, List<CallbackAddress> callbackAddresses) {
this.counterPartyAddress = counterPartyAddress;
this.contractId = contractId;
this.dataDestination = dataDestination;
Expand All @@ -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<CallbackAddress> callbackAddresses) {
public TransferRequest(String id, String type, JsonNode context, String counterPartyAddress, String contractId, DataDestination dataDestination, Boolean managedResources, String protocol, String transferType, List<CallbackAddress> callbackAddresses) {
super(id, type, context);
this.assetId = assetId;
this.counterPartyAddress = counterPartyAddress;
this.contractId = contractId;
this.dataDestination = dataDestination;
Expand All @@ -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<CallbackAddress> callbackAddresses) {
public TransferRequest(String type, String counterPartyAddress, String contractId, DataDestination dataDestination, Boolean managedResources, String protocol, String transferType, List<CallbackAddress> callbackAddresses) {
super(type);
this.assetId = assetId;
this.counterPartyAddress = counterPartyAddress;
this.contractId = contractId;
this.dataDestination = dataDestination;
Expand All @@ -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<CallbackAddress> callbackAddresses) {
public TransferRequest(JsonNode context, String counterPartyAddress, String contractId, DataDestination dataDestination, Boolean managedResources, String protocol, String transferType, List<CallbackAddress> callbackAddresses) {
super(context);
this.assetId = assetId;
this.counterPartyAddress = counterPartyAddress;
this.contractId = contractId;
this.dataDestination = dataDestination;
Expand All @@ -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<CallbackAddress> callbackAddresses) {
public TransferRequest(JsonNode context, String type, String counterPartyAddress, String contractId, DataDestination dataDestination, Boolean managedResources, String protocol, String transferType, List<CallbackAddress> callbackAddresses) {
super(context, type);
this.assetId = assetId;
this.counterPartyAddress = counterPartyAddress;
this.contractId = contractId;
this.dataDestination = dataDestination;
Expand All @@ -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;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,6 @@ void initiateTransferAndSeeTransfer() {
List<CallbackAddress> 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,
Expand Down

0 comments on commit 97f39a4

Please sign in to comment.