IBM WebSphere Multichannel Bank Transformation Toolkit Javadoc

com.ibm.btt.base
Class FormatDecorator

java.lang.Object
  extended by com.ibm.btt.base.FormatElement
      extended by com.ibm.btt.base.FormatDecorator
All Implemented Interfaces:
Cacheable, java.io.Externalizable, java.io.Serializable
Direct Known Subclasses:
CodeSetTranslator, Compressor, Delimiter, FixedLength, Identifier, MaximumLength, NullCheckDecorator, SelfLength

This is the parent abstact class of the decorators.
 
 Decorators represent an additional process to be applied to a formatted
 String, independent of which concrete format element has created it.

See Also:
Serialized Form

Field Summary
 FormatElement decorated
          
Fields inherited from class com.ibm.btt.base.FormatElement
dataElementName, externalizer, name
 
Constructor Summary
FormatDecorator()
          
Method Summary
abstract  java.lang.String addDecoration(java.lang.String aString)
          
Methods inherited from class com.ibm.btt.base.FormatElement
checkIndexes, exceptionInfo, externalizer, getExternalizer, getTagName, initializeFrom, isCacheable, isNull, readExternal, readExternal, readObject, removeExternal, setDataElementName, setExternalizer, setName, setSize, toTags, unformat, unformat, writeExternal, writeExternal
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

decorated

public FormatElement decorated
The format element to be decorated.

Constructor Detail

FormatDecorator

public FormatDecorator()
Method Detail

addDecoration

public abstract java.lang.String addDecoration(java.lang.String aString)
                                        throws DSEInvalidArgumentException
AddDecoration abstract method.

Throws:
DSEInvalidArgumentException

extract

public java.lang.String[] extract(java.lang.String aString)
                           throws DSEInvalidArgumentException
Overrides the extract() method of FormatElement to redirect the extract() method to the decorated String.

Overrides:
extract in class FormatElement
Parameters:
aString - String
Returns:
java.lang.String[]
Throws:
DSEInvalidArgumentException

format

public java.lang.String format(Context aContext)
                        throws DSEInvalidClassException,
                               DSEInvalidRequestException,
                               DSEInvalidArgumentException
Calls the addDecoration() method and passing to it the String requiring the decoration operation.

Overrides:
format in class FormatElement
Parameters:
aContext - com.ibm.btt.base.Context
Returns:
java.lang.String
Throws:
DSEInvalidClassException
DSEInvalidRequestException
DSEInvalidArgumentException

format

public java.lang.String format(DataElement aDataElement)
                        throws DSEInvalidClassException,
                               DSEInvalidRequestException,
                               DSEInvalidArgumentException
Calls the addDecoration() method and passing to it the String requiring the decoration operation. The String is obtained from the DataElement.

Specified by:
format in class FormatElement
Parameters:
aDataElement - com.ibm.btt.base.DataElement
Returns:
java.lang.String
Throws:
DSEInvalidClassException
DSEInvalidRequestException
DSEInvalidArgumentException

getDataElementName

public java.lang.String getDataElementName()
Returns the dataElementName of the decorated String. Overrides the method of FormatElement.

Overrides:
getDataElementName in class FormatElement
Returns:
java.lang.String

getDecorated

public FormatElement getDecorated()
Returns the decorated FormatElement.

Returns:
FormatElement

getName

public java.lang.String getName()
Returns the value of name.

Specified by:
getName in interface Cacheable
Overrides:
getName in class FormatElement
Returns:
java.lang.String

isConstant

public java.lang.Boolean isConstant()
Returns true if the String is a constant formatted String.

Overrides:
isConstant in class FormatElement
Returns:
Boolean deprecated

isItConstant

public boolean isItConstant()
Returns true if the String is a constant formatted String.

Overrides:
isItConstant in class FormatElement
Returns:
Boolean

reinitialize

public void reinitialize()
This method will call reinitialize of the decorated element.

Specified by:
reinitialize in interface Cacheable
Overrides:
reinitialize in class FormatElement

removeDecoration

public abstract java.lang.String removeDecoration(java.lang.String aString)
                                           throws DSEInvalidArgumentException
RemoveDecoration abstract method.

Parameters:
aString - String
Returns:
java.lang.String
Throws:
DSEInvalidArgumentException

rootDecorated

public FormatElement rootDecorated()
Returns the FormatElement decorated using this decorator even if other decorators exist.

Overrides:
rootDecorated in class FormatElement
Returns:
FormatElement

rootDecorator

public FormatDecorator rootDecorator()
Returns the decorator that is currently formatting the FormatElement.

Returns:
FormatDecorator

setDecorated

public void setDecorated(FormatElement aFormatElement)
Sets the value of decorated.

Parameters:
aFormatElement - FormatElement

toString

public java.lang.String toString()
Returns a visual representation of this decorator.

Overrides:
toString in class FormatElement
Returns:
java.lang.String

toStrings

public abstract Vector toStrings()
Returns a Vector containing a visual representation of the format.

Overrides:
toStrings in class FormatElement
Returns:
java.lang.String

unformat

public DataElement unformat(java.lang.String aString,
                            Context aContext)
                     throws DSEInvalidRequestException,
                            DSEInvalidArgumentException
Calls the removeDecoration() method and then unformats the String.

Overrides:
unformat in class FormatElement
Parameters:
aString - java.lang.String
aContext - com.ibm.btt.base.Context
Returns:
com.ibm.btt.base.DataElement
Throws:
DSEInvalidRequestException
DSEInvalidArgumentException

unformat

public DataElement unformat(java.lang.String aString,
                            DataElement aDataElement)
                     throws DSEInvalidRequestException,
                            DSEInvalidArgumentException
Calls the removeDecoration() method and then unformats the String.

Specified by:
unformat in class FormatElement
Parameters:
aString - java.lang.String
aDataElement - com.ibm.btt.base.DataElement
Returns:
com.ibm.btt.base.DataElement
Throws:
DSEInvalidRequestException
DSEInvalidArgumentException

IBM WebSphere Multichannel Bank Transformation Toolkit Javadoc

(c) Copyright IBM Corporation 1998, 2009