Package org.openwms.common.comm.osip.req
Class RequestMessage.Builder
java.lang.Object
org.openwms.common.comm.osip.req.RequestMessage.Builder
- Enclosing class:
RequestMessage
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final org.openwms.common.comm.spi.FieldLengthProviderprivate final RequestMessage -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Finally build the message.withActualLocation(String actualLocation) Add an actualLocationby the given uniqueLocationPkin an expected format like AAAAAAA/BBBBBB/....withBarcode(String barcode) Add anBarcodeto the message.withCreateDate(String createDate, String pattern) Add the date of creation with the configured date format.withErrorCode(String errorCode) Add an error code.withTargetLocation(String targetLocation) Add an targetLocationby the given uniqueLocationPkin an expected format like AAAAAAA/BBBBBB/....
-
Field Details
-
requestMessage
-
provider
private final org.openwms.common.comm.spi.FieldLengthProvider provider
-
-
Constructor Details
-
Builder
public Builder(org.openwms.common.comm.spi.FieldLengthProvider provider)
-
-
Method Details
-
withBarcode
Add anBarcodeto the message.- Parameters:
barcode- The barcode- Returns:
- The builder
-
withActualLocation
Add an actualLocationby the given uniqueLocationPkin an expected format like AAAAAAA/BBBBBB/.... Where the number of digits each coordinate has and the number of coordinates at all is defined by theFieldLengthProvider.- Parameters:
actualLocation- The String representation ofLocationPKof the actual location- Returns:
- The builder
-
withTargetLocation
Add an targetLocationby the given uniqueLocationPkin an expected format like AAAAAAA/BBBBBB/.... Where the number of digits each coordinate has and the number of coordinates at all is defined by theFieldLengthProvider.- Parameters:
targetLocation- The String representation ofLocationPKof the target location- Returns:
- The builder
-
withErrorCode
Add an error code.- Parameters:
errorCode- The error code- Returns:
- The builder
-
withCreateDate
public RequestMessage.Builder withCreateDate(String createDate, String pattern) throws ParseException Add the date of creation with the configured date format.- Parameters:
createDate- The creation date as Stringpattern- The configured date time pattern- Returns:
- The builder
- Throws:
ParseException- with invalid pattern
-
build
Finally build the message.- Returns:
- The completed message
-