org.openeai.config
Class EnterpriseMapping


java.lang.Object

  |

  +--org.openeai.OpenEaiObject

        |

        +--org.openeai.config.EnterpriseMapping


public class EnterpriseMapping
extends OpenEaiObject

This object maintains a list of mappings from application values to enterprise values by object/field and application name. This information is contained in the EnterpriseObjects document and the EnterpriseMapping object is an instance variable in EnterpriseTranslator.

The EnterpriseMapping object is built on a field by field basis as the EnterpriseFields object builds itself with contents found in the EnterpriseObjects documents.

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

Field Summary
 
Fields inherited from class org.openeai.OpenEaiObject
logger
 
Constructor Summary
EnterpriseMapping()
          Constructor
 
Method Summary
 void addApplicationValue(java.lang.String appName, java.lang.String value)
          The EnterpriseFields object uses this method to add an application value (by appName) to the HashMap of all application values for this field.
 java.util.HashMap getApplicationValues()
          This method returns a HashMap containing all Application specific values related to this particular field.
 java.lang.String getEnterpriseValue()
          This method returns the enterprise value associated to this Mapping.
 java.lang.String getFieldName()
          This method returns the name of the field associated to this mapping.
 void setApplicationValues(java.util.HashMap values)
          This method sets the HashMap of application specific values related to this field.
 void setEnterpriseValue(java.lang.String value)
          This method sets the enterprise value associated to this mapping.
 void setFieldName(java.lang.String name)
          This method sets the name of the field associated to this mapping.
 
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

EnterpriseMapping


public EnterpriseMapping()
Constructor

Method Detail

getApplicationValues


public final java.util.HashMap getApplicationValues()
This method returns a HashMap containing all Application specific values related to this particular field.

Returns:
HashMap

setApplicationValues


public final void setApplicationValues(java.util.HashMap values)
This method sets the HashMap of application specific values related to this field.


addApplicationValue


public final void addApplicationValue(java.lang.String appName,
                                      java.lang.String value)
The EnterpriseFields object uses this method to add an application value (by appName) to the HashMap of all application values for this field.


getEnterpriseValue


public final java.lang.String getEnterpriseValue()
This method returns the enterprise value associated to this Mapping. Note, there can only be one Enterprise Value for a given field.

Returns:
String the enterprise value associated to this field.

setEnterpriseValue


public final void setEnterpriseValue(java.lang.String value)
This method sets the enterprise value associated to this mapping. This is called when the EnterpriseFields object builds the Translator/Mapping for the field from information found in the EnterpriseObjects document.


getFieldName


public final java.lang.String getFieldName()
This method returns the name of the field associated to this mapping. This corresponds to the name of the field as it is specified in the enterprise objects document. Note, the field name associated to the EnterpriseMapping object is a combination of the parent object and the field itself (eg. - BasicPerson/Gender). This is to ensure uniqueness when storing field names since different parent objects could have the same field names within them.

Returns:
String the name of the field.

setFieldName


public final void setFieldName(java.lang.String name)
This method sets the name of the field associated to this mapping. This corresponds to the name of the field as it is specified in the enterprise objects document. Note, the field name associated to the EnterpriseMapping object is a combination of the parent object and the field itself (eg. - BasicPerson/Gender). This is to ensure uniqueness when storing field names since different parent objects could have the same field names within them. This method is called as the EnterpriseFields object builds the translator/mapping objects based on the information found in the EnterpriseObjects XML document.



Copyright © 2002, OpenEAI Software Foundation