org.openeai.moa.jmsobjects
Class JmsEnterpriseObjectBase

java.lang.Object
  extended by org.openeai.OpenEaiObject
      extended by org.openeai.moa.EnterpriseObjectBase
          extended by org.openeai.moa.XmlEnterpriseObjectImpl
              extended by org.openeai.moa.jmsobjects.JmsEnterpriseObjectBase
All Implemented Interfaces:
java.lang.Cloneable, EnterpriseObject, JmsEnterpriseObject, XmlEnterpriseObject, PubliclyCloneable

Deprecated. As of OpenEAI version 4.0, replaced by #org.openeai.moa.ActionableEnterpriseObjectBase

public abstract class JmsEnterpriseObjectBase
extends XmlEnterpriseObjectImpl
implements JmsEnterpriseObject

This is the ancestor of all "message aware" enterprise objects. This is where the functionality for querying, creating, updating and deleting is. This is a specific layer used for producing requests and consuming the replies via JMS. It is also the layer which produces sync messages. Clients use this layer when they call the "message actions" on a given message aware Enterprise Object.

For example, when a client makes a call to BasicPerson.update(), this is the layer performing that function. In some cases, some of the methods used to generate the XML associated with a given message will be re-implemented by a lower class (like InstitutionalId.generate()) This will only be necessary when that lower class doesn't use the same information in its message (the DataArea portion is different).

Version:
3.0 - 28 January 2003
Author:
Tod Jackson (tod@openeai.org), Steve Wheat (steve@openeai.org)

Field Summary
 
Fields inherited from class org.openeai.moa.XmlEnterpriseObjectImpl
ENTERPRISE_FIELDS, XML_LAYOUT_MANAGER
 
Fields inherited from class org.openeai.OpenEaiObject
logger
 
Constructor Summary
JmsEnterpriseObjectBase()
          Deprecated. Constructor.
 
Method Summary
protected  void buildCreateMessage(org.jdom.Document createDoc)
          Deprecated. Using the current contents of the object along with the 'primed' XML document this method builds the acutal Enterprise Message.
protected  void buildDeleteMessage(java.lang.String deleteAction, org.jdom.Document deleteDoc)
          Deprecated. Using the current contents of the object along with the 'primed' XML document this method builds the acutal Enterprise Message.
protected abstract  void buildGenerateMessage(org.jdom.Document generateDoc, XmlEnterpriseObject keyObject)
          Deprecated.  
protected  void buildQueryMessage(org.jdom.Document queryDoc, XmlEnterpriseObject keyObject)
          Deprecated. Using the current contents of the 'keyObject' passed in along with the 'primed' XML document this method builds the acutal Enterprise Message.
protected  void buildUpdateMessage(org.jdom.Document updateDoc)
          Deprecated. Using the current contents of the object along with the 'primed' XML document this method builds the acutal Enterprise Message.
 XmlEnterpriseObject create(PointToPointProducer producer)
          Deprecated. Create message production.
 void createSync(PubSubProducer producer)
          Deprecated. Create Sync message production.
 XmlEnterpriseObject delete(java.lang.String deleteAction, PointToPointProducer producer)
          Deprecated. Delete message production.
 void deleteSync(java.lang.String deleteAction, PubSubProducer producer)
          Deprecated. Delete Sync message production.
 java.util.List generate(XmlEnterpriseObject keyObject, PointToPointProducer producer)
          Deprecated. Generate message production.
 void generateSync(PubSubProducer producer, XmlEnterpriseObject keyObject)
          Deprecated. Generate Sync message production.
 Authentication getAuthentication()
          Deprecated. Returns the Authentication object associated with this object.
 java.lang.String getCommandName()
          Deprecated. Returns the Command name associated with this object.
protected  java.lang.String getElementName()
          Deprecated. Abstract method that must be implemented by decendants so this object will know what element it's dealing with when building Xml documents.
 java.util.List getLastErrors()
          Deprecated. Returns a List containing the last errors encountered by this object during a Request action (create, query, generate, update, delete).
 MessageId getMessageId()
          Deprecated. Returns the MessageId object associated with this object.
 XmlEnterpriseObject getXmlEnterpriseObject()
          Deprecated. Helper method that returns this object as an XmlEnterpriseObject.
 void init(MessageObjectConfig mConfig)
          Deprecated. Object initialization.
protected  XmlEnterpriseObject instantiate(java.lang.String className)
          Deprecated.  
 java.util.List query(XmlEnterpriseObject keyObject, PointToPointProducer producer)
          Deprecated. Query message production.
protected  void restoreLayoutManagers()
          Deprecated.  
protected  void saveLayoutManagers()
          Deprecated.  
 void setAuthentication(Authentication auth)
          Deprecated. Sets the Authentication object associated with this object.
 void setCommandName(java.lang.String name)
          Deprecated. Sets the Command name associated with this object.
protected  org.jdom.Element setControlArea(org.jdom.Element controlArea)
          Deprecated.  
 void setMessageId(MessageId msgId)
          Deprecated. Sets the MessageId object associated with this object.
 XmlEnterpriseObject update(PointToPointProducer producer)
          Deprecated. Update message production.
 void updateSync(PubSubProducer producer)
          Deprecated. Update Sync message production.
 
Methods inherited from class org.openeai.moa.XmlEnterpriseObjectImpl
addInputLayoutManager, addOutputLayoutManager, buildObjectFromInput, buildObjectFromXmlString, buildOutputFromObject, buildOutputFromObject, clone, deferInitialization, dumpData, equals, getApplicationValue, getBaseline, getCombinedKeyValue, getControlArea, getCreateDoc, getCreateDocUri, getCreateSyncDoc, getCreateSyncDocUri, getDeleteDoc, getDeleteDocUri, getDeleteSyncDoc, getDeleteSyncDocUri, getEnterpriseFields, getEnterpriseValue, getGenerateDoc, getGenerateDocUri, getGenerateSyncDoc, getGenerateSyncDocUri, getInputLayoutManager, getInputLayoutManager, getInputLayoutManagers, getLength, getOutputLayoutManager, getOutputLayoutManager, getOutputLayoutManagers, getProvideDoc, getProvideDocUri, getQueryDoc, getQueryDocUri, getResponseDoc, getResponseDocUri, getRootElementName, getTestId, getUpdateDoc, getUpdateDocUri, getUpdateSyncDoc, getUpdateSyncDocUri, getValidation, getValueFromObject, getValueFromObject, initializeChild, isDate, isEmpty, isRepeating, setBaseline, setCreateDoc, setCreateDocUri, setCreateSyncDoc, setCreateSyncDocUri, setDeleteDoc, setDeleteDocUri, setDeleteSyncDoc, setDeleteSyncDocUri, setEnterpriseFields, setGenerateDoc, setGenerateDocUri, setGenerateSyncDoc, setGenerateSyncDocUri, setInputLayoutManager, setInputLayoutManagers, setOutputLayoutManager, setOutputLayoutManagers, setProvideDoc, setProvideDocUri, setQueryDoc, setQueryDocUri, setResponseDoc, setResponseDocUri, setTestId, setUpdateDoc, setUpdateDocUri, setUpdateSyncDoc, setUpdateSyncDocUri, setValidation, setValue, toString, toXmlString
 
Methods inherited from class org.openeai.OpenEaiObject
getAppName, getDebug, getFromAddr, getMailHost, getMailService, getProperties, getToAddr, initializeLog4j, initializeLog4j, initializeLog4j, setAppName, setDebug, setFromAddr, setMailHost, setMailService, setProperties, setToAddr
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JmsEnterpriseObjectBase

public JmsEnterpriseObjectBase()
Deprecated. 
Constructor.

All "message-aware" objects inherit from this object. It provides most of the foundation methods that those objects need to be "message-aware".

Method Detail

getXmlEnterpriseObject

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

Specified by:
getXmlEnterpriseObject in interface JmsEnterpriseObject
Returns:
org.openeai.moa.XmlEnterpriseObject. This object cast to an XmlEnterpriseObject.

saveLayoutManagers

protected void saveLayoutManagers()
Deprecated. 
Overrides:
saveLayoutManagers in class XmlEnterpriseObjectImpl

restoreLayoutManagers

protected void restoreLayoutManagers()
Deprecated. 
Overrides:
restoreLayoutManagers in class XmlEnterpriseObjectImpl

setCommandName

public final void setCommandName(java.lang.String name)
Deprecated. 
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.

Specified by:
setCommandName in interface JmsEnterpriseObject
Parameters:
name - String the name of the command as specified in the configuration document.

getCommandName

public final java.lang.String getCommandName()
Deprecated. 
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.

Specified by:
getCommandName in interface JmsEnterpriseObject
Returns:
String message name associated with this object.

setMessageId

