Package com.persequor.event
Class Event
java.lang.Object
com.persequor.event.Event
- All Implemented Interfaces:
- Model
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescription<T extends Exception>
 voidaddCustomTag(String xpath, ThrowingConsumer<CustomTag, T> consumer) voidaddCustomTag(String xpath, String value) voidvoidaddEpcs(Collection<String> epcs) voidaddInputEpcs(String... epcs) voidaddInputEpcs(Collection<String> epcs) <E extends Exception>
 voidaddInputQuantity(ThrowingConsumer<QuantityElement, E> consumer) Add quantity to the output quantity list.<E extends Exception>
 voidaddQuantity(ThrowingConsumer<QuantityElement, E> consumer) Add quantity to this list.copy()Create a deep clone of the Event object.Create a deep clone of the Event object without ids that should be unique and/or be maintained by SAGA.ensureCustomTag(String xpath) This method is useful for making revert events.<E extends Exception>
 ErrorDeclarationensureErrorDeclaration(ThrowingConsumer<ErrorDeclaration, E> consumer) This method is useful for making revert events.getCustomTags(String xpath) getCustomTagValue(String xpath) getCustomTagValue(String xpath, Boolean isFullyQualifiedName) If not empty, this unique ID is used to identify the event not only in the Saga system, but globally.getEpcs()Depending on the EventType this can be the parentEPC, transactionId or transformationIdlonggetRequiredCustomTag(Namespace namespace, String name) Find custom tag with matching namespace and name,IllegalArgumentExceptionis thrown if there's no matching custom taggetRequiredCustomTag(String xpath) getRequiredCustomTagValue(String xpath) booleanvoidvoidsetBizLocation(BizLocation bizLocation) voidsetBizLocation(ElementUri bizLocation) voidsetBizLocation(String bizLocation) voidsetBizStep(BizStep bizStep) voidsetBizStep(ElementUri bizStep) voidsetBizStep(String bizStep) voidsetDisposition(Disposition disposition) voidsetDisposition(ElementUri disposition) voidsetDisposition(String disposition) voidsetDocumentId(String documentId) voidsetEpcisEventId(String epcisEventId) If set, it must be globally unique as it is used to identify the event not only in the Saga system, but globally.voidvoidsetEpcs(Collection<String> epcs) voidsetEventTime(ZonedDateTime eventTime) voidsetEventTimeZoneOffset(String eventTimeZoneOffset) voidsetEventType(EventType eventType) voidsetParentId(String parentId) voidsetPartition(long partition) voidsetReadPoint(ElementUri readPoint) voidsetReadPoint(ReadPoint readPoint) voidsetReadPoint(String readPoint) voidsetRecordTime(ZonedDateTime recordTime) voidsetSagaEventId(UUID sagaEventId) 
- 
Constructor Details- 
Eventpublic Event()
 
- 
- 
Method Details- 
getEpcisEventIdIf not empty, this unique ID is used to identify the event not only in the Saga system, but globally. See GS1 CBV for more information.
- 
setEpcisEventIdIf set, it must be globally unique as it is used to identify the event not only in the Saga system, but globally. According to the GS1 Core Business Vocabulary it should follow one of these formats:- Be a UUID take the form: urn:uuid:2902c942-c26d-43fa-8ba3-d7ac1e58211f
- Be a hash and look like this: ni:///sha-256;e838b765d316a7b6c3cf2c5ba19735a34ab36a34c741788e1bc896ae6b2c02f2?ver=CBV2.0
 
- Be a UUID take the form: 
- 
getEpcs
- 
setEpcs
- 
setEpcs
- 
addEpcs
- 
addEpcs
- 
getEventTime
- 
setEventTime
- 
getRecordTime
- 
setRecordTime
- 
getEventTimeZoneOffset
- 
setEventTimeZoneOffset
- 
getErrorDeclaration
- 
ensureErrorDeclarationThis method is useful for making revert events. You can obtain the error declaration. If the error declaration is not yet initialized then a new instance is created. That mean this method never returns null.- Returns:
- always error declaration instance
 
- 
ensureErrorDeclarationpublic <E extends Exception> ErrorDeclaration ensureErrorDeclaration(ThrowingConsumer<ErrorDeclaration, E> consumer) throws EThis method is useful for making revert events. You can obtain the error declaration. If the error declaration is not yet initialized then a new instance is created. That mean this method never returns null.- Type Parameters:
- E- exception type
- Parameters:
- consumer- function that accepts the error. It can access values of the resulting ErrorDeclaration
- Returns:
- error stored in this event
- Throws:
- E- exception thrown out of the provided consumer
 
- 
getAction
- 
setAction
- 
getBizStep
- 
getDisposition
- 
getReadPoint
- 
getBizLocation
- 
getBizTransactions
- 
getCustomTags
- 
addCustomTagpublic <T extends Exception> void addCustomTag(String xpath, ThrowingConsumer<CustomTag, T> consumer) throws T- Throws:
- T extends Exception
 
- 
addCustomTag
- 
getCustomTagValue
- 
getCustomTagValue
- 
getRequiredCustomTagValue
- 
getRequiredCustomTag
- 
getCustomTags
- 
getRequiredCustomTagFind custom tag with matching namespace and name,IllegalArgumentExceptionis thrown if there's no matching custom tag- Parameters:
- namespace- to look for
- name- to look for
- Returns:
- custom tag with specified namespace and name
 
- 
getSagaEventId
- 
setSagaEventId
- 
getSources
- 
getDestinations
- 
getQuantities
- 
addQuantitypublic <E extends Exception> void addQuantity(ThrowingConsumer<QuantityElement, E> consumer) throws EAdd quantity to this list. The quantity is obtained from the provided consumer that may throw an exception- Type Parameters:
- E- type of exception thrown by the provided consumer
- Parameters:
- consumer- quanatity provider
- Throws:
- E- exception thrown by the consumer
 
- 
getParentIdDepending on the EventType this can be the parentEPC, transactionId or transformationId- Returns:
- parentEPC, transactionId or transformationId.
 
- 
setParentId
- 
is
- 
getEventType
- 
setEventType
- 
getInstanceLotMasterData
- 
getPartitionpublic long getPartition()
- 
setPartitionpublic void setPartition(long partition) 
- 
copyCreate a deep clone of the Event object. Useful for returning an event that does not propagate changes to the original Event object, but still holds all information.- Returns:
- clone of Event object
 
- 
copyWithoutIdsCreate a deep clone of the Event object without ids that should be unique and/or be maintained by SAGA. Useful for creating a series of similar events from a base Event object- Returns:
- clone of Event object with unique ids empty
 
- 
ensureCustomTag
- 
getInputEpcs
- 
addInputEpcs
- 
addInputEpcs
- 
getInputQuantities
- 
addInputQuantitypublic <E extends Exception> void addInputQuantity(ThrowingConsumer<QuantityElement, E> consumer) throws EAdd quantity to the output quantity list. The quantity is obtained from the provided consumer that may throw an exception- Type Parameters:
- E- type of exception thrown by the provided consumer
- Parameters:
- consumer- quantity provider
- Throws:
- E- exception thrown by the consumer
 
- 
setDocumentId
- 
getDocumentId
- 
getEpcsIncludingParent
- 
setBizStep
- 
setBizStep
- 
setBizStep
- 
setDisposition
- 
setDisposition
- 
setDisposition
- 
setBizLocation
- 
setBizLocation
- 
setBizLocation
- 
setReadPoint
- 
setReadPoint
- 
setReadPoint
 
-