|
IBM WebSphere Multichannel Bank Transformation Toolkit Javadoc | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.btt.base.FormatElement
com.ibm.btt.services.ldap.MapFormat
public class MapFormat
This class represents a pseudo format. It specifies a set of data mappings between one context and another. For each mapping defined in the map, an additional format can be specified. Given an externalized mapping definition:
<map source=contextA target=contextB> <mapping source=userName target=UN> <fString> </map>Calling format on the map will, for the above 1) Create the format corresponding to the fString tag, and set the name of its data element to be userName 2) Call format(Context) on the format and store the string value returned in the data element named UN in contextB.
Field Summary | |
---|---|
protected static java.lang.String |
endingTagName
|
Fields inherited from class com.ibm.btt.base.FormatElement |
---|
dataElementName |
Constructor Summary | |
---|---|
MapFormat()
This constructor creates a Map object. |
Method Summary | |
---|---|
void |
addMapping(Mapping mapping)
Adds supplied mapping to this map. |
void |
addMapping(java.lang.Object key,
Mapping aMapping)
Adds a mapping to this map. |
java.lang.String |
convertMapToString(Context sourceContext,
Context targetContext)
|
void |
deRegisterFormat(Mapping mapping)
Removes the format defined for the supplied mapping, if it exists. |
void |
deRegisterFormat(java.lang.Object key)
Removes the format defined for the supplied key, if it exists. |
java.lang.String |
format()
Performs functionally equivalent task as calling format(Context, Context), except that the function will obtain the source and target context from the source and target context attributes of this class. |
java.lang.String |
format(Context sourceContext)
Performs functionally equivalent task as calling format(Context, Context), except that the function will obtain the target context from the target context attribute of this class. |
java.lang.String |
format(Context sourceContext,
Context targetContext)
Causes the transfer of data values from the source context to the target context. |
java.lang.String |
format(DataElement element)
The traditional format(DataElement) method. |
protected FormatElement |
getFormat(java.lang.String name)
Obtains a format instance depending on the supplied name. |
Mapping |
getMapping(java.lang.Object key)
Returns the mapping associated with the given key. |
java.lang.String |
getName()
Returns the name of this format element. |
Context |
getSourceContext()
Returns the source context attribute of this format element. |
java.lang.String |
getSourceContextName()
Returns the source context name attribute of this format element. |
java.lang.String |
getSourcePrefix()
Returns the source prefix attribute of this format element. |
Context |
getTargetContext()
Returns the target context attribute of this format element. |
java.lang.String |
getTargetContextName()
Returns the target context name attribute of this format element. |
java.lang.String |
getTargetPrefix()
Returns the target prefix attribute of this format element. |
java.lang.Object |
initializeFrom(Tag aTag)
Initializes the state of this format element from externalized data. |
java.util.Enumeration |
keys()
Returns the keys of this Map. |
void |
registerFormat(Mapping mapping,
FormatElement format)
Registers the supplied format to the supplied mapping. |
void |
registerFormat(java.lang.Object key,
FormatElement format)
Registers the supplied format to the supplied key. |
void |
removeMapping(Mapping mapping)
Removes this mapping from the map. |
void |
removeMapping(java.lang.Object key)
Removes this mapping from the map. |
void |
setName(java.lang.String newName)
Sets the name of this format element. |
void |
setSourceContext(Context newSourceContext)
Sets the source context attribute of this format element. |
void |
setSourceContextName(java.lang.String newSourceContextName)
Sets the source context name attribute of this format element. |
void |
setSourcePrefix(java.lang.String newSourcePrefix)
Sets the source prefix attribute of this format element. |
void |
setTargetContext(Context newTargetContext)
Sets the target context attribute of this format element. |
void |
setTargetContextName(java.lang.String newTargetContextName)
Sets the target context name attribute of this format element. |
void |
setTargetPrefix(java.lang.String newTargetPrefix)
Sets the target prefix attribute of this format element. |
Vector |
toStrings()
Returns a vector containing the string representation of the SGML tags used to externalize this object. |
DataElement |
unformat(java.lang.String str,
DataElement element)
This method is unused. |
Methods inherited from class com.ibm.btt.base.FormatElement |
---|
checkIndexes, exceptionInfo, externalizer, extract, getDataElementName, getExternalizer, getTagName, isCacheable, isConstant, isItConstant, isNull, readExternal, readExternal, readObject, reinitialize, removeExternal, rootDecorated, setDataElementName, setExternalizer, setSize, toString, toTags, unformat, unformat, unformat, writeExternal, writeExternal |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected static final java.lang.String endingTagName
Constructor Detail |
---|
public MapFormat()
Method Detail |
---|
public void addMapping(Mapping mapping)
mapping
- com.ibm.btt.services.ldap.Mappingpublic void addMapping(java.lang.Object key, Mapping aMapping)
key
- java.lang.Objectmapping
- com.ibm.btt.services.ldap.Mappingpublic java.lang.String convertMapToString(Context sourceContext, Context targetContext) throws DSEInvalidRequestException
DSEInvalidRequestException
public void deRegisterFormat(Mapping mapping)
mapping
- com.ibm.btt.services.ldap.Mappingpublic void deRegisterFormat(java.lang.Object key)
key
- java.lang.Objectpublic java.lang.String format() throws DSEInvalidRequestException, DSEInvalidClassException, DSEInvalidArgumentException
DSEInvalidRequestException
DSEInvalidClassException
com.ibm.btt.baseDSEInvalidArgumentException
DSEInvalidArgumentException
public java.lang.String format(Context sourceContext) throws DSEInvalidRequestException, DSEInvalidClassException, DSEInvalidArgumentException
format
in class FormatElement
sourceContext
- com.ibm.btt.base.Context
DSEInvalidRequestException
DSEInvalidClassException
com.ibm.btt.baseDSEInvalidArgumentException
DSEInvalidArgumentException
public java.lang.String format(Context sourceContext, Context targetContext) throws DSEInvalidRequestException, DSEInvalidClassException, DSEInvalidArgumentException
sourceContext
- com.ibm.btt.base.ContexttargetContext
- com.ibm.btt.base.Context
DSEInvalidRequestException
DSEInvalidClassException
com.ibm.btt.baseDSEInvalidArgumentException
DSEInvalidArgumentException
public java.lang.String format(DataElement element) throws DSEInvalidClassException, DSEInvalidRequestException, DSEInvalidArgumentException
format
in class FormatElement
element
- com.ibm.btt.base.DataElement
DSEInvalidClassException
DSEInvalidRequestException
DSEInvalidArgumentException
protected FormatElement getFormat(java.lang.String name)
name
- java.lang.String
public Mapping getMapping(java.lang.Object key)
key
- java.lang.Object
public java.lang.String getName()
getName
in interface Cacheable
getName
in class FormatElement
public Context getSourceContext()
public java.lang.String getSourceContextName()
public java.lang.String getSourcePrefix()
public Context getTargetContext()
public java.lang.String getTargetContextName()
public java.lang.String getTargetPrefix()
public java.lang.Object initializeFrom(Tag aTag) throws java.io.IOException, DSEException
initializeFrom
in class FormatElement
aTag
- com.ibm.btt.base.Tag
java.io.IOException
DSEException
public java.util.Enumeration keys()
public void registerFormat(Mapping mapping, FormatElement format)
mapping
- com.ibm.btt.services.ldap.Mappingformat
- com.ibm.btt.base.FormatElementpublic void registerFormat(java.lang.Object key, FormatElement format)
key
- java.lang.Objectformat
- com.ibm.btt.base.FormatElementpublic void removeMapping(Mapping mapping)
hashcode
attribute of the mapping.
mapping
- com.ibm.btt.services.ldap.Mappingpublic void removeMapping(java.lang.Object key)
mapping
- com.ibm.btt.services.ldap.Mappingpublic void setName(java.lang.String newName)
setName
in class FormatElement
newName
- java.lang.Stringpublic void setSourceContext(Context newSourceContext)
newSourceContext
- com.ibm.btt.base.Contextpublic void setSourceContextName(java.lang.String newSourceContextName)
newSourceContextName
- java.lang.Stringpublic void setSourcePrefix(java.lang.String newSourcePrefix)
newSourcePrefix
- java.lang.Stringpublic void setTargetContext(Context newTargetContext)
newTargetContext
- com.ibm.btt.base.Contextpublic void setTargetContextName(java.lang.String newTargetContextName)
newTargetContextName
- java.lang.Stringpublic void setTargetPrefix(java.lang.String newTargetPrefix)
newTargetPrefix
- java.lang.Stringpublic Vector toStrings()
toStrings
in class FormatElement
public DataElement unformat(java.lang.String str, DataElement element) throws DSEInvalidRequestException, DSEInvalidArgumentException
unformat
in class FormatElement
str
- java.lang.Stringelement
- com.ibm.btt.base.DataElement
DSEInvalidRequestException
DSEInvalidArgumentException
|
IBM WebSphere Multichannel Bank Transformation Toolkit Javadoc | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |