IBM Bank Transformation Toolkit Javadoc

com.ibm.btt.cha.ejb
Interface CHASessionLocal

All Superinterfaces:
javax.ejb.EJBLocalObject

public interface CHASessionLocal
extends javax.ejb.EJBLocalObject

Local interface for Enterprise Bean: CHASession


Field Summary
static java.lang.String COPYRIGHT
           
 
Method Summary
 void addChild(java.lang.String childInstanceID, java.lang.String instanceID)
           
 void addElement(java.lang.String instanceID, java.io.Serializable anElement)
          Adds an element to the Context
 void chainTo(java.lang.String instanceID, java.lang.String parentInstanceID)
          Chains this context to the context named specified by parentInstanceID.
 void clearKeyedCollection(java.lang.String instanceID)
          Clears the context (current level only) by destroying the current keyed collection associated and replacing it with a new one.
 void clearKeyedCollection(java.lang.String instanceID, boolean keepKCollStatus, boolean clearOnlyValues)
          This method clears both the typed and non-typed elements in the context keyed collection.
 void commit(java.lang.String instanceID)
           
 boolean containsChild(java.lang.String instanceID, java.lang.String aContextName)
          Returns true if this context has a child with the name aContextName.
 Vector fields(java.lang.String instanceID)
          Returns all the data fields, which are addressable from this context.
 java.lang.String getAncestorByName(java.lang.String instanceID, java.lang.String aContextName)
          Searches the context tree for an ancestor Context named aContextName and returns the first matching context.
 Vector getChildren(java.lang.String instanceID)
           
 Vector getChildrenAtAnyLevel(java.lang.String currentInstanceID)
          Get the children of a remote context at any level from the context tree.
 java.lang.String getContextByType(java.lang.String instanceID, java.lang.String aTypeName)
          Returns the instanceID of the first context that matches its type to aTypeName.
 java.lang.String getContextNamed(java.lang.String contextName)
          Searches the context tree from the root context for a context named aContextName in the session specified by parameter sessionID and returns the first matching context. if sessionID is null, this distributed context is shared by all the sesison.
 Vector getContextTable()
          Get the context table which is a hashtable.
 java.io.Serializable getElementAt(java.lang.String instanceID, java.lang.String aCompositeKey, boolean isReadOnly)
          Returns the element of its keyedCollection,or keyedCollections of the upper contexts which is located at aCompositeKey path.
 KeyedCollection getKeyedCollection(java.lang.String instanceID)
          Returns the keyedCollection attribute.
 java.lang.String getLevel(java.lang.String instanceID)
          We can define an attribute --level-- in dsectxt.xml file to indicate level of the context.
 java.lang.String getName(java.lang.String instanceID)
           
 java.lang.String getNextContextHorizontal(java.lang.String currentInstanceID)
          The method used to iterate over the context tree.
 java.lang.String getNextContextVertical(java.lang.String parentInstanceID, java.lang.String childInstanceID)
          The method used to iterate over the context tree.
 java.lang.String getParentID(java.lang.String childInstanceID)
           
 java.lang.String getParentName(java.lang.String instanceID)
           
 java.lang.String getRoot()
          Returns the instanceID of root context of the context tree.
 javax.ejb.SessionContext getSessionContext()
          getSessionContext
 java.lang.String getTagName(java.lang.String instanceID)
          Returns a String used by the externalizer.
 java.lang.String getTypeName(java.lang.String instanceID)
           
 DataElement getTypePackages()
          Get the packages info for type data from CHA server side dse.ini
 Hashtable getTypeTagClassTable()
          Get the tag class table for type data from CHA server side dse.ini
 DataElement getTypeTagClassTableDefinition()
          Get definition for tag class table in server side dse.ini file
 Vector getTypeTags()
           
 boolean isAddToDynamicKColl(java.lang.String instanceID)
          Returns the value of the addToDynamicKColl property.
 boolean isChained(java.lang.String instanceID)
          return true/false based on the existence of a parent ID
 boolean isDirty(java.lang.String instanceID)
           
 boolean isReadOnly(java.lang.String instanceID)
          If the definition of this context in dsetxt.xml has the attribute readonly="true", this method will return true, otherwise, false is returned.
 boolean isRoot(java.lang.String instanceID)
           
 void mapContents(java.lang.String formatName, Context inputContext, Context outputContext)
          Maps two contexts, map the content of inputContext into outputContext.
 java.lang.String newContext(java.lang.String contextName, java.lang.String typeName, Context parentContext)
          Creates a new CHAInstanceMemoryFactory Entity based on a context name, and the following optional params: type name parent CHAInstanceMemoryFactory remote interface The name specified in the context name must exist in the external XML definiton files.
 java.lang.String newContext(java.lang.String contextName, java.lang.String typeName, Context parentContext, KeyedCollection aKeyedCollection)
          Creates a new CHAInstanceMemoryFactory Entity based on a context name, and the following optional params: type name parent CHAInstanceMemoryFactory remote interface The name specified in the context name must exist in the external XML definiton files.
 Context newDynamicContext(java.lang.String contextName)
          Creates a new dynamic Local context with a supplied name.
 java.lang.String newRemoteContext(java.lang.String contextName, java.lang.String typeName, Context parentContext, KeyedCollection aKeyedCollection)
          Create a remote Context with settings from facade side
 void prune(java.lang.String currentInstanceID)
          Removes this context and its children from the context tree.
 void pruneFromMemory(java.lang.String currentInstanceID)
          Removes this context and its children from the context tree.
 DataElement removeAt(java.lang.String instanceID, java.lang.String aCompositeKey)
          Removes aCompositeKey element of its keyedCollection.
 DataElement removeAtAnyLevel(java.lang.String instanceID, java.lang.String aCompositeKey)
          Removes an element of its keyedCollection, or the keyedCollections in the upper contexts, located in the aCompositeKey path.
 void removeChild(java.lang.String childInstanceID)
           
 void removeInstance(java.lang.String currentInstanceID)
          Removes this context and its children from the context tree.
 void setAddToDynamicKColl(java.lang.String instanceID, boolean newValue)
          Sets the value of the addToDynamicKColl property.
 void setDirty(java.lang.String instanceID, boolean dirty)
           
 void setKCollDynamic(java.lang.String instanceID, boolean aValue)
          Set the value to the attribute dynamic for the keyedCollection in this context.
 void setKeyedCollection(java.lang.String instanceID, java.io.Serializable akeyedCollection)
          set the context's KeyedCollection.
 void setName(java.lang.String instanceID, java.lang.String aContextName)
           
 void setParentID(java.lang.String childInstanceID, java.lang.String parentInstanceID)
          Establish the child-parent relationship
 void setRoot(java.lang.String instanceID)
           
 void setSessionContext(javax.ejb.SessionContext ctx)
          setSessionContext
 void setTypeName(java.lang.String instanceID, java.lang.String aContextType)
           
 int setValueAt(java.lang.String instanceID, SortedTable aSortedTable)
          The function is similiar to setValueAt(String, Object) except that set pairs of keys and values stored in aSortedTable via one method.
 void setValueAt(java.lang.String instanceID, java.lang.String aKey, java.io.Serializable aValue)
           
 Vector toStrings(java.lang.String instanceID)
          Returns a visual representation of this context.
 int trySetElementAt(java.lang.String instanceID, java.lang.String aCompositeKey, java.io.Serializable aValue)
          Set the value of the element of its keyedCollection, or keyedCollections of the upper contexts which is located at aCompositeKey path.
 void unchain(java.lang.String instanceID)
           
 
Methods inherited from interface javax.ejb.EJBLocalObject
getEJBLocalHome, getPrimaryKey, isIdentical, remove
 

Field Detail

COPYRIGHT

static final java.lang.String COPYRIGHT
See Also:
Constant Field Values
Method Detail

getSessionContext

javax.ejb.SessionContext getSessionContext()
getSessionContext


setSessionContext

void setSessionContext(javax.ejb.SessionContext ctx)
setSessionContext


getContextNamed

java.lang.String getContextNamed(java.lang.String contextName)
                                 throws CHARemoteProcessException
Searches the context tree from the root context for a context named aContextName in the session specified by parameter sessionID and returns the first matching context. if sessionID is null, this distributed context is shared by all the sesison.

Throws:
CHARemoteProcessException

getNextContextHorizontal

java.lang.String getNextContextHorizontal(java.lang.String currentInstanceID)
                                          throws CHARemoteProcessException
The method used to iterate over the context tree.

Returns:
String instanceID
Throws:
CHARemoteProcessException

getNextContextVertical

java.lang.String getNextContextVertical(java.lang.String parentInstanceID,
                                        java.lang.String childInstanceID)
                                        throws CHARemoteProcessException
The method used to iterate over the context tree.

Throws:
CHARemoteProcessException

prune

void prune(java.lang.String currentInstanceID)
           throws CHARemoteProcessException
Removes this context and its children from the context tree.

Throws:
CHARemoteProcessException

getChildrenAtAnyLevel

Vector getChildrenAtAnyLevel(java.lang.String currentInstanceID)
                             throws CHARemoteProcessException
Get the children of a remote context at any level from the context tree.

Throws:
CHARemoteProcessException

removeInstance

void removeInstance(java.lang.String currentInstanceID)
                    throws CHARemoteProcessException
Removes this context and its children from the context tree.

Throws:
CHARemoteProcessException

containsChild

boolean containsChild(java.lang.String instanceID,
                      java.lang.String aContextName)
                      throws CHARemoteProcessException
Returns true if this context has a child with the name aContextName. It returns false otherwise.

Throws:
CHARemoteProcessException

addChild

void addChild(java.lang.String childInstanceID,
              java.lang.String instanceID)
              throws CHARemoteProcessException
Parameters:
childInstanceID -
Throws:
CHARemoteProcessException

removeChild

void removeChild(java.lang.String childInstanceID)
                 throws CHARemoteProcessException
Throws:
CHARemoteProcessException

chainTo

void chainTo(java.lang.String instanceID,
             java.lang.String parentInstanceID)
             throws CHARemoteProcessException
Chains this context to the context named specified by parentInstanceID. This method throws an CHARemoteBeanException if this context does not exist.

Throws:
CHARemoteProcessException

unchain

void unchain(java.lang.String instanceID)
             throws CHARemoteProcessException
Throws:
CHARemoteProcessException

getTypeTags

Vector getTypeTags()
Returns:

getTypePackages

DataElement getTypePackages()
Get the packages info for type data from CHA server side dse.ini

Returns:

getTypeTagClassTable

Hashtable getTypeTagClassTable()
Get the tag class table for type data from CHA server side dse.ini

Returns:

getTypeTagClassTableDefinition

DataElement getTypeTagClassTableDefinition()
Get definition for tag class table in server side dse.ini file

Returns:

setAddToDynamicKColl

void setAddToDynamicKColl(java.lang.String instanceID,
                          boolean newValue)
                          throws CHARemoteProcessException
Sets the value of the addToDynamicKColl property.

Parameters:
newValue - boolean The new value of the property.
Throws:
CHARemoteProcessException

setKCollDynamic

void setKCollDynamic(java.lang.String instanceID,
                     boolean aValue)
                     throws CHARemoteProcessException
Set the value to the attribute dynamic for the keyedCollection in this context.

Parameters:
aValue -
Throws:
CHARemoteProcessException

setKeyedCollection

void setKeyedCollection(java.lang.String instanceID,
                        java.io.Serializable akeyedCollection)
                        throws CHARemoteProcessException
set the context's KeyedCollection. Warning: parameter value can be large. Also any existing keyedCollection in the Context object is immediately replaced.

Throws:
CHARemoteProcessException

setParentID

void setParentID(java.lang.String childInstanceID,
                 java.lang.String parentInstanceID)
                 throws CHARemoteProcessException
Establish the child-parent relationship

Throws:
CHARemoteProcessException

setValueAt

int setValueAt(java.lang.String instanceID,
               SortedTable aSortedTable)
The function is similiar to setValueAt(String, Object) except that set pairs of keys and values stored in aSortedTable via one method. Behind this method, when this context is a distributed context, the pairs of keys and values stored in aSortedTable will be sent to CHA server a time, thus improving performance.

Parameters:
aSortedTable -
Returns:
int = 0 : success int = 1,2,...,n: a value is failed to set which is indicated by return int value. For example, if return value is 1, the first value in aSortedTable can not be set successfully. if return value is 2, the first value is set successfully, but the second value is failed to be set and subsequent pairs of the keys and values will not be set .

setValueAt

void setValueAt(java.lang.String instanceID,
                java.lang.String aKey,
                java.io.Serializable aValue)
                throws CHARemoteProcessException
Throws:
CHARemoteProcessException

toStrings

Vector toStrings(java.lang.String instanceID)
Returns a visual representation of this context.

Returns:
Vector

trySetElementAt

int trySetElementAt(java.lang.String instanceID,
                    java.lang.String aCompositeKey,
                    java.io.Serializable aValue)
                    throws CHARemoteProcessException
Set the value of the element of its keyedCollection, or keyedCollections of the upper contexts which is located at aCompositeKey path. If the dataElement can be found in the current context or its upper contexts, set its value and return int 1. Otherwise, return -1 saying this dataElement does not exist.

