|
IBM WebSphere Multichannel Bank Transformation Toolkit Javadoc | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.btt.base.ContextImpl
com.ibm.btt.base.LocalContextImpl
public class LocalContextImpl
Local context implementatation
Context
,
Serialized FormField Summary |
---|
Fields inherited from class com.ibm.btt.base.ContextImpl |
---|
addToDynamicKColl, bufferSize, childInstanceIDs, children, currentChild, DEFAULT_BUFFER_SIZE, DEFAULT_COMPRESSION, dirty, externalizer, instanceID, keyedCollection, level, localCall, mode, name, parent, parentInstanceID, parentName, readOnly, rootContext, serializableLevel, serializeParentsAndChildren, type |
Constructor Summary | |
---|---|
LocalContextImpl()
This constructor creates a local context object without name. |
|
LocalContextImpl(java.lang.String contextName,
boolean isDistributed)
This constructor creates a distributed Context object or a local context according to the value of the parameter isDistributed. |
|
LocalContextImpl(java.lang.String aName,
java.lang.String aType,
Context aParent)
Creates a local context without predefined definition and chain to another local or distributed context. |
|
LocalContextImpl(java.lang.String contextName,
java.lang.String typeName,
Context parentContext,
boolean isDistributed)
If isDistributed = true, create a distributed Context based on a context name, and the following optional params, type name, parent Context. |
|
LocalContextImpl(java.lang.String aName,
java.lang.String aType,
Context aParent,
KeyedCollection aKeyedCollection)
Creates a local context without predefined definition and chain to another local or distributed context. |
|
LocalContextImpl(java.lang.String contextName,
java.lang.String typeName,
Context parentContext,
KeyedCollection aKeyedCollection,
boolean isDistributed)
If isDistributed = true, create a distributed Context based on a context name, and the following optional params, type name, parent Context, a KeyedCollection. |
|
LocalContextImpl(java.lang.String aName,
java.lang.String aType,
KeyedCollection aKeyedCollection)
Creates a local context without predefined definition and chain to another local or distributed context. |
Method Summary | |
---|---|
void |
addChild(Context aNewChild)
Adds a child specified by the parameter to the children list of current context. |
void |
addElement(DataElement aDataElement)
Adds an element to its keyedCollection. |
void |
addService(Service aService,
java.lang.String aServiceName,
java.lang.String aServiceType)
Adds a service to the service list of this context. |
void |
chainTo(Context aContext)
Chains this context to aContext. |
void |
clearKeyedCollection()
Clears the context (current level only) by destroying the current keyed collection associated and replacing it with a new one. |
void |
clearKeyedCollection(boolean keepKCollStatus,
boolean clearOnlyValues)
This method clears both the typed and non-typed elements in the context keyed collection. |
void |
commit()
Commit a context and all its children and childrenĄŻ children into db, and remove these contexts from memory. |
boolean |
containsChild(java.lang.String aContextName)
Returns true if this context has a child with the name aContextName. |
Vector |
fields()
Returns all the data fields, which are addressable from this context. |
Context |
getAncestorByName(java.lang.String aContextName)
Searches the context tree for an ancestor Context named aContextName and returns the first matching context. |
static boolean |
getAutoChainToParentContext()
|
Vector |
getChildInstanceIDs()
Deprecated. |
Vector |
getChildren()
Returns the children contexts of this one. |
Vector |
getChildrenAtAnyLevel()
Get the children of a remote context at any level from the context tree. |
java.lang.String |
getClassID()
get the class instance ID |
static Context |
getContextByInstanceID(java.lang.String anInstanceID)
Returns the distributed context that matches the parameter: instanceID. |
Context |
getContextByType(java.lang.String aTypeName)
Returns the first context that matches its type to aTypeName. |
static Context |
getContextNamed(java.lang.String aContextName)
Searches the context tree from the root context for a context named aContextName |
static Vector |
getContextTable()
Get a Vector containing all the instanceIDs in the server side hashtable. |
DataElement |
getElementAt(java.lang.String aCompositeKey)
Returns the element of its keyedCollection,or keyedCollections of the upper contexts which is located at aCompositeKey path. |
KeyedCollection |
getKeyedCollection()
Returns the keyedCollection attribute. |
java.lang.String |
getLevel()
We can define an attribute --level-- in context.xml file to indicate level of the context. |
java.lang.String |
getName()
Return the name attribute. |
Context |
getNextContextHorizontal()
The method used to iterate over the context tree. |
Context |
getNextContextVertical(Context parentContext)
Search the context tree from Vertical direction |
Context |
getParent()
Returns the parent attribute. |
java.lang.String |
getParentInstanceID()
Deprecated. |
java.lang.String |
getParentName()
|
static Context |
getRoot()
Returns the root context of the context tree. |
Service |
getService(java.lang.String aServiceName)
Returns the first service named aServiceName, by searching over this context branch in the upper direction. |
Hashtable |
getServices()
get the Services from context |
java.lang.String |
getType()
Returns the "type" attribute. |
java.lang.Object |
getValueAt(java.lang.String aCompositeKey)
Returns the value of the element of its keyedCollection, or keyedCollections of the upper contexts, located in the "aCompositeKey" path. |
boolean |
hasChildren()
Returns true if this context has any children. |
java.lang.Object |
initializeFrom(Tag aTag)
Initializes a Context with the Tag attributes. |
java.lang.Object |
initializeServiceFrom(Tag aTag)
Initializes services in the context. |
boolean |
isAddToDynamicKColl()
Returns the value of the addToDynamicKColl property. |
boolean |
isChained()
Returns true if this context is in the context tree. |
boolean |
isDirty()
Check if the context is dirty, if it is dirty it can be commited to persistence |
boolean |
isReadOnly()
If the definition of this context in context.xml has the attribute readonly="true", this method will return true, otherwise, false is returned. |
boolean |
isRoot()
Returns true if this context is the root context. |
void |
prune()
Removes this context and its children from the context tree from both memory and DB. |
void |
readExternal()
Initializes a dataElement with its external value. |
void |
readExternal(java.io.ObjectInput s)
Invokes the object creation from an ObjectInput. |
void |
readExternal(TagInputStream aTIS)
Initializes this instance with values read from a file. |
void |
readFromStream(java.io.ObjectInput s)
Invokes the object creation from an ObjectInput. |
DataElement |
removeAt(java.lang.String aCompositeKey)
Removes aCompositeKey element of its keyedCollection. |
DataElement |
removeAtAnyLevel(java.lang.String aCompositeKey)
Removes an element of its keyedCollection, or the keyedCollections in the upper contexts, located in the aCompositeKey path. |
void |
removeChild(Context aContext)
Removes a child of this context from the context tree. |
void |
removeChild(java.lang.String childInstanceID)
Remove the child-parent relationship between this context and its child context specified by the parameter childInstanceID |
void |
removeExternal()
Removes the object's tags from the file in which the object is externalized. |
void |
removeInstance()
The method used to remove the current context if it is a remote context. |
void |
setAddToDynamicKColl(boolean newValue)
Sets the value of the addToDynamicKColl property. |
static void |
setAutoChainToParentContext(boolean value)
set the flag if to chain to parent context automatically when parent attribute is defined in cotext XML definition |
void |
setChildren(Vector aChildrenCollection)
Sets the children property. |
void |
setDirty(boolean aDirty)
Set the dirty value of context. |
void |
setInstanceID(java.lang.String anInstanceID)
Sets the instanceID for a local context which must not predefined in the configuration file such as context.xml. |
void |
setKCollDynamic(boolean aValue)
Set the value to the attribute dynamic for the keyedCollection in this context. |
void |
setKeyedCollection(KeyedCollection aKeyedCollection)
Sets the attribute keyedCollection. |
void |
setName(java.lang.String aContextName)
Sets the name property of this context. |
void |
setParentInstanceID(java.lang.String string)
Deprecated. |
void |
setReadOnly(boolean isReadOnly)
Set the value for readonly attribute for this context. |
java.lang.String |
setRemote()
Change the mode of this context to remote |
protected static void |
setRoot(Context aContext)
Sets the value of rootContext. |
void |
setType(java.lang.String aContextType)
Sets the type property of this context. |
int |
setValueAt(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 aCompositeKey,
java.lang.Object aDataValue)
Sets the value of the element of its keyedCollection, or keyedCollections of the upper contexts, located in the aCompositeKey path. |
void |
stopServices()
Stops all services in the context invoking the terminate service's method. |
void |
stopServicesInChildren()
Stops all services in this context and all of its children. |
java.lang.String |
toString()
Returns an XML representation of this context. |
Vector |
toStrings()
Returns a visual representation of this context. |
Vector |
toTags()
Returns a Vector with the elements represented as a Tag. |
DataElement |
tryGetElementAt(java.lang.String aCompositeKey)
Returns the element of its keyedCollection, or keyedCollections of the upper contexts which is located at aCompositeKey path. |
java.lang.Object |
tryGetValueAt(java.lang.String aCompositeKey)
Returns the value of the element of its keyedCollection, or keyedCollections of the upper contexts, located in the aCompositeKey path. |
int |
trySetElementAt(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()
Removes this context and all its children from the context tree. |
void |
writeExternal()
Writes this instance to a file using tags. |
void |
writeExternal(java.io.ObjectOutput s)
Provides concrete serialization handling for contexts. |
void |
writeToStream(java.io.ObjectOutput s)
Provides concrete serialization handling for contexts. |
Methods inherited from class com.ibm.btt.base.ContextImpl |
---|
checkObject, checkString, convertToByte, convertToContext, externalizer, getExternalizer, getInstanceID, getMode, getTagName, read, reset, setExternalizer, setMode, setSerializableLevel, setSerializeParentsAndChildren |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public LocalContextImpl()
public LocalContextImpl(java.lang.String contextName, boolean isDistributed) throws DSEInvalidRequestException
contextName
- isDistributed
-
DSEInvalidRequestException
public LocalContextImpl(java.lang.String aName, java.lang.String aType, KeyedCollection aKeyedCollection) throws DSEInvalidRequestException
aName
- aType
- aKeyedCollection
-
DSEInvalidRequestException
public LocalContextImpl(java.lang.String aName, java.lang.String aType, Context aParent, KeyedCollection aKeyedCollection) throws DSEInvalidRequestException
aName
- aType
- aParent
- aKeyedCollection
-
DSEInvalidRequestException
public LocalContextImpl(java.lang.String aName, java.lang.String aType, Context aParent) throws DSEInvalidRequestException
aName
- aType
- aParent
-
DSEInvalidRequestException
public LocalContextImpl(java.lang.String contextName, java.lang.String typeName, Context parentContext, KeyedCollection aKeyedCollection, boolean isDistributed) throws DSEInvalidRequestException
contextName
- typeName
- parentContext
- aKeyedCollection
- isDistributed
-
DSEInvalidRequestException
public LocalContextImpl(java.lang.String contextName, java.lang.String typeName, Context parentContext, boolean isDistributed) throws DSEInvalidRequestException
contextName
- typeName
- parentContext
- isDistributed
-
DSEInvalidRequestException
Method Detail |
---|
public void addChild(Context aNewChild) throws DSEInvalidRequestException
aNewChild
-
DSEInvalidRequestException
public void addElement(DataElement aDataElement) throws DSEInvalidRequestException
aDataElement
-
DSEInvalidRequestException
public void chainTo(Context aContext) throws DSEInvalidRequestException
aContext
-
DSEInvalidRequestException
public void clearKeyedCollection() throws DSEInvalidRequestException
DSEInvalidRequestException
public void clearKeyedCollection(boolean keepKCollStatus, boolean clearOnlyValues) throws java.io.IOException, DSEInvalidRequestException
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
- -
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
DSEInvalidRequestException
public boolean containsChild(java.lang.String aContextName) throws DSEInvalidRequestException
aContextName
-
DSEInvalidRequestException
public Vector fields() throws DSEInvalidRequestException
DSEInvalidRequestException
public Context getAncestorByName(java.lang.String aContextName) throws DSEInvalidRequestException
aContextName
-
DSEInvalidRequestException
public Vector getChildrenAtAnyLevel() throws DSEInvalidRequestException
DSEInvalidRequestException
public Vector getChildren() throws DSEInvalidRequestException
DSEInvalidRequestException
public Context getContextByType(java.lang.String aTypeName) throws DSEInvalidRequestException
aTypeName
-
DSEInvalidRequestException
public static Context getContextNamed(java.lang.String aContextName) throws DSEInvalidRequestException
aContextName
-
DSEInvalidRequestException
public static Context getContextByInstanceID(java.lang.String anInstanceID) throws DSEInvalidRequestException
anInstanceID
-
DSEInvalidRequestException
public static Vector getContextTable() throws DSEInvalidRequestException
DSEInvalidRequestException
public Context getNextContextHorizontal() throws DSEInvalidRequestException
DSEInvalidRequestException
public Context getNextContextVertical(Context parentContext) throws DSEInvalidRequestException
parentContext
-
DSEInvalidRequestException
public DataElement getElementAt(java.lang.String aCompositeKey) throws DSEObjectNotFoundException
aCompositeKey
-
DSEObjectNotFoundException
public KeyedCollection getKeyedCollection()
DSEInvalidRequestException
public java.lang.String getName()
public Context getParent()
DSEInvalidRequestException
public static Context getRoot()
DSEInvalidRequestException
public java.lang.String getType()
DSEInvalidRequestException
public java.lang.Object getValueAt(java.lang.String aCompositeKey) throws DSEObjectNotFoundException
aCompositeKey
-
DSEObjectNotFoundException
public boolean hasChildren() throws DSEInvalidRequestException
DSEInvalidRequestException
public java.lang.Object initializeFrom(Tag aTag) throws java.io.IOException, DSEException
aTag
- Tag
java.io.IOException
- DSEException
DSEException
public boolean isAddToDynamicKColl()
DSEInvalidRequestException
public boolean isChained() throws DSEInvalidRequestException
DSEInvalidRequestException
public boolean isRoot()
DSEInvalidRequestException
public void prune() throws DSEInvalidRequestException, DSEObjectNotFoundException
DSEInvalidRequestException
DSEObjectNotFoundException
public void readExternal() throws java.io.IOException
java.io.IOException
public void readExternal(TagInputStream aTIS) throws java.io.IOException
aTIS
-
java.io.IOException
public void readExternal(java.io.ObjectInput s) throws java.io.IOException, java.lang.ClassNotFoundException
s
- java.io.ObjectInput
java.io.IOException.
java.lang.ClassNotFoundException.
java.io.IOException
java.lang.ClassNotFoundException
public void readFromStream(java.io.ObjectInput s) throws java.io.IOException, java.lang.ClassNotFoundException
s
- java.io.ObjectInput
java.io.IOException.
java.lang.ClassNotFoundException.
java.io.IOException
java.lang.ClassNotFoundException
public DataElement removeAt(java.lang.String aCompositeKey) throws DSEObjectNotFoundException, DSEInvalidRequestException
aCompositeKey
-
DSEObjectNotFoundException
DSEInvalidRequestException
public DataElement removeAtAnyLevel(java.lang.String aCompositeKey) throws DSEObjectNotFoundException, DSEInvalidRequestException
aCompositeKey
-
DSEObjectNotFoundException
DSEInvalidRequestException
public void removeChild(Context aContext) throws DSEInvalidRequestException
aContext
-
DSEObjectNotFoundException
DSEInvalidRequestException
public void removeInstance() throws DSEInvalidRequestException
DSEInvalidRequestException
public void removeChild(java.lang.String childInstanceID) throws DSEInvalidRequestException
childInstanceID
-
DSEInvalidRequestException
public void removeExternal() throws java.io.IOException
java.io.IOException
public void setAddToDynamicKColl(boolean newValue)
newValue
-
DSEInvalidRequestException
public void setChildren(Vector aChildrenCollection) throws DSEInvalidRequestException
aChildrenCollection
-
DSEInvalidRequestException
public void setKeyedCollection(KeyedCollection aKeyedCollection) throws DSEInvalidRequestException
aKeyedCollection
-
DSEInvalidRequestException
public void setName(java.lang.String aContextName)
protected static void setRoot(Context aContext) throws DSEInvalidRequestException
aContext
-
DSEInvalidRequestException
public void setType(java.lang.String aContextType) throws DSEInvalidRequestException
aContextType
-
DSEInvalidRequestException
public int setValueAt(SortedTable aSortedTable) throws DSEInvalidRequestException
aSortedTable
-
DSEInvalidRequestException
public java.lang.String toString()
toString
in interface Context
toString
in class java.lang.Object
public Vector toStrings()
public Vector toTags() throws java.io.IOException
java.io.IOException
public DataElement tryGetElementAt(java.lang.String aCompositeKey)
aCompositeKey
-
DSEObjectNotFoundException
public java.lang.Object tryGetValueAt(java.lang.String aCompositeKey)
aCompositeKey
-
DSEObjectNotFoundException
public void unchain() throws DSEInvalidRequestException, DSEObjectNotFoundException
DSEInvalidRequestException
DSEObjectNotFoundException
public void writeExternal() throws java.io.IOException
java.io.IOException
public void writeExternal(java.io.ObjectOutput s) throws java.io.IOException
s
- java.io.ObjectOutput
java.io.IOException
public void writeToStream(java.io.ObjectOutput s) throws java.io.IOException
s
- java.io.ObjectOutput
java.io.IOException
public void setInstanceID(java.lang.String anInstanceID) throws DSEInvalidArgumentException
anInstanceID
-
DSEInvalidArgumentException
public void setKCollDynamic(boolean aValue) throws DSEInvalidRequestException
aValue
-
DSEInvalidRequestException
public int trySetElementAt(java.lang.String aCompositeKey, java.io.Serializable aValue)
aCompositeKey
- aValue
-
DSEInvalidRequestException
public void setValueAt(java.lang.String aCompositeKey, java.lang.Object aDataValue) throws DSEInvalidArgumentException, DSEObjectNotFoundException, DSEInvalidRequestException
aCompositeKey
- aDataValue
-
DSEInvalidArgumentException
DSEObjectNotFoundException
DSEInvalidRequestException
public boolean isReadOnly()
DSEInvalidRequestException
public void setReadOnly(boolean isReadOnly)
isReadOnly
- public java.lang.String getLevel() throws DSEInvalidRequestException
DSEInvalidRequestException
public void commit() throws DSEInvalidRequestException
instanceID
-
DSEInvalidRequestException
public java.lang.String getParentInstanceID() throws DSEInvalidRequestException
DSEInvalidRequestException
public void setParentInstanceID(java.lang.String string) throws DSEInvalidRequestException
string
-
DSEInvalidRequestException
public Vector getChildInstanceIDs() throws DSEInvalidRequestException
DSEInvalidRequestException
public java.lang.String getParentName() throws DSEInvalidRequestException
DSEInvalidRequestException
public void setDirty(boolean aDirty)
dirty
- public boolean isDirty()
dirty
- public java.lang.String setRemote() throws DSEInvalidRequestException
DSEInvalidRequestException
public java.lang.String getClassID()
public java.lang.Object initializeServiceFrom(Tag aTag) throws java.io.IOException
aTag
- com.ibm.dse.base.Tag
java.io.IOException
public void addService(Service aService, java.lang.String aServiceName, java.lang.String aServiceType) throws DSEInvalidRequestException
DSEInvalidRequestException
public Hashtable getServices()
public Service getService(java.lang.String aServiceName) throws DSEObjectNotFoundException
DSEObjectNotFoundException
public void stopServicesInChildren() throws DSEInvalidRequestException
DSEInvalidRequestException
public void stopServices()
public static void setAutoChainToParentContext(boolean value)
value
- public static boolean getAutoChainToParentContext()
|
IBM WebSphere Multichannel Bank Transformation Toolkit Javadoc | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |