org.openeai.moa
Interface ActionableEnterpriseObject

All Superinterfaces:
EnterpriseObject, XmlEnterpriseObject
All Known Implementing Classes:
ActionableEnterpriseObjectBase

public interface ActionableEnterpriseObject
extends XmlEnterpriseObject


Method Summary
 XmlEnterpriseObject create(RequestService producer)
          Create message production.
 void createSync(SyncService producer)
          Create Sync message production.
 XmlEnterpriseObject delete(java.lang.String deleteAction, RequestService producer)
          Delete message production.
 void deleteSync(java.lang.String deleteAction, SyncService producer)
          Delete Sync message production.
 java.util.List generate(XmlEnterpriseObject keyObject, RequestService producer)
          Generate message production.
 Authentication getAuthentication()
          Returns the Authentication object associated with this object.
 java.lang.String getCommandName()
          Returns the Command name associated with this object.
 java.util.List getLastErrors()
          Returns a List containing the last errors encountered by this object during a Request action (create, query, generate, update, delete).
 MessageId getMessageId()
          Returns the MessageId object associated with this object.
 XmlEnterpriseObject getXmlEnterpriseObject()
          Helper method that returns this object as an XmlEnterpriseObject.
 java.util.List query(XmlEnterpriseObject keyObject, RequestService producer)
          Query message production.
 void setAuthentication(Authentication auth)
          Sets the Authentication object associated with this object.
 void setCommandName(java.lang.String name)
          Sets the Command name associated with this object.
 void setMessageId(MessageId msgId)
          Sets the MessageId object associated with this object.
 XmlEnterpriseObject update(RequestService producer)
          Update message production.
 void updateSync(SyncService producer)
          Update Sync message production.
 
Methods inherited from interface org.openeai.moa.XmlEnterpriseObject
addInputLayoutManager, addOutputLayoutManager, buildObjectFromInput, buildObjectFromXmlString, buildOutputFromObject, buildOutputFromObject, clone, equals, getBaseline, getCombinedKeyValue, getCreateDoc, getCreateSyncDoc, getDeleteDoc, getDeleteSyncDoc, getEnterpriseFields, getGenerateDoc, getGenerateSyncDoc, getInputLayoutManager, getInputLayoutManager, getInputLayoutManagers, getOutputLayoutManager, getOutputLayoutManager, getOutputLayoutManagers, getProvideDoc, getQueryDoc, getResponseDoc, getTestId, getUpdateDoc, getUpdateSyncDoc, getValidation, getValueFromObject, getValueFromObject, initializeChild, isDate, isEmpty, setBaseline, setCreateDoc, setCreateSyncDoc, setDeleteDoc, setDeleteSyncDoc, setEnterpriseFields, setGenerateDoc, setGenerateSyncDoc, setInputLayoutManager, setInputLayoutManagers, setOutputLayoutManager, setOutputLayoutManagers, setProvideDoc, setQueryDoc, setResponseDoc, setTestId, setUpdateDoc, setUpdateSyncDoc, toString, toXmlString
 

Method Detail

query

java.util.List query(XmlEnterpriseObject keyObject,
                     RequestService producer)
                     throws EnterpriseObjectQueryException
Query message production. Builds an XML document (using the primed query document as a "template") out of the current contents of the keyObject passed in. While building the XML Query message, it will validate contents of the keyObject checking for any malformed, missing or invalid fields. Field data values are also checked for validitity against the EnterpriseObjects document. Uses the producer passed in to send the XML document as a JMS request to the queue connected to by the producer which then processes the response checking for any errors in the response.

Parameters:
keyObject - XmlEnterpriseObject to use as retreival arguments in the Query. The contents of this object are inserted into the Query document prior to sending the query request. Under normal conditions, this object is actually a LightweightPerson object since that's the most common query object used.

NOTE: This method should be over-ridden by lower level classes if the keyObject isn't a LightweightPerson.

producer - PointToPointProducer a pre-configured and started PointToPointProducer which will be used to send the update-request message to the appropriate destination and return the reply to this method (via the PointToPointProducer.produceRequest method).

Returns:
java.util.List this is a list of XmlEnterpriseObject objects (like BasicPerson, BasicEmployee etc.) provided by the authoritative source (the application consuming the query request).

Throws:
EnterpriseObjectQueryException - if any errors occur when validating the contents of the object, if any errors occur while producing the request or if the object doesn't support the create action. This exception will also be thrown if the contents of the reply document contains an error. That is, if the consuming application had errors processing the request. This exception will include the Result information containing the error that occurred.

create

XmlEnterpriseObject create(RequestService producer)
                           throws EnterpriseObjectCreateException
Create message production. Builds an XML document (using the primed create document as a "template") out of the current contents of the object. While building the XML Create document, it will validate contents of the object checking for any malformed, missing or invalid fields. Field data values are also checked for validitity against the EnterpriseObjects document. Uses the producer passed in to send the XML document as a JMS request to the queue connected to by the producer which then processes the response checking for any errors in the response.

Parameters:
producer - PointToPointProducer a pre-configured and started PointToPointProducer which will be used to send the create-request message to the appropriate destination and return the reply to this method (via the PointToPointProducer.produceRequest method).

Returns:
XmlEnterpriseObject a generic response which will indicate success or failure. If failure, any error information will be included in that result. The object returned is actually a org.openeai.moa.objects.Result object.

Throws:
EnterpriseObjectCreateException - if any errors occur when validating the contents of the object, if any errors occur while producing the request or if the object doesn't support the create action. This exception will also be thrown if the contents of the reply document contains an error. That is, if the consuming application had errors processing the request. This exception will include the Result information containing the error that occurred.

createSync

void createSync(SyncService producer)
                throws EnterpriseObjectSyncException
Create Sync message production. Builds an XML document (using the primed create sync document as a baseline) out of the current contents of the object. While building the XML Create Sync document, it will validate contents of the object checking for any malformed, missing or invalid fields. Field data values are also checked for validitity against the EnterpriseObjects document. Publishes the XML document in a JMS message to the topic connected to by producer.

Parameters:
producer - org.openeai.jms.producer.PubSubProducer to use to publish the message.
Throws:
EnterpriseObjectSyncException - if any errors occur when validating the contents of the object. Or, if any errors occur while publishing the message.

delete

XmlEnterpriseObject delete(java.lang.String deleteAction,
                           RequestService producer)
                           throws EnterpriseObjectDeleteException
Delete message production. Builds an XML document (using the primed delete document as a "template") out of the current contents of the object. While building the XML Delete document, it will validate contents of the object checking for any malformed, missing or invalid fields. Field data values are also checked for validitity against the EnterpriseObjects document. Uses the producer passed in to send the XML document as a JMS request to the queue connected to by the producer which then processes the response checking for any errors in the response.

Parameters:
deleteAction - String the delete action ('delete' or 'purge')

producer - PointToPointProducer a pre-configured and started PointToPointProducer which will be used to send the delete-request message to the appropriate destination and return the reply to this method (via the PointToPointProducer.produceRequest method).

Returns:
XmlEnterpriseObject a generic response which will indicate success or failure. If failure, any error information will be included in that result. The object returned is actually a org.openeai.moa.objects.Result object.

Throws:
EnterpriseObjectDeleteException - if any errors occur when validating the contents of the object, if any errors occur while producing the request or if the object doesn't support the create action. This exception will also be thrown if the contents of the reply document contains an error. That is, if the consuming application had errors processing the request. This exception will include the Result information containing the error that occurred.

deleteSync

void deleteSync(java.lang.String deleteAction,
                SyncService producer)
                throws EnterpriseObjectSyncException
Delete Sync message production. Builds an XML document (using the primed delete sync document as a baseline) out of the current contents of the object. While building the XML Delete Sync document, it will validate contents of the object checking for any malformed, missing or invalid fields. Field data values are also checked for validitity against the EnterpriseObjects document. Publishes the XML document in a JMS message to the topic connected to by producer.

Parameters:
deleteAction - String delete action ('purge' or 'delete')

producer - PubSubProducer a pre-configured and started PubSubProducer which will be used to send the delete-sync message to the appropriate destination (via the PubSubProducer.publishMessage method).

Throws:
EnterpriseObjectSyncException - if any errors occur when validating the contents of the object. Or, if any errors occur while publishing the message.

generate

java.util.List generate(XmlEnterpriseObject keyObject,
                        RequestService producer)
                        throws EnterpriseObjectGenerateException
Generate message production. Builds an XML document (using the primed generate document as a "template") out of the current contents of the object. While building the XML Generate document, it will validate contents of the object checking for any malformed, missing or invalid fields. Field data values are also checked for validitity against the EnterpriseObjects document. Uses the producer passed in to send the XML document as a JMS request to the queue connected to by the producer which then processes the response checking for any errors in the response.

Parameters:
producer - PointToPointProducer a pre-configured and started PointToPointProducer which will be used to send the update-request message to the appropriate destination and return the reply to this method (via the PointToPointProducer.produceRequest method).

keyObject - XmlEnterpriseObject to use as generation "seed" data (like an UnknownPerson for an InstitutionalIdentity-Generate-Request).

Returns:
java.util.List this is a list of XmlEnterpriseObject objects generated by the authoritative source (the application consuming the request to generate). Typically, this will be only one object (like an InstitutionalIdentity).

Throws:
EnterpriseObjectGenerateException - if any errors occur when validating the contents of the object, if any errors occur while producing the request or if the object doesn't support the create action. This exception will also be thrown if the contents of the reply document contains an error. That is, if the consuming application had errors processing the request. This exception will include the Result information containing the error that occurred.

update

XmlEnterpriseObject update(RequestService producer)
                           throws EnterpriseObjectUpdateException
Update message production. Builds an XML document (using the primed update document as a "template") out of the current contents of the object (this). It will use the current contents of the object as the NewData portion of the message and it will use this object's "baseline" object as the Baseline portion of the message. The "baseline" object is set when this object was "queried" for previously. While building the XML Update message, it will validate contents checking for any malformed, missing or invalid fields. Field data values are also checked for validitity against the EnterpriseObjects document. Uses the producer passed in to send the XML document as a JMS request to the queue connected to by the producer which then processes the response checking for any errors in the response.

Parameters:
producer - PointToPointProducer a pre-configured and started PointToPointProducer which will be used to send the update-request message to the appropriate destination and return the reply to this method (via the PointToPointProducer.produceRequest method).

Returns:
XmlEnterpriseObject (Result) this will indicate the success or failure of the Update request. In an error condition, this will include any error information.

Throws:
EnterpriseObjectUpdateException - if any errors occur when validating the contents of the object, if any errors occur while producing the request or if the object doesn't support the create action. This exception will also be thrown if the contents of the reply document contains an error. That is, if the consuming application had errors processing the request. This exception will include the Result information containing the error that occurred.

updateSync

void updateSync(SyncService producer)
                throws EnterpriseObjectSyncException
Update Sync message production. Builds an XML document (using the primed update sync document as a "template") out of the current contents of the object. It will use the current contents of the object as the NewData portion of the message and it will use the m_baseline object as the Baseline portion of the message. The m_baseline object is set when this object was "queried" for previously. While building the XML Update Sync document, it will validate contents of the object checking for any malformed, missing or invalid fields. Field data values are also checked for validitity against the EnterpriseObjects document. Publishes the XML document in a JMS message to the topic connected to by producer.

Parameters:
producer - PubSubProducer a pre-configured and started PubSubProducer which will be used to send the delete-sync message to the appropriate destination (via the PubSubProducer.publishMessage method).

Throws:
EnterpriseObjectSyncException - if any errors occur when validating the contents of the object. Or, if any errors occur while publishing the message.

getCommandName

java.lang.String getCommandName()
Returns the Command name associated with this object. This is a core part of all messages (a property on the JMS message) and no message can be produced if either this hasn't been set. However, this gets set when the Message Object is initialized via the init method and the MessageObjectConfig object. The Command Name is set based on contents of the MessagingEnterprise XML document which is used to initialize all message objects. No client application should ever need to call this method directly. This is information that will be used by a consumer of the message to determine which "command" to execute when it receives the message. For more information on Commands and the University JMS Consumer framework refer to the JavaDoc for the org.openeai.jms.consumer package.

Returns:
String message name associated with this object.

setCommandName

void setCommandName(java.lang.String name)
Sets the Command name associated with this object. This is a core part of all messages (a property on the JMS message) and no message can be produced if this hasn't been set. However, this gets set when the Message Object is initialized via the init method and the MessageObjectConfig object. The Command Name is set based on contents of the application Deployment configuration document which is used to initialize all message objects. No client application should ever need to call this method directly. This is information that will be used by a consumer of the message to determine which "command" to execute when it receives the message. For more information on Commands and the University JMS Consumer framework refer to the JavaDoc for the org.openeai.jms.consumer package.

Parameters:
name - String the name of the command as specified in the configuration document.

getAuthentication

Authentication getAuthentication()
Returns the Authentication object associated with this object. This is a core part of all messages (in the ControlArea) and no message can be produced if this hasn't been set. However, this gets set when the Message Object is initialized via the init method and the MessageObjectConfig object. The information contained in the Authentication object is set based on contents of the MessagingEnterprise XML document which is used to initialize all message objects. No client application should ever need to call this method directly.

Returns:
Authentication the authentication object associated with this object.

setAuthentication

void setAuthentication(Authentication auth)
Sets the Authentication object associated with this object. This is a core part of all messages (in the ControlArea) and no message can be produced if this hasn't been set. However, this gets set when the Message Object is initialized via the init method and the MessageObjectConfig object. The information contained in the Authentication object is set based on contents of the MessagingEnterprise XML document which is used to initialize all message objects. No client application should ever need to call this method directly.

Parameters:
auth - Authentication

getMessageId

MessageId getMessageId()
Returns the MessageId object associated with this object. This is a core part of all messages (in the ControlArea) and no message can be produced if this hasn't been set. However, this gets set when the Message Object is initialized via the init method and the MessageObjectConfig object. The information contained in the MessageId object is set based on contents of the MessagingEnterprise XML document which is used to initialize all message objects. No client application should ever need to call this method directly.

Returns:
MessageId the MessageId object associated with this object.

setMessageId

void setMessageId(MessageId msgId)
Sets the MessageId object associated with this object. This is a core part of all messages (in the ControlArea) and no message can be produced if this hasn't been set. However, this gets set when the Message Object is initialized via the init method and the MessageObjectConfig object. The information contained in the MessageId object is set based on contents of the MessagingEnterprise XML document which is used to initialize all message objects. No client application should ever need to call this method directly.

Parameters:
msgId - MessageId

getXmlEnterpriseObject

XmlEnterpriseObject getXmlEnterpriseObject()
Helper method that returns this object as an XmlEnterpriseObject.

Returns:
org.openeai.moa.XmlEnterpriseObject. This object cast to an XmlEnterpriseObject.

getLastErrors

java.util.List getLastErrors()
Returns a List containing the last errors encountered by this object during a Request action (create, query, generate, update, delete). When an error occurs during one of those actions, an exception is thrown. Therefore, the calling application doesn't have access to the errror objects in the result. This convenience method gives them access to those Error objects so they may use them accordingly in their application instead of having to parse the exception message etc.

Returns:
java.util.List the list of errors that were saved the last time this object had an error performing a request action.


Copyright © 2002,2003 OpenEAI Software Foundation