Throws:
CHARemoteProcessException

removeAt

DataElement removeAt(java.lang.String instanceID,
                     java.lang.String aCompositeKey)
                     throws CHARemoteProcessException
Removes aCompositeKey element of its keyedCollection.

Throws:
CHARemoteProcessException

removeAtAnyLevel

DataElement removeAtAnyLevel(java.lang.String instanceID,
                             java.lang.String aCompositeKey)
                             throws CHARemoteProcessException
Removes an element of its keyedCollection, or the keyedCollections in the upper contexts, located in the aCompositeKey path.

Throws:
CHARemoteProcessException

isAddToDynamicKColl

boolean isAddToDynamicKColl(java.lang.String instanceID)
                            throws CHARemoteProcessException
Returns the value of the addToDynamicKColl property.

Returns:
boolean - The current value of addToDynamicKColl
Throws:
CHARemoteProcessException

isChained

boolean isChained(java.lang.String instanceID)
                  throws CHARemoteProcessException
return true/false based on the existence of a parent ID

Throws:
CHARemoteProcessException

isReadOnly

boolean isReadOnly(java.lang.String instanceID)
                   throws CHARemoteProcessException
If the definition of this context in dsetxt.xml has the attribute readonly="true", this method will return true, otherwise, false is returned.

Returns:
boolean
Throws:
CHARemoteProcessException

isRoot

boolean isRoot(java.lang.String instanceID)
               throws CHARemoteProcessException
Parameters:
instanceID -
Returns:
true if the context is a root context.
Throws:
CHARemoteProcessException

getTagName

java.lang.String getTagName(java.lang.String instanceID)
                            throws CHARemoteProcessException
Returns a String used by the externalizer.

Returns:
java.lang.String
Throws:
CHARemoteProcessException

getTypeName

java.lang.String getTypeName(java.lang.String instanceID)
                             throws CHARemoteProcessException
Parameters:
instanceID -
Returns:
Throws:
CHARemoteProcessException

getParentID

java.lang.String getParentID(java.lang.String childInstanceID)
                             throws CHARemoteProcessException
Parameters:
childInstanceID -
Returns:
Throws:
CHARemoteProcessException

getElementAt

java.io.Serializable getElementAt(java.lang.String instanceID,
                                  java.lang.String aCompositeKey,
                                  boolean isReadOnly)
                                  throws CHARemoteProcessException
Returns the element of its keyedCollection,or keyedCollections of the upper contexts which is located at aCompositeKey path.

Throws:
CHARemoteProcessException

getKeyedCollection

KeyedCollection getKeyedCollection(java.lang.String instanceID)
                                   throws CHARemoteProcessException
Returns the keyedCollection attribute.

Throws:
CHARemoteProcessException

getLevel

java.lang.String getLevel(java.lang.String instanceID)
                          throws CHARemoteProcessException
We can define an attribute --level-- in dsectxt.xml file to indicate level of the context. The context can be devided into three levels:root, session, normal.

Returns:
"root", "session", "normal". If this attribute is not difined, return null ;
Throws:
CHARemoteProcessException

getContextByType

java.lang.String getContextByType(java.lang.String instanceID,
                                  java.lang.String aTypeName)
                                  throws CHARemoteProcessException
Returns the instanceID of the first context that matches its type to aTypeName.

Throws:
CHARemoteProcessException

fields

Vector fields(java.lang.String instanceID)
              throws CHARemoteProcessException
Returns all the data fields, which are addressable from this context. This includes all the data fields of this context and the upper context.

Returns:
Vector
Throws:
CHARemoteProcessException

getAncestorByName

java.lang.String getAncestorByName(java.lang.String instanceID,
                                   java.lang.String aContextName)
                                   throws CHARemoteProcessException
Searches the context tree for an ancestor Context named aContextName and returns the first matching context.

Parameters:
aContextName - java.lang.String
Returns:
String instanceID
Throws:
CHARemoteProcessException

addElement

void addElement(java.lang.String instanceID,
                java.io.Serializable anElement)
                throws CHARemoteProcessException
Adds an element to the Context

Throws:
CHARemoteProcessException

clearKeyedCollection

void clearKeyedCollection(java.lang.String instanceID)
                          throws CHARemoteProcessException
Clears the context (current level only) by destroying the current keyed collection associated and replacing it with a new one.

Throws:
CHARemoteProcessException

getChildren

Vector getChildren(java.lang.String instanceID)
                   throws CHARemoteProcessException
