-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
DT-741: UC14 - Carrier - Confirm Shipping Instructions complete
Signed-off-by: Niels Thykier <[email protected]>
- Loading branch information
Showing
6 changed files
with
101 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
46 changes: 46 additions & 0 deletions
46
...formance/standards/ebl/action/UC14_Carrier_ConfirmShippingInstructionsCompleteAction.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
package org.dcsa.conformance.standards.ebl.action; | ||
|
||
import com.fasterxml.jackson.databind.node.ObjectNode; | ||
import java.util.stream.Stream; | ||
import lombok.Getter; | ||
import org.dcsa.conformance.core.check.*; | ||
|
||
@Getter | ||
public class UC14_Carrier_ConfirmShippingInstructionsCompleteAction extends StateChangingSIAction { | ||
private final JsonSchemaValidator requestSchemaValidator; | ||
|
||
public UC14_Carrier_ConfirmShippingInstructionsCompleteAction( | ||
String carrierPartyName, | ||
String shipperPartyName, | ||
EblAction previousAction, | ||
JsonSchemaValidator requestSchemaValidator) { | ||
super(carrierPartyName, shipperPartyName, previousAction, "UC14", 204); | ||
this.requestSchemaValidator = requestSchemaValidator; | ||
} | ||
|
||
@Override | ||
public String getHumanReadablePrompt() { | ||
return ("UC14: Confirm shipping instructions with reference %s is complete." | ||
.formatted(getDspSupplier().get().shippingInstructionsReference())); | ||
} | ||
|
||
@Override | ||
public ObjectNode asJsonNode() { | ||
return super.asJsonNode() | ||
.put("documentReference", getDspSupplier().get().shippingInstructionsReference()); | ||
} | ||
|
||
@Override | ||
public ConformanceCheck createCheck(String expectedApiVersion) { | ||
return new ConformanceCheck(getActionTitle()) { | ||
@Override | ||
protected Stream<? extends ConformanceCheck> createSubChecks() { | ||
return getTDNotificationChecks( | ||
getMatchedExchangeUuid(), | ||
expectedApiVersion, | ||
requestSchemaValidator | ||
); | ||
} | ||
}; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters