|
IBM Branch Transformation Toolkit Javadoc | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.dse.base.DSEOperation
The DSEOperation Class derives from Object and implements the interfaces Externalizable and Operation. This is an abstract class and it cannot be instantiated. An Operation has four attributes: - an externalizer: object from the OperationExternalizer hierarchy used to build Operations objects from the definition file. - a context: contains the Context where the operation runs. This could be the operation itself because the operation will be a special context. - an id: contains the operation name. - a formats: a Hashtable that contains all the formats associated with this operation. - a isSelfDefinedOperation: a boolean indicating whether the operation is generic or self-defined.
Field Summary | |
---|---|
protected OperationRepliedListener |
aOperationRepliedListener
|
protected static Externalizer |
externalizer
|
Constructor Summary | |
---|---|
DSEOperation()
This constructor creates a DSEOperation object. |
|
DSEOperation(java.lang.String aName)
This constructor creates a new instance of Operation with its corresponding Context (obtained from the definition files through anOperationName). |
|
DSEOperation(java.lang.String anOperationName,
Context aParentContext)
This constructor creates a new instance of Operation (obtained from the definition files through anOperationName) chained to aParentContext. |
|
DSEOperation(java.lang.String anOperationName,
java.lang.String aParentContext)
This constructor creates a new instance of Operation (obtained from the definition files through anOperationName) chained to the Context named aParentContextName. |
Method Summary | |
---|---|
DataElement |
addElement(DataElement aDataElement)
Adds an element aDataElement to the keyed collection of the operation. |
void |
addOperationRepliedListener(OperationRepliedListener newListener)
Adds an operation replied listener. |
void |
chainTo(Context aContext)
Sets the receiving context as a child of aContext. |
void |
chainToContextNamed(java.lang.String aContextName)
Sets the context as a child of the context named aContextName in the hierarchy. |
void |
chainToCurrentContext()
Sets the current context as a child of the current Context in the hierarchy. |
void |
clearKeyedCollection(boolean keepKCollStatus,
boolean clearOnlyValues)
This method clears both the typed and non-typed elements in the operation context. |
void |
close()
Unchains the operation context. |
void |
execute()
Executes the operation steps and fires the OperationRepliedEvent event to all of the listener to this operation. |
Externalizer |
externalizer()
Returns the OperationExternalizer instance, which is the current builder. |
void |
fireHandleOperationRepliedEvent(OperationRepliedEvent event)
Support listener events. |
java.lang.String |
getApplicationId()
Returns the value of the applicationId property. |
Context |
getContext()
Returns the operation context. |
Context |
getContextByType(java.lang.String aContextType)
Returns the context of type aContextType in the chain of contexts. |
java.lang.String |
getContextName()
Returns the context name. |
static Context |
getContextNamed(java.lang.String aContextName)
Returns the Context named aContextName. |
DataElement |
getElementAt(java.lang.String aCompositeKey)
Return the DataElement identified by aCompositeKey. |
static Externalizer |
getExternalizer()
Gets the OperationExternalizer instance which is the current builder. |
java.lang.Object |
getFormat(java.lang.String aFormatName)
Returns the formatElement named aFormatName from the formats Hashtable. |
Hashtable |
getFormats()
Returns the operation formats Hashtable. |
java.lang.Object |
getHostReceiveFormat()
Returns the hostReceiveFormat formatElement from the formats Hashtable. |
java.lang.Object |
getHostSendFormat()
This method returns the hostSendFormat formatElement of the formats Hashtable. |
OperationStepInterface |
getInstanceOfOperationStep(java.lang.String anOpStep)
Returns an instance of the operation step named anOpStep. |
KeyedCollection |
getKeyedCollection()
Returns the context keyedCollection. |
static long |
getMinOperationConsumeTimeForTrace()
Returns the minOperationConsumeTimeForTrace. |
java.lang.String |
getName()
Returns the operation name. |
KeyedCollection |
getOperationStep(int index)
Returns the instance of the operation step at the index position. |
int |
getOperationStepRC()
Returns the operation step results code. |
KeyedCollection |
getOperationSteps()
Returns the opSteps |
Context |
getParent()
Returns the Context object defined as the parent context of the receiving context. |
TagInputStream |
getSelfDefinedOpTagInputStream(java.lang.String aSelfDefinedOperationId)
Gets the TagInputStream corresponding to an operation ID. |
Service |
getService(java.lang.String aServiceName)
Returns the service in the chain of context identified by aServiceName. |
Service |
getServiceByType(java.lang.String aServiceType)
This method returns the service in the chain of contexts with type aServiceType. |
java.lang.String |
getSessionId()
Returns the value of the sessionId property. |
java.lang.String |
getSgmlSelfDefinedOpFileName(java.lang.String anOperationId)
Gets the self-defined operation file name corresponding to anOperationId. |
static java.lang.String |
getTraceOperationConsumeTime()
Returns the traceOperationConsumeTime. |
java.lang.String |
getType()
Returns the context type. |
java.lang.Object |
getValueAt(java.lang.String aCompositeKey)
Returns the value of the data element identified by aConpositeKey. |
OperationXValidate |
getXValidator()
Returns the operation XValidator stored in the xval attribute. |
boolean |
hasServices()
Returns true if the context has any service defined. |
java.lang.Object |
initializeFormatFrom(Tag aTag)
This method finds, instantiates, and adds the format element referred to by aTag, into the operation's formats. |
java.lang.Object |
initializeFrom(Tag aTag)
This method will initialize this operation with all the data stored inside the tag: aTag |
java.lang.Object |
initializeKeyedCollectionValueFrom(Tag aTag)
Initializes a collection of values from aTag. |
void |
initializeOpStep(Tag aTag)
Initializes an OpStep for the operation |
void |
initializeOpStepsFrom(Tag aTag)
Get the operation steps from a refOpSteps tag. |
boolean |
isCacheable()
This method finds out if THIS particular object can be cached. |
boolean |
isChained()
Returns true if the context is chained to the hierarchy. |
static boolean |
isContext(java.lang.String aContextName)
Returns true if the context named aContextName exists in the chain of contexts. |
static int |
occurrencesNamed(java.lang.String aContextNamed)
Returns the number of contexts with name aContextNamed in the hierarchy. |
void |
prune()
Removes context from the hierarchy. |
void |
readExternal()
Initializes an operation with its external value. |
void |
readExternal(java.io.ObjectInput s)
Invokes the object creation from an ObjectInput. |
static java.lang.Object |
readObject(java.lang.String aName)
Returns an Object, which is an instance of the operation named aName. |
void |
reinitialize()
This method will reinitialize THIS object. |
DataElement |
removeAt(java.lang.String aCompositeKey)
Removes the data element identified by aCompositeKey from the context data collection. |
void |
removeExternal()
This method is an Externalizable interface method. |
void |
removeOperationRepliedListener(OperationRepliedListener newListener)
Removes the operation replied listener. |
void |
setApplicationId(java.lang.String appId)
Sets the value of the applicationId property. |
void |
setContext(Context aContext)
Sets the context to aContext. |
void |
setContextName(java.lang.String aContextName)
Sets the context name to aContextName. |
static void |
setExternalizer(Externalizer anExternalizer)
Sets the OperationExternalizer instance which will be the current builder to anExternalizer. |
void |
setHostReceiveFormat(java.lang.Object aFormat)
Sets the hostReceiveFormat formatElement of the formats Hashtable to aFormat. |
void |
setHostSendFormat(java.lang.Object aFormat)
Sets the hostSendFormat formatElement of the formats Hashtable to aFormat. |
void |
setKeyedCollection(KeyedCollection aKeyedCollection)
Sets the context keyed collection to aKeyedCollection. |
static void |
setMinOperationConsumeTimeForTrace(long minConsumeTimeForTrace)
Sets the minOperationConsumeTimeForTrace. |
void |
setName(java.lang.String aName)
Sets the operation name to aName. |
void |
setSessionId(java.lang.String sessId)
Sets the value of the sessionId property. |
static void |
setTraceOperationConsumeTime(java.lang.String traceTime)
Sets the traceOperationConsumeTime. |
void |
setType(java.lang.String aContextType)
Sets the context type to aContextType. |
void |
setValueAt(java.lang.String aCompositeKey,
java.lang.Object aDataValue)
Sets the value of the data identified by aCompositeKey to aDataValue. |
void |
setXValidator(OperationXValidate xValidator)
Sets the value of the xval attribute. |
java.lang.String |
toString()
Returns a String representating the operation. |
Vector |
toStrings()
Returns a visual representation of the operation. |
Vector |
toTags()
This method returns a Vector with the operation represented as a Tag. |
void |
unchain()
Removes the receiving context from the context hierarchy. |
void |
writeExternal()
Writes this instance converted in tags to a file. |
void |
writeExternal(java.io.ObjectOutput s)
Provides concrete serialization handling for DSEOperation. |
java.lang.String[] |
xValidate()
Returns a String that indicates if the validation has been achieved successfully or not. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected static Externalizer externalizer
protected transient OperationRepliedListener aOperationRepliedListener
Constructor Detail |
public DSEOperation()
public DSEOperation(java.lang.String aName) throws java.io.IOException
public DSEOperation(java.lang.String anOperationName, Context aParentContext) throws java.io.IOException, DSEInvalidRequestException
public DSEOperation(java.lang.String anOperationName, java.lang.String aParentContext) throws java.io.IOException, DSEInvalidRequestException, DSEObjectNotFoundException
Method Detail |
public DataElement addElement(DataElement aDataElement) throws DSEInvalidRequestException
addElement
in interface Operation
DSEInvalidRequestException
public void addOperationRepliedListener(OperationRepliedListener newListener)
Operation
addOperationRepliedListener
in interface Operation
newListener
- com.ibm.dse.base.OperationRepliedListenerpublic void chainTo(Context aContext) throws DSEInvalidRequestException
chainTo
in interface Operation
DSEInvalidRequestException
public void chainToContextNamed(java.lang.String aContextName) throws DSEInvalidRequestException, DSEObjectNotFoundException
chainToContextNamed
in interface Operation
DSEInvalidRequestException
DSEObjectNotFoundException
public void chainToCurrentContext() throws DSEInvalidRequestException
DSEInvalidRequestException
public void clearKeyedCollection(boolean keepKCollStatus, boolean clearOnlyValues) throws java.io.IOException
keepKCollStatus
- boolean (false - clear also the context kColl attributes; true - keep the context kColl attributes and clear only the kColl data elements)clearOnlyValues
- boolean (false - clear all attributes of the context kColl data elements; true - clear only kColl data elements values)
java.io.IOException
- - This exception occurs if the keyed collection is not defined in the generic files or in the self defined filepublic void close() throws DSEInvalidRequestException, DSEObjectNotFoundException
close
in interface Operation
DSEInvalidRequestException
DSEObjectNotFoundException
public void execute() throws java.lang.Exception
execute
in interface Operation
java.lang.Exception
public Externalizer externalizer() throws java.io.IOException
externalizer
in interface Externalizable
java.io.IOException
public void fireHandleOperationRepliedEvent(OperationRepliedEvent event)
event
- com.ibm.dse.base.OperationRepliedEventpublic java.lang.String getApplicationId()
getApplicationId
in interface Operation
public Context getContext()
getContext
in interface Operation
public Context getContextByType(java.lang.String aContextType)
public java.lang.String getContextName()
getContextName
in interface Operation
public static Context getContextNamed(java.lang.String aContextName) throws DSEInvalidRequestException
DSEInvalidRequestException
public DataElement getElementAt(java.lang.String aCompositeKey) throws DSEObjectNotFoundException
getElementAt
in interface Operation
DSEObjectNotFoundException
public static Externalizer getExternalizer() throws java.io.IOException
java.io.IOException
public java.lang.Object getFormat(java.lang.String aFormatName) throws DSEInvalidArgumentException
getFormat
in interface Operation
DSEInvalidArgumentException
public Hashtable getFormats()
getFormats
in interface Operation
public java.lang.Object getHostReceiveFormat()
public java.lang.Object getHostSendFormat()
public OperationStepInterface getInstanceOfOperationStep(java.lang.String anOpStep) throws java.lang.Exception
anOpStep
- java.lang.String
java.lang.Exception
public KeyedCollection getKeyedCollection()
getKeyedCollection
in interface Operation
public java.lang.String getName()
getName
in interface Externalizable
public KeyedCollection getOperationStep(int index) throws java.lang.Exception
index
- int
com.ibm.dse.base.DSEObjectNotFoundException.
java.lang.Exception
public int getOperationStepRC()
public KeyedCollection getOperationSteps()
public Context getParent()
getParent
in interface Operation
public TagInputStream getSelfDefinedOpTagInputStream(java.lang.String aSelfDefinedOperationId) throws java.io.IOException
aSelfDefinedOperationId
- java.lang.String
java.io.IOException
public Service getService(java.lang.String aServiceName) throws DSEObjectNotFoundException
getService
in interface Operation
DSEObjectNotFoundException
public Service getServiceByType(java.lang.String aServiceType) throws DSEObjectNotFoundException
getServiceByType
in interface Operation
DSEObjectNotFoundException
public java.lang.String getSessionId()
public java.lang.String getSgmlSelfDefinedOpFileName(java.lang.String anOperationId)
anOperationId
- java.lang.String
public java.lang.String getType()
getType
in interface Operation
public java.lang.Object getValueAt(java.lang.String aCompositeKey) throws DSEObjectNotFoundException
getValueAt
in interface Operation
DSEObjectNotFoundException
public OperationXValidate getXValidator()
public boolean hasServices()
hasServices
in interface Operation
public java.lang.Object initializeFormatFrom(Tag aTag) throws java.io.IOException
aTag
- com.ibm.dse.base.Tag
java.io.IOException
public java.lang.Object initializeFrom(Tag aTag) throws java.io.IOException, DSEException
initializeFrom
in interface Externalizable
aTag
- com.ibm.dse.base.Tag - An operation Tag
java.io.IOException
DSEException
public java.lang.Object initializeKeyedCollectionValueFrom(Tag aTag) throws java.io.IOException
aTag
- com.ibm.dse.base.Tag
java.io.IOException
public void initializeOpStep(Tag aTag) throws java.io.IOException
aTag
- com.ibm.dse.base.Tag - An operation Tag
java.io.IOException
public void initializeOpStepsFrom(Tag aTag) throws java.io.IOException
aTag
- com.ibm.dse.base.Tag
java.io.IOException
public boolean isCacheable()
isCacheable
in interface Cacheable
public boolean isChained()
isChained
in interface Operation
public static boolean isContext(java.lang.String aContextName) throws DSEInvalidRequestException
DSEInvalidRequestException
public static int occurrencesNamed(java.lang.String aContextNamed) throws DSEInvalidRequestException
DSEInvalidRequestException
public void prune() throws DSEInvalidRequestException, DSEObjectNotFoundException
prune
in interface Operation
DSEInvalidRequestException
DSEObjectNotFoundException
public void readExternal() throws java.io.IOException
readExternal
in interface Externalizable
java.io.IOException
public void readExternal(java.io.ObjectInput s) throws java.io.IOException, java.lang.ClassNotFoundException
readExternal
in interface java.io.Externalizable
s
- java.io.ObjectInput
java.io.IOException
java.lang.ClassNotFoundException
public static java.lang.Object readObject(java.lang.String aName) throws java.io.IOException
java.io.IOException
public void reinitialize()
reinitialize
in interface Cacheable
public DataElement removeAt(java.lang.String aCompositeKey) throws DSEInvalidRequestException, DSEObjectNotFoundException
removeAt
in interface Operation
DSEInvalidRequestException
DSEObjectNotFoundException
public void removeExternal() throws java.io.IOException
removeExternal
in interface Externalizable
java.io.IOException
public void removeOperationRepliedListener(OperationRepliedListener newListener)
Operation
removeOperationRepliedListener
in interface Operation
newListener
- com.ibm.dse.base.OperationRepliedListenerpublic void setApplicationId(java.lang.String appId)
setApplicationId
in interface Operation
appId
- String - The new value of the applicationIdpublic void setContext(Context aContext)
setContext
in interface Operation
public void setContextName(java.lang.String aContextName)
setContextName
in interface Operation
public static void setExternalizer(Externalizer anExternalizer)
public void setHostReceiveFormat(java.lang.Object aFormat)
public void setHostSendFormat(java.lang.Object aFormat)
public void setKeyedCollection(KeyedCollection aKeyedCollection)
setKeyedCollection
in interface Operation
public void setName(java.lang.String aName)
setName
in interface Externalizable
aName
- java.lang.Stringpublic void setSessionId(java.lang.String sessId)
sessId
- String - The new value of the sessionIdpublic void setType(java.lang.String aContextType)
setType
in interface Operation
public void setValueAt(java.lang.String aCompositeKey, java.lang.Object aDataValue) throws DSEObjectNotFoundException, DSEInvalidArgumentException
setValueAt
in interface Operation
DSEObjectNotFoundException
DSEInvalidArgumentException
public void setXValidator(OperationXValidate xValidator)
xValidator
- OperationXValidatepublic java.lang.String toString()
public Vector toStrings()
toStrings
in interface Externalizable
java.lang.Exception
public Vector toTags() throws java.io.IOException
toTags
in interface Externalizable
java.io.IOException
public void unchain() throws DSEInvalidRequestException, DSEObjectNotFoundException
unchain
in interface Operation
DSEInvalidRequestException
DSEObjectNotFoundException
public void writeExternal() throws java.io.IOException
writeExternal
in interface Externalizable
java.io.IOException
public void writeExternal(java.io.ObjectOutput s) throws java.io.IOException
writeExternal
in interface java.io.Externalizable
s
- java.io.ObjectOutput
java.io.IOException
public java.lang.String[] xValidate()
xValidate
in interface Operation
public static java.lang.String getTraceOperationConsumeTime()
public static void setTraceOperationConsumeTime(java.lang.String traceTime)
public static long getMinOperationConsumeTimeForTrace()
public static void setMinOperationConsumeTimeForTrace(long minConsumeTimeForTrace)
|
IBM Branch Transformation Toolkit Javadoc | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |