|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object
|
+--org.openeai.OpenEaiObject
|
+--org.openeai.config.EnterpriseConfigurationObjectImpl
|
+--org.openeai.config.MessageObjectConfig
A MessageObjectConfig is a wrapper class that takes information stored in an OpenEAI Deployment document (MessageObjectConfig Element) and stores it in a Java object. Then the configuration object is passed to the constructor of an organization's Enterprise Message Objects and they are able to configure themselves with the information found in the config object.
These configuration objects are used to configure both JmsEnterpriseObjects as well as XmlEnterpriseObjects. Certain parameters are required for both types of objects and some are only required for JmsEnterpriseObjects. Where this is true, it will be noted.
Configuration Parameters:
These are the configuration parameters specified by the MessageObjectConfig Element in the Deployment document. NOTE: Like all other OpenEAI configuration objects, there is a "container" level associated to MessageObjectConfig objects. Many Elements and attributes are required at that level and may be optionally overridden at this level. This is to avoid having to enter redundant information in the Deployment document if all (or most) message objects being configured should use the same configuration information. Therefore, many of the MessageObject configuration parameters are optional at this level but required at the "container" level. Where this is the case, it will be indicated by an "*".
| Name | Required | Description |
|---|---|---|
| name | yes | Name of the message object. This will be the key by which the object is stored in AppConfig and will most likely be used to retrieve the object out of AppConfig. Therefore it should be unique. |
| deferInitialization (true | false) | no (default is false) | This parameter tells the message object if it should initialize its EnterpriseFields, Layout Manager(s) and Primed XML documents when the object is first initialized (when the application is started) or wait until the first time the object is used. This can mean significant reduction in the time required to start an application because these operations are relatively expensive especially when an application requires a large number of message objects. If this flag is set to false, the message objects will initialize these components when they are first needed instead of when the application starts. The risk of deferring intialization is that the resources needed to initialize these objects may not be available when they are initialized later and this would only be known at that time. If they're initialized when the application first starts, the user will know immediately if everything starts okay. Once an object's EnterpriseFields, Layout Managers and primed XML documents are fully initialized, they will not be intialized again for the life of the application. |
| xmlDocumentValidation (true | false) | no* | This parameter tells the message object if it should perform XML validation when producing requests (create, update, delete, generate and query) or publishing sync (createSync, updateSync, deleteSync etc.). If this flag is true, the message object will validate the XML document created from the contents of the object prior to performing the message action associated to the method being called. NOTE: This parameter is only used by JmsEnterpriseObjects. |
| translationType (all | application) | no* | This parameter tells the message object what type of application->enterprise data translations will be performed. If 'application' is chosen, the MessageObject will only store translations associated to the current application in the MessageObject's EnterpriseFields object. This means, it will only translate values for a particular application (that application's "application values"). If 'all' is chosen, the MessageObject will store translation mappings for all applications in its EnterpriseFields object. This means it will perform translations for all applications. Generally, this is only ever set to all in the case of an infrastructure type application/gateway where that application will be processing messages and performing translations for all applications. |
| SenderAppId | no* | This parameter provides the message object with information needed when it produces/publishes messages related to the application sending the message. This information is stored in the object and dynamically placed in the messages produced by this message object. It is part of the ControlArea... for all messages as specified by the OpenEAI Message Protocol. |
| Authentication | no* | This parameter provides the message object with information needed when it produces/publishes messages related to the user associated to the application sending the message. This information is stored in the object and dynamically placed in the messages produced by this message object. It is part of the ControlArea... for all messages as specified by the OpenEAI Message Protocol. NOTE: This parameter is only used by JmsEnterpriseObjects. |
| CommandName | yes | This parameter provides the message object with information needed when it produces/publishes messages related to the COMMAND_NAME JMS Property that will be put on the JMS Message ultimately produced by the message object. This COMMAND_NAME property is then used by Consumers when they consume a message to determine which Request or Sync Command implementation they should execute. This is how the message being sent by the application/gateway is correlated to the business logic contained within the Commands executed by the consumers. NOTE: This parameter is only used by JmsEnterpriseObjects. |
| PrimedXmlDocuments | no | This parameter provides the message object with information needed to store in memory a pre-parsed "primed" document related to the actions that will be performed by that object. Primed documents only need to be listed here if the object will be performing that action. This primed document is used when building the XML Enterprise message from the contents of the object as a starting point (for structure only). The dynamic portions of the document are replaced by these configuration paramaters along with the content of the object. It is parsed during initialization so the object doesn't have to parse the document each time it sends a message. NOTE: This parameter is only used by JmsEnterpriseObjects. |
| ConfigClass | no* | Name of the configuration class that wraps the config Element (this class) |
| ObjectClass | yes | Name of the Java object that will be instantiated with this Config class (a JmsEnterpriseObject or XmlEnterpriseObject) |
| EnterpriseObjectDocument | no* | Provides the object with information needed to initialize it's EnterpriseFields object. Each object must have one of these so it can know the appropriate rules for the object as values are put into the object. |
| LayoutManager | no* | Provides the object with information needed to initialize it's Layout manager objects. Each object must have one layout manager of type "xml" associated to it. Objects can also have additional layout managers associated to it of different types. These layout managers are what allow an object to build itself from and serialize itself to different formats. They are all implementations of org.openeai.layouts.EnterpriseLayoutManager and can be switched between during the course of the application's lifetime. |
EnterpriseFields,
EnterpriseLayoutManager,
MessageId,
Authentication| Field Summary |
| Fields inherited from class org.openeai.OpenEaiObject |
logger |
| Constructor Summary | |
MessageObjectConfig()
This is the constructor used by AppConfig to instantiate the config object. |
|
MessageObjectConfig(org.jdom.Element configElement)
|
|
MessageObjectConfig(java.lang.String configDocUrl,
java.lang.String objectName)
|
|
| Method Summary | |
void |
addInputLayoutManager(java.lang.String type,
EnterpriseLayoutManager iLayout)
This method adds an input layout manager to the HashMap of input layout managers associated to the object that will be initialized using this configuration object. |
void |
addOutputLayoutManager(java.lang.String type,
EnterpriseLayoutManager oLayout)
This method adds an output layout manager to the HashMap of output layout managers associated to the object that will be initialized using this configuration object. |
EnterpriseFields |
getEnterpriseFields()
Returns the EnterpriseFields object associated to this configuration object that will in turn be set on the business object being initialized using this configuration object. |
EnterpriseLayoutManager |
getInputLayoutManager()
Returns the currently active input layout manager. |
EnterpriseLayoutManager |
getInputLayoutManager(java.lang.String type)
This method returns the input layout manager that matches the type passed in or null if that type does not exist in the HashMap of input layout managers associated to this configuration object. |
java.util.HashMap |
getInputLayoutManagers()
This method returns the HashMap of all input layout managers that will be associated to the XmlEnterpriseObject that ultimately gets initialized using this MessageObjectConfig object. |
EnterpriseLayoutManager |
getOutputLayoutManager()
Returns the currently active output layout manager. |
EnterpriseLayoutManager |
getOutputLayoutManager(java.lang.String type)
This method returns the output layout manager that matches the type passed in or null if that type does not exist in the HashMap of output layout managers associated to this configuration object. |
java.util.HashMap |
getOutputLayoutManagers()
This method returns the HashMap of all output layout managers that will be associated to the XmlEnterpriseObject that ultimately gets initialized using this MessageObjectConfig object. |
java.lang.String |
getTranslationType()
Returns the translation type that should be associated to the business object being initialized with this configuration object. |
void |
init(org.jdom.Element configElement)
Implements the init(Element) method that all EnterpriseConfiguration objects must implement. |
void |
setEnterpriseFields(EnterpriseFields fields)
Sets the EnterpriseFields object on this configuration object that will be ultimately used by the acutal business object that gets initialized with this configuration object. |
void |
setInputLayoutManager(EnterpriseLayoutManager layout)
Sets the currently active input layout manager to the one passed in. |
void |
setInputLayoutManagers(java.util.HashMap iManagers)
This method sets the HashMap of input layout managers that will be associated to the message object being configured using this configuration object. |
void |
setOutputLayoutManager(EnterpriseLayoutManager layout)
Sets the currently active output layout manager to the one passed in. |
void |
setOutputLayoutManagers(java.util.HashMap iManagers)
This method sets the HashMap of output layout managers that will be associated to the message object being configured using this configuration object. |
void |
setTranslationType(java.lang.String translationType)
Sets the translation type that should be associated to the business object being initialized with this configuration object. |
| Methods inherited from class org.openeai.config.EnterpriseConfigurationObjectImpl |
addProperty, getAppName, getConfigDoc, getConfigElementByAttributeValue, getElementByAttributeValue, getName, getType, getValidation, setAppName, setConfigDoc, setName, setType, setValidation |
| Methods inherited from class org.openeai.OpenEaiObject |
addLog4jProperty, getDebug, getFromAddr, getLog4jProperties, getMailHost, getMailService, getProperties, getToAddr, initializeLog4j, initializeLog4j, initializeLog4j, setDebug, setFromAddr, setMailHost, setMailService, setProperties, setToAddr |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.openeai.config.EnterpriseConfigurationObject |
getAppName, getProperties, setAppName |
| Constructor Detail |
public MessageObjectConfig()
public MessageObjectConfig(java.lang.String configDocUrl,
java.lang.String objectName)
throws EnterpriseConfigurationObjectException
public MessageObjectConfig(org.jdom.Element configElement)
throws EnterpriseConfigurationObjectException
| Method Detail |
public void setTranslationType(java.lang.String translationType)
EnterpriseFieldspublic java.lang.String getTranslationType()
EnterpriseFieldspublic void setEnterpriseFields(EnterpriseFields fields)
EnterpriseFieldspublic EnterpriseFields getEnterpriseFields()
EnterpriseFieldspublic void setInputLayoutManager(EnterpriseLayoutManager layout)
public EnterpriseLayoutManager getInputLayoutManager()
public void setOutputLayoutManager(EnterpriseLayoutManager layout)
public EnterpriseLayoutManager getOutputLayoutManager()
public java.util.HashMap getInputLayoutManagers()
Input layout managers are used to build an object from an input and are implementations of the EnterpriseLayoutManager interface.
XmlEnterpriseObject,
EnterpriseLayoutManagerpublic void setInputLayoutManagers(java.util.HashMap iManagers)
Input layout managers are used to build an object from an input and are implementations of the EnterpriseLayoutManager interface.
XmlEnterpriseObject,
EnterpriseLayoutManager
public void addInputLayoutManager(java.lang.String type,
EnterpriseLayoutManager iLayout)
Input layout managers are used to build an object from an input and are implementations of the EnterpriseLayoutManager interface.
public EnterpriseLayoutManager getInputLayoutManager(java.lang.String type)
public java.util.HashMap getOutputLayoutManagers()
Output layout managers are used to serialized an object to a particular output and are implementations of the EnterpriseLayoutManager interface.
XmlEnterpriseObject,
EnterpriseLayoutManagerpublic void setOutputLayoutManagers(java.util.HashMap iManagers)
Output layout managers are used to serialized an object to a particular output and are implementations of the EnterpriseLayoutManager interface.
XmlEnterpriseObject,
EnterpriseLayoutManager
public void addOutputLayoutManager(java.lang.String type,
EnterpriseLayoutManager oLayout)
Output layout managers are used to serialized an object to a particular output and are implementations of the EnterpriseLayoutManager interface.
public EnterpriseLayoutManager getOutputLayoutManager(java.lang.String type)
public void init(org.jdom.Element configElement)
throws EnterpriseConfigurationObjectException
init in interface EnterpriseConfigurationObjectEnterpriseConfigurationObjectException - if errors occur processing the configuration Element.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||