public final void setMessageId(MessageId msgId)
Deprecated. 
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.

Specified by:
setMessageId in interface JmsEnterpriseObject
Parameters:
msgId - MessageId

getMessageId

public final MessageId getMessageId()
Deprecated. 
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.

Specified by:
getMessageId in interface JmsEnterpriseObject
Returns:
MessageId the MessageId object associated with this object.

setAuthentication

public final void setAuthentication(Authentication auth)
Deprecated. 
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.

Specified by:
setAuthentication in interface JmsEnterpriseObject
Parameters:
auth - Authentication

getAuthentication

public final Authentication getAuthentication()
Deprecated. 
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.

Specified by:
getAuthentication in interface JmsEnterpriseObject
Returns:
Authentication the authentication object associated with this object.

getElementName

protected java.lang.String getElementName()
Deprecated. 
Abstract method that must be implemented by decendants so this object will know what element it's dealing with when building Xml documents.

Returns:
String the element name.

buildCreateMessage

protected void buildCreateMessage(org.jdom.Document createDoc)
                           throws org.jdom.JDOMException,
                                  EnterpriseObjectCreateException
Deprecated. 
Using the current contents of the object along with the 'primed' XML document this method builds the acutal Enterprise Message. (e.g. - Person/BasicPerson-Create-Request or Person/BasicPerson-Create-Sync). This Enterprise Message will then be sent via JMS to a queue/topic and consumed by a Gateway which will process the request/sync and return a reply if appropriate. Note, replies will only be returned when a request message is sent.

Parameters:
createDoc - Document the 'primed' xml document for this action. (e.g. - a sample BasicPerson-Create-Request.xml document).

Throws:
EnterpriseObjectCreateException - if errors serializing the object as an Xml Element.
org.jdom.JDOMException - if errors occur manipulating the document.

buildDeleteMessage

protected void buildDeleteMessage(java.lang.String deleteAction,
                                  org.jdom.Document deleteDoc)
                           throws org.jdom.JDOMException,
                                  EnterpriseObjectDeleteException
Deprecated. 
Using the current contents of the object along with the 'primed' XML document this method builds the acutal Enterprise Message. (e.g. - Person/BasicPerson-Delete-Request or Person/BasicPerson-Delete-Sync). This Enterprise Message will then be sent via JMS to a queue/topic and consumed by a Gateway which will process the request/sync and return a reply if appropriate. Note, replies will only be returned when a request message is sent.

Parameters:
deleteDoc - Document the 'primed' xml document for this action. (e.g. - a sample BasicPerson-Create-Request.xml document).

Throws:
EnterpriseObjectDeleteException - if errors serializing the object as an Xml Element.
org.jdom.JDOMException - if errors occur manipulating the document.

buildUpdateMessage

protected void buildUpdateMessage(org.jdom.Document updateDoc)
                           throws org.jdom.JDOMException,
                                  EnterpriseObjectUpdateException
Deprecated. 
Using the current contents of the object along with the 'primed' XML document this method builds the acutal Enterprise Message. (e.g. - Person/BasicPerson-Update-Request or Person/BasicPerson-Update-Sync). This Enterprise Message will then be sent via JMS to a queue/topic and consumed by a Gateway which will process the request/sync and return a reply if appropriate. Note, replies will only be returned when a request message is sent.

Parameters:
updateDoc - Document the 'primed' xml document for this action. (e.g. - a sample BasicPerson-Create-Request.xml document).

Throws:
EnterpriseObjectUpdateException - if errors serializing the object as an Xml Element.
org.jdom.JDOMException - if errors occur manipulating the document.

buildQueryMessage

protected void buildQueryMessage(org.jdom.Document queryDoc,
                                 XmlEnterpriseObject keyObject)
                          throws org.jdom.JDOMException,
                                 EnterpriseObjectQueryException
Deprecated. 
Using the current contents of the 'keyObject' passed in along with the 'primed' XML document this method builds the acutal Enterprise Message. (e.g. - Person/BasicPerson-Query-Request). This Enterprise Message will then be sent via JMS to a queue/topic and consumed by a Gateway which will process the query request and return an appropriate provide-reply.

This method may be overridden by ancestors of JmsEnterpriseObject if they require a different 'keyObject' in the Query. (e.g. - InstituitonalIdentity requires an UnknownPerson instead of a LightweightPerson).

