IBM WebSphere Multichannel Bank Transformation Toolkit Javadoc

com.ibm.btt.base
Class OperationExternalizer

java.lang.Object
  extended by com.ibm.btt.base.Externalizer
      extended by com.ibm.btt.base.OperationExternalizer
All Implemented Interfaces:
Cache

public class OperationExternalizer
extends Externalizer

This Externalizer reads operations. The generic operations definition file must be specified in the btt.xml file (in the settings.file.operation path) and the self-defined operation files must be specified in the btt.xml file (in the settings.files.operations path). The tags in the definition file are the name of the classes to instantiate. The packages that contain the classes must be specified in the btt.xml file (in the settings.packages.operations).


Field Summary
 
Fields inherited from class com.ibm.btt.base.Externalizer
numberOfObjects, tagClassTable, tagInputStream, TYPE_CONTEXT, TYPE_DATA, TYPE_FORMAT, TYPE_OPERATION, TYPE_PROCESSOR, TYPE_SERVICE, TYPE_SETTINGS, TYPE_TYPE, TYPE_UNKNOWN, TYPE_VIEW
 
Constructor Summary
OperationExternalizer()
          This is the default constructor used to create an BTTOperationExternalizer object.
OperationExternalizer(java.lang.String option, java.io.BufferedInputStream aIniStream)
          This constructor creates a new instance of the BTTOperationExternalizer class.
OperationExternalizer(java.lang.String option, java.lang.String pathAndFile)
          This constructor creates a new instance of the BTTOperationExternalizer class.
 
Method Summary
static void addType(Tag aTag)
          This method creates a Type object and initializes it with the information stored in the Tag.
static void clearCache()
          This method empties the cache
 java.lang.Object convertTagToObject(Tag aTag)
          Converts a tag to an object and initializes the object's attributes.
protected  Externalizer createNewExternalizer()
          Returns a new externalizer for the generic operation file.
 TagInputStream createSelfDefinedOpTagInputStream(java.lang.String aFileOpName, java.lang.String aPathFile)
          Returns a new self-defined TagInputStream for the specified file.
 void end()
          Releases resources from this Externalizer.
static Hashtable getCache()
          This method returns the Operation element cache.
static java.util.Date getDateCreationFileByFileName(java.lang.String anOpFileName)
          Returns the date the self-defined operation file anOpFileName was created or modified.
static java.util.Date getDateCreationFileByOperationName(java.lang.String anOperationName)
          Returns the date the file containing the self-defined operation anOperationName was created or modified.
static Cacheable getFromCache(java.lang.String key)
          This method will remove an operation element with id=key from the cache and return it.
 KeyedCollection getNewKCollForOperation(java.lang.String anOperationName, java.lang.String aKeyedCollectionName)
          Returns a new instance of the context keyed Collection located in a self defined operation.
static java.util.Enumeration getOperationFileList()
          Returns the list of the self-defined operation file.
 TagInputStream getSelfDefinedOpTagInputStream(java.lang.String anOpFileName)
          Returns the TagInputStream to which the specified anOpFileName key is mapped.
 Hashtable getSelfDefinedOpTagInputStreams()
          Returns the Hashtable containing the self-defined operations file names as keys and the corresponding TagInputStreams as values.
 TagOutputStream getSelfDefinedOpTagOutputStream(java.lang.String anOpFileName)
          Returns the tagOutputStream of a self-defined operation.
 java.lang.Object[] getSgmlSelfDefinedOpFileName(java.lang.String anOperationId)
          Returns the self-defined operation file name corresponding to the anOperationId parameter.
static boolean isCacheEnabled()
          Returns true if operation element caching is possible.
static void linkContext(Tag parentTag, TagInputStream theTagInputStream)
          Deprecated. Replaced by linkContext(Tag,TagInputStream,TagInputSteam).
static void linkContext(Tag parentTag, TagInputStream theTagInputStream, TagInputStream genericTagInputStream)
          This method will add to parentTag (context tag), a subtag that is the parent context.
static void linkOperationContext(Tag parentTag, TagInputStream theTagInputStream)
          Deprecated. Replaced by "linkOperationContext(Tag,TagInputStream,TagInputSteam)."
static void linkOperationContext(Tag parentTag, TagInputStream theTagInputStream, TagInputStream genericTagInputStream)
          This method will add to parentTag (operation tag), a subtag that is the operation context.
