com.ibm.dse.base
Class DSEServerOperation

java.lang.Object
  |
  +--com.ibm.dse.base.DSEOperation
        |
        +--com.ibm.dse.base.DSEServerOperation
Direct Known Subclasses:
ApplicationTablesServerOp, DSEHtmlProcessorOperation, EJQueryServerOperation, EventManagerServerOperation, ForwardingServerOperation, RetrieveSchemaInfoServerOperation

public class DSEServerOperation
extends DSEOperation
implements ServerOperation

The DSEServerOperation class derives from DSEOperation and implements the interface ServerOperation.

This is an abstract class and cannot be instantiated.

A DSEServerOperation has one attribute called originWorkstation that contains the terminal identifier (TID) of the workstation that performed the request. This is used by the operation to send events to the client using the client/server mechanism interface.

See Also:
Serialized Form

Fields inherited from class com.ibm.dse.base.DSEOperation
aOperationRepliedListener, externalizer
 
Constructor Summary
DSEServerOperation()
          This constructor creates a DSEServerOperation object.
DSEServerOperation(java.lang.String anOperationName)
          This constructor creates a new instance of ServerOperation with its corresponding Context (obtained from the definition files through anOperationName).
DSEServerOperation(java.lang.String anOperationName, Context aParentContext)
          This constructor creates a new instance of ServerOperation (obtained from the definition files through anOperationName) chained to aParentContext.
DSEServerOperation(java.lang.String anOperationName, java.lang.String aParentContext)
          This constructor creates a new instance of ServerOperation (obtained from the definition files through anOperationName) chained to the Context Named aParentContextName.
 
Method Summary
 void execute()
          Implements the server operation logic.
 FormatElement getCSReplyFormat()
          Returns the csReplyFormat formatElement of the formats Hashtable.
 FormatElement getCSRequestFormat()
          Returns the csRquestFormat formatElement of the formats Hashtable.
 java.lang.String getOriginWorkstation()
          Returns the workstation terminal identifier (TID) belonging to the workstation that performed the request, which caused the operation to be executed.
 void runInSession(java.lang.String aSessionID)
          Searches in the table of sessions for the input session (see Context Interface).
 void setCSReplyFormat(FormatElement aFormat)
          Sets the csReplyFormat formatElement of the formats Hashtable to aFormat.
 void setCSRequestFormat(FormatElement aFormat)
          Sets the csRequetsFormat formatElement of the formats Hashtable to aFormat.
 void setOriginWorkstation(java.lang.String aString)
          Sets the workstation terminal identifier (TID) belonging to the workstation that performed the request.
 boolean updateContext(KeyedCollection kcReqData)
          Updates dse_errorMessages field in the context with the results of the validation.
 
Methods inherited from class com.ibm.dse.base.DSEOperation
addElement, addOperationRepliedListener, chainTo, chainToContextNamed, chainToCurrentContext, close, externalizer, fireHandleOperationRepliedEvent, getApplicationId, getContext, getContextByType, getContextName, getContextNamed, getElementAt, getExternalizer, getFormat, getFormats, getHostReceiveFormat, getHostSendFormat, getInstanceOfOperationStep, getKeyedCollection, getName, getOperationStep, getOperationStepRC, getOperationSteps, getParent, getSelfDefinedOpTagInputStream, getService, getServiceByType, getSessionId, getSgmlSelfDefinedOpFileName, getType, getValueAt, hasServices, initializeFormatFrom, initializeFrom, initializeKeyedCollectionValueFrom, initializeOpStep, initializeOpStepsFrom, isCacheable, isChained, isContext, occurrencesNamed, prune, readExternal, readExternal, readObject, reinitialize, removeAt, removeExternal, removeOperationRepliedListener, setApplicationId, setContext, setContextName, setExternalizer, setHostReceiveFormat, setHostSendFormat, setKeyedCollection, setName, setSessionId, setType, setValueAt, toString, toStrings, toTags, unchain, writeExternal, writeExternal, xValidate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DSEServerOperation

public DSEServerOperation()
This constructor creates a DSEServerOperation object.

DSEServerOperation

public DSEServerOperation(java.lang.String anOperationName)
                   throws java.io.IOException
This constructor creates a new instance of ServerOperation with its corresponding Context (obtained from the definition files through anOperationName).

DSEServerOperation

public DSEServerOperation(java.lang.String anOperationName,
                          Context aParentContext)
                   throws java.io.IOException,
                          DSEInvalidRequestException
This constructor creates a new instance of ServerOperation (obtained from the definition files through anOperationName) chained to aParentContext.

DSEServerOperation

public DSEServerOperation(java.lang.String anOperationName,
                          java.lang.String aParentContext)
                   throws java.io.IOException,
                          DSEInvalidRequestException,
                          DSEObjectNotFoundException
This constructor creates a new instance of ServerOperation (obtained from the definition files through anOperationName) chained to the Context Named aParentContextName.
Method Detail

execute

public void execute()
             throws java.lang.Exception
Implements the server operation logic.

The execute method should be implemented by subclasses .

Overrides:
execute in class DSEOperation

getCSReplyFormat

public FormatElement getCSReplyFormat()
Returns the csReplyFormat formatElement of the formats Hashtable.
Specified by:
getCSReplyFormat in interface ServerOperation

getCSRequestFormat

public FormatElement getCSRequestFormat()
Returns the csRquestFormat formatElement of the formats Hashtable.

getOriginWorkstation

public java.lang.String getOriginWorkstation()
Returns the workstation terminal identifier (TID) belonging to the workstation that performed the request, which caused the operation to be executed.
Specified by:
getOriginWorkstation in interface ServerOperation
Tags copied from interface: ServerOperation
Returns:
java.lang.String

runInSession

public void runInSession(java.lang.String aSessionID)
                  throws java.lang.Exception
Searches in the table of sessions for the input session (see Context Interface). It keeps the origin workstation identifier and it calls the execute() method. If the session is not found then the execute() method is directly invoked instead.
Specified by:
runInSession in interface ServerOperation

setCSReplyFormat

public void setCSReplyFormat(FormatElement aFormat)
Sets the csReplyFormat formatElement of the formats Hashtable to aFormat.
Specified by:
setCSReplyFormat in interface ServerOperation

setCSRequestFormat

public void setCSRequestFormat(FormatElement aFormat)
Sets the csRequetsFormat formatElement of the formats Hashtable to aFormat.

setOriginWorkstation

public void setOriginWorkstation(java.lang.String aString)
Sets the workstation terminal identifier (TID) belonging to the workstation that performed the request.
Specified by:
setOriginWorkstation in interface ServerOperation
Tags copied from interface: ServerOperation
Parameters:
wks - java.lang.String

updateContext

public boolean updateContext(KeyedCollection kcReqData)
                      throws DSETypeException,
                             DSEObjectNotFoundException,
                             DSEInvalidArgumentException
Updates dse_errorMessages field in the context with the results of the validation.
Parameters:
kcReqData - com.ibm.dse.base.KeyedCollection
Returns:
boolean - True if validation successfully.
Throws:
DSETypeException. -  
DSEObjectNotFoundException. -  
DSEInvalidArgumentException. -