Parameters:
keyObject - XmlEnterpriseObject the 'keyObject' to be used in the Query. (e.g. - LightweightPerson)
queryDoc - Document the 'primed' xml document for this action. (e.g. - a sample BasicPerson-Create-Request.xml document).

Throws:
EnterpriseObjectQueryException - if errors serializing the object as an Xml Element.
org.jdom.JDOMException - if errors occur manipulating the document.

buildGenerateMessage

protected abstract void buildGenerateMessage(org.jdom.Document generateDoc,
                                             XmlEnterpriseObject keyObject)
                                      throws org.jdom.JDOMException,
                                             EnterpriseObjectGenerateException
Deprecated. 
Throws:
org.jdom.JDOMException
EnterpriseObjectGenerateException

setControlArea

protected org.jdom.Element setControlArea(org.jdom.Element controlArea)
                                   throws EnterpriseObjectException
Deprecated. 
Throws:
EnterpriseObjectException

init

public void init(MessageObjectConfig mConfig)
          throws EnterpriseObjectException
Deprecated. 
Object initialization. This method initializes the current object with information contained in the EnterpriseConfigurationObject passed in. All JmsEnterpriseObjects inherit this functionality and the init method is called when the AppConfig object is being built for a particular application. This method will never be called directly from an application. The call is "behind the scenes". The values stored in the config object passed in are retreived from the Application Deployment and EnterpriseObjects documents. This includes configuration information for things like: Primed Documents, Xml Validation, Enterprise field rules (translation, formats, scrubbing etc.) and Layout management. See the documentation for the Application Deployment and EnterpriseObjects Xml documents for more information on these items. More information can also be found in the JavaDoc for the org.openeai.config package.

Overrides:
init in class XmlEnterpriseObjectImpl
Parameters:
mConfig - MessageObjectConfig object loaded with all configuration information relative to this object built from the configuration document.

Throws:
EnterpriseObjectException - if errors occur initializing the current MessageObject.
See Also:
MessageObjectConfig, EnterpriseFields

generateSync

public final void generateSync(PubSubProducer producer,
                               XmlEnterpriseObject keyObject)
                        throws EnterpriseObjectSyncException
Deprecated. 
Generate Sync message production. Builds an XML document (using the primed generate sync document as a "template") out of the current contents of the object. While building the XML generate 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.

Specified by:
generateSync in interface JmsEnterpriseObject
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).

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

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

createSync

public final void createSync(PubSubProducer producer)
                      throws EnterpriseObjectSyncException
Deprecated. 
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.

Specified by:
createSync in interface JmsEnterpriseObject
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.

deleteSync

public final void deleteSync(java.lang.String deleteAction,
                             PubSubProducer producer)
                      throws EnterpriseObjectSyncException
Deprecated. 
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.

Specified by:
deleteSync in interface JmsEnterpriseObject
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.

updateSync

public final void updateSync(PubSubProducer producer)
                      throws EnterpriseObjectSyncException
Deprecated. 
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.

Specified by:
updateSync in interface JmsEnterpriseObject
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.

create

public final XmlEnterpriseObject create(PointToPointProducer producer)
                                 throws EnterpriseObjectCreateException
Deprecated. 
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.

Specified by:
create in interface JmsEnterpriseObject
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.

delete

public final XmlEnterpriseObject delete(java.lang.String deleteAction,
                                        PointToPointProducer producer)
                                 throws EnterpriseObjectDeleteException
Deprecated. 
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.

Specified by:
delete in interface JmsEnterpriseObject
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.

update

public final XmlEnterpriseObject update(PointToPointProducer producer)
                                 throws EnterpriseObjectUpdateException
Deprecated. 
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.

Specified by:
update in interface JmsEnterpriseObject
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.

generate

public final java.util.List generate(XmlEnterpriseObject keyObject,
                                     PointToPointProducer producer)
                              throws EnterpriseObjectGenerateException
Deprecated. 
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.

Specified by:
generate in interface JmsEnterpriseObject
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.

query

public final java.util.List query(XmlEnterpriseObject keyObject,
                                  PointToPointProducer producer)
                           throws EnterpriseObjectQueryException
Deprecated. 
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.

Specified by:
query in interface JmsEnterpriseObject
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.

getLastErrors

public java.util.List getLastErrors()
Deprecated. 
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.

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

instantiate

protected XmlEnterpriseObject instantiate(java.lang.String className)
                                   throws java.lang.InstantiationException
Deprecated. 
Throws:
java.lang.InstantiationException


Copyright © 2002,2003 OpenEAI Software Foundation