static void linkRefData(Tag parentTag, Tag grandParentTag, TagInputStream theTagInputStream, int parentRefTagIndex)
          Deprecated. Replaced by linkRefData(Tag,Tag,TagInputStream,int,TagInputStream).
static void linkRefData(Tag parentTag, Tag grandParentTag, TagInputStream theTagInputStream, int parentRefTagIndex, TagInputStream genericTagInputStream)
          This method replaces parentTag (refData tag) with its corresponding real tag.
static void linkReferences(Tag grandParentTag, Tag parentTag, int parentRefTagIndex, int recursiveDepth, TagInputStream theTagInputStream)
          This method alters the tag structure of the tagInputStream for operation files (either DSEOPER, or a self defined file) by linking all references to their real tags.
protected static void linkReferences(Tag grandParentTag, Tag parentTag, int parentRefTagIndex, int recursiveDepth, TagInputStream theTagInputStream, TagInputStream genericTagInputStream)
          This method alters the tag structure of the tagInputStream for operation files (either DSEOPER, or a self defined file) by linking all references to their real tags.
static void linkRefFmt(Tag parentTag, Tag grandParentTag, TagInputStream theTagInputStream, int parentRefTagIndex)
          Deprecated. Replaced by linkRefFmt(Tag,Tag,TagInputStream,int,TagInputStream).
static void linkRefFmt(Tag parentTag, Tag grandParentTag, TagInputStream theTagInputStream, int parentRefTagIndex, TagInputStream genericTagInputStream)
          This method replaces parentTag (refFmt tag) with its corresponding real tag.
static void linkRefFormat(Tag parentTag, TagInputStream theTagInputStream)
          Deprecated. Replaced by "linkRefFormat(Tag,TagInputStream,TagInputStream)."
static void linkRefFormat(Tag parentTag, TagInputStream theTagInputStream, TagInputStream genericTagInputStream)
          This method will add the real corresponding format tag as a subtag to parentTag (refFormat tag).
static void linkRefKColl(Tag parentTag, TagInputStream theTagInputStream)
          Deprecated. Replaced by linkRefKColl(Tag,TagInputStream,TagInputStream).
static void linkRefKColl(Tag parentTag, TagInputStream theTagInputStream, TagInputStream genericTagInputStream)
          This method will add the real corresponding tag as a subtag to parentTag (refKColl tag).
static void linkRefOpSteps(Tag parentTag, TagInputStream theTagInputStream)
          Deprecated. Replaced by linkRefOpSteps(Tag,TagInputStream,TagInputStream).
static void linkRefOpSteps(Tag parentTag, TagInputStream theTagInputStream, TagInputStream genericTagInputStream)
          This method will add the real corresponding tag as a subtag to parentTag (refOpSteps tag).
static void linkRefService(Tag parentTag, TagInputStream theTagInputStream)
          Deprecated. Replaced by linkRefService(Tag,TagInputStream,TagInputStream).
static void linkRefService(Tag parentTag, TagInputStream theTagInputStream, TagInputStream genericTagInputStream)
          This method will add the real corresponding tag as a subtag to parentTag (refService tag).
static Tag overrideTagAttributes(Tag childTag, Vector subTags)
          Overrides a given tag with the attributes specified as param subtags in the given list of subtags.
static Tag overrideTagAttributesForData(Tag childTag, Vector subTags)
          Overrides a given tag with the attributes specified as param subtags in the given list of subtags.
static void putIntoCache(Cacheable operation)
          This method will place the cacheable element into the cache.
 java.lang.Object readObject(java.lang.String anOperationId)
          When an application wants to internalize an instance of an operation (generic or self-defined), it calls this method.
 Tag readTag(int index, java.lang.String anOpFileName)
          Returns the Tag with a given index to the tagInputStream corresponding to a self-defined operation file.
 void reset()
          Resets all the generic operations.
 void reset(java.util.Enumeration listTagId)
          Resets the definition of operations which id appears in listTagId.
 void reset(java.lang.String tagId)
          Resets the definition of the operation named tagId.
protected  void reset(java.lang.String anOperationId, TagInputStream aTagInputStream, Hashtable selfDefinedTagInputStreams)
          Resets the definition of the operation named tagId.
static void resetOperationFileNamed(java.lang.String anOpFileName)
          Resets all the self-defined operations contained in the file anOpFileName and then removes the TagInputStream corresponding to the self-defined operation file anOpFileName from the Hashtable.
static void resetOperationNamed(java.lang.String anOperationName)
          Resets the self-defined operation anOperationName.
static void setCacheEnabled(boolean newValue)
          This method enables or disables the operation element caching.
 void setSelfDefinedOpTagInputStream(java.lang.String aFileOpName)
          Creates and sets a TagInputStream corresponding to the aFileOpName file.
 void setSelfDefinedOpTagInputStream(java.lang.String aFileOpName, java.lang.String aPathFile)
          Creates and sets a TagInputStream corresponding to the aFileOpName file.
 void setSelfDefinedOpTagInputStream(java.lang.String aKey, TagInputStream aTagInputStream)
          Sets aTagInputStream in the hashtable with the key aKey.
 Vector tagList(java.lang.String anOpFileName)
          Returns the tags in the stream corresponding to the self-defined operation file anOpFileName.
 Tag tagWithId(java.lang.String aString, java.lang.String anOpFileName)
          Returns the Tag with the ID in the stream corresponding to the self-defined operation file anOpFileName.
 
Methods inherited from class com.ibm.btt.base.Externalizer
addEntryInTagClassTable, clearCacheTable, getCachePolicyToApply, getCacheTable, getClasses, getFromCacheTable, getNumberOfObjects, getObjectsMaxNum, getObjectsPerTypeMaxNum, getObjectTypesMaxNum, getTagClassTable, getTagInputStream, getTagOutputStream, isCachingEnabled, isRunTime, putIntoCacheTable, readObject, readTag, rebuildCacheTable, setCachingEnabled, setNumberOfObjects, setObjectsMaxNum, setObjectsPerTypeMaxNum, setObjectTypesMaxNum, setRunTime, setTagClassTable, setTagInputStream, tagList, tagWithId
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OperationExternalizer

public OperationExternalizer()
This is the default constructor used to create an BTTOperationExternalizer object.


OperationExternalizer

public OperationExternalizer(java.lang.String option,
                             java.io.BufferedInputStream aIniStream)
                      throws java.io.IOException
This constructor creates a new instance of the BTTOperationExternalizer class. Option can be Memory or File. Memory means that all tags are stored in memory. This is recommended with small files. File means that the file is read every time you need a tag. This is recommended with large files.

Parameters:
option - java.lang.String
aIniStream - java.io.BufferedInputStream
Throws:
java.io.IOException

OperationExternalizer

public OperationExternalizer(java.lang.String option,
                             java.lang.String pathAndFile)
                      throws java.io.IOException
This constructor creates a new instance of the BTTOperationExternalizer class. Option can be Memory or File. Memory means that all tags are stored in memory. This is recommended with small files. File means that the file is read everytime you need a tag. This is recommended with large files.

Parameters:
option - java.lang.String
pathAndFile - java.lang.String
Throws:
java.io.IOException
Method Detail

addType

public static void addType(Tag aTag)
                    throws java.io.IOException
This method creates a Type object and initializes it with the information stored in the Tag. Then it adds this object to the DSETypeExternalizer's list of types.

Parameters:
aTag - com.ibm.btt.base.Tag
Throws:
java.io.IOException

clearCache

public static void clearCache()
                       throws java.io.IOException
This method empties the cache

Throws:
java.io.IOException

convertTagToObject

public java.lang.Object convertTagToObject(Tag aTag)
                                    throws java.io.IOException
Converts a tag to an object and initializes the object's attributes. Users can specify where to find the operation using the full package name in the operations tag or in the initialization file. To work properly, the class that provides the instance must have a constructor with no arguments.

Overrides:
convertTagToObject in class Externalizer
Parameters:
aTag - com.ibm.btt.base.Tag
Returns:
java.lang.Object
Throws:
java.io.IOException

createNewExternalizer

protected Externalizer createNewExternalizer()
                                      throws java.io.IOException,
                                             DSEObjectNotFoundException
Returns a new externalizer for the generic operation file.

Returns:
com.ibm.btt.base.Externalizer
Throws:
java.io.IOException
DSEObjectNotFoundException

createSelfDefinedOpTagInputStream

public TagInputStream createSelfDefinedOpTagInputStream(java.lang.String aFileOpName,
                                                        java.lang.String aPathFile)
                                                 throws java.io.IOException
Returns a new self-defined TagInputStream for the specified file.

Parameters:
aFileOpName - java.lang.String - The name of the file
aPathFile - java.lang.String - The path of the file
Returns:
TagInputStream
Throws:
java.io.IOException

end

public void end()
Releases resources from this Externalizer.

Specified by:
end in class Externalizer

getCache

public static Hashtable getCache()
This method returns the Operation element cache.

Returns:
com.ibm.btt.base.Hashtable

getDateCreationFileByFileName

public static java.util.Date getDateCreationFileByFileName(java.lang.String anOpFileName)
Returns the date the self-defined operation file anOpFileName was created or modified.

Parameters:
anOpFileName - java.lang.String - The self-defined operation file name
Returns:
java.util.Date.

getDateCreationFileByOperationName

public static java.util.Date getDateCreationFileByOperationName(java.lang.String anOperationName)
Returns the date the file containing the self-defined operation anOperationName was created or modified.

Parameters:
anOperationName - java.lang.String - The self-defined operation name (id)
Returns:
java.util.Date.

getFromCache

public static Cacheable getFromCache(java.lang.String key)
                              throws java.io.IOException
This method will remove an operation element with id=key from the cache and return it. If there are no elements in the cache with id=key, then null is returned.

Parameters:
key - java.lang.String
Returns:
com.ibm.btt.base.Cacheable
Throws:
java.io.IOException

getNewKCollForOperation

public KeyedCollection getNewKCollForOperation(java.lang.String anOperationName,
                                               java.lang.String aKeyedCollectionName)
                                        throws java.io.IOException
Returns a new instance of the context keyed Collection located in a self defined operation.

Parameters:
anOperationName - java.lang.String - The Operation name
aKeyedCollectionName - java.lang.String - The operation context keyed collection name
Returns:
com.ibm.btt.base.KeyedCollection
Throws:
java.io.IOException

getOperationFileList

public static java.util.Enumeration getOperationFileList()
Returns the list of the self-defined operation file.

Returns:
java.util.Enumeration

getSelfDefinedOpTagInputStream

public TagInputStream getSelfDefinedOpTagInputStream(java.lang.String anOpFileName)
Returns the TagInputStream to which the specified anOpFileName key is mapped.

Parameters:
anOpFileName - java.lang.String
Returns:
com.ibm.btt.base.TagInputStream

getSelfDefinedOpTagInputStreams

public Hashtable getSelfDefinedOpTagInputStreams()
Returns the Hashtable containing the self-defined operations file names as keys and the corresponding TagInputStreams as values.

Returns:
com.ibm.btt.base.Hashtable

getSelfDefinedOpTagOutputStream

public TagOutputStream getSelfDefinedOpTagOutputStream(java.lang.String anOpFileName)
                                                throws java.io.IOException
Returns the tagOutputStream of a self-defined operation. This is used only in edit-time.

Parameters:
anOpFileName - String
Returns:
TagOutputStream
Throws:
java.io.IOException

getSgmlSelfDefinedOpFileName

public java.lang.Object[] getSgmlSelfDefinedOpFileName(java.lang.String anOperationId)
Returns the self-defined operation file name corresponding to the anOperationId parameter.

Parameters:
anOperationId - java.lang.String
Returns:
java.lang.Object[] Object[0] => Boolean indicating whether the self-defined operation is defined in the .INI file or not Object[1] => file name of the self-defined operation Object[2] => path of the self-defined operation file

isCacheEnabled

public static boolean isCacheEnabled()
Returns true if operation element caching is possible. Returns false if it is not possible.

Returns:
boolean

linkContext

public static void linkContext(Tag parentTag,
                               TagInputStream theTagInputStream)
                        throws java.io.IOException
Deprecated. Replaced by linkContext(Tag,TagInputStream,TagInputSteam).

This method will add to parentTag (context tag), a subtag that is the parent context.

Parameters:
parentTag - com.ibm.btt.base.Tag
theTagInputStream - com.ibm.btt.base.Tag
Throws:
java.io.IOException

linkContext

public static void linkContext(Tag parentTag,
                               TagInputStream theTagInputStream,
                               TagInputStream genericTagInputStream)
                        throws java.io.IOException
This method will add to parentTag (context tag), a subtag that is the parent context.

Parameters:
parentTag - com.ibm.btt.base.Tag
theTagInputStream - com.ibm.btt.base.Tag
genericTagInputStream - com.ibm.btt.base.Tag
Throws:
java.io.IOException

linkOperationContext

public static void linkOperationContext(Tag parentTag,
                                        TagInputStream theTagInputStream)
                                 throws java.io.IOException
Deprecated. Replaced by "linkOperationContext(Tag,TagInputStream,TagInputSteam)."

This method will add to parentTag (operation tag), a subtag that is the operation context.

Parameters:
parentTag - com.ibm.btt.base.Tag
theTagInputStream - com.ibm.btt.base.Tag
Throws:
java.io.IOException

linkOperationContext

public static void linkOperationContext(Tag parentTag,
                                        TagInputStream theTagInputStream,
                                        TagInputStream genericTagInputStream)
                                 throws java.io.IOException
This method will add to parentTag (operation tag), a subtag that is the operation context.

Parameters:
parentTag - com.ibm.btt.base.Tag
theTagInputStream - com.ibm.btt.base.Tag
genericTagInputStream - com.ibm.btt.base.TagInputStream
Throws:
java.io.IOException

linkRefData

public static void linkRefData(Tag parentTag,
                               Tag grandParentTag,
                               TagInputStream theTagInputStream,
                               int parentRefTagIndex)
                        throws java.io.IOException
Deprecated. Replaced by linkRefData(Tag,Tag,TagInputStream,int,TagInputStream).

This method replaces parentTag (refData tag) with its corresponding real tag.

Parameters:
parentTag - com.ibm.btt.base.Tag
grandParentTag - com.ibm.btt.base.Tag
theTagInputStream - com.ibm.btt.base.TagInputStream
parentRefTagIndex - int
Throws:
java.io.IOException

linkRefData

public static void linkRefData(Tag parentTag,
                               Tag grandParentTag,
                               TagInputStream theTagInputStream,
                               int parentRefTagIndex,
                               TagInputStream genericTagInputStream)
                        throws java.io.IOException
This method replaces parentTag (refData tag) with its corresponding real tag.

Parameters:
parentTag - com.ibm.btt.base.Tag
grandParentTag - com.ibm.btt.base.Tag
theTagInputStream - com.ibm.btt.base.TagInputStream
parentRefTagIndex - int
genericTagInputStream - com.ibm.btt.base.TagInputStream
Throws:
java.io.IOException

linkReferences

public static void linkReferences(Tag grandParentTag,
                                  Tag parentTag,
                                  int parentRefTagIndex,
                                  int recursiveDepth,
                                  TagInputStream theTagInputStream)
                           throws java.io.IOException,
                                  DSEObjectNotFoundException
This method alters the tag structure of the tagInputStream for operation files (either DSEOPER, or a self defined file) by linking all references to their real tags. All real tags are looked for first in the self defined operation file tag stream, and then in the corresponding file tag stream (either data, formats, services, contexts, or operations). The grandParentTag has the parentTag as one of its subtags. The parentTag is the tag that is currently being checked for references. The parentRefTagIndex is the index of the parentTag in the subtags vector of grandParentTag. The recursiveDepth describes the nesting level of the tag. Any base level tags have recursiveDepth of 1. The theTagInputStream is the input stream which will have its references linked. It can be either the generic operation file (DSEOPER) or a self-defined operation.

Parameters:
grandParentTag - com.ibm.btt.base.Tag
parentTag - com.ibm.btt.base.Tag
parentRefTagIndex - int
recursiveDepth - int
theTagInputStream - com.ibm.btt.base.TagInputStream
Throws:
java.io.IOException
DSEObjectNotFoundException

linkReferences

protected static void linkReferences(Tag grandParentTag,
                                     Tag parentTag,
                                     int parentRefTagIndex,
                                     int recursiveDepth,
                                     TagInputStream theTagInputStream,
                                     TagInputStream genericTagInputStream)
                              throws java.io.IOException,
                                     DSEObjectNotFoundException
This method alters the tag structure of the tagInputStream for operation files (either DSEOPER, or a self defined file) by linking all references to their real tags. All real tags are looked for first in the self defined operation file tag stream, and then in the corresponding file tag stream (either data, formats, services, contexts, or operations). The grandParentTag has the parentTag as one of its subtags. The parentTag is the tag that is currently being checked for references. The parentRefTagIndex is the index of the parentTag in the subtags vector of grandParentTag. The recursiveDepth describes the nesting level of the tag. Any base level tags have recursiveDepth of 1. The theTagInputStream is the input stream which will have its references linked. It can be either the generic operation file (DSEOPER) or a self-defined operation. The genericTagInputStream is the input stream to be considered as generic stream in order to solve references.

Parameters:
grandParentTag - com.ibm.btt.base.Tag
parentTag - com.ibm.btt.base.Tag
parentRefTagIndex - int
recursiveDepth - int
theTagInputStream - com.ibm.btt.base.TagInputStream
genericTagInputStream - com.ibm.btt.base.TagInputStream
Throws:
java.io.IOException
DSEObjectNotFoundException

linkRefFmt

public static void linkRefFmt(Tag parentTag,
                              Tag grandParentTag,
                              TagInputStream theTagInputStream,
                              int parentRefTagIndex)
                       throws java.io.IOException
Deprecated. Replaced by linkRefFmt(Tag,Tag,TagInputStream,int,TagInputStream).

This method replaces parentTag (refFmt tag) with its corresponding real tag.

Parameters:
parentTag - com.ibm.btt.base.Tag
grandParentTag - com.ibm.btt.base.Tag
theTagInputStream - com.ibm.btt.base.TagInputStream
parentRefTagIndex - int
Throws:
java.io.IOException

linkRefFmt

public static void linkRefFmt(Tag parentTag,
                              Tag grandParentTag,
                              TagInputStream theTagInputStream,
                              int parentRefTagIndex,
                              TagInputStream genericTagInputStream)
                       throws java.io.IOException
This method replaces parentTag (refFmt tag) with its corresponding real tag.

Parameters:
parentTag - com.ibm.btt.base.Tag
grandParentTag - com.ibm.btt.base.Tag
theTagInputStream - com.ibm.btt.base.TagInputStream
parentRefTagIndex - int
genericTagInputStream - com.ibm.btt.base.TagInputStream
Throws:
java.io.IOException

linkRefFormat

public static void linkRefFormat(Tag parentTag,
                                 TagInputStream theTagInputStream)
                          throws java.io.IOException
Deprecated. Replaced by "linkRefFormat(Tag,TagInputStream,TagInputStream)."

This method will add the real corresponding format tag as a subtag to parentTag (refFormat tag).

Parameters:
parentTag - com.ibm.btt.base.Tag
theTagInputStream - com.ibm.btt.base.TagInputStream
Throws:
java.io.IOException

linkRefFormat

public static void linkRefFormat(Tag parentTag,
                                 TagInputStream theTagInputStream,
                                 TagInputStream genericTagInputStream)
                          throws java.io.IOException
This method will add the real corresponding format tag as a subtag to parentTag (refFormat tag).

Parameters:
parentTag - com.ibm.btt.base.Tag
theTagInputStream - com.ibm.btt.base.TagInputStream
genericTagInputStream - com.ibm.btt.base.TagInputStream
Throws:
java.io.IOException

linkRefKColl

public static void linkRefKColl(Tag parentTag,
                                TagInputStream theTagInputStream)
                         throws java.io.IOException
Deprecated. Replaced by linkRefKColl(Tag,TagInputStream,TagInputStream).

This method will add the real corresponding tag as a subtag to parentTag (refKColl tag).

Parameters:
parentTag - com.ibm.btt.base.Tag
theTagInputStream - com.ibm.btt.base.TagInputStream
Throws:
java.io.IOException

linkRefKColl

public static void linkRefKColl(Tag parentTag,
                                TagInputStream theTagInputStream,
                                TagInputStream genericTagInputStream)
                         throws java.io.IOException
This method will add the real corresponding tag as a subtag to parentTag (refKColl tag).

Parameters:
parentTag - com.ibm.btt.base.Tag
theTagInputStream - com.ibm.btt.base.TagInputStream
genericTagInputStream - com.ibm.btt.base.TagInputStream
Throws:
java.io.IOException

