|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.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 :
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 |
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. |
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. |
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. |
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 will 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 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. |
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. |
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. |
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
This method throws a DSEInvalidRequestException.
Refer to the Context class addElement method.
public void addOperationRepliedListener(OperationRepliedListener newListener)
newListener
- com.ibm.dse.base.OperationRepliedListenerpublic void chainTo(Context aContext) throws DSEInvalidRequestException
The receiving context is set as the new current child.
This method throws a DSEInvalidRequestException.
Refer to the Context class chainTo method.
public void chainToContextNamed(java.lang.String aContextName) throws DSEInvalidRequestException, DSEObjectNotFoundException
The recieving context is set as the new curent child. If there is more than one context with this name, one of them is chosen randomly.
This method throws a DSEInvalidRequestException generated by the chainTo method.
This method throws a DSEObjectNotFoundException if the context parent is not found.
Refer to the Context class chainToContextNamed method.
public void chainToCurrentContext() throws DSEInvalidRequestException
The receiving context is set as the new current context. If the hierarchy of the context is empty, the receiving context is set as the root of the hierarchy.
This method throws a DSEInvalidRequestException to generate by the chainTo method.
Refer to the Context class chainToCurrentContext method.
public void close() throws DSEInvalidRequestException, DSEObjectNotFoundException
It should be implemented by the subclasses in order to perform housekeeping processes before ending the operation process.
public void execute() throws java.lang.Exception
If you need another behavior then extends a new class from this one and implement the method execute of that class.
public Externalizer externalizer() throws java.io.IOException
This method is an Externalizable interface method.
public void fireHandleOperationRepliedEvent(OperationRepliedEvent event)
event
- com.ibm.dse.base.OperationRepliedEventpublic java.lang.String getApplicationId()
public Context getContext()
public Context getContextByType(java.lang.String aContextType)
If the context does not exist, null is returned.
Refer to the Context class getContextByType method.
public java.lang.String getContextName()
public static Context getContextNamed(java.lang.String aContextName) throws DSEInvalidRequestException
This method returns the Context named aContextName if the context instance identified by aContextName exists in the chain of contexts. Otherwise it returns null.
public DataElement getElementAt(java.lang.String aCompositeKey) throws DSEObjectNotFoundException
Refer to the same method in the KeyedCollection class.
public static Externalizer getExternalizer() throws java.io.IOException
public java.lang.Object getFormat(java.lang.String aFormatName) throws DSEInvalidArgumentException
public Hashtable getFormats()
public java.lang.Object getHostReceiveFormat()
public java.lang.Object getHostSendFormat()
public OperationStepInterface getInstanceOfOperationStep(java.lang.String anOpStep) throws java.lang.Exception
anOpStep
- java.lang.Stringpublic KeyedCollection getKeyedCollection()
Refer to the Context class getKeyedCollection method.
public java.lang.String getName()
public KeyedCollection getOperationStep(int index) throws java.lang.Exception
index
- intpublic int getOperationStepRC()
public KeyedCollection getOperationSteps()
public Context getParent()
public TagInputStream getSelfDefinedOpTagInputStream(java.lang.String aSelfDefinedOperationId) throws java.io.IOException
aSelfDefinedOperationId
- java.lang.Stringpublic Service getService(java.lang.String aServiceName) throws DSEObjectNotFoundException
This method throws a DSEObjectNotFoundException if the service is not found.
Refer to the Context class getService method.
public Service getServiceByType(java.lang.String aServiceType) throws DSEObjectNotFoundException
This method throws a DSEObjectNotFoundException if the service is not found.
Refer to the Context class getServiceByType method.
public java.lang.String getSessionId()
public java.lang.String getSgmlSelfDefinedOpFileName(java.lang.String anOperationId)
anOperationId
- java.lang.Stringpublic java.lang.String getType()
public java.lang.Object getValueAt(java.lang.String aCompositeKey) throws DSEObjectNotFoundException
This method throws a DSEObjectNotFoundException if the data element is not found.
Refer to the same method of the KeyedCollection class.
public boolean hasServices()
Otherwise, it returns false.
Refer to the Context class hasServices method.
public java.lang.Object initializeFormatFrom(Tag aTag) throws java.io.IOException
aTag
- com.ibm.dse.base.Tagpublic java.lang.Object initializeFrom(Tag aTag) throws java.io.IOException, DSEException
aTag
- com.ibm.dse.base.Tag an operation Tagpublic java.lang.Object initializeKeyedCollectionValueFrom(Tag aTag) throws java.io.IOException
aTag
- com.ibm.dse.base.Tagpublic void initializeOpStep(Tag aTag) throws java.io.IOException
aTag
- com.ibm.dse.base.Tag an operation Tagpublic void initializeOpStepsFrom(Tag aTag) throws java.io.IOException
aTag
- com.ibm.dse.base.Tagpublic boolean isCacheable()
public boolean isChained()
Otherwis,e it returns false.
public static boolean isContext(java.lang.String aContextName) throws DSEInvalidRequestException
This method returns true if the context identified by aContextName exists in the chain of contexts. Otherwise, it returns false.
public static int occurrencesNamed(java.lang.String aContextNamed) throws DSEInvalidRequestException
public void prune() throws DSEInvalidRequestException, DSEObjectNotFoundException
All their descendants become orphans.
This method throws a DSEInvalidRequestException and a DSEObjectNotFoundException.
Refer to the Context class prune method.
public void readExternal() throws java.io.IOException
In order to work properly it is assumed:
public void readExternal(java.io.ObjectInput s) throws java.io.IOException, java.lang.ClassNotFoundException
s
- java.io.ObjectInputpublic static java.lang.Object readObject(java.lang.String aName) throws java.io.IOException
The operation Externalizer reads the corresponding definition file to find the object.
This method throws an IOException if the externalizer is not initialized.
public void reinitialize()
public DataElement removeAt(java.lang.String aCompositeKey) throws DSEInvalidRequestException, DSEObjectNotFoundException
This method throws a DSEInvalidRequestException and a DSEObjectNotFoundException.
Refer to the Context class removeAt method.
public void removeExternal() throws java.io.IOException
This method removes the tags for this object from the sgml file where it is externalized.
public void removeOperationRepliedListener(OperationRepliedListener newListener)
newListener
- com.ibm.dse.base.OperationRepliedListenerpublic void setApplicationId(java.lang.String appId)
appId
- String The new value of the applicationId.public void setContext(Context aContext)
public void setContextName(java.lang.String aContextName)
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)
public void setName(java.lang.String aName)
aName
- java.lang.Stringpublic void setSessionId(java.lang.String sessId)
sessId
- String The new value of the sessionId.public void setType(java.lang.String aContextType)
public void setValueAt(java.lang.String aCompositeKey, java.lang.Object aDataValue) throws DSEObjectNotFoundException, DSEInvalidArgumentException
This method throws a DSEInvalidRequestException if the data type doesn't allow a setValue().
This method throws a DSEObjectNotFoundException if the data is not found.
public java.lang.String toString()
public Vector toStrings()
public Vector toTags() throws java.io.IOException
public void unchain() throws DSEInvalidRequestException, DSEObjectNotFoundException
The parent attribute is se to null and the receiving context is removed from the children list in the parent context. The receiving context cannot have children.
This method throws a DSEInvalidRequestException and a DSEObjectNotFoundException.
Refer to the Context class unchain method.
public void writeExternal() throws java.io.IOException
In order to work properly it is assumed:
public void writeExternal(java.io.ObjectOutput s) throws java.io.IOException
s
- java.io.ObjectOutputpublic java.lang.String[] xValidate()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |