|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object
|
+--org.openeai.OpenEaiObject
|
+--org.openeai.layouts.EnterpriseLayoutManagerImpl
The parent class of all EnterpriseLayoutManagers created by the OpenEAI software foundation. Provides convenience methods to the decendant objects.
| Field Summary |
| Fields inherited from class org.openeai.OpenEaiObject |
logger |
| Constructor Summary | |
EnterpriseLayoutManagerImpl()
Constructor |
|
| Method Summary | |
java.lang.String |
getEnterpriseObjectsUri()
Returns the EnterpriseObjects document uri associated to this EnterpriseFields object. |
protected org.jdom.Element |
getFieldLayout(org.jdom.Element eField,
java.lang.String name)
Returns the Layout Element associated to a particular field as specified in an application's deployment document. |
protected org.jdom.Element |
getLayout()
This method returns the actual layout element associated with this layout manager. |
protected org.jdom.Element |
getLayout(org.jdom.Element startingElement,
java.lang.String name)
This method searches for and returns the field definition which is part of the layout for an object that matches the name passed in. |
java.lang.String |
getLayoutManagerName()
This method returns the name of the layout manager. |
org.jdom.Element |
getLayoutRoot()
Returns the layout manager's root element. |
protected int |
getLength(XmlEnterpriseObject xeo,
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. |
protected java.lang.String |
getTargetAppName()
Returns the target application name associated to this layout manager. |
protected java.lang.Object |
getValueFromObject(XmlEnterpriseObject xeo,
java.lang.String fieldName)
Returns the value currently held in the parent object for the field passed in. |
protected java.lang.Object |
getValueFromObject(XmlEnterpriseObject xeo,
java.lang.String fieldName,
java.lang.Object[] parms,
java.lang.Class[] parmTypes)
Convenience method used by layout manager implementations to retrieve data from a repeating field (of any type) on a parent object. |
protected java.lang.Object |
getValueFromObject(XmlEnterpriseObject xeo,
java.lang.String appName,
java.lang.String fieldName)
Convenience method used by layout manager implementations to retrieve data from a parent object for a particular application. |
protected java.lang.Object |
getValueFromObject(XmlEnterpriseObject xeo,
java.lang.String appName,
java.lang.String fieldName,
java.lang.Object[] parms,
java.lang.Class[] parmTypes)
Convenience method used by layout manager implementations to retrieve data from a repeating field (of type Element or Attribute) on a parent object for a particular application. |
void |
init(java.lang.String layoutManagerName,
org.jdom.Document layoutDoc)
This is the default initialization method that can be used by child layout managers. |
protected java.lang.Object |
instantiate(java.lang.String className)
Convenience method used by layout manager implementations to instantiate child objects that need to be built from the input passed to them and added to the parent object being built. |
protected boolean |
isDate(java.lang.String className)
Determines if the class name passed in is one of the OpenEAI Date objects (Date or Datetime). |
protected boolean |
isRepeating(java.lang.Object xeo,
java.lang.String fieldName)
Convenience method that tells the layout manager implementation if the field specified is a repeating field on the object passed in. |
protected boolean |
isRequired(org.jdom.Element eField)
Uses the field definition passed in to determine if a field is required. |
void |
setEnterpriseObjectsUri(java.lang.String uri)
Sets the EnterpriseObjects document uri associated to this EnterpriseFields object. |
protected void |
setLayout(org.jdom.Element layout)
This method sets the actual layout element associated with this layout manager. |
void |
setLayoutManagerName(java.lang.String name)
This method sets the name associated to the layout manager. |
protected void |
setLayoutRoot(org.jdom.Element layout)
This method sets the layout manager's root element. |
protected void |
setTargetAppName(java.lang.String appName)
Sets the name of the target application for which an output is being built. |
protected void |
setVariableValue(java.lang.Object mObj,
java.lang.String variableName,
java.lang.Object value,
java.lang.Class classType)
Convenience method that sets a field on an object passed in to the value passed in by finding the appropriate setter method (by field name) on the object and invoking that method. |
protected void |
setVariableValue(java.lang.Object mObj,
java.lang.String variableName,
java.lang.Object value,
java.lang.Class classType,
int index)
This method replaces the repeatable child object at a particular index with the value passed in. |
| Methods inherited from class org.openeai.OpenEaiObject |
addLog4jProperty, getAppName, getDebug, getFromAddr, getLog4jProperties, getMailHost, getMailService, getProperties, getToAddr, initializeLog4j, initializeLog4j, initializeLog4j, setAppName, setDebug, setFromAddr, setMailHost, setMailService, setProperties, setToAddr |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public EnterpriseLayoutManagerImpl()
| Method Detail |
protected void setTargetAppName(java.lang.String appName)
This application name will be used to "reverse-translate" data from enterprise values to application values if translations/mappings exist.
EnterpriseTranslator,
EnterpriseMappingprotected java.lang.String getTargetAppName()
EnterpriseTranslator,
EnterpriseMappingprotected final void setLayoutRoot(org.jdom.Element layout)
public final org.jdom.Element getLayoutRoot()
public final void setEnterpriseObjectsUri(java.lang.String uri)
public final java.lang.String getEnterpriseObjectsUri()
protected final void setLayout(org.jdom.Element layout)
This is the element that provides the details regarding what the layout being used really is. It's the layout's definition.
protected final org.jdom.Element getLayout()
This is the element that provides the details regarding what the layout being used really is. It's the layout's definition.
protected final org.jdom.Element getFieldLayout(org.jdom.Element eField,
java.lang.String name)
public final void setLayoutManagerName(java.lang.String name)
public final java.lang.String getLayoutManagerName()
public void init(java.lang.String layoutManagerName,
org.jdom.Document layoutDoc)
throws EnterpriseLayoutException
EnterpriseLayoutException
protected org.jdom.Element getLayout(org.jdom.Element startingElement,
java.lang.String name)
throws EnterpriseLayoutException
EnterpriseLayoutException
protected boolean isRequired(org.jdom.Element eField)
throws EnterpriseLayoutException
EnterpriseLayoutException - if the Field's Format element can't be found.
protected boolean isRepeating(java.lang.Object xeo,
java.lang.String fieldName)
throws EnterpriseLayoutException
All XmlEnterpriseObject objects have a "getLength" method associated to each field that is repeating. This is how this method determines if the field is repeating. By looking for that method on the object passed in.
For example, the Address child object in the BasicPerson object is repeating. Therefore, the BasicPerson object has a "getAddressLength" method that returns the number of Address object that exist in that BasicPerson. This method looks for that method and if it exists it knows the Address is a repeating child on the BasicPerson. This will work for any XmlEnterpriseObject.
EnterpriseLayoutException - if an error occurs determining if the field is a repeating field.
protected int getLength(XmlEnterpriseObject xeo,
java.lang.String fieldName)
throws EnterpriseLayoutException
All XmlEnterpriseObject objects have a "getLength" method associated to each field that is repeating. This is how this method determines how many instances of the field exist. By executing that method on the object passed in.
For example, the Address child object in the BasicPerson object is repeating. Therefore, the BasicPerson object has a "getAddressLength" method that returns the number of Address object that exist in that BasicPerson. This method executes that getAddressLength method on the BasicPerson object passed in to determine how many Addresses exist in the BasicPerson object. This will work for any XmlEnterpriseObject.
EnterpriseLayoutException - if an error occurs executing the getLength method for the particular
field on the parent object passed in.protected java.lang.Object instantiate(java.lang.String className)
String class name of the object to instantiate.
protected java.lang.Object getValueFromObject(XmlEnterpriseObject xeo,
java.lang.String appName,
java.lang.String fieldName)
throws EnterpriseLayoutException
EnterpriseLayoutException - if errors occur reverse-translating the enterprise
value to an application specific value.
protected java.lang.Object getValueFromObject(XmlEnterpriseObject xeo,
java.lang.String fieldName)
throws EnterpriseLayoutException
EnterpriseLayoutException - if errors occur invoking the getter method on the field
protected java.lang.Object getValueFromObject(XmlEnterpriseObject xeo,
java.lang.String appName,
java.lang.String fieldName,
java.lang.Object[] parms,
java.lang.Class[] parmTypes)
throws EnterpriseLayoutException
EnterpriseLayoutException - if errors occur reverse-translating the enterprise
value to an application specific value.
protected java.lang.Object getValueFromObject(XmlEnterpriseObject xeo,
java.lang.String fieldName,
java.lang.Object[] parms,
java.lang.Class[] parmTypes)
throws EnterpriseLayoutException
EnterpriseLayoutException - if errors occur reverse-translating the enterprise
value to an application specific value.
protected void setVariableValue(java.lang.Object mObj,
java.lang.String variableName,
java.lang.Object value,
java.lang.Class classType)
throws EnterpriseFieldException
By invoking the setter method on the object passed in, all the rules that are specified in the EnterpriseFields object are invoked when that setter method is called.
EnterpriseFieldExceptionEnterpriseFields,
EnterpriseFormatter
protected void setVariableValue(java.lang.Object mObj,
java.lang.String variableName,
java.lang.Object value,
java.lang.Class classType,
int index)
throws EnterpriseFieldException
EnterpriseFieldException - if errors occur calling the setter method.protected boolean isDate(java.lang.String className)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||