linkRefOpSteps

public static void linkRefOpSteps(Tag parentTag,
                                  TagInputStream theTagInputStream)
                           throws java.io.IOException
Deprecated. Replaced by linkRefOpSteps(Tag,TagInputStream,TagInputStream).

This method will add the real corresponding tag as a subtag to parentTag (refOpSteps tag).

Parameters:
parentTag - com.ibm.btt.base.Tag
theTagInputStream - com.ibm.btt.base.TagInputStream
Throws:
java.io.IOException

linkRefOpSteps

public static void linkRefOpSteps(Tag parentTag,
                                  TagInputStream theTagInputStream,
                                  TagInputStream genericTagInputStream)
                           throws java.io.IOException
This method will add the real corresponding tag as a subtag to parentTag (refOpSteps tag).

Parameters:
parentTag - com.ibm.btt.base.Tag
theTagInputStream - com.ibm.btt.base.TagInputStream
genericTagInputStream - com.ibm.btt.base.TagInputStream
Throws:
java.io.IOException

linkRefService

public static void linkRefService(Tag parentTag,
                                  TagInputStream theTagInputStream)
                           throws java.io.IOException
Deprecated. Replaced by linkRefService(Tag,TagInputStream,TagInputStream).

This method will add the real corresponding tag as a subtag to parentTag (refService tag).

Parameters:
parentTag - com.ibm.btt.base.Tag
theTagInputStream - com.ibm.btt.base.TagInputStream
Throws:
java.io.IOException

linkRefService

public static void linkRefService(Tag parentTag,
                                  TagInputStream theTagInputStream,
                                  TagInputStream genericTagInputStream)
                           throws java.io.IOException
This method will add the real corresponding tag as a subtag to parentTag (refService tag).

Parameters:
parentTag - com.ibm.btt.base.Tag
parentTag - com.ibm.btt.base.TagInputStream
genericTagInputStream - com.ibm.btt.base.TagInputStream
Throws:
java.io.IOException

overrideTagAttributes

public static Tag overrideTagAttributes(Tag childTag,
                                        Vector subTags)
Overrides a given tag with the attributes specified as param subtags in the given list of subtags.

Parameters:
childTag - com.ibm.btt.base.Tag
subTags - com.ibm.btt.base.Vector
Returns:
com.ibm.btt.base.Tag

overrideTagAttributesForData

public static Tag overrideTagAttributesForData(Tag childTag,
                                               Vector subTags)
Overrides a given tag with the attributes specified as param subtags in the given list of subtags.

Parameters:
childTag - com.ibm.btt.base.Tag
subTags - com.ibm.btt.base.Vector
Returns:
com.ibm.btt.base.Tag

putIntoCache

public static void putIntoCache(Cacheable operation)
                         throws java.io.IOException
This method will place the cacheable element into the cache. The operation element will be keyed with the operation name in the cache.

Parameters:
key - java.lang.String
value - java.lang.Object
Throws:
java.io.IOException

readObject

public java.lang.Object readObject(java.lang.String anOperationId)
                            throws java.io.IOException
When an application wants to internalize an instance of an operation (generic or self-defined), it calls this method. The parameter is the identification of a tag whose type matches the operation class of the element. The instance is initialized with the attributes found in the tag. If you know the class to be internalized and it implements Externalizable, an alternative way to get the instance is to use: new MyClass(aString).

Overrides:
readObject in class Externalizer
Parameters:
anOperationId - java.lang.String
Returns:
java.lang.Object
Throws:
java.io.IOException.
java.io.IOException

readTag

public Tag readTag(int index,
                   java.lang.String anOpFileName)
            throws java.io.IOException
Returns the Tag with a given index to the tagInputStream corresponding to a self-defined operation file.

Parameters:
index - int
anOpFileName - java.lang.String - The self-defined operation file name where the tag must be searched
Returns:
com.ibm.btt.base.Tag
Throws:
java.io.IOException

reset

public void reset()
           throws java.io.IOException,
                  DSEObjectNotFoundException
Resets all the generic operations. All self-defined definitions are deleted.

Throws:
java.io.IOException
DSEObjectNotFoundException

reset

public void reset(java.lang.String tagId)
           throws java.io.IOException,
                  DSEObjectNotFoundException
Resets the definition of the operation named tagId. The new definition is read from the file associated with this operation.

Parameters:
tagId - java.lang.String - The id of the operation to reset
Throws:
java.io.IOException
DSEObjectNotFoundException

reset

protected void reset(java.lang.String anOperationId,
                     TagInputStream aTagInputStream,
                     Hashtable selfDefinedTagInputStreams)
              throws java.io.IOException
Resets the definition of the operation named tagId. The new definition is obtained from the temporal TagInputStreams passed by parameter.

Parameters:
anOperationId - java.lang.String - The id of the operation to reset
aTagInputStream - com.ibm.btt.base.TagInputStream - The temporal generic TagInputStream
selfDefinedTagInputStreams - com.ibm.btt.base.Hashtable - The temporal self-defined TagInputStreams
Throws:
java.io.IOException

reset

public void reset(java.util.Enumeration listTagId)
           throws java.io.IOException,
                  DSEObjectNotFoundException
Resets the definition of operations which id appears in listTagId. The new definitions are read from the file associated with the reset operations.

Parameters:
listTagId - java.util.Enumeration
Throws:
java.io.IOException
DSEObjectNotFoundException

resetOperationFileNamed

public static void resetOperationFileNamed(java.lang.String anOpFileName)
Resets all the self-defined operations contained in the file anOpFileName and then removes the TagInputStream corresponding to the self-defined operation file anOpFileName from the Hashtable.

Parameters:
anOpFileName - java.lang.String - The name of the self-defined operation file

resetOperationNamed

public static void resetOperationNamed(java.lang.String anOperationName)
Resets the self-defined operation anOperationName. All the operations included in the same file as anOperationName are also reset. The method then removes the TagInputStream corresponding to the self-defined operation file from the Hashtable.

Parameters:
anOperationName - java.lang.String - The name of the operation to reset

setCacheEnabled

public static void setCacheEnabled(boolean newValue)
                            throws java.io.IOException
This method enables or disables the operation element caching. if newValue = true, then object caching is enabled. if newValue = false, then object caching is disabled.

Parameters:
newValue - boolean
Throws:
java.io.IOException

setSelfDefinedOpTagInputStream

public void setSelfDefinedOpTagInputStream(java.lang.String aFileOpName)
                                    throws java.io.IOException
Creates and sets a TagInputStream corresponding to the aFileOpName file. The method then adds the new TagInputStream to the Hashtable containing TagInputStream instances corresponding to the self-defined operation files.

Parameters:
aFileOpName - java.lang.String
Throws:
java.io.IOException

setSelfDefinedOpTagInputStream

public void setSelfDefinedOpTagInputStream(java.lang.String aKey,
                                           TagInputStream aTagInputStream)
                                    throws java.io.IOException
Sets aTagInputStream in the hashtable with the key aKey. This stream can read tags.

Parameters:
aKey - java.lang.String
aTagInputStream - aTagInputStream
Throws:
java.io.IOException.
java.io.IOException

setSelfDefinedOpTagInputStream

public void setSelfDefinedOpTagInputStream(java.lang.String aFileOpName,
                                           java.lang.String aPathFile)
                                    throws java.io.IOException
Creates and sets a TagInputStream corresponding to the aFileOpName file. The method then adds the new TagInputStream to the Hashtable containing TagInputStream instances corresponding to the self-defined operation files.

Parameters:
aFileOpName - java.lang.String
aPathFile - java.lang.String
Throws:
java.io.IOException.
java.io.IOException

tagList

public Vector tagList(java.lang.String anOpFileName)
Returns the tags in the stream corresponding to the self-defined operation file anOpFileName.

Parameters:
anOpFileName - java.lang.String
Returns:
com.ibm.btt.base.Vector

tagWithId

public Tag tagWithId(java.lang.String aString,
                     java.lang.String anOpFileName)
              throws java.io.IOException
Returns the Tag with the ID in the stream corresponding to the self-defined operation file anOpFileName.

Parameters:
aString - java.lang.String - The id of the Tag to search
anOpFileName - java.lang.String - The self-defined operation file name where the tag must be searched
Returns:
com.ibm.btt.base.Tag
Throws:
java.io.IOException

IBM WebSphere Multichannel Bank Transformation Toolkit Javadoc

(c) Copyright IBM Corporation 1998, 2010