|
BEA Systems, Inc. | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.bea.rfid.workflow.epcis.EventGenerator
public abstract class EventGenerator
Abstract base class for generating EPCIS events for
list of com.connecterra.ale.api.ECReportGroupListMember containing
tags read.
Concrete implementations of this must implement createSpecificEPCISEvent,
which is to create the specific EPCIS event for that implementation.
This contains EPCIS event fields that are common across all EPCIS event types. These are:
This also contains a template event. Non-null fields on the template event will override the properties set on the instance of the class. For example, if the template event contains a read point URI, that value will be used on the generated event. Business transactions and EPCIS event extensions on the template event will be added to the business transactions event extensions on this. The generated event will contain the union of the business transactions and event extensions on this and the template event.
This may be in active or inactive state and input tags are processed only in active state.
This implementation assumes single threaded operation and is not synchronized. If multiple threads access this concurrently, it must be synchronized externally.
| Constructor Summary | |
|---|---|
EventGenerator()
|
|
| Method Summary | |
|---|---|
void |
addBusinessTransaction(com.connecterra.epcis.api.BusinessTransaction bizTrans)
Adds a business transaction entry to list of business transactions to be used on the generated event. |
void |
addBusinessTransaction(URI bizTransType,
URI bizTransID)
Creates a business transaction for the given type and ID and adds it to the list of business transactions to be used on the generated event. |
void |
addEventExtension(String namespace,
String name,
String value)
Creates an EPCIS event extension for the given namespace, name and values and adds it to the list of event extensions to be used on the generated event. |
protected static URI |
convertToEPC(com.connecterra.ale.api.ECReportGroupListMember tagIn)
Returns URI form for a com.connecterra.ale.api.ECReportGroupListMember. |
protected static List |
convertToEPCList(List tags)
Utility method to create a list of URIs that can be used on EPCIS event fields from a given list of com.connecterra.ale.api.ECReportGroupListMember. |
com.connecterra.epcis.api.EPCISDocument |
createEPCISDocument(List tags)
Returns EPCISDocument with the generated EPCIS event for the input tags. |
abstract com.connecterra.epcis.impl.AbstractEPCISEvent |
createSpecificEPCISEvent(List tags)
Abstract method to create the EPCIS event specific to the concrete implementation. |
URI |
getBusinessLocation()
Returns the business location URI value on this. |
URI |
getBusinessStep()
Returns the business step URI value on this. |
List |
getBusinessTransactionList()
Returns the list of business transations specified on this. |
URI |
getDisposition()
Returns the disposition URI value on this. |
List |
getEventExtensionList()
Returns the list of EPCIS event extensions specified on this. |
URI |
getReadPoint()
Returns the read point URI value on this. |
com.connecterra.epcis.api.EPCISDocument |
getTemplate()
Returns EPCISDocument with the template event. |
protected String |
getTemplateAction()
Utility method to get action string specified in the template event. |
protected com.connecterra.epcis.api.EPCISBasicEvent |
getTemplateEvent()
Returns the template event extracted from the template EPCISDocument. |
boolean |
isProcessing()
Returns boolean indicating if the event generator is in active state or not. |
protected void |
populateAbstractEPCISEvent(com.connecterra.epcis.impl.AbstractEPCISEvent event)
Populates common EPCIS event fields using the event field properties on this. |
void |
setBusinessLocation(URI bizLocURI)
Specifies the business location URI that must be used on generated events if the template event does not contain one. |
void |
setBusinessStep(URI bizStepURI)
Specifies the business step URI that must be used on generated events if the template event does not contain one. |
void |
setBusinessTransactionList(List bizTransactions)
Specifies business transactions that must be used along with the ones on template event on the generated event. |
void |
setDisposition(URI disposition)
Specifies the disposition URI that must be used on generated events if the template event does not contain one. |
void |
setEventExtensionList(List extensions)
Specifies EPCIS event extensions that must be used along with the ones on template event, on the generated event. |
void |
setReadPoint(URI readPointURI)
Specifies the read point URI that must be used on generated events if the template event does not contain one. |
void |
setTemplate(com.connecterra.epcis.api.EPCISDocument templateDoc)
Specifies the template event for this event generator. |
void |
startProcessing()
Moves this to the state where it processes tags to generate EPCIS events. |
void |
stopProcessing()
Moves this to the state where it does not generate EPCIS events for input tags. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public EventGenerator()
| Method Detail |
|---|
public abstract com.connecterra.epcis.impl.AbstractEPCISEvent createSpecificEPCISEvent(List tags)
throws com.connecterra.epcis.api.EPCISException
createEPCISDocument to get the EPCIS event,
which is further filled out using event field properties on this.
tags - list of com.connecterra.ale.api.ECReportGroupListMember
for which EPCIS event must be generated
com.connecterra.epcis.api.EPCISException - if an error occurs trying to create the eventpublic void startProcessing()
public void stopProcessing()
public boolean isProcessing()
public com.connecterra.epcis.api.EPCISDocument createEPCISDocument(List tags)
throws com.connecterra.epcis.api.EPCISException
EPCISDocument with the generated EPCIS event for the input tags.
This uses the abstract method, createSpecificEPCISEvent, to create
specific event and populates the common event fields on that.
tags - list of com.connecterra.ale.api.ECReportGroupListMember
for which EPCIS event must be generated
EPCISDocument with the generated EPCIS event
com.connecterra.epcis.api.EPCISException - if an error occurs trying to create the EPCIS event
protected void populateAbstractEPCISEvent(com.connecterra.epcis.impl.AbstractEPCISEvent event)
throws com.connecterra.epcis.api.EPCISException
event - AbstractEPCISEvent whose event fields should be populated
using the event field properties
com.connecterra.epcis.api.EPCISException - if an error occurs trying to set the event fieldspublic URI getReadPoint()
public void setReadPoint(URI readPointURI)
readPointURI - the read point URI that must be used on generated events if the
template event does not contain onepublic URI getBusinessLocation()
public void setBusinessLocation(URI bizLocURI)
bizLocURI - the business location URI that must be used on generated events if the
template event does not contain onepublic URI getBusinessStep()
public void setBusinessStep(URI bizStepURI)
bizStepURI - the business step URI that must be used on generated events if the
template event does not contain onepublic URI getDisposition()
public void setDisposition(URI disposition)
disposition - the disposition URI that must be used on generated events if the
template event does not contain onepublic List getBusinessTransactionList()
public void setBusinessTransactionList(List bizTransactions)
bizTransactions - list of business transactions that must be used along with the
ones on template event on the generated event
public void addBusinessTransaction(URI bizTransType,
URI bizTransID)
bizTransType - the business transaction type URIbizTransID - the business transaction IDpublic void addBusinessTransaction(com.connecterra.epcis.api.BusinessTransaction bizTrans)
bizTrans - the business transaction to be added to the list to be used on the
generated eventpublic List getEventExtensionList()
public void setEventExtensionList(List extensions)
extensions - list of event extensions that must be used along with the
ones on template event on the generated event
public void addEventExtension(String namespace,
String name,
String value)
namespace - namespace of the extensionname - name of the extensionvalue - value for the extensionpublic com.connecterra.epcis.api.EPCISDocument getTemplate()
EPCISDocument with the template event.
Non-null fields on the template event will override
the event field properties set on this. For example, if the template event
contains a read point URI, that value will be used on the generated event. Business
transactions and EPCIS event extensions on the template event will be added to the
business transactions event extensions on this.
EPCISDocument with the template event. Returns null if there
is no template set on this.public void setTemplate(com.connecterra.epcis.api.EPCISDocument templateDoc)
templateDoc - EPCISDocument with the template eventprotected com.connecterra.epcis.api.EPCISBasicEvent getTemplateEvent()
EPCISDocument.
This method returns null if there is no template set on this.
This is provided as a convenience so that subclasses can get to the template event
easily.
EPCISDocument.
Returns null if there is no template set on this.protected String getTemplateAction()
protected static List convertToEPCList(List tags)
com.connecterra.ale.api.ECReportGroupListMember. This
uses convertToEPC to get the URI for each ECReportGroupListMember
in the list.
tags - list of com.connecterra.ale.api.ECReportGroupListMember
protected static URI convertToEPC(com.connecterra.ale.api.ECReportGroupListMember tagIn)
com.connecterra.ale.api.ECReportGroupListMember.
This is used by the event generation code to get the URI form to use in EPCIS events
for input tags. Below is the sequence in which this tries to get the URI form:
ECReportGroupListMember contains the pure identity URI (returned
by getEPC() method) that will be returned.
getTag() method),
it will be
converted to the pure identity URI form and returned. If the full tag URI cannot
be converted to the pure identity URI, the tag URI will be returned.
tagIn - the input com.connecterra.ale.api.ECReportGroupListMember
|
Documentation is available at ${DOCSWEBROOT} Copyright 2007 BEA Systems Inc. |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||