IBM WebSphere Multichannel Bank Transformation Toolkit Javadoc

com.ibm.btt.automaton
Class ProcessorExternalizer

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

public class ProcessorExternalizer
extends Externalizer

The ProcessExternalizer class reads processors. The generic XML file must be specified in BTT.XML in the settings.files.processor path. The tags must be in the settings.tags.processors path.


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
ProcessorExternalizer()
          This is the default constructor used to create a ProcessorExternalizer object.
ProcessorExternalizer(java.lang.String option, java.io.BufferedInputStream aIniStream)
          This constructor creates a new instance of the ProcessorExternalizer class.
ProcessorExternalizer(java.lang.String option, java.lang.String pathAndFile)
          This constructor initializes a Processor object.
 
Method Summary
static void addType(Tag aTag)
          Creates a Type object and initializes it with the information stored in the Tag.
static void clearCache()
          Empties the cache
 java.lang.Object convertTagToObject(Tag aTag)
          Converts a tag to an object and initializes the object's attributes.
protected  ProcessorExternalizer createNewExternalizer()
          Returns a new externalizer for the generic processor file.
protected  TagInputStream createSelfDefinedProcTagInputStream(java.lang.String aFileProcName, java.lang.String aPathFile)
          Returns a new self-defined TagInputStream for the specified file.
 void end()
          Releases resources from this Externalizer.
static Hashtable getCache()
          Returns the Processor element cache.
static java.util.Date getDateCreationFileByFileName(java.lang.String aProcFileName)
          Returns the date the self-defined processor file aProcFileName was created or modified.
static java.util.Date getDateCreationFileByProcessorName(java.lang.String aProcessorName)
          Returns the date the file containing the self-defined processor aProcessorName was created or modified.
static Cacheable getFromCache(java.lang.String key)
          Removes the processor element with id=key from the cache and returns it.
 KeyedCollection getNewKCollForProcessor(java.lang.String aProcessorName, java.lang.String aKeyedCollectionName)
          Returns a new instance of the context keyed Collection located in a self defined processor.
static java.util.Enumeration getProcessorFileList()
          Returns the number of self-defined processor files from the list.
 TagInputStream getSelfDefinedProcTagInputStream(java.lang.String aProcFileName)
          Returns the TagInputStream to which the specified aProcFileName key is mapped.
 java.util.Hashtable getSelfDefinedProcTagInputStreams()
          Returns the Hashtable containing the self-defined processors file names as keys and the corresponding TagInputStreams as values.
 TagOutputStream getSelfDefinedProcTagOutputStream(java.lang.String aProcFileName)
          Returns the tagOutputStream of a self-defined processor.
 java.lang.Object[] getSgmlSelfDefinedProcFileName(java.lang.String aProcessorId)
          Returns the self-defined processor file name corresponding to the aProcessorId.
static boolean isCacheEnabled()
          Returns true if processor caching is enabled.
static void linkAttributeRefs(Tag parentTag, TagInputStream theTagInputStream)
          Deprecated. Replaced by linkAttributeRefs(Tag, TagInputStream, TagInputStream).
static void linkAttributeRefs(Tag parentTag, TagInputStream theTagInputStream, TagInputStream genericTagInputStream)
          Adds the referenced tag to the parentTag as a subtag if the parentTag has an attribute named context, refFlow, operationName, or operationContext.
static void linkContext(Tag parentTag, TagInputStream theTagInputStream)
          Deprecated. Replaced by linkContext(Tag, TagInputStream, TagInputStream).
static void linkContext(Tag parentTag, TagInputStream theTagInputStream, TagInputStream genericTagInputStream)
          Chains the context to the parentTag parent 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, TagInputStream theTagInputStream)
          Alters the tag structure of the tagInputStream for processor files (either DSEPROCESSOR.xml or a self defined file) by linking all references to their real tags.
protected static void linkReferences(Tag grandParentTag, Tag parentTag, int parentRefTagIndex, TagInputStream theTagInputStream, TagInputStream genericTagInputStream)
          Alters the tag structure of the tagInputStream for processor files (either DSEPROCESSOR.xml 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)
          Replaces the 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)
          Adds the real corresponding format tag as a subtag of the 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)
          Adds the real corresponding tag as a subtag to the 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)
          Adds the real corresponding tag as a subtag to the 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)
          Adds the real corresponding tag as a subtag to the parentTag ("refService" tag).
static void linkSpecifiedContext(Tag parentTag, TagInputStream theTagInputStream, java.lang.String tagId)
          Deprecated. Replaced by linkSpecifiedContext(Tag, TagInputStream, String, TagInputStream).
static void linkSpecifiedContext(Tag parentTag, TagInputStream theTagInputStream, java.lang.String tagId, TagInputStream genericTagInputStream)
          Adds as subtag of the parentTag a context tag called tagId.
static void linkSpecifiedFlow(Tag parentTag, TagInputStream theTagInputStream, java.lang.String flowId)
          Deprecated. Replaced by linkSpecifiedFlow(Tag, TagInputStream, String, TagInputStream).
static void linkSpecifiedFlow(Tag parentTag, TagInputStream theTagInputStream, java.lang.String flowId, TagInputStream genericTagInputStream)
          Finds a flow tag called flowId and adds all its sub tags to the subtags of the parentTag.
static void linkSpecifiedFormat(Tag parentTag, TagInputStream theTagInputStream, java.lang.String tagId)
          Deprecated. Replaced by linkSpecifiedFormat(Tag, TagInputStream, String, TagInputStream).
static void linkSpecifiedFormat(Tag parentTag, TagInputStream theTagInputStream, java.lang.String tagId, TagInputStream genericTagInputStream)
          Adds as subtag of the parentTag a format tag called tagId.
static void linkSpecifiedOperation(Tag parentTag, TagInputStream theTagInputStream, java.lang.String tagId)
          Deprecated. Replaced by linkSpecifiedOperation(Tag, TagInputStream, String, TagInputStream).
static void linkSpecifiedOperation(Tag parentTag, TagInputStream theTagInputStream, java.lang.String tagId, TagInputStream genericTagInputStream)
          Adds as subtag of the parentTag an operation tag called tagId.
static void putIntoCache(Cacheable processor)
          Places the cacheable processor element into the cache.
 java.lang.Object readObject(java.lang.String aProcessorId)
          When an application wants to internalize an instance of an processor (generic or self-defined), it calls this method.
 java.lang.Object readObjectNonCache(java.lang.String aProcessorId)
          Returns a new processor instance created from the information stored in the configuration files associated with a given processor id.
 Tag readTag(int index, java.lang.String aProcFileName)
          Returns the Tag with a given index to the tagInputStream corresponding to a self-defined processor file.
 void reset()
          Resets all the generic processors.
 void reset(java.util.Enumeration listTagId)
          Resets the definition of processors that have IDs that appear in listTagId.
 void reset(java.lang.String tagId)
          Resets the definition of the processor named tagId.
protected  void reset(java.lang.String aProcessorId, TagInputStream aTagInputStream, Hashtable selfDefinedTagInputStreams)
          Resets the definition of the processor named tagId.
static void resetProcessorFileNamed(java.lang.String aProcFileName)
          Resets all the self-defined processors contained in the file aProcFileName and then removes the TagInputStream corresponding to the self-defined processor file aProcFileName from the Hashtable.
static void resetProcessorNamed(java.lang.String aProcessorName)
          Resets the self-defined processor aProcessorName.
static void setCacheEnabled(boolean newValue)
          Enables or disables the processor element caching.
 void setSelfDefinedProcTagInputStream(java.lang.String aFileProcName)
          Creates and sets a TagInputStream corresponding to the aFileProcName file.
 void setSelfDefinedProcTagInputStream(java.lang.String aFileProcName, java.lang.String aPathFile)
          Creates and sets a TagInputStream corresponding to the aFileProcName file.
 void setSelfDefinedProcTagInputStream(java.lang.String aKey, TagInputStream aTagInputStream)
          Sets aTagInputStream in the hashtable with the key aKey.
 java.util.Vector tagList(java.lang.String aProcFileName)
          Returns the tags in the stream corresponding to the self-defined processor file aProcFileName.
 Tag tagWithId(java.lang.String aString, java.lang.String aProcFileName)
          Returns the Tag with the ID in the stream corresponding to the self-defined processor file aProcFileName.
 
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

ProcessorExternalizer

public ProcessorExternalizer()
This is the default constructor used to create a ProcessorExternalizer object.


ProcessorExternalizer

public ProcessorExternalizer(java.lang.String option,
                             java.io.BufferedInputStream aIniStream)
                      throws java.io.IOException
This constructor creates a new instance of the ProcessorExternalizer class. The option parameter must 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 a tag is needed. This is recommended with large tag files.

Parameters:
option - java.lang.String must be "Memory" or "File"
aIniStream - java.io.BufferedInputStream
Throws:
java.io.IOException

ProcessorExternalizer

public ProcessorExternalizer(java.lang.String option,
                             java.lang.String pathAndFile)
                      throws java.io.IOException
