|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--org.gxos.ContextManager
Provides all the functionality needed for context management for GXOS such as initialization, root context creation, etc.
$Id: ContextManager.java,v 1.20 2001/10/19 03:23:48 balsoy Exp $
| Constructor Summary | |
ContextManager()
|
|
| Method Summary | |
XMLObject |
constructRootContext(java.lang.String rootName)
This function returns the root context, i.e. |
GxContext |
getContext()
Returns the initial context for the context manager. |
XMLObject |
getRootContext(java.lang.String rootName)
This function returns the root context, i.e. |
XMLObject |
getXMLObject(java.lang.String databaseName)
Retrieves the root XML object for the given name. |
void |
initialize()
Initializes the database with current environment variables and default configuration values. |
void |
initialize(java.util.Hashtable env)
Initializes the context manages with the given environment settings. |
boolean |
isInitialized()
Checks if context manager is initialized previously. |
void |
setContext(GxContext ctx)
Sets initial context for the context manager. |
void |
setUpload(boolean load)
Sets the flag for uploading all the GXOS objects at once. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public ContextManager()
| Method Detail |
public GxContext getContext()
public void setContext(GxContext ctx)
ctx - Initial GXOS context.public void setUpload(boolean load)
load - set to true if objects are required to upload to the memory
at once; false otherwise.
public XMLObject constructRootContext(java.lang.String rootName)
throws javax.naming.NamingException
This function returns the root context, i.e. //GlobalRoot, //Education.
If it does not exist, it creates a new one as well as other predefined
subcontexts such as Admin, Documents, Events, etc.
rootName - Name for the root, i.e. Education, //University,
//Education/University/CSDepartmentNameAlreadyBoundException - if the name is bound to another object
other than a root context.javax.naming.NamingException - if a root context cannot be created or
any other naming error is encountered.
public XMLObject getRootContext(java.lang.String rootName)
throws javax.naming.NamingException
//GlobalRoot,
//Education.rootName - Name for the root, i.e. Education, //University,
//Education/University/CSDepartmentjavax.naming.InvalidNameException - if given root name is empty or null.NameNotFoundException - if the root context does not existjavax.naming.NamingException - if any other naming error is encountered.public boolean isInitialized()
isInitialized in interface Databaseinitialize()
public void initialize()
throws XMLException
initialize in interface DatabaseXMLException - if the database is already initialized.
public void initialize(java.util.Hashtable env)
throws XMLException
initialize in interface Databaseenv - Current environment settings. It should include at least
"java.naming.factory.initial".XMLException - if a naming error is encountered.
public XMLObject getXMLObject(java.lang.String databaseName)
throws XMLException
getXMLObject in interface DatabasedatabaseName - name of the database to be retrieved or constructed.XMLException - if an error is encountered.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||