org.openeai.moa
Class XmlEnterpriseObjectImpl

java.lang.Object
  extended by org.openeai.OpenEaiObject
      extended by org.openeai.moa.EnterpriseObjectBase
          extended by org.openeai.moa.XmlEnterpriseObjectImpl
All Implemented Interfaces:
java.lang.Cloneable, EnterpriseObject, XmlEnterpriseObject, PubliclyCloneable
Direct Known Subclasses:
ActionableEnterpriseObjectBase, Authentication, ControlAreaReply, ControlAreaRequest, ControlAreaSync, Date, Datetime, Error, ExpectedReplyFormat, Failure, JmsEnterpriseObjectBase, MaximumTime, MessageId, MessageSeries, MinimumTime, Predecessor, ProcessedMessageId, RequestTimings, Result, Sender, SourceInfo, Success, TargetInfo, TestCaseSummary, TestId, TestResult, TestSeriesSummary, TestStatus, TestStepSummary, TestSuiteSummary

public class XmlEnterpriseObjectImpl
extends EnterpriseObjectBase
implements XmlEnterpriseObject, PubliclyCloneable

This is the ancestor class of our "xml aware" objects inclued in the Message Object API (MOA). This includes both "message/jms aware" objects like BasicPerson and child objects that are "xml aware" but not "message/jms aware" like the Address object which is a child object of BasicPerson.

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

Field Summary
static EnterpriseFields ENTERPRISE_FIELDS
           
static EnterpriseLayoutManager XML_LAYOUT_MANAGER
           
 
Fields inherited from class org.openeai.OpenEaiObject
logger
 
Constructor Summary
XmlEnterpriseObjectImpl()
          Constructor
 
Method Summary
 void addInputLayoutManager(java.lang.String type, EnterpriseLayoutManager iLayout)
           
 void addOutputLayoutManager(java.lang.String type, EnterpriseLayoutManager oLayout)
           
 void buildObjectFromInput(java.lang.Object input)
          Using the currently assigned input layout manager, this method takes the input passed in and builds the object from that input.
 void buildObjectFromXmlString(java.lang.String theString)
          This method allows application developers to build an object from a XML String representation of an object that was previously converted to an XML String via the toXmlString() method.
 java.lang.Object buildOutputFromObject()
          Using the currently assigned output layout manager, this method uses the current contents of the object and builds an output object as implemented by the layout manager.
 java.lang.Object buildOutputFromObject(java.lang.String appName)
          Using the currently assigned output layout manager, this method uses the current contents of the object and builds an output object as implemented by the layout manager for the specified application name.
 java.lang.Object clone()
          Performs a recursive field for field copy of the current Object and returns the result.
 boolean deferInitialization()
           
 void dumpData()
           
 boolean equals(XmlEnterpriseObject xeo)
          A convenience method that can be used to compare two Xml aware objects (XmlEnterpriseObjectImpl).
protected  java.lang.String getApplicationValue(java.lang.String appName, java.lang.String fieldName, java.lang.String enterpriseValue)
          Uses the EnterpriseFields object associated to this object to convert the enterprise value passed in to the application specific value based on rules found in the EnterpriseObjects XML document associated to the object for the application name passed in.
 XmlEnterpriseObject getBaseline()
          Returns the baseline object associated to this object.
 java.lang.String getCombinedKeyValue()
          goes through all the key fields on the xeo passed in and creates a string containing all the values from those key fields.
protected  org.jdom.Element getControlArea(org.jdom.Element root)
          This method looks at the document and returns the appropriate ControlArea.
 org.jdom.Document getCreateDoc()
          Returns the "primed" Create Document associated with this object.
 java.lang.String getCreateDocUri()
          Returns the primed create XML document URI.
 org.jdom.Document getCreateSyncDoc()
          Returns the "primed" CreateSync Document associated with this object.
 java.lang.String getCreateSyncDocUri()
          Returns the primed Create-Sync XML document URI.
 org.jdom.Document getDeleteDoc()
          Returns the "primed" Delete Document associated with this object.
 java.lang.String getDeleteDocUri()
          Returns the primed Delete-Request XML document URI.
 org.jdom.Document getDeleteSyncDoc()
          Returns the "primed" DeleteSync Document associated with this object.
 java.lang.String getDeleteSyncDocUri()
          Returns the primed Delete-Sync XML document URI.
 EnterpriseFields getEnterpriseFields()
          Returns the EnterpriseFields object associated with this object.
protected  java.lang.String getEnterpriseValue(java.lang.String fieldName, java.lang.String appValue)
          Uses the EnterpriseFields object associated to this object to convert the application value passed in to the enterprise value.
 org.jdom.Document getGenerateDoc()
          Returns the "primed" generate Document associated with this object.
 java.lang.String getGenerateDocUri()
          Returns the primed Generate-Request XML document URI.
 org.jdom.Document getGenerateSyncDoc()
          Returns the "primed" GenerateSync Document associated with this object.
 java.lang.String getGenerateSyncDocUri()
          Returns the primed Generate-Sync XML document URI.
 EnterpriseLayoutManager getInputLayoutManager()
          Returns this object's currently assigned Input Layout manager.
 EnterpriseLayoutManager getInputLayoutManager(java.lang.String type)
          Returns an Input Layout manager for this object of a specified type.
 java.util.HashMap getInputLayoutManagers()
          Returns a HashMap containing all Input Layout managers associated to this object.
protected  int getLength(java.lang.String fieldName)
          Convenience method that tells the layout manager implementation how many instances of a given repeatable field exist on the parent object.
 EnterpriseLayoutManager getOutputLayoutManager()
          Returns this object's currently assigned Output Layout manager.
 EnterpriseLayoutManager getOutputLayoutManager(java.lang.String type)
          Returns an Output Layout manager for this object of a specified type.
 java.util.HashMap getOutputLayoutManagers()
          Returns a HashMap containing all Output Layout managers associated to this object.
 org.jdom.Document getProvideDoc()
          Returns the "primed" Provide Document associated with this object.
 java.lang.String getProvideDocUri()
          Returns the primed Provide-Reply XML document URI.
 org.jdom.Document getQueryDoc()
          Returns the "primed" Query Document associated with this object.
 java.lang.String getQueryDocUri()
          Returns the primed Query-Request XML document URI.
 org.jdom.Document getResponseDoc()
          Returns the "primed" Response Document associated with this object.
 java.lang.String getResponseDocUri()
          Returns the primed Response-Reply XML document URI.
protected  java.lang.String getRootElementName(org.jdom.Element e)
           
 TestId getTestId()
          Returns the test id associated to this object.
 org.jdom.Document getUpdateDoc()
          Returns the "primed" Update Document associated with this object.
 java.lang.String getUpdateDocUri()
          Returns the primed Update-Request XML document URI.
 org.jdom.Document getUpdateSyncDoc()
          Returns the "primed" UpdateSync Document associated with this object.
 java.lang.String getUpdateSyncDocUri()
          Returns the primed Update-Sync XML document URI.
 boolean getValidation()
          Returns a boolean flag indicating whether or not XML validation will be used when messages are produced/published by this object.
 java.lang.Object getValueFromObject(java.lang.String fieldName)
          Returns the current value from the field name passed in.
 java.lang.Object getValueFromObject(java.lang.String fieldName, java.lang.Object[] parms, java.lang.Class[] parmTypes)
          Returns the current value from the field name passed in.
 void init(MessageObjectConfig mConfig)
          Object initialization.
 void initializeChild(XmlEnterpriseObject childXeo)
          This method sets the EnterpriseFields and XML layout manager information on the child object passed in to be that of the current object.
 boolean isDate()
          Checks to see if this object is a "Date/Datetime" object.
 boolean isEmpty()
          Recursively checks the contents of the object and true if it contains any data.
 boolean isRepeating(java.lang.String fieldName)
          Convenience method that indicates if the field specified is a repeating field this object.
protected  void restoreLayoutManagers()
           
protected  void saveLayoutManagers()
           
 void setBaseline(XmlEnterpriseObject baseline)
          Sets the baseline object associated to this object.
 void setCreateDoc(org.jdom.Document doc)
          Sets the "primed" create document associated with this object.
 void setCreateDocUri(java.lang.String uri)
          Sets the primed create XML document URI.
 void setCreateSyncDoc(org.jdom.Document doc)
          Sets the "primed" create sync document associated with this object.
 void setCreateSyncDocUri(java.lang.String uri)
          Sets the primed Create-Sync XML document URI.
 void setDeleteDoc(org.jdom.Document doc)
          Sets the "primed" delete document associated with this object.
 void setDeleteDocUri(java.lang.String uri)
          Sets the primed Delete-Request XML document URI.
 void setDeleteSyncDoc(org.jdom.Document doc)
          Sets the "primed" delete sync document associated with this object.
 void setDeleteSyncDocUri(java.lang.String uri)
          Sets the primed Delete-Sync XML document URI.
 void setEnterpriseFields(EnterpriseFields fields)
          Sets the EnterpriseFields object associated with this object.
 void setGenerateDoc(org.jdom.Document doc)
          Sets the "primed" generate document associated with this object.
 void setGenerateDocUri(java.lang.String uri)
          Sets the primed Generate-Request XML document URI.
 void setGenerateSyncDoc(org.jdom.Document doc)
          Sets the "primed" generate sync document associated with this object.
 void setGenerateSyncDocUri(java.lang.String uri)
          Sets the primed Generate-Sync XML document URI.
 void setInputLayoutManager(EnterpriseLayoutManager elm)
           
 void setInputLayoutManagers(java.util.HashMap iManagers)
           
 void setOutputLayoutManager(EnterpriseLayoutManager elm)
           
 void setOutputLayoutManagers(java.util.HashMap oManagers)
           
 void setProvideDoc(org.jdom.Document doc)
          Sets the "primed" provide document associated with this object.
 void setProvideDocUri(java.lang.String uri)
          Sets the primed Provide-Reply XML document URI.
 void setQueryDoc(org.jdom.Document doc)
          Sets the "primed" query document associated with this object.
 void setQueryDocUri(java.lang.String uri)
          Sets the primed Query-Request XML document URI.
 void setResponseDoc(org.jdom.Document doc)
          Sets the "primed" response document associated with this object.
 void setResponseDocUri(java.lang.String uri)
          Sets the primed Response-Reply XML document URI.
 void setTestId(TestId tId)
          Sets the test id associated to this object.
 void setUpdateDoc(org.jdom.Document doc)
          Sets the "primed" update document associated with this object.
 void setUpdateDocUri(java.lang.String uri)
          Sets the primed Update-Request XML document URI.
 void setUpdateSyncDoc(org.jdom.Document doc)
          Sets the "primed" update sync document associated with this object.
 void setUpdateSyncDocUri(java.lang.String uri)
          Sets the primed Update-Sync XML document URI.
 void setValidation(boolean validate)
          Sets a boolean flag indicating whether or not XML validation will be used when messages are produced/published by this object.
 void setValue(java.lang.String fieldName, java.lang.String value)
          Sets the current value the field name passed in to the value passed in.
 java.lang.String toString()
          Returns a comma separated String containing all the data currently stored in this object.
 java.lang.String toXmlString()
          A convenience method that can be used simply by application developers to retreive the contents of the object as an XML String.
 
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
 

Field Detail

ENTERPRISE_FIELDS

public static EnterpriseFields ENTERPRISE_FIELDS

XML_LAYOUT_MANAGER

public static EnterpriseLayoutManager XML_LAYOUT_MANAGER
Constructor Detail

XmlEnterpriseObjectImpl

public XmlEnterpriseObjectImpl()
Constructor

Method Detail

deferInitialization

public final boolean deferInitialization()

setBaseline

public final void setBaseline(XmlEnterpriseObject baseline)
Sets the baseline object associated to this object. The baseline object is populated by all objects when that object performs a Query action via the JmsEnterpriseObject.query method. Then, when updates are performed on the object and an Update-Request/Sync is made on behalf of the object (via the JmsEnterpriseObject.update/updateSync method, it uses the baseline object to populate the DataArea/BaselineData element in the update document. The baseline object remains untouched during the processing on the main object.

Specified by:
setBaseline in interface XmlEnterpriseObject
Parameters:
baseline - XmlEnterpriseObject the baseline object (e.g. - BasicPerson) that is an image of the object at the time the Query action was performed.

getBaseline

public final XmlEnterpriseObject getBaseline()
Returns the baseline object associated to this object. The baseline object is populated by all objects when that object performs a Query action via the JmsEnterpriseObject.query method. Then, when updates are performed on the object and an Update-Request/Sync is made on behalf of the object (via the JmsEnterpriseObject.update/updateSync method, it uses the baseline object to populate the DataArea/BaselineData element in the update document. The baseline object remains untouched during the processing on the main object.

Specified by:
getBaseline in interface XmlEnterpriseObject
Returns:
XmlEnterpriseObject the baseline object (e.g. - BasicPerson) that is an image of the object at the time of the Query.

setTestId

public void setTestId(TestId tId)
Sets the test id associated to this object. This is used during testing to correlate a message sent by a particular object to a message consumed by a gateway. This is related to the OpenEAI Test Suite foundation.

Specified by:
setTestId in interface XmlEnterpriseObject
Parameters:
tId - TestId the test id object associated to this object.

getTestId

public TestId getTestId()
Returns the test id associated to this object. This is used during testing to correlate a message sent by a particular object to a message consumed by a gateway. This is related to the OpenEAI Test Suite foundation.

Specified by:
getTestId in interface XmlEnterpriseObject
Returns:
TestId the test id object associated to this object.

init

public void init(MessageObjectConfig mConfig)
          throws EnterpriseObjectException
Object initialization. This method initializes the current object with information contained in the MessageObjectConfig passed in. All XmlEnterpriseObjectImpls 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.

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

initializeChild

public final void initializeChild(XmlEnterpriseObject childXeo)
This method sets the EnterpriseFields and XML layout manager information on the child object passed in to be that of the current object. This is a convenience method that can be used by Parent objects when returning a child object from a "getter" method. Since the child objects will not be initialized with this information at start up, this eliminates the need to application developers to do this programmatically since it can be done automatically in the getter methods.

Example: The BasicPerson object has a child object in it called Name. The name object is another XmlEnterpriseObjectImpl. When the getName() method is called on BasicPerson, this method is called to "give" the Name object being returned the EnterpriseFields and XmlLayout manager associated to the BasicPerson. Since the BasicPerson's EnterpriseObjects XML document will also have to include the Name object's definition, the Name object returned by the BasicPerson.getName() method will have what it needs to function properly and no action will be required by the developers.

Specified by:
initializeChild in interface XmlEnterpriseObject
Parameters:
childXeo - XmlEnterpriseObjectImpl the child object being initialized.

isEmpty

public boolean isEmpty()
                throws XmlEnterpriseObjectException
Recursively checks the contents of the object and true if it contains any data. Otherwise, it returns false. For example, if the BasicPerson/Name/FirstName variable has data in it, this method will return true. If no instance variables, or child objects have data in them, it returns false.

Specified by:
isEmpty in interface XmlEnterpriseObject
Returns:
boolean an indicator specifying whether or not the object is empty.

Throws:
XmlEnterpriseObjectException - if any errors occur when determining if the object empty.

isDate

public final boolean isDate()
Checks to see if this object is a "Date/Datetime" object. This is because Dates and Datetimes contain special constructors that indicate the type of Date/Datetime being built and several other foundation components need to determine if an object being dealt with is one of those Date/Datetime objects.

Specified by:
isDate in interface XmlEnterpriseObject
Returns:
boolean

clone

public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
Description copied from interface: XmlEnterpriseObject
Performs a recursive field for field copy of the current Object and returns the result. Any object found that supports the "clone" method is cloned. Since all simple fields within an XmlEnterpriseObjectImpl are ultimately Strings, the resulting object is in fact a new object because the copy is recursive.

Specified by:
clone in interface XmlEnterpriseObject
Specified by:
clone in interface PubliclyCloneable
Overrides:
clone in class java.lang.Object
Returns:
XmlEnterpriseObject a "deep" copy of the object.
Throws:
java.lang.CloneNotSupportedException

setEnterpriseFields

public final void setEnterpriseFields(EnterpriseFields fields)
Sets the EnterpriseFields object associated with this object. For information on the EnterpriseFields object, refer to the JavaDoc for the org.openeai.config package. This is called when the object is initialized. The EnterpriseFields object is built based on information found in the EnterpriseObjects document.

This information is specified in the MessageObjectConfig XML Element in the deployment documents and is passed to this object during initialization by the MessageObjectConfig Java object.

Specified by:
setEnterpriseFields in interface XmlEnterpriseObject
Parameters:
fields - EnterpriseFields the EnterpriseFields object that will be used by this object to validate/format data passed to setter methods on this object.
See Also:
EnterpriseFields

getEnterpriseFields

public final EnterpriseFields getEnterpriseFields()
Returns the EnterpriseFields object associated with this object. For information on the EnterpriseFields object, refer to the JavaDoc for the org.openeai.config package.

Specified by:
getEnterpriseFields in interface XmlEnterpriseObject
Returns:
EnterpriseFields the EnterpriseFields object that will be used by this object to validate/format data passed to setter methods on this object.
See Also:
EnterpriseFields

getEnterpriseValue

protected java.lang.String getEnterpriseValue(java.lang.String fieldName,
                                              java.lang.String appValue)
                                       throws EnterpriseFieldException
Uses the EnterpriseFields object associated to this object to convert the application value passed in to the enterprise value.

Parameters:
fieldName - String the name of the field for which the conversion is being performed
appValue - String the value being converted.
Returns:
String the enterprise value that corresponds to the rules for the field
Throws:
EnterpriseFieldException
See Also:
EnterpriseFields

getApplicationValue

protected java.lang.String getApplicationValue(java.lang.String appName,
                                               java.lang.String fieldName,
                                               java.lang.String enterpriseValue)
                                        throws EnterpriseFieldException
Uses the EnterpriseFields object associated to this object to convert the enterprise value passed in to the application specific value based on rules found in the EnterpriseObjects XML document associated to the object for the application name passed in.

Parameters:
appName - String the name of the applicatoin for which the conversion is being performed
fieldName - String the name of the field for which the conversion is being performed
enterpriseValue - String the value being converted.
Returns:
String the applicaiton specific value that corresponds to the rules for the field
Throws:
EnterpriseFieldException
See Also:
EnterpriseFields

getInputLayoutManagers

public final java.util.HashMap getInputLayoutManagers()
Returns a HashMap containing all Input Layout managers associated to this object. These are all the input layout managers that may be used by this object. Since objects may support several different layout managers that are used to build themselves, this is necessary.

Specified by:
getInputLayoutManagers in interface XmlEnterpriseObject
Returns:
HashMap the list of Input Layout managers that may be used by this object.

setInputLayoutManagers

public final void setInputLayoutManagers(java.util.HashMap iManagers)
Specified by:
setInputLayoutManagers in interface XmlEnterpriseObject

addInputLayoutManager

public final void addInputLayoutManager(java.lang.String type,
                                        EnterpriseLayoutManager iLayout)
Specified by:
addInputLayoutManager in interface XmlEnterpriseObject

setInputLayoutManager

public final void setInputLayoutManager(EnterpriseLayoutManager elm)
Specified by:
setInputLayoutManager in interface XmlEnterpriseObject

getInputLayoutManager

public final EnterpriseLayoutManager getInputLayoutManager()
Returns this object's currently assigned Input Layout manager. If no current input layout manager exists, it returns the XmlLayout manager that all objects must have.

Specified by:
getInputLayoutManager in interface XmlEnterpriseObject
Returns:
EnterpriseLayoutManager the currently assigned input layout manager. if no input layout manager has been assigned, it returns the XmlLayout manager.

getInputLayoutManager

public final EnterpriseLayoutManager getInputLayoutManager(java.lang.String type)
Returns an Input Layout manager for this object of a specified type. (e.g. - "xml", "extract"). If no layout manager of the specified type exists, it returns null.

Specified by:
getInputLayoutManager in interface XmlEnterpriseObject
Parameters:
type - String the type of input layout manager ("xml", "extract" etc.).

Returns:
EnterpriseLayoutManager the input layout manager that is the type specified as a parm.

getOutputLayoutManagers

public final java.util.HashMap getOutputLayoutManagers()
Returns a HashMap containing all Output Layout managers associated to this object. These are all the output layout managers that may be used by this object. Since objects may support several different layout managers that are used to serialize themselves, this is necessary.

Specified by:
getOutputLayoutManagers in interface XmlEnterpriseObject
Returns:
HashMap the list of Output Layout managers that may be used by this object.

setOutputLayoutManagers

public final void setOutputLayoutManagers(java.util.HashMap oManagers)
Specified by:
setOutputLayoutManagers in interface XmlEnterpriseObject

addOutputLayoutManager

public final void addOutputLayoutManager(java.lang.String type,
                                         EnterpriseLayoutManager oLayout)
Specified by:
addOutputLayoutManager in interface XmlEnterpriseObject

setOutputLayoutManager

public final void setOutputLayoutManager(EnterpriseLayoutManager elm)
Specified by:
setOutputLayoutManager in interface XmlEnterpriseObject

getOutputLayoutManager

public final EnterpriseLayoutManager getOutputLayoutManager()
Returns this object's currently assigned Output Layout manager. If no current output layout manager exists, it returns the XmlLayout manager that all objects must have.

Specified by:
getOutputLayoutManager in interface XmlEnterpriseObject
Returns:
EnterpriseLayoutManager the currently assigned output layout manager. if no output layout manager has been assigned, it returns the XmlLayout manager.

getOutputLayoutManager

public final EnterpriseLayoutManager getOutputLayoutManager(java.lang.String type)
Returns an Output Layout manager for this object of a specified type. (e.g. - "xml", "extract"). If no layout manager of the specified type exists, it returns null.

Specified by:
getOutputLayoutManager in interface XmlEnterpriseObject
Parameters:
type - String the type of output layout manager ("xml", "extract" etc.).

Returns:
EnterpriseLayoutManager the output layout manager that is the type specified as a parm.

buildObjectFromInput

public final void buildObjectFromInput(java.lang.Object input)
                                throws EnterpriseLayoutException
Using the currently assigned input layout manager, this method takes the input passed in and builds the object from that input. For example, if the data passed in is a BasicPerson XML Element, and the current inputLayoutManager is the XmlLayout manager, it will ask the layout manager to build the BasicPerson object from that element. The layout manager will then take the data in the element and put it into the appropriate instance variables (via object getter/setter methods). While it's doing that, the input data will be validated based on business rules found in the EnterpriseFields object (built from EnterpriseObjects.xml)

Additionally, if the data passed in is "application specific" data (like codes) this data will be converted to Enterprise Values based on Translation information also obtained from the EnterpriseObjects.xml document.

This method (along with buildOutputFromObject and the Layout Manager infrastructure) allows us to generalize the building our message objects so we don't have to put all of that logic in the objects themselves. We just implement new Layout Managers and associate those layouts to the objects. All objects have an Xml Layout Manager associated to them that is derived from the EnterpriseObjects.xml document.

Specified by:
buildObjectFromInput in interface XmlEnterpriseObject
Parameters:
input - Object the data that will be used to build the object. e.g. - Element, String etc.

Throws:
EnterpriseLayoutException. - If an error occurs building the object from the data passed in.
EnterpriseLayoutException

buildOutputFromObject

public final java.lang.Object buildOutputFromObject()
                                             throws EnterpriseLayoutException
Using the currently assigned output layout manager, this method uses the current contents of the object and builds an output object as implemented by the layout manager. For example, if the object is a BasicPerson, and the current outputLayoutManager is the XmlLayout manager, it will ask the layout manager to build the BasicPerson XML Element from BasicPerson object. The layout manager will then retrieve the data from the BasicPerson object via object getter methods and build an Element from the data. While it's doing that, the object will be validated based on business rules found in the EnterpriseFields object (built from EnterpriseObjects.xml)

This method (along with buildInputFromObject and the Layout Manager infrastructure) allows us to generalize the serialization our message objects so we don't have to put all of that logic in the objects themselves. We just implement new Layout Managers and associate those layouts to the objects. All objects have an Xml Layout Manager associated to them that is derived from the EnterpriseObjects.xml document.

Specified by:
buildOutputFromObject in interface XmlEnterpriseObject
Returns:
Object the data that will be built from the object. The calling applicatons will cast this object to the appropriate thing. e.g. - Element, String etc.

Throws:
EnterpriseLayoutException. - If an error occurs building the output from the object.
EnterpriseLayoutException

buildOutputFromObject

public final java.lang.Object buildOutputFromObject(java.lang.String appName)
                                             throws EnterpriseLayoutException
Using the currently assigned output layout manager, this method uses the current contents of the object and builds an output object as implemented by the layout manager for the specified application name. For example, if the object is a BasicPerson, and the current outputLayoutManager is the ExtractLayout manager, it will ask the layout manager to build an extract line with application specific values using the contents of the BasicPerson object. This allows us to "reverse translate" our enterprise values to application specific values (like codes etc.) The information related to these translations can be found in the EnterpriseObjects.xml document.

This method (along with buildInputFromObject and the Layout Manager infrastructure) allows us to generalize the serialization our message objects so we don't have to put all of that logic in the objects themselves. We just implement new Layout Managers and associate those layouts to the objects. All objects have an Xml Layout Manager associated to them that is derived from the EnterpriseObjects.xml document.

Specified by:
buildOutputFromObject in interface XmlEnterpriseObject
Returns:
Object the data that will be built from the object. The calling applicatons will cast this object to the appropriate thing. e.g. - Element, String etc.

Throws:
EnterpriseLayoutException. - If an error occurs building the output from the object.
EnterpriseLayoutException

buildObjectFromXmlString

public final void buildObjectFromXmlString(java.lang.String theString)
                                    throws XmlEnterpriseObjectException
This method allows application developers to build an object from a XML String representation of an object that was previously converted to an XML String via the toXmlString() method. This method basically uses the "xml" inputLayoutManager to build the object from an Element that gets created out of the String passed in. This is so developers don't have to convert the String to an element themselves (as a convenience). They just have to pass the String and this method takes care of converting it to an Element and asking the layout manager to build the object from that element.

Specified by:
buildObjectFromXmlString in interface XmlEnterpriseObject
Parameters:
theString - String the XML String that will be used to build the object.

Throws:
XmlEnterpriseObjectException. - If an error occurs building the object from the data passed in.
XmlEnterpriseObjectException

getCreateDoc

public final org.jdom.Document getCreateDoc()
Description copied from interface: XmlEnterpriseObject
Returns the "primed" Create Document associated with this object. This document is used as a baseline for create message production. This is valuable because we can populate the primed document with information that will not change and the message production logic doesn't have to worry about filling that information in prior to sending the message. Clients should never need to call this method directly unless they just want to know if the object has a primed create document associated to it.

If the document is not initialized because of deferred initialization, the document will be initialized in this method and then it will be returned. This way, document initialization will only ever have to happen once and it can be configured to do it when an application starts or when the document is first requested.

Specified by:
getCreateDoc in interface XmlEnterpriseObject
Returns:
Document the primed create document. Returns null if the document is null.

getCreateDocUri

public final java.lang.String getCreateDocUri()
Returns the primed create XML document URI. This URI corresponds to the PrimedXmlDocument elements listed in the MessageObjectConfig portion of the deployment descriptor. The method is called when the object is initialized by AppConfig to create the Create-Request primed document using the URI specified in the deployment descriptor.

Returns:
String the Create-Request primed document URI as listed in the MessageObjectConfig Element associate to this object.

setCreateDocUri

public final void setCreateDocUri(java.lang.String uri)
Sets the primed create XML document URI. This URI corresponds to the PrimedXmlDocument elements listed in the MessageObjectConfig portion of the deployment descriptor. The method is called when the object is initialized by AppConfig to create the Create-Request primed document using the URI specified in the deployment descriptor.

Parameters:
uri - String the Create-Request primed document URI as listed in the MessageObjectConfig Element associate to this object.

getProvideDoc

public org.jdom.Document getProvideDoc()
Description copied from interface: XmlEnterpriseObject
Returns the "primed" Provide Document associated with this object. This document can be used by gateways who consume Query-Requests for this object as a baseline for Provide-Reply messages. This way, the gateway doesn't have to support any complex mapping in the gateway itself. Although some gateways may still choose to do it that way.

If the document is not initialized because of deferred initialization, the document will be initialized in this method and then it will be returned. This way, document initialization will only ever have to happen once and it can be configured to do it when an application starts or when the document is first requested.

Specified by:
getProvideDoc in interface XmlEnterpriseObject
Returns:
Document the primed provide document.

getProvideDocUri

public final java.lang.String getProvideDocUri()
Returns the primed Provide-Reply XML document URI. This URI corresponds to the PrimedXmlDocument elements listed in the MessageObjectConfig portion of the deployment descriptor. The method is called when the object is initialized by AppConfig to create the Provide-Reply primed document using the URI specified in the deployment descriptor.

Returns:
String the Provide-Reply primed document URI as listed in the MessageObjectConfig Element associate to this object.

setProvideDocUri

public final void setProvideDocUri(java.lang.String uri)
Sets the primed Provide-Reply XML document URI. This URI corresponds to the PrimedXmlDocument elements listed in the MessageObjectConfig portion of the deployment descriptor. The method is called when the object is initialized by AppConfig to create the Provide-Reply primed document using the URI specified in the deployment descriptor.

Parameters:
uri - String the Provide-Reply primed document URI as listed in the MessageObjectConfig Element associate to this object.

getResponseDoc

public org.jdom.Document getResponseDoc()
Description copied from interface: XmlEnterpriseObject
Returns the "primed" Response Document associated with this object. This document can be used by gateways who consume Create, Delete and Update Requests for this object as a baseline for Response-Reply messages. This way, the gateway doesn't have to support any complex mapping in the gateway itself. Although some gateways may still choose to do it that way.

If the document is not initialized because of deferred initialization, the document will be initialized in this method and then it will be returned. This way, document initialization will only ever have to happen once and it can be configured to do it when an application starts or when the document is first requested.

Specified by:
getResponseDoc in interface XmlEnterpriseObject
Returns:
Document the primed provide document.

getResponseDocUri

public final java.lang.String getResponseDocUri()
Returns the primed Response-Reply XML document URI. This URI corresponds to the PrimedXmlDocument elements listed in the MessageObjectConfig portion of the deployment descriptor. The method is called when the object is initialized by AppConfig to create the Response-Reply primed document using the URI specified in the deployment descriptor.

Returns:
String the Response-Reply primed document URI as listed in the MessageObjectConfig Element associate to this object.

setResponseDocUri

public final void setResponseDocUri(java.lang.String uri)
Sets the primed Response-Reply XML document URI. This URI corresponds to the PrimedXmlDocument elements listed in the MessageObjectConfig portion of the deployment descriptor. The method is called when the object is initialized by AppConfig to create the Response-Reply primed document using the URI specified in the deployment descriptor.

Parameters:
uri - String the Response-Reply primed document URI as listed in the MessageObjectConfig Element associate to this object.

getDeleteDoc

public final org.jdom.Document getDeleteDoc()
Description copied from interface: XmlEnterpriseObject
Returns the "primed" Delete Document associated with this object. This document is used as a baseline for delete message production. This is valuable because we can populate the primed document with information that will not change and the message production logic doesn't have to worry about filling that information in prior to sending the message. Clients should never need to call this method directly unless they just want to know if the object has a primed delete document associated to it.

If the document is not initialized because of deferred initialization, the document will be initialized in this method and then it will be returned. This way, document initialization will only ever have to happen once and it can be configured to do it when an application starts or when the document is first requested.

Specified by:
getDeleteDoc in interface XmlEnterpriseObject
Returns:
Document the primed delete document. Returns null if the document is null.

getDeleteDocUri

public final java.lang.String getDeleteDocUri()
Returns the primed Delete-Request XML document URI. This URI corresponds to the PrimedXmlDocument elements listed in the MessageObjectConfig portion of the deployment descriptor. The method is called when the object is initialized by AppConfig to create the Delete-Request primed document using the URI specified in the deployment descriptor.

Returns:
String the Response-Reply primed document URI as listed in the MessageObjectConfig Element associate to this object.

setDeleteDocUri

public final void setDeleteDocUri(java.lang.String uri)
Sets the primed Delete-Request XML document URI. This URI corresponds to the PrimedXmlDocument elements listed in the MessageObjectConfig portion of the deployment descriptor. The method is called when the object is initialized by AppConfig to create the Delete-Request primed document using the URI specified in the deployment descriptor.

Parameters:
uri - String the Response-Reply primed document URI as listed in the MessageObjectConfig Element associate to this object.

getUpdateDoc

public final org.jdom.Document getUpdateDoc()
Description copied from interface: XmlEnterpriseObject
Returns the "primed" Update Document associated with this object. This document is used as a baseline for update message production. This is valuable because we can populate the primed document with information that will not change and the message production logic doesn't have to worry about filling that information in prior to sending the message. Clients should never need to call this method directly unless they just want to know if the object has a primed update document associated to it.

If the document is not initialized because of deferred initialization, the document will be initialized in this method and then it will be returned. This way, document initialization will only ever have to happen once and it can be configured to do it when an application starts or when the document is first requested.

Specified by:
getUpdateDoc in interface XmlEnterpriseObject
Returns:
Document the primed update document.

getUpdateDocUri

public final java.lang.String getUpdateDocUri()
Returns the primed Update-Request XML document URI. This URI corresponds to the PrimedXmlDocument elements listed in the MessageObjectConfig portion of the deployment descriptor. The method is called when the object is initialized by AppConfig to create the Update-Request primed document using the URI specified in the deployment descriptor.

Returns:
String the Response-Reply primed document URI as listed in the MessageObjectConfig Element associate to this object.

setUpdateDocUri

public final void setUpdateDocUri(java.lang.String uri)
Sets the primed Update-Request XML document URI. This URI corresponds to the PrimedXmlDocument elements listed in the MessageObjectConfig portion of the deployment descriptor. The method is called when the object is initialized by AppConfig to create the Update-Request primed document using the URI specified in the deployment descriptor.

Parameters:
uri - String the Response-Reply primed document URI as listed in the MessageObjectConfig Element associate to this object.

getGenerateDoc

public final org.jdom.Document getGenerateDoc()
Description copied from interface: XmlEnterpriseObject
Returns the "primed" generate Document associated with this object. This document is used as a baseline for generate message production. This is valuable because we can populate the primed document with information that will not change and the message production logic doesn't have to worry about filling that information in prior to sending the message. Clients should never need to call this method directly unless they just want to know if the object has a primed generate document associated to it.

If the document is not initialized because of deferred initialization, the document will be initialized in this method and then it will be returned. This way, document initialization will only ever have to happen once and it can be configured to do it when an application starts or when the document is first requested.

Specified by:
getGenerateDoc in interface XmlEnterpriseObject
Returns:
Document the primed generate document. Returns null if the document is null.

getGenerateDocUri

public final java.lang.String getGenerateDocUri()
Returns the primed Generate-Request XML document URI. This URI corresponds to the PrimedXmlDocument elements listed in the MessageObjectConfig portion of the deployment descriptor. The method is called when the object is initialized by AppConfig to create the Generate-Request primed document using the URI specified in the deployment descriptor.

Returns:
String the Generate-Reply primed document URI as listed in the MessageObjectConfig Element associate to this object.

setGenerateDocUri

public final void setGenerateDocUri(java.lang.String uri)
Sets the primed Generate-Request XML document URI. This URI corresponds to the PrimedXmlDocument elements listed in the MessageObjectConfig portion of the deployment descriptor. The method is called when the object is initialized by AppConfig to create the Generate-Request primed document using the URI specified in the deployment descriptor.

Parameters:
uri - String the Generate-Reply primed document URI as listed in the MessageObjectConfig Element associate to this object.

getCreateSyncDoc

public final org.jdom.Document getCreateSyncDoc()
Description copied from interface: XmlEnterpriseObject
Returns the "primed" CreateSync Document associated with this object. This document is used as a baseline for CreateSync message production. This is valuable because we can populate the primed document with information that will not change and the message production logic doesn't have to worry about filling that information in prior to sending the message. Clients should never need to call this method directly unless they just want to know if the object has a primed create sync document associated to it.

If the document is not initialized because of deferred initialization, the document will be initialized in this method and then it will be returned. This way, document initialization will only ever have to happen once and it can be configured to do it when an application starts or when the document is first requested.

Specified by:
getCreateSyncDoc in interface XmlEnterpriseObject
Returns:
Document the primed CreateSync document. Returns null if the document is null.

getCreateSyncDocUri

public final java.lang.String getCreateSyncDocUri()
Returns the primed Create-Sync XML document URI. This URI corresponds to the PrimedXmlDocument elements listed in the MessageObjectConfig portion of the deployment descriptor. The method is called when the object is initialized by AppConfig to create the Create-Sync primed document using the URI specified in the deployment descriptor.

Returns:
String the Create-Sync primed document URI as listed in the MessageObjectConfig Element associate to this object.

setCreateSyncDocUri

public final void setCreateSyncDocUri(java.lang.String uri)
Sets the primed Create-Sync XML document URI. This URI corresponds to the PrimedXmlDocument elements listed in the MessageObjectConfig portion of the deployment descriptor. The method is called when the object is initialized by AppConfig to create the Create-Sync primed document using the URI specified in the deployment descriptor.

Parameters:
uri - String the Create-Sync primed document URI as listed in the MessageObjectConfig Element associate to this object.

getDeleteSyncDoc

public final org.jdom.Document getDeleteSyncDoc()
Description copied from interface: XmlEnterpriseObject
Returns the "primed" DeleteSync Document associated with this object. This document is used as a baseline for DeleteSync message production. This is valuable because we can populate the primed document with information that will not change and the message production logic doesn't have to worry about filling that information in prior to sending the message. Clients should never need to call this method directly unless they just want to know if the object has a primed delete sync document associated to it.

If the document is not initialized because of deferred initialization, the document will be initialized in this method and then it will be returned. This way, document initialization will only ever have to happen once and it can be configured to do it when an application starts or when the document is first requested.

Specified by:
getDeleteSyncDoc in interface XmlEnterpriseObject
Returns:
Document the primed DeleteSync document. Returns null if the document is null.

getDeleteSyncDocUri

public final java.lang.String getDeleteSyncDocUri()
Returns the primed Delete-Sync XML document URI. This URI corresponds to the PrimedXmlDocument elements listed in the MessageObjectConfig portion of the deployment descriptor. The method is called when the object is initialized by AppConfig to create the Delete-Sync primed document using the URI specified in the deployment descriptor.

Returns:
String the Delete-Sync primed document URI as listed in the MessageObjectConfig Element associate to this object.

setDeleteSyncDocUri

public final void setDeleteSyncDocUri(java.lang.String uri)
Sets the primed Delete-Sync XML document URI. This URI corresponds to the PrimedXmlDocument elements listed in the MessageObjectConfig portion of the deployment descriptor. The method is called when the object is initialized by AppConfig to create the Delete-Sync primed document using the URI specified in the deployment descriptor.


getUpdateSyncDoc

public final org.jdom.Document getUpdateSyncDoc()
Description copied from interface: XmlEnterpriseObject
Returns the "primed" UpdateSync Document associated with this object. This document is used as a baseline for UpdateSync message production. This is valuable because we can populate the primed document with information that will not change and the message production logic doesn't have to worry about filling that information in prior to sending the message. Clients should never need to call this method directly unless they just want to know if the object has a primed update sync document associated to it.

If the document is not initialized because of deferred initialization, the document will be initialized in this method and then it will be returned. This way, document initialization will only ever have to happen once and it can be configured to do it when an application starts or when the document is first requested.

Specified by:
getUpdateSyncDoc in interface XmlEnterpriseObject
Returns:
Document the primed UpdateSync document.

getUpdateSyncDocUri

public final java.lang.String getUpdateSyncDocUri()
Returns the primed Update-Sync XML document URI. This URI corresponds to the PrimedXmlDocument elements listed in the MessageObjectConfig portion of the deployment descriptor. The method is called when the object is initialized by AppConfig to create the Update-Sync primed document using the URI specified in the deployment descriptor.

Returns:
String the Update-Sync primed document URI as listed in the MessageObjectConfig Element associate to this object.

setUpdateSyncDocUri

public final void setUpdateSyncDocUri(java.lang.String uri)
Sets the primed Update-Sync XML document URI. This URI corresponds to the PrimedXmlDocument elements listed in the MessageObjectConfig portion of the deployment descriptor. The method is called when the object is initialized by AppConfig to create the Update-Sync primed document using the URI specified in the deployment descriptor.

Parameters:
uri - String the Update-Sync primed document URI as listed in the MessageObjectConfig Element associate to this object.

getGenerateSyncDoc

public final org.jdom.Document getGenerateSyncDoc()
Description copied from interface: XmlEnterpriseObject
Returns the "primed" GenerateSync Document associated with this object. This document is used as a baseline for GenerateSync message production. This is valuable because we can populate the primed document with information that will not change and the message production logic doesn't have to worry about filling that information in prior to sending the message. Clients should never need to call this method directly unless they just want to know if the object has a primed generate sync document associated to it.

If the document is not initialized because of deferred initialization, the document will be initialized in this method and then it will be returned. This way, document initialization will only ever have to happen once and it can be configured to do it when an application starts or when the document is first requested.

Specified by:
getGenerateSyncDoc in interface XmlEnterpriseObject
Returns:
Document the primed GenerateSync document. Returns null if the document is null.

getGenerateSyncDocUri

public final java.lang.String getGenerateSyncDocUri()
Returns the primed Generate-Sync XML document URI. This URI corresponds to the PrimedXmlDocument elements listed in the MessageObjectConfig portion of the deployment descriptor. The method is called when the object is initialized by AppConfig to create the Generate-Sync primed document using the URI specified in the deployment descriptor.

Returns:
String the Generate-Sync primed document URI as listed in the MessageObjectConfig Element associate to this object.

setGenerateSyncDocUri

public final void setGenerateSyncDocUri(java.lang.String uri)
Sets the primed Generate-Sync XML document URI. This URI corresponds to the PrimedXmlDocument elements listed in the MessageObjectConfig portion of the deployment descriptor. The method is called when the object is initialized by AppConfig to create the Generate-Sync primed document using the URI specified in the deployment descriptor.

Parameters:
uri - String the Generate-Sync primed document URI as listed in the MessageObjectConfig Element associate to this object.

getQueryDoc

public final org.jdom.Document getQueryDoc()
Description copied from interface: XmlEnterpriseObject
Returns the "primed" Query Document associated with this object. This document is used as a baseline for Query message production. This is valuable because we can populate the primed document with information that will not change and the message production logic doesn't have to worry about filling that information in prior to sending the message. Clients should never need to call this method directly unless they just want to know if the object has a primed query document associated to it.

If the document is not initialized because of deferred initialization, the document will be initialized in this method and then it will be returned. This way, document initialization will only ever have to happen once and it can be configured to do it when an application starts or when the document is first requested.

Specified by:
getQueryDoc in interface XmlEnterpriseObject
Returns:
Document the primed Query document. Returns null if the document is null.

getQueryDocUri

public final java.lang.String getQueryDocUri()
Returns the primed Query-Request XML document URI. This URI corresponds to the PrimedXmlDocument elements listed in the MessageObjectConfig portion of the deployment descriptor. The method is called when the object is initialized by AppConfig to create the Query-Request primed document using the URI specified in the deployment descriptor.

Returns:
String the Query-Request primed document URI as listed in the MessageObjectConfig Element associate to this object.

setQueryDocUri

public final void setQueryDocUri(java.lang.String uri)
Sets the primed Query-Request XML document URI. This URI corresponds to the PrimedXmlDocument elements listed in the MessageObjectConfig portion of the deployment descriptor. The method is called when the object is initialized by AppConfig to create the Query-Request primed document using the URI specified in the deployment descriptor.

Parameters:
uri - String the Query-Request primed document URI as listed in the MessageObjectConfig Element associate to this object.

getRootElementName

protected java.lang.String getRootElementName(org.jdom.Element e)

getControlArea

protected org.jdom.Element getControlArea(org.jdom.Element root)
This method looks at the document and returns the appropriate ControlArea. Since there can be three different control areas based on the message (ControlAreaRequest, ControlAreaReply and ControlAreaSync) we need to have some intelligence built in when retrieving the element from the document. Clients should never need to call this method directly.

Parameters:
root - org.jdom.Element the root element of the document
Returns:
Element the ControlArea element (may be ControlAreaRequest, ControlAreaReply or ControlAreaSync depending on the doc)

setValidation

public final void setValidation(boolean validate)
Sets a boolean flag indicating whether or not XML validation will be used when messages are produced/published by this object. If XML validation is turned on, the resulting XML document that gets generated from the contents of this object will be validated from an XML perspective prior to producing/publishing any messages.

This information is specified in the MessageObjectConfig XML Element in the deployment documents and is passed to this object during initialization by the MessageObjectConfig Java object.

Parameters:
validate - boolean true=XML validation will be on, false=XML validation will be off.

getValidation

public final boolean getValidation()
Returns a boolean flag indicating whether or not XML validation will be used when messages are produced/published by this object. If XML validation is turned on, the resulting XML document that gets generated from the contents of this object will be validated from an XML perspective prior to producing/publishing any messages.

This information is specified in the MessageObjectConfig XML Element in the deployment documents and is passed to this object during initialization by the MessageObjectConfig Java object.

Specified by:
getValidation in interface XmlEnterpriseObject
Returns:
boolean true=XML validation will be on, false=XML validation will be off.

setCreateDoc

public final void setCreateDoc(org.jdom.Document doc)
Description copied from interface: XmlEnterpriseObject
Sets the "primed" create document associated with this object. This is called during object initialization and is set based on information in the deployment document. Clients should never need to call this method directly unless they want to override the primed document that was associated to the object when it was initialized.

This information is specified in the MessageObjectConfig XML Element in the deployment documents and is passed to this object during initialization by the MessageObjectConfig Java object.

Specified by:
setCreateDoc in interface XmlEnterpriseObject
Parameters:
doc - org.jdom.Document the "primed" create Document

setDeleteDoc

public final void setDeleteDoc(org.jdom.Document doc)
Description copied from interface: XmlEnterpriseObject
Sets the "primed" delete document associated with this object. This is called during object initialization and is set based on information in the MessagingEnterprise document. Clients should never need to call this method directly unless they want to override the primed document that was associated to the object when it was initialized.

This information is specified in the MessageObjectConfig XML Element in the deployment documents and is passed to this object during initialization by the MessageObjectConfig Java object.

Specified by:
setDeleteDoc in interface XmlEnterpriseObject
Parameters:
doc - org.jdom.Document the "primed" delete Document

setUpdateDoc

public final void setUpdateDoc(org.jdom.Document doc)
Sets the "primed" update document associated with this object. This is called during object initialization and is set based on information in the MessagingEnterprise document. Clients should never need to call this method directly.

This information is specified in the MessageObjectConfig XML Element in the deployment documents and is passed to this object during initialization by the MessageObjectConfig Java object.

Specified by:
setUpdateDoc in interface XmlEnterpriseObject
Parameters:
doc - org.jdom.Document the "primed" update Document

setGenerateDoc

public final void setGenerateDoc(org.jdom.Document doc)
Sets the "primed" generate document associated with this object. This is called during object initialization and is set based on information in the MessagingEnterprise document. Clients should never need to call this method directly.

This information is specified in the MessageObjectConfig XML Element in the deployment documents and is passed to this object during initialization by the MessageObjectConfig Java object.

Specified by:
setGenerateDoc in interface XmlEnterpriseObject
Parameters:
doc - org.jdom.Document the "primed" generate Document

setCreateSyncDoc

public final void setCreateSyncDoc(org.jdom.Document doc)
Description copied from interface: XmlEnterpriseObject
Sets the "primed" create sync document associated with this object. This is called during object initialization and is set based on information in the MessagingEnterprise document. Clients should never need to call this method directly unless they want to override the primed document that was associated to the object when it was initialized.

This information is specified in the MessageObjectConfig XML Element in the deployment documents and is passed to this object during initialization by the MessageObjectConfig Java object.

Specified by:
setCreateSyncDoc in interface XmlEnterpriseObject
Parameters:
doc - org.jdom.Document the "primed" create sync Document

setDeleteSyncDoc

public final void setDeleteSyncDoc(org.jdom.Document doc)
Description copied from interface: XmlEnterpriseObject
Sets the "primed" delete sync document associated with this object. This is called during object initialization and is set based on information in the MessagingEnterprise document. Clients should never need to call this method directly unless they want to override the primed document that was associated to the object when it was initialized.

This information is specified in the MessageObjectConfig XML Element in the deployment documents and is passed to this object during initialization by the MessageObjectConfig Java object.

Specified by:
setDeleteSyncDoc in interface XmlEnterpriseObject
Parameters:
doc - org.jdom.Document the "primed" delete sync Document

setUpdateSyncDoc

public final void setUpdateSyncDoc(org.jdom.Document doc)
Description copied from interface: XmlEnterpriseObject
Sets the "primed" update sync document associated with this object. This is called during object initialization and is set based on information in the MessagingEnterprise document. Clients should never need to call this method directly unless they want to override the primed document that was associated to the object when it was initialized.

This information is specified in the MessageObjectConfig XML Element in the deployment documents and is passed to this object during initialization by the MessageObjectConfig Java object.

Specified by:
setUpdateSyncDoc in interface XmlEnterpriseObject
Parameters:
doc - org.jdom.Document the "primed" update sync Document

setResponseDoc

public void setResponseDoc(org.jdom.Document doc)
Description copied from interface: XmlEnterpriseObject
Sets the "primed" response document associated with this object. This is called during object initialization and is set based on information in the Deployment descriptor. Clients should never need to call this method directly unless they want to override the primed document that was associated to the object when it was initialized.

This information is specified in the MessageObjectConfig XML Element in the deployment documents and is passed to this object during initialization by the MessageObjectConfig Java object.

Specified by:
setResponseDoc in interface XmlEnterpriseObject
Parameters:
doc - org.jdom.Document the "primed" response Document

setProvideDoc

public void setProvideDoc(org.jdom.Document doc)
Description copied from interface: XmlEnterpriseObject
Sets the "primed" provide document associated with this object. This is called during object initialization and is set based on information in the Deployment descriptor. Clients should never need to call this method directly unless they want to override the primed document that was associated to the object when it was initialized.

This information is specified in the MessageObjectConfig XML Element in the deployment documents and is passed to this object during initialization by the MessageObjectConfig Java object.

Specified by:
setProvideDoc in interface XmlEnterpriseObject
Parameters:
doc - org.jdom.Document the "primed" provide Document

setGenerateSyncDoc

public final void setGenerateSyncDoc(org.jdom.Document doc)
Description copied from interface: XmlEnterpriseObject
Sets the "primed" generate sync document associated with this object. This is called during object initialization and is set based on information in the MessagingEnterprise document. Clients should never need to call this method directly unless they want to override the primed document that was associated to the object when it was initialized.

This information is specified in the MessageObjectConfig XML Element in the deployment documents and is passed to this object during initialization by the MessageObjectConfig Java object.

Specified by:
setGenerateSyncDoc in interface XmlEnterpriseObject
Parameters:
doc - org.jdom.Document the "primed" generate sync Document

setQueryDoc

public final void setQueryDoc(org.jdom.Document doc)
Description copied from interface: XmlEnterpriseObject
Sets the "primed" query document associated with this object. This is called during object initialization and is set based on information in the MessagingEnterprise document. Clients should never need to call this method directly unless they want to override the primed document that was associated to the object when it was initialized.

This information is specified in the MessageObjectConfig XML Element in the deployment documents and is passed to this object during initialization by the MessageObjectConfig Java object.

Specified by:
setQueryDoc in interface XmlEnterpriseObject
Parameters:
doc - org.jdom.Document the "primed" query Document

dumpData

public final void dumpData()

equals

public final boolean equals(XmlEnterpriseObject xeo)
                     throws XmlEnterpriseObjectException
A convenience method that can be used to compare two Xml aware objects (XmlEnterpriseObjectImpl). This method converts the current object and the object passed in to an XML String via the toXmlString() method. Then it does a String comparison on those two strings. Note, this method IS case sensitive.

Specified by:
equals in interface XmlEnterpriseObject
Returns:
boolean

Throws:
XmlEnterpriseObjectException. - If an error occurs serializing the object to a String. This is usually due to invalid data (formats etc.) determined from the object's current rules as specified in EnterpriseFields.
XmlEnterpriseObjectException

toString

public java.lang.String toString()
Returns a comma separated String containing all the data currently stored in this object.

Format for returned data:

FieldName1=some value, FieldName2=field2 data etc.

Specified by:
toString in interface XmlEnterpriseObject
Overrides:
toString in class java.lang.Object
Returns:
String

toXmlString

public final java.lang.String toXmlString()
                                   throws XmlEnterpriseObjectException
A convenience method that can be used simply by application developers to retreive the contents of the object as an XML String. Basically, this is a fully valid XML Element just represented as a String. This data can then be used to persist the entire object, and/or build an Element from that String which can be used to build the object from an input (an XML Element).

Specified by:
toXmlString in interface XmlEnterpriseObject
Returns:
String the XML representation of the object as a String.

Throws:
XmlEnterpriseObjectException. - If an error occurs serializing the object to a String. This is usually due to invalid data (formats etc.) determined from the object's current rules as specified in EnterpriseFields.
XmlEnterpriseObjectException

getCombinedKeyValue

public final java.lang.String getCombinedKeyValue()
                                           throws XmlEnterpriseObjectException
goes through all the key fields on the xeo passed in and creates a string containing all the values from those key fields. This string is used by other methods to determine if there are matching new/baseline xeos with the same key information. That allows us to determine if a transaction should be an insert, update, delete or ignored.

Specified by:
getCombinedKeyValue in interface XmlEnterpriseObject
Returns:
String the combined key value

Throws:
XmlEnterpriseObjectException

getLength

protected int getLength(java.lang.String fieldName)
                 throws XmlEnterpriseObjectException
Convenience method that tells the layout manager implementation how many instances of a given repeatable field exist on the parent object. This is useful in determining how many child objects need to be serialized when building an output from an object.

If a child object is a repeating object within a parent object, the "getter" method for that child object will return a java.util.List. This method invokes the getter method for the child object and returns the size of that List. If the List returned is null, zero will be returned.

For example, the Address child object in the BasicPerson object is repeating. Therefore, the BasicPerson object has a "getAddress" method that returns a java.util.List of Address objects that exist in that BasicPerson. This method invokes that method and returns the size of the returned object.

Parameters:
xeo - XmlEnterpriseObject the parent object being queried
fieldName - String the name of the child object being tested
Returns:
int the number of child objects
Throws:
EnterpriseLayoutException - if an error occurs executing the getter method for the particular field on the parent object passed in. An exception will also be thrown if the object being checked is not a repeating field (the object returned by the getter method is not a java.util.List.
XmlEnterpriseObjectException

isRepeating

public boolean isRepeating(java.lang.String fieldName)
                    throws XmlEnterpriseObjectException
Convenience method that indicates if the field specified is a repeating field this object.

If a child object is a repeating object within a parent object, the "getter" method for that child object will return a java.util.List. This method inspects the return type of that getter method and checks to see if it's a java.util.List.

For example, the Address child object in the BasicPerson object is repeating. Therefore, the BasicPerson object has a "getAddress" method that returns a java.util.List of Address objects that exist in that BasicPerson. This method invokes that method and checks the class type (instanceof) the returned object. If it's a java.util.List it knows the Address is a repeating child on the BasicPerson. This will work for any XmlEnterpriseObject.

Parameters:
fieldName - String the name of the field being tested.
Returns:
boolean true if the field is a repeating field, false if not.
Throws:
XmlEnterpriseObjectException - if an error occurs executing the child object's getter method.

getValueFromObject

public final java.lang.Object getValueFromObject(java.lang.String fieldName,
                                                 java.lang.Object[] parms,
                                                 java.lang.Class[] parmTypes)
                                          throws XmlEnterpriseObjectException
Returns the current value from the field name passed in. Convenience method to allow "reflective" use of XmlEnterpriseObjects. Allows for parameters. This is especially neccessary when retrieving an individual object from a list of objects contained within the parent object.

Specified by:
getValueFromObject in interface XmlEnterpriseObject
Parameters:
fieldName - String the name of the field from which to retrieve data
parms - Object[] any parameters that need to be passed to the getter method being called.
parmTypes - Class[] the paramater types associated to any parameters.
Returns:
Object the value from the field
Throws:
XmlEnterpriseObjectException - if the field name passed in does not exist or if any other errors occur calling the getter method associated to the field.

getValueFromObject

public final java.lang.Object getValueFromObject(java.lang.String fieldName)
                                          throws XmlEnterpriseObjectException
Returns the current value from the field name passed in. Convenience method to allow "reflective" use of XmlEnterpriseObjects. Assumes the getter method being called does not take any parameters.

Specified by:
getValueFromObject in interface XmlEnterpriseObject
Parameters:
fieldName - String the name of the field from which to retrieve data
Returns:
Object the value from the field
Throws:
XmlEnterpriseObjectException - if the field name passed in does not exist or if any other errors occur calling the getter method associated to the field.

setValue

public final void setValue(java.lang.String fieldName,
                           java.lang.String value)
                    throws XmlEnterpriseObjectException
Sets the current value the field name passed in to the value passed in. Convenience method to allow "reflective" use of XmlEnterpriseObjects. Assumes the setter method being called takes one String parameter.

Parameters:
fieldName - String the name of the field from which to retrieve data
value - String the value to set on the field
Throws:
XmlEnterpriseObjectException - if the field name passed in does not exist or if any other errors occur calling the setter method associated to the field.

saveLayoutManagers

protected void saveLayoutManagers()

restoreLayoutManagers

protected void restoreLayoutManagers()


Copyright © 2002,2003 OpenEAI Software Foundation