|
|||||||||||
| 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.EnterpriseFields
This class wraps the EnterpriseObjects XML documents and provides our Enterprise Message objects with all the information they need to serialized themselves to and from different formats as well as providing information relating to specific business rules associated to specific fields contained in the EnterpriseObjects document (formatting, translations etc.).
Think of this object AS the Java representation of the EnterpriseObjects XML document.
EnterpriseFormatter,
EnterpriseTranslator,
Field| Field Summary |
| Fields inherited from class org.openeai.OpenEaiObject |
logger |
| Constructor Summary | |
EnterpriseFields()
Constructor |
|
| Method Summary | |
void |
addFieldsForObject(java.lang.String objectName,
java.util.HashMap fields)
This method adds an ObjectDefinition (all fields and their rules for an object) to a HashMap that is keyed by object name. |
java.lang.Object |
clone()
|
java.lang.String |
getApplicationValue(java.lang.String objectName,
java.lang.String appName,
java.lang.String fieldName,
java.lang.String enterpriseValue)
Returns the application specific value that corresponds to the enterprise value passed in. |
java.lang.String |
getEnterpriseObjectsUri()
Returns the EnterpriseObjects document uri associated to this EnterpriseFields object. |
java.lang.String |
getEnterpriseValue(java.lang.String objectName,
java.lang.String fieldName,
java.lang.String appValue)
Returns the "enterprise value" that corresponds to the application value passed in based on formatting rules specified in the EnterpriseObjects document. |
org.jdom.Element |
getEODocRoot()
|
java.util.HashMap |
getFieldsForObject()
Returns the HashMap of all fields this EnterpriseFields object knows about. |
java.util.HashMap |
getFieldsForObject(java.lang.String objectName)
Returns the HashMap of all fields this EnterpriseFields object knows about that corresponds to a specific object name. |
java.util.List |
getKeyNamesForField(java.lang.String objectName)
Returns a list of all key fields associated to an object. |
java.lang.String |
getTranslationType()
Returns the translation type that should be used when converting from application specific to enterprise value as specified in the application's deployment document and that is associated to the message object being configured. |
boolean |
ignoreMissingFields()
Returns the flag indicating whether or not missing field definitions will be allowed or not. |
boolean |
ignoreValidation()
Returns the flag indicating whether or not "object" validation is turned on or not. |
void |
init(org.jdom.Document doc)
This method reads through the supplied EnterpriseObjects XML Document and builds itself according to the contents found within that document. |
void |
reinitialize()
Re-initializes this EnterpriseFields object by re-reading the EnterpriseObjects.xml document from the URI specified in the configuration document. |
void |
setEnterpriseObjectsUri(java.lang.String uri)
Sets the EnterpriseObjects document uri associated to this EnterpriseFields object. |
void |
setFieldsForObject(java.util.HashMap fields)
Sets the HashMap of all fields this EnterpriseFields object knows about. |
void |
setIgnoreMissingFields(boolean ignore)
Sets the flag indicating whether or not this EnterpriseFields object will be allowed to work if some of the object definitions specified in an objects definition are missing from the EnterpriseObjects document. |
void |
setIgnoreValidation(boolean ignore)
Sets a flag indicating whether or not "object" validation should be used when converting an application value to an enterprise value. |
void |
setTranslationType(java.lang.String translationType)
Sets the translation type that should be used when converting from application specific to enterprise value as specified in the application's deployment document and that is associated to the message object being configured. |
| 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 |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public EnterpriseFields()
| Method Detail |
public java.lang.Object clone()
throws java.lang.CloneNotSupportedException
clone in interface PubliclyCloneableclone in class java.lang.Objectjava.lang.CloneNotSupportedException
public final void init(org.jdom.Document doc)
throws EnterpriseFieldException
It recursively includes object definitions found in any included EnterpriseObject document references.
This method is called by AppConfig when a Message object is being configured.
EnterpriseFieldException - if errors occur building the EnterpriseFields object.
public final void reinitialize()
throws EnterpriseFieldException
This is the same basic processing that occurs when the MessageObject is initially configured at application startup time.
EnterpriseFieldException - if any errors occur initializing.public final void setEnterpriseObjectsUri(java.lang.String uri)
public final java.lang.String getEnterpriseObjectsUri()
public org.jdom.Element getEODocRoot()
public final void setTranslationType(java.lang.String translationType)
Currently, two types are supported:
public final java.lang.String getTranslationType()
Currently, two types are supported:
public final void setIgnoreMissingFields(boolean ignore)
It was originally intended to allow development work to continue while the EnterpriseObjects document is finished up.
public final boolean ignoreMissingFields()
public final void setIgnoreValidation(boolean ignore)
public final boolean ignoreValidation()
public final void addFieldsForObject(java.lang.String objectName,
java.util.HashMap fields)
Fieldpublic final java.util.HashMap getFieldsForObject()
public final void setFieldsForObject(java.util.HashMap fields)
public final java.util.HashMap getFieldsForObject(java.lang.String objectName)
Fieldpublic final java.util.List getKeyNamesForField(java.lang.String objectName)
public final java.lang.String getApplicationValue(java.lang.String objectName,
java.lang.String appName,
java.lang.String fieldName,
java.lang.String enterpriseValue)
throws EnterpriseFieldException
EnterpriseFieldException - if any errors occur converting the enterprise value to the application valueEnterpriseFormatter,
EnterpriseTranslator
public final java.lang.String getEnterpriseValue(java.lang.String objectName,
java.lang.String fieldName,
java.lang.String appValue)
throws EnterpriseFieldException
EnterpriseFieldException - if any formatting rule is brokenEnterpriseFormatter,
EnterpriseTranslator,
Field
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||