Skip to content
This repository has been archived by the owner on Nov 7, 2023. It is now read-only.

Commit

Permalink
Remove isToOrder attribute from transaction
Browse files Browse the repository at this point in the history
It is a document wide attribute.

Signed-off-by: Niels Thykier <[email protected]>
  • Loading branch information
nt-gt committed Jul 11, 2023
1 parent c887722 commit ade81d1
Show file tree
Hide file tree
Showing 7 changed files with 3 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,6 @@ public class Transaction {
@Column(name = "timestamp", nullable = false)
private Long timestamp;

private Boolean isToOrder;

private String platformHost;

@ToString.Exclude
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,13 +116,6 @@ private Transaction createExportTransaction(String transferee, Set<Transaction>
return Transaction.builder()
.party(partyService.getPartyByTransferee(transferee))
.comments("The B/L exported to: " + transferee)
.isToOrder(
transactions.stream()
.map(Transaction::getIsToOrder)
.findAny()
.orElse(
true)) // When no local transactions exist only the export transaction will be
// created and isToOrder will be set to true
.platformHost(hostname+":"+port)
.timestamp(System.currentTimeMillis())
.action(TransactionAction.TRNS)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ public EndorsementChainTransactionTO endorsementChainTransactionTO() {
return EndorsementChainTransactionTO.builder()
.comments("This is a freetext comment")
.action(BlAction.SURR)
.isToOrder(false)
.platformHost("localhost:8443")
.timestamp(System.currentTimeMillis())
.transferee("Transferee@localhost:8443")
Expand All @@ -25,7 +24,6 @@ public List<EndorsementChainTransactionTO> endorsementChainTransactionTOList() {
EndorsementChainTransactionTO initialTransaction = EndorsementChainTransactionTO.builder()
.comments("The B/L is issued")
.action(BlAction.ISSU)
.isToOrder(false)
.platformHost("localhost:8443")
.timestamp(System.currentTimeMillis())
.transferee("initialTransferee@localhost:8443")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ void testEndorsementChainEntryMapper() {
Set.of(
Transaction.builder()
.comments("this is a comment")
.isToOrder(true)
.action(TransactionAction.ISSU)
.platformHost("localhost:443")
.party(PartyDataFactory.party())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ public Transaction transactionEntity() {
return Transaction.builder()
.comments("this is a free text comment")
.action(TransactionAction.ISSU)
.isToOrder(true)
.platformHost("localhost:8443")
.id(UUID.fromString("326137d8-bd60-4dea-88cc-52687fcb303a"))
.timestamp(System.currentTimeMillis())
Expand All @@ -31,7 +30,6 @@ public List<Transaction> transactionEntityList() {
Transaction transaction = Transaction.builder()
.comments("this is a free text comment")
.action(TransactionAction.TRNS)
.isToOrder(true)
.platformHost("localhost:8443")
.id(UUID.fromString("cb4c7721-f87c-485e-a6ec-3d0682faa24c"))
.timestamp(System.currentTimeMillis())
Expand All @@ -46,7 +44,6 @@ public EndorsementChainTransactionTO endorsementChainTransaction() {
return EndorsementChainTransactionTO.builder()
.action(BlAction.ISSU)
.comments("this is a free text comment")
.isToOrder(true)
.transferee("Receiving party")
.build();
}
Expand All @@ -57,7 +54,6 @@ public String endorsementChainTransactionJson() throws JsonProcessingException {
{
"action": "ISSU",
"comments": "The B/L has been issued.",
"isToOrder": true,
"transferee": "dummy transferee"
}
""";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@ public record EndorsementChainTransactionTO(
@NotNull
Long timestamp,

@NotNull
Boolean isToOrder,

@NotNull
String platformHost,

Expand Down
6 changes: 3 additions & 3 deletions postman_collection.json

Large diffs are not rendered by default.

0 comments on commit ade81d1

Please sign in to comment.