Throws:
CHARemoteProcessException

getRoot

java.lang.String getRoot()
                         throws CHARemoteProcessException
Returns the instanceID of root context of the context tree.

Throws:
CHARemoteProcessException

clearKeyedCollection

void clearKeyedCollection(java.lang.String instanceID,
                          boolean keepKCollStatus,
                          boolean clearOnlyValues)
                          throws CHARemoteProcessException,
                                 java.io.IOException
This method clears both the typed and non-typed elements in the context keyed collection. It can clear only the elements of the kColl and keep the kColl attributes. For the kColl elements it is possible to clear only the values or to clear all the attributes.

Parameters:
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)
Throws:
java.io.IOException - - If keepKCollStatus or clearOnlyValues are false and the keyed collection has not been defined in the generic data file or in the generic types file
CHARemoteProcessException

getName

java.lang.String getName(java.lang.String instanceID)
                         throws CHARemoteProcessException
Throws:
CHARemoteProcessException

setName

void setName(java.lang.String instanceID,
             java.lang.String aContextName)
             throws CHARemoteProcessException
Throws:
CHARemoteProcessException

setTypeName

void setTypeName(java.lang.String instanceID,
                 java.lang.String aContextType)
                 throws CHARemoteProcessException
Throws:
CHARemoteProcessException

isDirty

boolean isDirty(java.lang.String instanceID)
                throws CHARemoteProcessException
Parameters:
instanceID -
Returns:
Throws:
CHARemoteProcessException
CHARemoteProcessException

setDirty

void setDirty(java.lang.String instanceID,
              boolean dirty)
              throws CHARemoteProcessException
Parameters:
instanceID -
dirty -
Throws:
CHARemoteProcessException

newRemoteContext

java.lang.String newRemoteContext(java.lang.String contextName,
                                  java.lang.String typeName,
                                  Context parentContext,
                                  KeyedCollection aKeyedCollection)
                                  throws CHARemoteProcessException
Create a remote Context with settings from facade side

Throws:
CHARemoteProcessException

newContext

java.lang.String newContext(java.lang.String contextName,
                            java.lang.String typeName,
                            Context parentContext,
                            KeyedCollection aKeyedCollection)
                            throws CHARemoteProcessException
Creates a new CHAInstanceMemoryFactory Entity based on a context name, and the following optional params: type name parent CHAInstanceMemoryFactory remote interface The name specified in the context name must exist in the external XML definiton files.

Throws:
CHARemoteProcessException

newContext

java.lang.String newContext(java.lang.String contextName,
                            java.lang.String typeName,
                            Context parentContext)
                            throws CHARemoteProcessException
Creates a new CHAInstanceMemoryFactory Entity based on a context name, and the following optional params: type name parent CHAInstanceMemoryFactory remote interface The name specified in the context name must exist in the external XML definiton files.

Throws:
CHARemoteProcessException

newDynamicContext

Context newDynamicContext(java.lang.String contextName)
                          throws CHARemoteProcessException
Creates a new dynamic Local context with a supplied name. The Context is created based on external definitions If the supplied name is given, it is created from the server-side external definitions. If no name is given, it will return null.

Throws:
CHARemoteProcessException

setRoot

void setRoot(java.lang.String instanceID)
             throws CHARemoteProcessException
Parameters:
string -
Throws:
CHARemoteProcessException

commit

void commit(java.lang.String instanceID)
            throws CHARemoteProcessException
Parameters:
instanceID -
Throws:
CHARemoteProcessException

getContextTable

Vector getContextTable()
Get the context table which is a hashtable. In this hashtable, the key is instanceID and the value is the context object.

Returns:
a hashtable

mapContents

void mapContents(java.lang.String formatName,
                 Context inputContext,
                 Context outputContext)
                 throws CHARemoteProcessException
Maps two contexts, map the content of inputContext into outputContext.

Parameters:
inputContext -
outputContext -
formatName -
Throws:
DSEInvalidRequestException
CHARemoteProcessException

getParentName

java.lang.String getParentName(java.lang.String instanceID)
                               throws CHARemoteProcessException
Returns:
Returns the parentName.
Throws:
CHARemoteProcessException
DSEInvalidRequestException

pruneFromMemory

void pruneFromMemory(java.lang.String currentInstanceID)
                     throws CHARemoteProcessException
Removes this context and its children from the context tree.

Throws:
CHARemoteProcessException

IBM Bank Transformation Toolkit Javadoc

(c) Copyright IBM Corporation 1998, 2008