|
IBM WebSphere Multichannel Bank Transformation Toolkit Javadoc | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
@ATTR(value={"id#String#REQUIRED","parent#String#IMPLIED","type#String#REQUIRED","addToDynamicKColl#Boolean#IMPLIED"}) public interface Context
This class is the basic repository of data and services. Instances of this class can be linked, or chained, in a tree of contexts, and the instances are capable of navigating over this tree, always in the upper direction. The instances of this class also can be passed as parameters of the format() and unformat() methods of a record format.
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 |
addNotifier(Notifier aNotifier,
java.lang.String aNotifierName,
java.lang.String aNotifierType)
|
void |
addService(Service aService,
java.lang.String aServiceName,
java.lang.String aServiceType)
Add the service to 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. |
byte[] |
convertToByte()
Convert this context as an array of bytes. |
Externalizer |
externalizer()
Returns the externalizer instance of this class. |
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. |
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. |
Context |
getContextByType(java.lang.String aTypeName)
Returns the first context that matches its type to aTypeName. |
DataElement |
getElementAt(java.lang.String aCompositeKey)
Returns the element of its keyedCollection,or keyedCollections of the upper contexts which is located at aCompositeKey path. |
java.lang.String |
getInstanceID()
Returns the instanceID. |
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. |
int |
getMode()
Returns the mode. |
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 |
Notifier |
getNotifier(java.lang.String aNotifierName)
|
Notifier |
getNotifierByType(java.lang.String aNotifierType)
|
Context |
getParent()
Returns the parent attribute. |
java.lang.String |
getParentInstanceID()
Deprecated. |
java.lang.String |
getParentName()
|
Service |
getService(java.lang.String aServiceName)
Get the service by service ID |
Hashtable |
getServices()
Get the service from context |
java.lang.String |
getTagName()
Returns a String used by the externalizer. |
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. |
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 |
removeNotifier(java.lang.String aNotifierName)
|
void |
setAddToDynamicKColl(boolean newValue)
Sets the value of the addToDynamicKColl property. |
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 |
setMode(int mode)
Deprecated. |
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 |
void |
setSerializableLevel(int i)
Set the value of variable serializableLevel. |
void |
setSerializeParentsAndChildren(boolean b)
Set the value of variable serializeParentsAndChildren When the local context will be serialized, if serializeParentsAndChildren = true, the parents and children of the local context will be serialized. |
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 |
stopNotifiers()
|
void |
stopNotifiersInChildren()
|
void |
stopServices()
|
void |
stopServicesInChildren()
|
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. |
Notifier |
tryGetNotifier(java.lang.String aNotifierName)
|
Notifier |
tryGetNotifierByType(java.lang.String aNotifierType)
|
Service |
tryGetService(java.lang.String aServiceName)
|
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. |
Method Detail |
---|
void addChild(Context aNewChild) throws DSEInvalidRequestException
aNewChild
-
DSEInvalidRequestException
void addElement(DataElement aDataElement) throws DSEInvalidRequestException
aDataElement
-
DSEInvalidRequestException
void chainTo(Context aContext) throws DSEInvalidRequestException
aContext
-
DSEInvalidRequestException
void clearKeyedCollection() throws DSEInvalidRequestException
DSEInvalidRequestException
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
boolean containsChild(java.lang.String aContextName) throws DSEInvalidRequestException
aContextName
-
DSEInvalidRequestException
Externalizer externalizer()
Vector fields() throws DSEInvalidRequestException
DSEInvalidRequestException
Context getAncestorByName(java.lang.String aContextName) throws DSEInvalidRequestException
aContextName
-
DSEInvalidRequestException
Vector getChildrenAtAnyLevel() throws DSEInvalidRequestException
DSEInvalidRequestException
Vector getChildren() throws DSEInvalidRequestException
DSEInvalidRequestException
Context getContextByType(java.lang.String aTypeName) throws DSEInvalidRequestException
aTypeName
-
DSEInvalidRequestException
Context getNextContextHorizontal() throws DSEInvalidRequestException
DSEInvalidRequestException
Context getNextContextVertical(Context parentContext) throws DSEInvalidRequestException
parentContext
-
DSEInvalidRequestException
DataElement getElementAt(java.lang.String aCompositeKey) throws DSEObjectNotFoundException
aCompositeKey
-
DSEObjectNotFoundException
KeyedCollection getKeyedCollection() throws DSEInvalidRequestException
DSEInvalidRequestException
java.lang.String getName()
Context getParent() throws DSEInvalidRequestException
DSEInvalidRequestException
java.lang.String getTagName()
java.lang.String getType() throws DSEInvalidRequestException
DSEInvalidRequestException
java.lang.Object getValueAt(java.lang.String aCompositeKey) throws DSEObjectNotFoundException
aCompositeKey
-
DSEObjectNotFoundException
boolean hasChildren() throws DSEInvalidRequestException
DSEInvalidRequestException
java.lang.Object initializeFrom(Tag aTag) throws java.io.IOException, DSEException
aTag
- Tag
java.io.IOException
- DSEException
DSEException
boolean isAddToDynamicKColl() throws DSEInvalidRequestException
DSEInvalidRequestException
boolean isChained() throws DSEInvalidRequestException
DSEInvalidRequestException
boolean isRoot() throws DSEInvalidRequestException
DSEInvalidRequestException
void prune() throws DSEInvalidRequestException, DSEObjectNotFoundException
DSEInvalidRequestException
DSEObjectNotFoundException
void readExternal() throws java.io.IOException
java.io.IOException
void readExternal(TagInputStream aTIS) throws java.io.IOException
aTIS
-
java.io.IOException
void readExternal(java.io.ObjectInput s) throws java.io.IOException, java.lang.ClassNotFoundException
readExternal
in interface java.io.Externalizable
s
- java.io.ObjectInput
java.io.IOException.
java.lang.ClassNotFoundException.
java.io.IOException
java.lang.ClassNotFoundException
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
DataElement removeAt(java.lang.String aCompositeKey) throws DSEObjectNotFoundException, DSEInvalidRequestException
aCompositeKey
-
DSEObjectNotFoundException
DSEInvalidRequestException
DataElement removeAtAnyLevel(java.lang.String aCompositeKey) throws DSEObjectNotFoundException, DSEInvalidRequestException
aCompositeKey
-
DSEObjectNotFoundException
DSEInvalidRequestException
void removeChild(Context aContext) throws DSEObjectNotFoundException, DSEInvalidRequestException
aContext
-
DSEObjectNotFoundException
DSEInvalidRequestException
void removeInstance() throws DSEInvalidRequestException
DSEInvalidRequestException
void removeChild(java.lang.String childInstanceID) throws DSEInvalidRequestException
childInstanceID
-
DSEInvalidRequestException
void removeExternal() throws java.io.IOException
java.io.IOException
void setAddToDynamicKColl(boolean newValue) throws DSEInvalidRequestException
newValue
-
DSEInvalidRequestException
void setChildren(Vector aChildrenCollection) throws DSEInvalidRequestException
aChildrenCollection
-
DSEInvalidRequestException
void setKeyedCollection(KeyedCollection aKeyedCollection) throws DSEInvalidRequestException
aKeyedCollection
-
DSEInvalidRequestException
void setName(java.lang.String aContextName)
aContextName
- java.lang.Stringvoid setType(java.lang.String aContextType) throws DSEInvalidRequestException
aContextType
-
DSEInvalidRequestException
int setValueAt(SortedTable aSortedTable) throws DSEInvalidRequestException
aSortedTable
-
DSEInvalidRequestException
java.lang.String toString()
toString
in class java.lang.Object
Vector toStrings()
Vector toTags() throws java.io.IOException
java.io.IOException
DataElement tryGetElementAt(java.lang.String aCompositeKey)
aCompositeKey
-
DSEObjectNotFoundException
java.lang.Object tryGetValueAt(java.lang.String aCompositeKey)
aCompositeKey
-
DSEObjectNotFoundException
void unchain() throws DSEInvalidRequestException, DSEObjectNotFoundException
DSEInvalidRequestException
DSEObjectNotFoundException
void writeExternal() throws java.io.IOException
java.io.IOException
void writeExternal(java.io.ObjectOutput s) throws java.io.IOException
writeExternal
in interface java.io.Externalizable
s
- java.io.ObjectOutput
java.io.IOException
void writeToStream(java.io.ObjectOutput s) throws java.io.IOException
s
- java.io.ObjectOutput
java.io.IOException
java.lang.String getInstanceID()
void setInstanceID(java.lang.String anInstanceID) throws DSEInvalidArgumentException
anInstanceID
-
DSEInvalidArgumentException
int getMode()
void setKCollDynamic(boolean aValue) throws DSEInvalidRequestException
aValue
-
DSEInvalidRequestException
int trySetElementAt(java.lang.String aCompositeKey, java.io.Serializable aValue)
aCompositeKey
- aValue
-
DSEInvalidRequestException
void setValueAt(java.lang.String aCompositeKey, java.lang.Object aDataValue) throws DSEInvalidArgumentException, DSEObjectNotFoundException, DSEInvalidRequestException
aCompositeKey
- aDataValue
-
DSEInvalidArgumentException
DSEObjectNotFoundException
DSEInvalidRequestException
boolean isReadOnly() throws DSEInvalidRequestException
DSEInvalidRequestException
java.lang.String getLevel() throws DSEInvalidRequestException
DSEInvalidRequestException
void setReadOnly(boolean isReadOnly)
isReadOnly
- void setSerializableLevel(int i) throws DSEInvalidRequestException
i
-
DSEInvalidRequestException
void setSerializeParentsAndChildren(boolean b)
b
- void commit() throws DSEInvalidRequestException
instanceID
-
DSEInvalidRequestException
java.lang.String getParentInstanceID() throws DSEInvalidRequestException
DSEInvalidRequestException
void setParentInstanceID(java.lang.String string) throws DSEInvalidRequestException
string
-
DSEInvalidRequestException
Vector getChildInstanceIDs() throws DSEInvalidRequestException
DSEInvalidRequestException
void setMode(int mode)
mode
- The mode to set.java.lang.String getParentName() throws DSEInvalidRequestException
DSEInvalidRequestException
byte[] convertToByte() throws java.io.IOException
java.io.IOException
void setDirty(boolean aDirty)
dirty
- boolean isDirty()
dirty
- java.lang.String setRemote() throws DSEInvalidRequestException
DSEInvalidRequestException
void addService(Service aService, java.lang.String aServiceName, java.lang.String aServiceType) throws DSEInvalidRequestException
DSEInvalidRequestException
Hashtable getServices()
Service getService(java.lang.String aServiceName) throws DSEObjectNotFoundException
DSEObjectNotFoundException
void stopServicesInChildren() throws DSEInvalidRequestException
DSEInvalidRequestException
void stopServices()
Service tryGetService(java.lang.String aServiceName)
void addNotifier(Notifier aNotifier, java.lang.String aNotifierName, java.lang.String aNotifierType) throws DSEInvalidRequestException
DSEInvalidRequestException
Notifier getNotifier(java.lang.String aNotifierName) throws DSEObjectNotFoundException
DSEObjectNotFoundException
Notifier getNotifierByType(java.lang.String aNotifierType) throws DSEObjectNotFoundException
DSEObjectNotFoundException
void removeNotifier(java.lang.String aNotifierName) throws DSEObjectNotFoundException, DSEException
DSEObjectNotFoundException
DSEException
void stopNotifiers()
void stopNotifiersInChildren()
Notifier tryGetNotifier(java.lang.String aNotifierName)
Notifier tryGetNotifierByType(java.lang.String aNotifierType)
|
IBM WebSphere Multichannel Bank Transformation Toolkit Javadoc | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |