|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.gxos.gndi.context.GxContext
GNDI provider and XMLObject implementer class.
$Id: GxContext.java,v 1.45 2001/10/09 18:58:26 balsoy Exp $
Field Summary | |
static java.lang.String |
CURRENT
Name for the current context which is equal to "." or "" |
static java.lang.String |
NULL
Name defining null objects. |
static java.lang.String |
SELF
Name defining collection objects themselves like this, self, etc. |
protected static javax.naming.Name |
SELF_NAME
|
static java.lang.String |
UNDEFINED
Name defining undefined objects. |
Fields inherited from interface javax.naming.Context |
APPLET, AUTHORITATIVE, BATCHSIZE, DNS_URL, INITIAL_CONTEXT_FACTORY, LANGUAGE, OBJECT_FACTORIES, PROVIDER_URL, REFERRAL, SECURITY_AUTHENTICATION, SECURITY_CREDENTIALS, SECURITY_PRINCIPAL, SECURITY_PROTOCOL, STATE_FACTORIES, URL_PKG_PREFIXES |
Constructor Summary | |
GxContext(java.util.Hashtable environment)
GNDI context constructor. |
|
GxContext(java.lang.String name,
javax.naming.Context ctx,
java.util.Hashtable environment)
GNDI context constructor. |
Method Summary | |
void |
addNamespace(java.lang.String name,
java.lang.String uri)
Registers a namespace with a given URI into this context. |
void |
addObject(XMLObject object)
Adds an XML object as a child XML object into this XML object. |
java.lang.Object |
addToEnvironment(java.lang.String propName,
java.lang.Object propVal)
Adds a new environment property to the environment of this context. |
void |
bind(javax.naming.Name name,
java.lang.Object obj)
Binds an object with a given name. |
protected void |
bind(javax.naming.Name name,
java.lang.Object object,
boolean rebind)
Binds an object with a given name, or rebinds a new or altered object with the same name. |
void |
bind(java.lang.String name,
java.lang.Object obj)
Binds an object with a given name. |
protected void |
bindMemory(java.lang.String name,
java.lang.Object object)
|
void |
close()
Closes this context. |
javax.naming.Name |
composeName(javax.naming.Name name,
javax.naming.Name prefix)
|
java.lang.String |
composeName(java.lang.String name,
java.lang.String prefix)
|
protected javax.naming.Context |
constructRootContext(java.lang.String name)
|
protected javax.naming.Context |
createContext(java.lang.String name)
Returns a new GNDI context with a given name. |
javax.naming.Context |
createSubcontext(javax.naming.Name name)
Constructs a new sub context with a given name. |
javax.naming.Context |
createSubcontext(javax.naming.Name name,
TreeObject gxchild)
Constructs a new sub context with a given name and a GXOS collection object. |
javax.naming.Context |
createSubcontext(java.lang.String name)
Constructs a new sub context with a given name. |
javax.naming.Context |
createSubcontext(java.lang.String name,
TreeObject gxchild)
Constructs a new sub context with a given name and a GXOS collection object. |
javax.naming.Context |
createSubcontext(TreeObject gxchild)
Constructs a new sub context with a given GXOS collection object. |
void |
destroySubcontext(javax.naming.Name name)
Destroys a sub context under this context. |
void |
destroySubcontext(java.lang.String name)
Destroys a sub context under this context. |
void |
destroySubcontextAll(java.lang.String name)
Destroys a sub context under this context. |
void |
destroySubcontextPhysically(javax.naming.Name name,
boolean recursive)
Destroys a sub context under this context. |
void |
destroySubcontextPhysically(java.lang.String name)
Destroys a sub context under this context. |
java.util.Enumeration |
enumerateChildren()
Returns an enumeration of child objects. |
XMLObject |
getChild(java.lang.String name)
Returns the child object whose name is as given. |
java.lang.String[] |
getChildren()
Returns a list of child XML objects' names. |
java.util.Hashtable |
getEnvironment()
Retrieves the environment in effect for this context. |
protected javax.naming.Context |
getFSContext()
Returns the pointer to the sub JNDI provider this context uses. |
javax.naming.Name |
getGxosName()
Retrieves the full GXOS name of this context within its GXOS namespace. |
TreeObject |
getGxosObject()
Returns the GXOS object for this context. |
java.lang.String |
getName()
Returns the name of this XML object. |
java.lang.String |
getNameInNamespace()
Retrieves the full GXOS name of this context within its GXOS namespace. |
java.lang.String |
getNameInNamespace(GxContext namespace)
Retrieves the full GXOS name of this context within its GXOS namespace. |
javax.naming.NameParser |
getNameParser(javax.naming.Name name)
|
javax.naming.NameParser |
getNameParser(java.lang.String name)
|
GxContext |
getNamespace(java.lang.String nsname)
Returns the context object named as a namespace at this level. |
java.lang.Object |
getObject()
Returns the unmarshalled GXOS object for this context using the associated XML file handle. |
protected java.lang.Object |
getObject(java.io.File file)
Returns a memory object from a given XML file. |
java.lang.String |
getParameter(java.lang.String key)
Returns the parameter value associated with this attribute value. |
java.util.Hashtable |
getParameters()
Returns the hashtable which is a mapping to NodeProfile/TreeContext element in TreeObject. |
protected GxContext |
getParent()
Returns the parenting context of this context. |
XMLObject |
getParentXMLObject()
Returns the parent of this XML object. |
protected javax.naming.Name |
getPrefix(javax.naming.Name name)
|
java.lang.String |
getURI()
Returns the URI of this XML object. |
java.lang.String |
getXML()
Returns contents of this XML object as an XML document. |
protected java.io.File |
getXMLFile()
Returns the file object which holds the XML content of this context. |
protected void |
init(java.util.Hashtable environment)
Initializes sub JNDI provider; sets GXOS name to its initial value; creates a hashtable for child objects and contexts. |
void |
link(java.lang.String linkName,
java.lang.Object linkedObject,
GxContext parentCtx,
boolean validate)
Establishes a link from a context to an object under another context. |
void |
link(java.lang.String linkName,
java.lang.String linkedObject,
java.lang.String namespace)
Establishes a link from a context to an object under another context. |
javax.naming.NamingEnumeration |
list(javax.naming.Name name)
|
javax.naming.NamingEnumeration |
list(java.lang.String name)
|
javax.naming.NamingEnumeration |
listBindings(javax.naming.Name name)
|
javax.naming.NamingEnumeration |
listBindings(java.lang.String name)
|
java.lang.Object |
lookup(InternalND name)
Returns the object corresponding to the given name. |
java.lang.Object |
lookup(LinkNode link)
Returns the object linked with the given link object. |
java.lang.Object |
lookup(javax.naming.Name name)
Returns the object corresponding to the given name. |
java.lang.Object |
lookup(java.lang.String name)
Returns the object corresponding to the given name. |
void |
lookupAll()
Brings all the GXOS objects in this context into the memory. |
java.lang.Object |
lookupLink(LinkNode link)
Returns an object using a link. |
java.lang.Object |
lookupLink(javax.naming.Name name)
|
java.lang.Object |
lookupLink(java.lang.String name)
Returns an object using a link. |
void |
rebind()
|
void |
rebind(javax.naming.Name name,
java.lang.Object obj)
|
void |
rebind(java.lang.String name,
java.lang.Object obj)
|
void |
relink(java.lang.String linkName,
java.lang.String linkedObject,
java.lang.String namespace)
Resets a link from a context to an object under another context. |
java.lang.Object |
removeFromEnvironment(java.lang.String propName)
Removes an environment property from the environment of this context. |
void |
removeNamespace(java.lang.String nsname)
Removes a namespace from this context. |
void |
removeObject(java.lang.String name)
Removes an XML object from children list of this XML object. |
void |
rename(javax.naming.Name oldname,
javax.naming.Name newname)
|
void |
rename(java.lang.String oldname,
java.lang.String newname)
|
protected void |
renameOld(javax.naming.Name oldname,
javax.naming.Name newname)
|
void |
report(TreeObject t)
|
protected void |
setEnvironment(java.util.Hashtable newEnv)
Sets the environment in effect for this context. |
protected void |
setGxosName(javax.naming.Name name)
Sets this context's GXOS name to a new value. |
protected void |
setGxosName(java.lang.String name)
Sets this context's GXOS name to a new value. |
void |
setParameter(java.lang.String key,
java.lang.String value)
Returns the parameter value associated with this attribute value. |
protected java.lang.String |
translateName(java.lang.String gxosURI)
Translates a GXOS name to sub JNDI name, i.e. |
void |
unbind(javax.naming.Name name)
|
void |
unbind(java.lang.String name)
|
protected void |
unbindMemory(java.lang.String name)
|
protected void |
unbindObject(java.lang.String name)
|
void |
updateObject()
Writes any changes of XML object back to the database. |
void |
updateObject(XMLObject object)
Replaces an XML object with a new one or updated one. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static java.lang.String SELF
protected static javax.naming.Name SELF_NAME
public static java.lang.String CURRENT
public static java.lang.String UNDEFINED
public static java.lang.String NULL
Constructor Detail |
public GxContext(java.util.Hashtable environment) throws javax.naming.NamingException
environment
- Environment settings. Could be system properties
as well as user defined variables.javax.naming.NamingException
- if a naming error is encountered.GxContext(String,Context,Hashtable)
public GxContext(java.lang.String name, javax.naming.Context ctx, java.util.Hashtable environment) throws javax.naming.NamingException
name
- Name of the context to be created.ctx
- Parent context of this context.environment
- Environment settings. Could be system properties
as well as user defined variables.CannotProceedException
- if object construction fails.javax.naming.NamingException
- if a naming error is encountered.GxContext(Hashtable)
Method Detail |
protected void init(java.util.Hashtable environment) throws javax.naming.NamingException
javax.naming.NamingException
- if a naming error is encountered.protected javax.naming.Context createContext(java.lang.String name) throws javax.naming.NamingException
createSubcontext(Name,TreeObject)
method.name
- name for the new GNDI context.javax.naming.NamingException
- if a naming error is encountered.createSubcontext(Name,TreeObject)
protected javax.naming.Context constructRootContext(java.lang.String name) throws javax.naming.NamingException
protected java.lang.String translateName(java.lang.String gxosURI) throws javax.naming.NamingException
gxosURL
- GXOS name to be converted.javax.naming.NamingException
- if a naming error is encountered.protected java.io.File getXMLFile()
protected javax.naming.Context getFSContext()
protected void setGxosName(java.lang.String name) throws javax.naming.NamingException
String
name and calls setGxosName(Name)
.name
- new name for this context.NamingExpception
- if a naming error is encountered.setGxosName(Name)
protected void setGxosName(javax.naming.Name name) throws javax.naming.NamingException
Name
-type name.
Name should either start with Defaults.GXOS_ROOT_PREFIX
or be a relative name, i.e. name1/name2/name3, etc.
name
- new name for this context.NamingExpception
- if a naming error is encountered
such as empty names.setGxosName(String)
public javax.naming.Context createSubcontext(javax.naming.Name name) throws javax.naming.NamingException
In GNDI, there is another method defined, which replaces
the standard methods: createSubcontext(Name,TreeObject)
This method, as its second parameter, takes a GXOS collection object
which the new sub context will be created from. However,
the standard methods, createSubcontext(Name)
and
createSubcontext(String)
, call the GNDI method with a
null
parameter. This signals the GNDI method to create
an empty collection object and use it as its sub context.
createSubcontext
in interface javax.naming.Context
name
- name for the sub context.javax.naming.NamingException
- if a naming error is encountered.createSubcontext(Name,TreeObject)
,
createSubcontext(String,TreeObject)
,
createSubcontext(String)
,
createSubcontext(TreeObject)
public javax.naming.Context createSubcontext(java.lang.String name) throws javax.naming.NamingException
See createSubcontext(Name)
for more information.
createSubcontext
in interface javax.naming.Context
name
- name for the sub context.javax.naming.NamingException
- if a naming error is encountered.createSubcontext(Name,TreeObject)
,
createSubcontext(String,TreeObject)
,
createSubcontext(Name)
,
createSubcontext(TreeObject)
public javax.naming.Context createSubcontext(TreeObject gxchild) throws javax.naming.NamingException
This method uses the object's NodeName
as its
GNDI name and calls createSubcontext(Name,TreeObject)
.
See createSubcontext(Name,TreeObject)
for more information.
gxchild
- a GXOS collection object the new sub context will be
constructed from.CannotProceedException
- if given GXOS object is nulljavax.naming.NamingException
- if a naming error is encountered.createSubcontext(Name,TreeObject)
,
createSubcontext(String,TreeObject)
,
createSubcontext(String)
,
createSubcontext(Name)
public javax.naming.Context createSubcontext(java.lang.String name, TreeObject gxchild) throws javax.naming.NamingException
This method calls createSubcontext(Name,TreeObject)
after
constructing a Name object
from its first parameter name.
name
- name for the sub context.gxchild
- a GXOS collection object the new sub context will be
constructed from.javax.naming.NamingException
- if a naming error is encountered.createSubcontext(Name,TreeObject)
,
createSubcontext(Name)
,
createSubcontext(String)
,
createSubcontext(TreeObject)
public javax.naming.Context createSubcontext(javax.naming.Name name, TreeObject gxchild) throws javax.naming.NamingException
More information coming soon.
name
- name for the sub context.gxchild
- a GXOS collection object the new sub context will be
constructed from.javax.naming.InvalidNameException
- if name parameter is either null or empty.NameAlreadyBoundException
- if a context with the same name already exists.CannotProceedException
- if sub context construction fails.javax.naming.NamingException
- if any other naming error is encountered.createSubcontext(String,TreeObject)
,
createSubcontext(TreeObject)
,
createSubcontext(Name)
,
createSubcontext(String)
public TreeObject getGxosObject() throws javax.naming.NamingException
javax.naming.NamingException
- if a naming error is encountered.protected java.lang.Object getObject(java.io.File file)
file
- file handle for the XML documentpublic java.lang.Object getObject()
"context/self.xml"
.getObject(File)
public void addNamespace(java.lang.String name, java.lang.String uri) throws javax.naming.NamingException
name
- name of the namespaceuri
- GXOS name of the context the above name is assigned.javax.naming.InvalidNameException
- if namespace name is null or empty.javax.naming.NamingException
- if a naming error is encountered.public GxContext getNamespace(java.lang.String nsname) throws javax.naming.NamingException
nsname
- namespace name which is given as in
nsname:object_name
. If nsname is empty string,
this context is returned.NameNotFoundException
- if namespace does not exist.OperationNotSupportedException
- if namespace does not refer to a context.javax.naming.InvalidNameException
- if namespace name is given as null.javax.naming.NamingException
- if any other error is encountered. Since
lookup(Name)
method is used in this method, also see the
exceptions it throws.public void removeNamespace(java.lang.String nsname) throws javax.naming.NamingException
nsname
- name of the namespace which will be removed from this context.NameNotFoundException
- if namespace does not exist.javax.naming.InvalidNameException
- if namespace name is given as null or empty.javax.naming.NamingException
- if any other error is encountered.protected GxContext getParent()
public java.lang.Object lookup(javax.naming.Name name) throws javax.naming.NamingException
javax.naming.Name
.lookup
in interface javax.naming.Context
name
- Associated name of the object which is searched for.NameNotFoundException
- if the given name is not bound to
an object or a sub context.javax.naming.InvalidNameException
- if the given name is null.CannotProceedException
- if context retrieval fails.javax.naming.NamingException
- if there is any other problem.lookup(String)
public java.lang.Object lookup(java.lang.String name) throws javax.naming.NamingException
java.lang.String
.lookup
in interface javax.naming.Context
name
- Associated name of the object which is searched for.NameNotFoundException
- if the given name is not bound to
an object or a sub context.javax.naming.NamingException
- if there is any other problem.lookup(Name)
public java.lang.Object lookup(InternalND name) throws javax.naming.NamingException
InternalND
.name
- Associated name of the object which is searched for.NameNotFoundException
- if the given name is not bound to
an object or a sub context.javax.naming.NamingException
- if there is any other problem.lookup(Name)
public java.lang.Object lookup(LinkNode link) throws javax.naming.NamingException
lookup(Name)
for details.name
- Associated name of the object which is searched for.NameNotFoundException
- if the given name is not bound to
an object or a sub context.javax.naming.NamingException
- if there is any other problem.lookup(Name)
public void lookupAll() throws javax.naming.NamingException
javax.naming.NamingException
- if any error is encountered.public void bind(java.lang.String name, java.lang.Object obj) throws javax.naming.NamingException
javax.naming.String
. See bind(Name,Object,boolean)
for more information.bind
in interface javax.naming.Context
name
- A binding name to the object to retrieve at a later time.obj
- Object which is to be bound to the given name.javax.naming.InvalidNameException
- if the given name is null
empty string, or does not match with object's NodeName
field.OperationNotSupported
- if the object is not a descendent of TreeObject,
or it is a collection object. In such cases, createSubcontext must be used.NameAlreadyBoundException
- if the name is already bound to another object.javax.naming.NamingException
- if there is any other problem.bind(Name,Object)
,
bind(Name,Object,boolean)
,
TreeObject
public void bind(javax.naming.Name name, java.lang.Object obj) throws javax.naming.NamingException
javax.naming.Name
. See bind(Name,Object,boolean)
for more information.bind
in interface javax.naming.Context
name
- A binding name to the object to retrieve at a later time.obj
- Object which is to be bound to the given name.javax.naming.InvalidNameException
- if the given name is null
empty string, or does not match with object's NodeName
field.OperationNotSupported
- if the object is not a descendent of TreeObject,
or it is a collection object. In such cases, createSubcontext must be used.NameAlreadyBoundException
- if the name is already bound to another object.javax.naming.NamingException
- if there is any other problem.bind(String,Object)
,
bind(Name,Object,boolean)
,
TreeObject
protected void bind(javax.naming.Name name, java.lang.Object object, boolean rebind) throws javax.naming.NamingException
javax.naming.Name
.name
- A binding name to the object to retrieve at a later time.obj
- Object which is to be bound to the given name.rebind
- Four possibilities exist: javax.naming.InvalidNameException
- if the given name is null
empty string, or does not match with object's NodeName
field.OperationNotSupportedException
- if the object is not a descendent of TreeObject,
or it is a collection object. In such cases, createSubcontext must be used.NameAlreadyBoundException
- if the name is already bound to another object.javax.naming.NamingException
- if there is any other problem.bind(String,Object)
,
bind(Name,Object)
,
TreeObject
public void rebind() throws javax.naming.NamingException
public void rebind(java.lang.String name, java.lang.Object obj) throws javax.naming.NamingException
rebind
in interface javax.naming.Context
public void rebind(javax.naming.Name name, java.lang.Object obj) throws javax.naming.NamingException
rebind
in interface javax.naming.Context
protected javax.naming.Name getPrefix(javax.naming.Name name) throws javax.naming.NamingException
protected void unbindObject(java.lang.String name) throws javax.naming.NamingException
public void unbind(java.lang.String name) throws javax.naming.NamingException
unbind
in interface javax.naming.Context
public void unbind(javax.naming.Name name) throws javax.naming.NamingException
unbind
in interface javax.naming.Context
public void rename(java.lang.String oldname, java.lang.String newname) throws javax.naming.NamingException
rename
in interface javax.naming.Context
protected void renameOld(javax.naming.Name oldname, javax.naming.Name newname) throws javax.naming.NamingException
protected void bindMemory(java.lang.String name, java.lang.Object object) throws javax.naming.NamingException
protected void unbindMemory(java.lang.String name) throws javax.naming.NamingException
public void rename(javax.naming.Name oldname, javax.naming.Name newname) throws javax.naming.NamingException
rename
in interface javax.naming.Context
public javax.naming.NamingEnumeration list(java.lang.String name) throws javax.naming.NamingException
list
in interface javax.naming.Context
public javax.naming.NamingEnumeration list(javax.naming.Name name) throws javax.naming.NamingException
list
in interface javax.naming.Context
public javax.naming.NamingEnumeration listBindings(java.lang.String name) throws javax.naming.NamingException
listBindings
in interface javax.naming.Context
public javax.naming.NamingEnumeration listBindings(javax.naming.Name name) throws javax.naming.NamingException
listBindings
in interface javax.naming.Context
public void destroySubcontext(java.lang.String name) throws javax.naming.NamingException
destroySubcontext(Name)
.destroySubcontext
in interface javax.naming.Context
name
- name of the subcontext to be destroyed.javax.naming.NamingException
- if a naming error is encountered.public void destroySubcontextAll(java.lang.String name) throws javax.naming.NamingException
name
- name of the subcontext to be destroyed.CannotProceedException
- if the sub context is not empty.javax.naming.NamingException
- if this context is not empty, or
another naming error is encountered.destroySubcontext(String)
public void destroySubcontextPhysically(java.lang.String name) throws javax.naming.NamingException
name
- name of the subcontext to be destroyed.CannotProceedException
- if the sub context is not empty.javax.naming.NamingException
- if this context is not empty, or
another naming error is encountered.destroySubcontextPhysically(Name,boolean)
,
destroySubcontext(String)
public void destroySubcontextPhysically(javax.naming.Name name, boolean recursive) throws javax.naming.NamingException
name
- name of the subcontext to be destroyed.recursive
- a boolean value which forces to destroy sub objects
to be deleted recursively.CannotProceedException
- if the sub context is not empty.javax.naming.NamingException
- if this context is not empty, or
another naming error is encountered.destroySubcontext(String)
public void destroySubcontext(javax.naming.Name name) throws javax.naming.NamingException
destroySubcontext
in interface javax.naming.Context
name
- name of the subcontext to be destroyed.OperationNotSupportedException
- if name is not bound to a context.NameNotFoundException
- if name is not found.javax.naming.NamingException
- if a naming error is encountered.destroySubcontext(String)
public void link(java.lang.String linkName, java.lang.Object linkedObject, GxContext parentCtx, boolean validate) throws javax.naming.NamingException
linkName
- name of the link to be established with this calllinkedObject
- object under another contextparentCtx
- parent context of the destination objectvalidate
- true if validation of the object and parent is requested;
false otherwise. Validation is more costly.javax.naming.InvalidNameException
- if the link name is given as empty or nullOperationNotSupportedException
- if the linked object is nullNameNotFoundException
- if object to be linked does not existNameAlreadyBoundException
- if link already existsjavax.naming.NamingException
- if an naming error is encountered.public void link(java.lang.String linkName, java.lang.String linkedObject, java.lang.String namespace) throws javax.naming.NamingException
linkName
- name of the link to be established with this calllinkedObject
- object under another contextparentCtx
- parent context of the destination objectjavax.naming.InvalidNameException
- if the link name is given as empty or nullOperationNotSupportedException
- if the linked object is nullNameNotFoundException
- if object to be linked does not existNameAlreadyBoundException
- if link already existsjavax.naming.NamingException
- if an naming error is encountered.public void relink(java.lang.String linkName, java.lang.String linkedObject, java.lang.String namespace) throws javax.naming.NamingException
linkName
- name of the link to be established with this calllinkedObject
- object under another contextparentCtx
- parent context of the destination objectjavax.naming.InvalidNameException
- if the link name is given as empty or nullOperationNotSupportedException
- if the linked object name is nullNameNotFoundException
- if object to be linked does not existLinkException
- if name refers to a non-link object.javax.naming.NamingException
- if an naming error is encountered.public java.lang.Object lookupLink(LinkNode link) throws javax.naming.NamingException
link
- link to an GXOS object.javax.naming.InvalidNameException
- if the link name is given as empty or nullOperationNotSupportedException
- if the linked object is nulljavax.naming.NamingException
- if an naming error is encountered. This method
uses lookup(String) method. Please see this method for further exceptions.lookup(String)
,
lookupLink(Name)
public java.lang.Object lookupLink(java.lang.String name) throws javax.naming.NamingException
lookupLink
in interface javax.naming.Context
name
- name of a link to retrieve an objectjavax.naming.InvalidNameException
- if the link name is given as empty or nullOperationNotSupportedException
- if the linked object is nulljavax.naming.NamingException
- if an naming error is encountered. This method
uses lookup(String) method. Please see this method for further exceptions.lookup(String)
public java.lang.Object lookupLink(javax.naming.Name name) throws javax.naming.NamingException
lookupLink
in interface javax.naming.Context
public javax.naming.NameParser getNameParser(java.lang.String name) throws javax.naming.NamingException
getNameParser
in interface javax.naming.Context
public javax.naming.NameParser getNameParser(javax.naming.Name name) throws javax.naming.NamingException
getNameParser
in interface javax.naming.Context
public java.lang.String composeName(java.lang.String name, java.lang.String prefix) throws javax.naming.NamingException
composeName
in interface javax.naming.Context
public javax.naming.Name composeName(javax.naming.Name name, javax.naming.Name prefix) throws javax.naming.NamingException
composeName
in interface javax.naming.Context
public java.lang.Object addToEnvironment(java.lang.String propName, java.lang.Object propVal) throws javax.naming.NamingException
addToEnvironment
in interface javax.naming.Context
propName
- the name of the environment property to add; may not be nullpropVal
- the value of the property to add; may not be nulljavax.naming.NamingException
- if a naming exception is encounteredgetEnvironment()
,
removeFromEnvironment(String)
public java.lang.Object removeFromEnvironment(java.lang.String propName) throws javax.naming.NamingException
removeFromEnvironment
in interface javax.naming.Context
propName
- the name of the environment property to remove; may not be nulljavax.naming.NamingException
- if a naming exception is encounteredgetEnvironment()
,
addToEnvironment(String, Object)
public java.util.Hashtable getEnvironment() throws javax.naming.NamingException
Retrieves the environment in effect for this context.
The caller should not make any changes to the object returned: their effect on the context is undefined. The environment of this context may be changed using addToEnvironment() and removeFromEnvironment().getEnvironment
in interface javax.naming.Context
javax.naming.NamingException
- if a naming exception is encounteredaddToEnvironment(String, Object)
,
removeFromEnvironment(String)
protected void setEnvironment(java.util.Hashtable newEnv) throws javax.naming.NamingException
the
- new environment of this contextjavax.naming.NamingException
- if a naming exception is encounteredgetEnvironment()
,
addToEnvironment(String, Object)
,
removeFromEnvironment(String)
public javax.naming.Name getGxosName()
Name
.getNameInNamespace()
public java.lang.String getName() throws XMLException
getName
in interface XMLObject
XMLException
- if an error is encountered.getGxosName()
,
getNameInNamespace()
public java.lang.String getNameInNamespace() throws javax.naming.NamingException
getNameInNamespace
in interface javax.naming.Context
String
.javax.naming.NamingException
- - if a naming exception is encountered.getGxosName()
public java.lang.String getNameInNamespace(GxContext namespace) throws javax.naming.NamingException
String
.javax.naming.NamingException
- - if a naming exception is encountered.getGxosName()
public void close() throws javax.naming.NamingException
This method is idempotent: invoking it on a context that has already been closed has no effect. Invoking any other method on a closed context is not allowed, and results in undefined behaviour.
close
in interface javax.naming.Context
javax.naming.NamingException
- if a naming exception is encountered.public void report(TreeObject t)
public java.util.Hashtable getParameters()
<TreeContext> <parametervalue name="key1">value1</parametervalue> <parametervalue name="key2">value2</parametervalue> ... <TreeContext>
This structure is represented by a hashmap, the name attribute being the key, and values are the parametervalue objects holding the key/value pairs. This is to allow users to alter the content of parameter values so that when content is commited, the alterations should be reflected in XML.
Example:
Parametervalue pv = context.getParameters().get("key"); if(pv != null && pv.getContent().equals("somevalue")) pv.setContent("new content");
public java.lang.String getParameter(java.lang.String key) throws XMLException
XMLObject
getParameter
in interface XMLObject
org.gxos.xml.XMLObject
key
- key to retrieve a parameter valueXMLObject.setParameter(java.lang.String, java.lang.String)
public void setParameter(java.lang.String key, java.lang.String value) throws XMLException
setParameter
in interface XMLObject
key
- key that the value will be associated.value
- value to retrive with the given key.XMLException
- if an error is encountered.getParameter(java.lang.String)
public java.lang.String getURI() throws XMLException
getURI
in interface XMLObject
XMLException
- if an error is encountered.public XMLObject getParentXMLObject() throws XMLException
getParentXMLObject
in interface XMLObject
XMLException
- if an error is encountered.public XMLObject getChild(java.lang.String name) throws XMLException
this object . child_1 . grandchild_1 . child_2 . grandchild_2 . grandchild_3then object retrieval can be
this.getChild("child_1")
or
this.getChild("child_2/grandchild_3")
and so on.
getChild
in interface XMLObject
name
- name of the XML objectXMLException
- if an error is encountered.public void addObject(XMLObject object) throws XMLException
XMLObject
addObject
in interface XMLObject
org.gxos.xml.XMLObject
object
- any XML object.XMLException
- if an error is encountered.public void updateObject() throws XMLException
updateObject
in interface XMLObject
XMLException
- if an error is encountered.updateObject(XMLObject)
public void updateObject(XMLObject object) throws XMLException
updateObject
in interface XMLObject
object
- any XML object.XMLException
- if an error is encountered.updateObject()
public void removeObject(java.lang.String name) throws XMLException
getChild(String)
for name usage.
removeObject
in interface XMLObject
name
- name of the child object to be removed.XMLException
- if an error is encountered.public java.lang.String getXML() throws XMLException
getXML
in interface XMLObject
XMLException
- if an error is encountered.public java.lang.String[] getChildren() throws XMLException
getChildren
in interface XMLObject
XMLException
- if an error is encountered.public java.util.Enumeration enumerateChildren() throws XMLException
enumerateChildren
in interface XMLObject
XMLException
- if an error is encountered.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |