|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ibm.dse.base.Externalizer | +--com.ibm.dse.base.OperationExternalizer
This Externalizer reads operations. The generic operations definition file must be specified in the DSE.INI file (in the settings.file.operation path) and the self-defined operation files must be specified in the DSE.INI 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 DSE.INI file (in the settings.packages.operations).
Fields inherited from class com.ibm.dse.base.Externalizer |
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 OperationExternalizer object. |
|
OperationExternalizer(java.lang.String option,
java.io.BufferedInputStream aIniStream)
This constructor creates a new instance of the OperationExternalizer class. |
|
OperationExternalizer(java.lang.String option,
java.lang.String pathAndFile)
This constructor creates a new instance of the OperationExternalizer 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. |
protected 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 java.lang.Object |
getFromCache(java.lang.String key)
This method will remove an operation element with id=key from the cache and return it. |
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). |
void |
makeTagClassTable()
Makes the tagClassTable with the values in DSE.INI path: settings.tags.operations |
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(Operation oper)
This method will place the operation element 'oper' 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.dse.base.Externalizer |
getClasses,
getTagClassTable,
getTagInputStream,
getTagOutputStream,
isRunTime,
readObject,
readTag,
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 |
public OperationExternalizer()
public OperationExternalizer(java.lang.String option, java.io.BufferedInputStream aIniStream) throws java.io.IOException
option
- java.lang.StringaIniStream
- java.io.BufferedInputStreampublic OperationExternalizer(java.lang.String option, java.lang.String pathAndFile) throws java.io.IOException
option
- java.lang.StringpathAndFile
- java.lang.StringMethod Detail |
public static void addType(Tag aTag) throws java.io.IOException
aTag
- com.ibm.dse.base.Tagpublic static void clearCache()
public java.lang.Object convertTagToObject(Tag aTag) throws java.io.IOException
aTag
- Tagprotected Externalizer createNewExternalizer() throws java.io.IOException, DSEObjectNotFoundException
protected TagInputStream createSelfDefinedOpTagInputStream(java.lang.String aFileOpName, java.lang.String aPathFile) throws java.io.IOException
aFileOpName
- java.lang.String The name of the file.aPathFile
- java.lang.String The path of the file.public void end()
public static Hashtable getCache()
public static java.util.Date getDateCreationFileByFileName(java.lang.String anOpFileName)
anOpFileName
- java.lang.String the self-defined operation file name.public static java.util.Date getDateCreationFileByOperationName(java.lang.String anOperationName)
anOperationName
- java.lang.String the self-defined operation name (id).public static java.lang.Object getFromCache(java.lang.String key) throws java.io.IOException
key
- java.lang.Stringpublic static java.util.Enumeration getOperationFileList()
public TagInputStream getSelfDefinedOpTagInputStream(java.lang.String anOpFileName)
anOpFileName
- java.lang.Stringpublic Hashtable getSelfDefinedOpTagInputStreams()
public TagOutputStream getSelfDefinedOpTagOutputStream(java.lang.String anOpFileName) throws java.io.IOException
anOpFileName
- Stringpublic java.lang.Object[] getSgmlSelfDefinedOpFileName(java.lang.String anOperationId)
anOperationId
- java.lang.Stringpublic static boolean isCacheEnabled()
public static void linkContext(Tag parentTag, TagInputStream theTagInputStream) throws java.io.IOException
linkContext(Tag,TagInputStream,TagInputSteam)
.
public static void linkContext(Tag parentTag, TagInputStream theTagInputStream, TagInputStream genericTagInputStream) throws java.io.IOException
public static void linkOperationContext(Tag parentTag, TagInputStream theTagInputStream) throws java.io.IOException
linkOperationContext(Tag,TagInputStream,TagInputSteam)
.
public static void linkOperationContext(Tag parentTag, TagInputStream theTagInputStream, TagInputStream genericTagInputStream) throws java.io.IOException
public static void linkRefData(Tag parentTag, Tag grandParentTag, TagInputStream theTagInputStream, int parentRefTagIndex) throws java.io.IOException
linkRefData(Tag,Tag,TagInputStream,int,TagInputStream)
.
public static void linkRefData(Tag parentTag, Tag grandParentTag, TagInputStream theTagInputStream, int parentRefTagIndex, TagInputStream genericTagInputStream) throws java.io.IOException
public static void linkReferences(Tag grandParentTag, Tag parentTag, int parentRefTagIndex, int recursiveDepth, TagInputStream theTagInputStream) throws java.io.IOException, DSEObjectNotFoundException
grandParentTag
- com.ibm.dse.base.TagparentTag
- com.ibm.dse.base.TagparentRefTagIndex
- intrecursiveDepth
- inttheTagInputStream
- com.ibm.dse.base.TagInputStreamprotected static void linkReferences(Tag grandParentTag, Tag parentTag, int parentRefTagIndex, int recursiveDepth, TagInputStream theTagInputStream, TagInputStream genericTagInputStream) throws java.io.IOException, DSEObjectNotFoundException
grandParentTag
- com.ibm.dse.base.TagparentTag
- com.ibm.dse.base.TagparentRefTagIndex
- intrecursiveDepth
- inttheTagInputStream
- com.ibm.dse.base.TagInputStreamgenericTagInputStream
- com.ibm.dse.base.TagInputStreampublic static void linkRefFmt(Tag parentTag, Tag grandParentTag, TagInputStream theTagInputStream, int parentRefTagIndex) throws java.io.IOException
linkRefFmt(Tag,Tag,TagInputStream,int,TagInputStream)
.
public static void linkRefFmt(Tag parentTag, Tag grandParentTag, TagInputStream theTagInputStream, int parentRefTagIndex, TagInputStream genericTagInputStream) throws java.io.IOException
public static void linkRefFormat(Tag parentTag, TagInputStream theTagInputStream) throws java.io.IOException
linkRefFormat(Tag,TagInputStream,TagInputStream)
.
public static void linkRefFormat(Tag parentTag, TagInputStream theTagInputStream, TagInputStream genericTagInputStream) throws java.io.IOException
public static void linkRefKColl(Tag parentTag, TagInputStream theTagInputStream) throws java.io.IOException
linkRefKColl(Tag,TagInputStream,TagInputStream)
.
public static void linkRefKColl(Tag parentTag, TagInputStream theTagInputStream, TagInputStream genericTagInputStream) throws java.io.IOException
public static void linkRefOpSteps(Tag parentTag, TagInputStream theTagInputStream) throws java.io.IOException
linkRefOpSteps(Tag,TagInputStream,TagInputStream)
.
public static void linkRefOpSteps(Tag parentTag, TagInputStream theTagInputStream, TagInputStream genericTagInputStream) throws java.io.IOException
public static void linkRefService(Tag parentTag, TagInputStream theTagInputStream) throws java.io.IOException
linkRefService(Tag,TagInputStream,TagInputStream)
.
public static void linkRefService(Tag parentTag, TagInputStream theTagInputStream, TagInputStream genericTagInputStream) throws java.io.IOException
public void makeTagClassTable()
public static Tag overrideTagAttributes(Tag childTag, Vector subTags)
childTag
- com.ibm.dse.base.TagsubTags
- com.ibm.dse.base.Vectorpublic static Tag overrideTagAttributesForData(Tag childTag, Vector subTags)
childTag
- com.ibm.dse.base.TagsubTags
- com.ibm.dse.base.Vectorpublic static void putIntoCache(Operation oper) throws java.io.IOException
key
- java.lang.Stringvalue
- java.lang.Objectpublic java.lang.Object readObject(java.lang.String anOperationId) throws java.io.IOException
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)
anOperationId
- java.lang.Stringpublic Tag readTag(int index, java.lang.String anOpFileName) throws java.io.IOException
index
- intanOpFileName
- java.lang.String the self-defined operation file name where the tag must be searchedpublic void reset() throws java.io.IOException, DSEObjectNotFoundException
public void reset(java.lang.String tagId) throws java.io.IOException, DSEObjectNotFoundException
tagId
- java.lang.String The id of the operation to reset.protected void reset(java.lang.String anOperationId, TagInputStream aTagInputStream, Hashtable selfDefinedTagInputStreams) throws java.io.IOException
anOperationId
- java.lang.String The id of the operation to reset.aTagInputStream
- com.ibm.dse.base.TagInputStream The temporal generic TagInputStream.selfDefinedTagInputStreams
- com.ibm.dse.base.Hashtable The temporal self-defined TagInputStreams.public void reset(java.util.Enumeration listTagId) throws java.io.IOException, DSEObjectNotFoundException
listTagId
- java.util.Enumerationpublic static void resetOperationFileNamed(java.lang.String anOpFileName)
anOpFileName
- java.lang.String the name of the self-defined operation filepublic static void resetOperationNamed(java.lang.String anOperationName)
anOperationName
- java.lang.String the name of the operation to resetpublic static void setCacheEnabled(boolean newValue)
newValue
- booleanpublic void setSelfDefinedOpTagInputStream(java.lang.String aFileOpName) throws java.io.IOException
aFileOpName
- java.lang.Stringpublic void setSelfDefinedOpTagInputStream(java.lang.String aKey, TagInputStream aTagInputStream) throws java.io.IOException
aKey
- java.lang.StringaTagInputStream
- aTagInputStreampublic void setSelfDefinedOpTagInputStream(java.lang.String aFileOpName, java.lang.String aPathFile) throws java.io.IOException
aFileOpName
- java.lang.StringaPathFile
- java.lang.Stringpublic Vector tagList(java.lang.String anOpFileName)
anOpFileName
- java.lang.Stringpublic Tag tagWithId(java.lang.String aString, java.lang.String anOpFileName) throws java.io.IOException
aString
- java.lang.String the id of the Tag to searchanOpFileName
- java.lang.String the self-defined operation file name where the tag must be searched
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |