IBM Branch Transformation Toolkit Javadoc

com.ibm.btt.server.bean
Class BaseSingleAction

java.lang.Object
  extended bycom.ibm.btt.server.bean.BaseSingleAction
Direct Known Subclasses:
StatefulSingleAction, StatelessSingleAction

public class BaseSingleAction
extends java.lang.Object

This class is the base class for StatefulSingleAction and StatelessSingleAction. It encapsulates some basic functions, such as context operations.


Field Summary
protected  BTTUserWorkArea bttUserWorkArea
          The BTT user work area.
static java.lang.String COMPID
          Component ID for Server Bean used in trace "#SBEAN"
protected  BTTSystemData systemData
          The system data for this action.
 
Constructor Summary
BaseSingleAction()
           
 
Method Summary
protected  DataElement addElement(DataElement aDataElement)
          Adds a data element to the context.
protected  void assignService(java.lang.String aServiceName, BTTServiceRequester aServiceRequester)
          Assigns the service.
protected  void chainTo(Context aContext)
          Chains the action context to aContext.
 void close()
           
 void ejbRemove()
          This method prunes the action context.
protected  java.lang.String getApplicationId()
          Returns the application id.
protected  Context getContext()
          Returns the action context.
protected  Context getContextByType(java.lang.String aContextType)
          Returns the first context of type aContextType in the chain of contexts.
protected  java.lang.String getContextName()
          Returns the action context name.
protected  DataElement getElementAt(java.lang.String aCompositeKey)
          Returns the data element identified by aCompositeKey.
protected  FormatElement getFormat(java.lang.String aFormatName)
          Returns the format named aFormatName.
protected  java.lang.String getInstanceId()
          Returns the instance id.
protected  KeyedCollection getKeyedCollection()
          Returns the keyed collection of the action context.
protected  java.lang.String getName()
          Returns the action name.
protected  java.lang.String getOriginWorkstation()
          Returns the origin workstation.
protected  Context getParent()
          Returns the parent context of the action context.
protected  BTTServiceRequester getService(java.lang.String aServiceName)
          Returns the service named aServiceName.
protected  java.lang.String getSessionId()
          Returns the session id.
protected  java.lang.String getType()
          Returns the type of the action context.
protected  java.lang.Object getValueAt(java.lang.String aCompositeKey)
          Returns the value of the data element identified by aCompositeKey.
 void initialize()
          This method performs EJB initialization operation: 1.
protected  boolean isChained()
          Returns true if the action context has parent.
protected  boolean isDistributedContext()
          Returns true if the action context is distributed context.
protected  java.util.Hashtable mapResponseFromCHA(java.util.Vector fieldNames)
          Mapping response data from CHA.
protected  void prune()
          Prunes the action context from the hierarchy.
protected  void releaseService(BTTServiceRequester aServiceRequester)
          Releases the service.
protected  DataElement removeAt(java.lang.String aCompositeKey)
          Removes the data element identified by aCompositeKey.
protected  boolean runInSession(java.lang.String tid)
          Set the origin workstation identifier.
protected  void setApplicationId(java.lang.String appId)
          Sets the application id.
protected  void setContext(Context aContext)
          Sets the action context.
protected  void setContextName(java.lang.String aContextName)
          Sets the action context name to aContextName.
protected  void setIsDistributedContext(boolean isDistributed)
          Sets true if the action context is distributed context.
protected  void setKeyedCollection(KeyedCollection aKeyedCollection)
          Sets the keyed collection of the action context to aKeyedCollection.
protected  void setName(java.lang.String aName)
          Sets the action name.
protected  void setOriginWorkstation(java.lang.String aOriginWorkstation)
          Sets the origin workstation.
protected  void setSessionId(java.lang.String sid)
          Sets the session id.
protected  void setType(java.lang.String aContextType)
          Sets the type of the action context to aContextType.
 void setupSessionContext()
          Setup session context: 1.
 void setupSessionContext(java.lang.String sessionCtxName)
          Setup session context: 1.
protected  void setValueAt(java.lang.String aCompositeKey, java.lang.Object aDataValue)
          Sets the value of the data elmement identified by aCompositeKey.
protected  void unassignService(java.lang.String aServiceName)
          Unassigns the service.