This constructor initializes a Processor object. The option parameter must 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 a tag is needed. This is recommended with large tag files.

Parameters:
option - java.lang.String must be "Memory" or "File"
pathAndFile - java.lang.String specifying the name and path of the formats definition file
Throws:
java.io.IOException
Method Detail

addType

public static void addType(Tag aTag)
                    throws java.io.IOException
Creates a Type object and initializes it with the information stored in the Tag. This method then 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()
Empties the cache


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 processor using the full package name in the processor 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 - Tag
Returns:
Object
Throws:
java.io.IOException

createNewExternalizer

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

Returns:
com.ibm.btt.automaton.ProcessorExternalizer
Throws:
java.io.IOException
DSEObjectNotFoundException

createSelfDefinedProcTagInputStream

protected TagInputStream createSelfDefinedProcTagInputStream(java.lang.String aFileProcName,
                                                             java.lang.String aPathFile)
                                                      throws java.io.IOException
Returns a new self-defined TagInputStream for the specified file.

Parameters:
aFileProcName - 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()
Returns the Processor element cache.

Returns:
com.ibm.btt.base.Hashtable

getDateCreationFileByFileName

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

Parameters:
aProcFileName - java.lang.String the self-defined processor file name
Returns:
java.util.Date - The date the file was created or last modified

getDateCreationFileByProcessorName

public static java.util.Date getDateCreationFileByProcessorName(java.lang.String aProcessorName)
Returns the date the file containing the self-defined processor aProcessorName was created or modified.

Parameters:
aProcessorName - java.lang.String the self-defined processor name (id).
Returns:
java.util.Date.

getFromCache

public static Cacheable getFromCache(java.lang.String key)
                              throws java.io.IOException
Removes the processor element with id=key from the cache and returns it. If there are no elements in the cache with id=key, this method returns null.

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

getNewKCollForProcessor

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

Parameters:
aProcessorName - java.lang.String the processor name.
aKeyedCollectionName - java.lang.String the processor context keyed collection name
Returns:
com.ibm.btt.base.KeyedCollection.
Throws:
java.io.IOException

getProcessorFileList

public static java.util.Enumeration getProcessorFileList()
Returns the number of self-defined processor files from the list.

Returns:
java.util.Enumeration - The number of files

getSelfDefinedProcTagInputStream

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

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

getSelfDefinedProcTagInputStreams

public java.util.Hashtable getSelfDefinedProcTagInputStreams()
Returns the Hashtable containing the self-defined processors file names as keys and the corresponding TagInputStreams as values.

Returns:
com.ibm.btt.base.Hashtable

getSelfDefinedProcTagOutputStream

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

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

getSgmlSelfDefinedProcFileName

public java.lang.Object[] getSgmlSelfDefinedProcFileName(java.lang.String aProcessorId)
Returns the self-defined processor file name corresponding to the aProcessorId.

Parameters:
aProcessorId - java.lang.String
Returns:
java.lang.Object[] - Object[0] => Boolean True if the self-defined processor is defined in the .INI file Object[1] => The file name of the self-defined processor Object[2] => The path of the self-defined processor file

isCacheEnabled

public static boolean isCacheEnabled()
Returns true if processor caching is enabled.

Returns:
boolean

linkAttributeRefs

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

If parentTag has an attribute named 'context','refFlow','operationName' or 'operationContext' then add to parentTag a subtag that is the referenced tag. But if parentTag has an attribute named 'inputMapFmt' or 'outputMapFmt' then add to parentTag a new "refFormat" subtag which in its turn has as subtag the tag referenced in the attribute value.

Throws:
java.io.IOException

linkAttributeRefs

public static void linkAttributeRefs(Tag parentTag,
                                     TagInputStream theTagInputStream,
                                     TagInputStream genericTagInputStream)
                              throws java.io.IOException
Adds the referenced tag to the parentTag as a subtag if the parentTag has an attribute named context, refFlow, operationName, or operationContext. If the parentTag has an attribute named inputMapFmt or outputMapFmt, this method adds a new "refFormat" subtag to the parentTag. The new refFormat subtag has as a subtag the tag referenced in the attributeValue.

Throws:
java.io.IOException

linkContext

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

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

Throws:
java.io.IOException

linkContext

public static void linkContext(Tag parentTag,
                               TagInputStream theTagInputStream,
                               TagInputStream genericTagInputStream)
                        throws java.io.IOException
Chains the context to the parentTag parent context.

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.

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.

Throws:
java.io.IOException

linkReferences

public static void linkReferences(Tag grandParentTag,
                                  Tag parentTag,
                                  int parentRefTagIndex,
                                  TagInputStream theTagInputStream)
                           throws java.io.IOException,
                                  DSEObjectNotFoundException
Alters the tag structure of the tagInputStream for processor files (either DSEPROCESSOR.xml or a self defined file) by linking all references to their real tags. All real tags are searched for first in the self defined processor file tag stream and then in the corresponding file tag stream (either data, services, contexts, or formats).

Parameters:
grandParentTag - com.ibm.btt.base.Tag the tag that has the parentTag as one of its subtags
parentTag - com.ibm.btt.base.Tag the tag that is currently being checked for references
parentRefTagIndex - int the index of the parentTag in the subtags vector of grandParentTag
theTagInputStream - com.ibm.btt.base.TagInputStream the input stream that will have its references linked. It can be either the generic processor file (DSEPROCESSOR) or a self-defined processor
Throws:
java.io.IOException
DSEObjectNotFoundException

linkReferences

protected static void linkReferences(Tag grandParentTag,
                                     Tag parentTag,
                                     int parentRefTagIndex,
                                     TagInputStream theTagInputStream,
                                     TagInputStream genericTagInputStream)
                              throws java.io.IOException,
                                     DSEObjectNotFoundException
Alters the tag structure of the tagInputStream for processor files (either DSEPROCESSOR.xml or a self defined file) by linking all references to their real tags. All real tags are searched for first in the self defined processor file tag stream and then in the corresponding file tag stream (either data, services, contexts, or formats).

Parameters:
grandParentTag - com.ibm.btt.base.Tag the tag that has the parentTag as one of its subtags
parentTag - com.ibm.btt.base.Tag the tag that is currently being checked for references
parentRefTagIndex - int the index of the parentTag in the subtags vector of grandParentTag
theTagInputStream - com.ibm.btt.base.TagInputStream the input stream that will have its references linked. It can be either the generic processor file (DSEPROCESSOR) or a self-defined processor
genericTagInputStream - the input stream used as the generic stream to resolve references
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.

Throws:
java.io.IOException

linkRefFmt

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

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).

Throws:
java.io.IOException

linkRefFormat

public static void linkRefFormat(Tag parentTag,
                                 TagInputStream theTagInputStream,
                                 TagInputStream genericTagInputStream)
                          throws java.io.IOException
Adds the real corresponding format tag as a subtag of the 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).

Throws:
java.io.IOException

linkRefKColl

public static void linkRefKColl(Tag parentTag,
                                TagInputStream theTagInputStream,
                                TagInputStream genericTagInputStream)
                         throws java.io.IOException
Adds the real corresponding tag as a subtag to the 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).

Throws:
java.io.IOException

linkRefOpSteps

public static void linkRefOpSteps(Tag parentTag,
                                  TagInputStream theTagInputStream,
                                  TagInputStream genericTagInputStream)
                           throws java.io.IOException
Adds the real corresponding tag as a subtag to the 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).

Throws:
java.io.IOException

linkRefService

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

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

linkSpecifiedContext

public static void linkSpecifiedContext(Tag parentTag,
                                        TagInputStream theTagInputStream,
                                        java.lang.String tagId)
                                 throws java.io.IOException
Deprecated. Replaced by linkSpecifiedContext(Tag, TagInputStream, String, TagInputStream).

Adds as subtag of the parentTag a context tag called tagId.

Throws:
java.io.IOException

linkSpecifiedContext

public static void linkSpecifiedContext(Tag parentTag,
                                        TagInputStream theTagInputStream,
                                        java.lang.String tagId,
                                        TagInputStream genericTagInputStream)
                                 throws java.io.IOException
Adds as subtag of the parentTag a context tag called tagId.

Throws:
java.io.IOException

linkSpecifiedFlow

public static void linkSpecifiedFlow(Tag parentTag,
                                     TagInputStream theTagInputStream,
                                     java.lang.String flowId)
                              throws java.io.IOException
Deprecated. Replaced by linkSpecifiedFlow(Tag, TagInputStream, String, TagInputStream).

Finds a flow tag called flowId and adds all its sub tags to the subtags of the parentTag.

Throws:
java.io.IOException

linkSpecifiedFlow

public static void linkSpecifiedFlow(Tag parentTag,
                                     TagInputStream theTagInputStream,
                                     java.lang.String flowId,
                                     TagInputStream genericTagInputStream)
                              throws java.io.IOException
Finds a flow tag called flowId and adds all its sub tags to the subtags of the parentTag.

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

linkSpecifiedFormat

public static void linkSpecifiedFormat(Tag parentTag,
                                       TagInputStream theTagInputStream,
                                       java.lang.String tagId)
                                throws java.io.IOException
Deprecated. Replaced by linkSpecifiedFormat(Tag, TagInputStream, String, TagInputStream).

Adds as subtag of the parentTag a format tag called tagId.

Throws:
java.io.IOException

linkSpecifiedFormat

public static void linkSpecifiedFormat(Tag parentTag,
                                       TagInputStream theTagInputStream,
                                       java.lang.String tagId,
                                       TagInputStream genericTagInputStream)
                                throws java.io.IOException
Adds as subtag of the parentTag a format tag called tagId.

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

linkSpecifiedOperation

public static void linkSpecifiedOperation(Tag parentTag,
                                          TagInputStream theTagInputStream,
                                          java.lang.String tagId)
                                   throws java.io.IOException
Deprecated. Replaced by linkSpecifiedOperation(Tag, TagInputStream, String, TagInputStream).

Adds as subtag of the parentTag an operation tag called tagId.

Throws:
java.io.IOException

linkSpecifiedOperation

public static void linkSpecifiedOperation(Tag parentTag,
                                          TagInputStream theTagInputStream,
                                          java.lang.String tagId,
                                          TagInputStream genericTagInputStream)
                                   throws java.io.IOException
Adds as subtag of the parentTag an operation tag called tagId.

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

putIntoCache

public static void putIntoCache(Cacheable processor)
                         throws java.io.IOException
Places the cacheable processor element into the cache. The processor element is keyed using the processor name.

Parameters:
processor - com.ibm.btt.base.Cacheable
Throws:
java.io.IOException

readObject

public java.lang.Object readObject(java.lang.String aProcessorId)
                            throws java.io.IOException
When an application wants to internalize an instance of an processor (generic or self-defined), it calls this method. If cache is enabled and the given processor exists in it, this instance is returned; if not, the toolkit creates a new instance from the configuration files. 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:
aProcessorId - java.lang.String the identification of a tag whose type matches the processor class of the element
Returns:
java.lang.Object - the processor instance
Throws:
java.io.IOException.
java.io.IOException

readObjectNonCache

public java.lang.Object readObjectNonCache(java.lang.String aProcessorId)
                                    throws java.io.IOException
Returns a new processor instance created from the information stored in the configuration files associated with a given processor id.

Parameters:
aProcessorId - java.lang.String
Returns:
java.lang.Object - the processor instance
Throws:
java.io.IOException.
java.io.IOException

readTag

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

Parameters:
index - int
aProcFileName - java.lang.String the self-defined processor file name where the tag must be searched
Returns:
Tag
Throws:
java.io.IOException

reset

public void reset()
           throws java.io.IOException,
                  DSEObjectNotFoundException
Resets all the generic processors. 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 processor named tagId. The new definition is read from the file associated with this processor.

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

reset

public void reset(java.util.Enumeration listTagId)
           throws java.io.IOException,
                  DSEObjectNotFoundException
Resets the definition of processors that have IDs that appear in listTagId. This method reads the new definitions from the file associated with the reset processors.

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

reset

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

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

resetProcessorFileNamed

public static void resetProcessorFileNamed(java.lang.String aProcFileName)
Resets all the self-defined processors contained in the file aProcFileName and then removes the TagInputStream corresponding to the self-defined processor file aProcFileName from the Hashtable.

Parameters:
aProcFileName - java.lang.String the name of the self-defined processor file

resetProcessorNamed

public static void resetProcessorNamed(java.lang.String aProcessorName)
Resets the self-defined processor aProcessorName. All the processors included in the same file as aProcessorName>/I> are also reset. The method then removes the TagInputStream corresponding to the self-defined processor file from the Hashtable.

Parameters:
aProcessorName - java.lang.String the name of the processor to reset

setCacheEnabled

public static void setCacheEnabled(boolean newValue)
Enables or disables the processor element caching.

Parameters:
newValue - boolean True to enable caching

setSelfDefinedProcTagInputStream

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

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

setSelfDefinedProcTagInputStream

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

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

setSelfDefinedProcTagInputStream

public void setSelfDefinedProcTagInputStream(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

tagList

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

Parameters:
aProcFileName - java.lang.String
Returns:
Vector

tagWithId

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

Parameters:
aString - java.lang.String the id of the Tag to search
aProcFileName - java.lang.String the self-defined processor file name where the tag must be searched
Returns:
Tag
Throws:
java.io.IOException

IBM WebSphere Multichannel Bank Transformation Toolkit Javadoc

(c) Copyright IBM Corporation 1998, 2010