protected  void unchain()
          Unchains the action context.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

systemData

protected transient BTTSystemData systemData
The system data for this action.


bttUserWorkArea

protected transient BTTUserWorkArea bttUserWorkArea
The BTT user work area.


COMPID

public static final java.lang.String COMPID
Component ID for Server Bean used in trace "#SBEAN"

See Also:
Constant Field Values
Constructor Detail

BaseSingleAction

public BaseSingleAction()
Method Detail

initialize

public void initialize()
                throws BTTSAEException
This method performs EJB initialization operation: 1. Initialize the action EJB attributes from its deployment descriptor. 2. Create the action context and chains it to the session context.

Throws:
BTTSAEException

setupSessionContext

public void setupSessionContext()
                         throws BTTSAEException
Setup session context: 1. Get the parent context. 2. Create the session context and chains it to the parent context. 3. Set session instance ID to BTTSystemData instanceId.

Throws:
BTTSAEException

setupSessionContext

public void setupSessionContext(java.lang.String sessionCtxName)
                         throws BTTSAEException
Setup session context: 1. Get the parent context. 2. Create the session context and chains it to the parent context. 3. Set session instance ID to BTTSystemData instanceId.

Throws:
BTTSAEException

close

public void close()

ejbRemove

public void ejbRemove()
This method prunes the action context.

Throws:
BTTSAEException

getName

protected java.lang.String getName()
Returns the action name.

Returns:
java.lang.String The action name.

setName

protected void setName(java.lang.String aName)
Sets the action name.

Parameters:
aName - The actoin name.

getContext

protected Context getContext()
Returns the action context.

Returns:
com.ibm.btt.base.Context The action context.

setContext

protected void setContext(Context aContext)
Sets the action context.

Parameters:
aContext - The action context.

isDistributedContext

protected boolean isDistributedContext()
Returns true if the action context is distributed context.

Returns:
boolean If the action context is distributed context.

setIsDistributedContext

protected void setIsDistributedContext(boolean isDistributed)
Sets true if the action context is distributed context.

Parameters:
isDistributed - If the action context is distributed context.

getSessionId

protected java.lang.String getSessionId()
Returns the session id.

Returns:
java.lang.String The session id.

setSessionId

protected void setSessionId(java.lang.String sid)
Sets the session id.

Parameters:
sid - The session id.

getApplicationId

protected java.lang.String getApplicationId()
Returns the application id.

Returns:
java.lang.String The application id.

setApplicationId

protected void setApplicationId(java.lang.String appId)
Sets the application id.

Parameters:
appId - The application id.

getInstanceId

protected java.lang.String getInstanceId()
Returns the instance id.

Returns:
java.lang.String The instance id.

getOriginWorkstation

protected java.lang.String getOriginWorkstation()
Returns the origin workstation.

Returns:
java.lang.String The origin workstation.

setOriginWorkstation

protected void setOriginWorkstation(java.lang.String aOriginWorkstation)
Sets the origin workstation.

Parameters:
aOriginWorkstation - The origin workstation.

addElement

protected DataElement addElement(DataElement aDataElement)
                          throws BTTSAEException
Adds a data element to the context.

Parameters:
aDataElement - The data element.
Returns:
com.ibm.btt.base.DataElement The data element added.
Throws:
BTTSAEException

getElementAt

protected DataElement getElementAt(java.lang.String aCompositeKey)
                            throws BTTSAEException
Returns the data element identified by aCompositeKey.

Parameters:
aCompositeKey - The composite key.
Returns:
com.ibm.btt.base.DataElement The data element.
Throws:
BTTSAEException

removeAt

protected DataElement removeAt(java.lang.String aCompositeKey)
                        throws BTTSAEException
Removes the data element identified by aCompositeKey.

Parameters:
aCompositeKey - The composite key.
Returns:
com.ibm.btt.base.DataElement The data element.
Throws:
BTTSAEException

getValueAt

protected java.lang.Object getValueAt(java.lang.String aCompositeKey)
                               throws BTTSAEException
Returns the value of the data element identified by aCompositeKey.

Parameters:
aCompositeKey - The composite key.
Returns:
java.lang.Object The value of the data element.
Throws:
BTTSAEException

setValueAt

protected void setValueAt(java.lang.String aCompositeKey,
                          java.lang.Object aDataValue)
                   throws BTTSAEException
Sets the value of the data elmement identified by aCompositeKey.

Parameters:
aCompositeKey - The composite key.
aDataValue - The value.
Throws:
BTTSAEException

getKeyedCollection

protected KeyedCollection getKeyedCollection()
                                      throws BTTSAEException
Returns the keyed collection of the action context.

Returns:
com.ibm.btt.base.KeyedCollection The keyed collection.
Throws:
BTTSAEException

setKeyedCollection

protected void setKeyedCollection(KeyedCollection aKeyedCollection)
                           throws BTTSAEException
Sets the keyed collection of the action context to aKeyedCollection.

Parameters:
aKeyedCollection - The keyed collection.
Throws:
BTTSAEException

getType

protected java.lang.String getType()
                            throws BTTSAEException
Returns the type of the action context.

Returns:
java.lang.String The type.
Throws:
BTTSAEException

setType

protected void setType(java.lang.String aContextType)
                throws BTTSAEException
Sets the type of the action context to aContextType.

Parameters:
aContextType - The type.
Throws:
BTTSAEException

chainTo

protected void chainTo(Context aContext)
                throws BTTSAEException
Chains the action context to aContext.

Parameters:
aContext - The context.
Throws:
BTTSAEException

isChained

protected boolean isChained()
                     throws BTTSAEException
Returns true if the action context has parent.

Returns:
boolean If the action context has parent.
Throws:
BTTSAEException

getContextByType

protected Context getContextByType(java.lang.String aContextType)
                            throws BTTSAEException
Returns the first context of type aContextType in the chain of contexts.

Parameters:
aContextType - The context type.
Returns:
com.ibm.btt.base.Context The context.
Throws:
BTTSAEException

getContextName

protected java.lang.String getContextName()
Returns the action context name.

Returns:
java.lang.String The action context name.

setContextName

protected void setContextName(java.lang.String aContextName)
Sets the action context name to aContextName.

Parameters:
aContextName - The action context name.

getParent

protected Context getParent()
                     throws BTTSAEException
Returns the parent context of the action context.

Returns:
com.ibm.btt.base.Context The parent context.
Throws:
BTTSAEException

unchain

protected void unchain()
                throws BTTSAEException
Unchains the action context.

Throws:
BTTSAEException

prune

protected void prune()
              throws BTTSAEException
Prunes the action context from the hierarchy.

Throws:
BTTSAEException

getFormat

protected FormatElement getFormat(java.lang.String aFormatName)
Returns the format named aFormatName.

Parameters:
aFormatName - The format name.
Returns:
com.ibm.btt.formatter.client.FormatElement The format.

getService

protected BTTServiceRequester getService(java.lang.String aServiceName)
                                  throws BTTSAEException
Returns the service named aServiceName.

Parameters:
aServiceName - The name of the service.
Returns:
com.ibm.btt.base.services.BTTServiceRequester The service.
Throws:
BTTSAEException

releaseService

protected void releaseService(BTTServiceRequester aServiceRequester)
                       throws BTTSAEException
Releases the service.

Parameters:
aServiceRequester - The service.
Throws:
BTTSAEException

assignService

protected void assignService(java.lang.String aServiceName,
                             BTTServiceRequester aServiceRequester)
                      throws BTTSAEException
Assigns the service.

Parameters:
aServiceName - The service name.
aServiceRequester - The service.
Throws:
BTTSAEException

unassignService

protected void unassignService(java.lang.String aServiceName)
                        throws BTTSAEException
Unassigns the service.

Parameters:
aServiceName - The service name.
Throws:
BTTSAEException

mapResponseFromCHA

protected java.util.Hashtable mapResponseFromCHA(java.util.Vector fieldNames)
                                          throws BTTSAEException
Mapping response data from CHA.

Parameters:
fieldNames - The field names.
Returns:
java.util.Hashtable The response data.
Throws:
BTTSAEException

runInSession

protected boolean runInSession(java.lang.String tid)
Set the origin workstation identifier.

Parameters:
tid - The origin workstation.
Returns:
boolean True if the input param is not null.

IBM Branch Transformation Toolkit Javadoc

(c) Copyright IBM Corporation 1998, 2005