Classes | Public Member Functions | Static Public Member Functions | Protected Attributes | Static Protected Attributes

com.cosylab.cdb.jdal.JNDIContext Class Reference

Inheritance diagram for com.cosylab.cdb.jdal.JNDIContext:
com.cosylab.cdb.browser.BrowserJNDIContext com.cosylab.cdb.jdal.JNDIXMLContext com.cosylab.cdb.browser.BrowserJNDIXMLContext

List of all members.

Classes

class  JNDIElementEnumeration

Public Member Functions

 JNDIContext (Logger logger)
 JNDIContext (String name, String elements, Logger logger)
Object lookup (Name name) throws NamingException
Object lookup (String name) throws NamingException
NamingEnumeration list (Name name) throws NamingException
NamingEnumeration list (String name) throws NamingException
void bind (Name name, Object obj) throws NamingException
void bind (String name, Object obj) throws NamingException
void rebind (Name name, Object obj) throws NamingException
void rebind (String name, Object obj) throws NamingException
void unbind (Name name) throws NamingException
void unbind (String name) throws NamingException
void rename (Name oldName, Name newName) throws NamingException
void rename (String oldName, String newName) throws NamingException
NamingEnumeration listBindings (Name name) throws NamingException
NamingEnumeration listBindings (String name) throws NamingException
void destroySubcontext (Name name) throws NamingException
void destroySubcontext (String name) throws NamingException
Context createSubcontext (Name name) throws NamingException
Context createSubcontext (String name) throws NamingException
Object lookupLink (Name name) throws NamingException
Object lookupLink (String name) throws NamingException
NameParser getNameParser (Name name) throws NamingException
NameParser getNameParser (String name) throws NamingException
Name composeName (Name name, Name prefix) throws NamingException
String composeName (String name, String prefix) throws NamingException
Object addToEnvironment (String propName, Object propVal) throws NamingException
Object removeFromEnvironment (String propName) throws NamingException
Hashtable getEnvironment () throws NamingException
void close () throws NamingException
String getNameInNamespace () throws NamingException

Static Public Member Functions

static void setDal (DAL dal)
static void setOrb (ORB orb)

Protected Attributes

final Logger logger
String name
String elements

Static Protected Attributes

static ORB orb
static DAL dal

Constructor & Destructor Documentation

com.cosylab.cdb.jdal.JNDIContext.JNDIContext ( Logger  logger  ) 

Constructor for CDBContext.

Referenced by com.cosylab.cdb.jdal.JNDIContext.lookup().

com.cosylab.cdb.jdal.JNDIContext.JNDIContext ( String  name,
String  elements,
Logger  logger 
)

Constructor for CDBContext.


Member Function Documentation

Object com.cosylab.cdb.jdal.JNDIContext.addToEnvironment ( String  propName,
Object  propVal 
) throws NamingException
See also:
Context.addToEnvironment(String, Object)
void com.cosylab.cdb.jdal.JNDIContext.bind ( String  name,
Object  obj 
) throws NamingException
See also:
Context.bind(String, Object)
void com.cosylab.cdb.jdal.JNDIContext.bind ( Name  name,
Object  obj 
) throws NamingException
See also:
Context.bind(Name, Object)
void com.cosylab.cdb.jdal.JNDIContext.close (  )  throws NamingException
See also:
Context.close()
Name com.cosylab.cdb.jdal.JNDIContext.composeName ( Name  name,
Name  prefix 
) throws NamingException
See also:
Context.composeName(Name, Name)
String com.cosylab.cdb.jdal.JNDIContext.composeName ( String  name,
String  prefix 
) throws NamingException
See also:
Context.composeName(String, String)
Context com.cosylab.cdb.jdal.JNDIContext.createSubcontext ( Name  name  )  throws NamingException
See also:
Context.createSubcontext(Name)
Context com.cosylab.cdb.jdal.JNDIContext.createSubcontext ( String  name  )  throws NamingException
See also:
Context.createSubcontext(String)
void com.cosylab.cdb.jdal.JNDIContext.destroySubcontext ( Name  name  )  throws NamingException
See also:
Context.destroySubcontext(Name)
void com.cosylab.cdb.jdal.JNDIContext.destroySubcontext ( String  name  )  throws NamingException
See also:
Context.destroySubcontext(String)
Hashtable com.cosylab.cdb.jdal.JNDIContext.getEnvironment (  )  throws NamingException
See also:
Context.getEnvironment()
String com.cosylab.cdb.jdal.JNDIContext.getNameInNamespace (  )  throws NamingException
See also:
Context.getNameInNamespace()
NameParser com.cosylab.cdb.jdal.JNDIContext.getNameParser ( Name  name  )  throws NamingException
See also:
Context.getNameParser(Name)
NameParser com.cosylab.cdb.jdal.JNDIContext.getNameParser ( String  name  )  throws NamingException
See also:
Context.getNameParser(String)
NamingEnumeration com.cosylab.cdb.jdal.JNDIContext.list ( Name  name  )  throws NamingException
NamingEnumeration com.cosylab.cdb.jdal.JNDIContext.list ( String  name  )  throws NamingException
NamingEnumeration com.cosylab.cdb.jdal.JNDIContext.listBindings ( String  name  )  throws NamingException
See also:
Context.listBindings(String)
NamingEnumeration com.cosylab.cdb.jdal.JNDIContext.listBindings ( Name  name  )  throws NamingException
See also:
Context.listBindings(Name)
Object com.cosylab.cdb.jdal.JNDIContext.lookup ( Name  name  )  throws NamingException
See also:
Context.lookup(Name) THIS IS OLD CDB implementation public Object lookup(Name name) throws NamingException { System.out.println("CDBContext lookup on " + this.name + " for " + name.toString()); String nameToLookup = this.name + "/" + name; String recordName = nameToLookup.substring(nameToLookup.lastIndexOf('/')+1); get list from the server String elements = dal.list_nodes(nameToLookup); try { if (elements.indexOf(recordName + ".xml") != -1) { String xml = dal.get_DAO(nameToLookup); return new JNDIXMLContext(nameToLookup, elements, xml); } else { if (elements.length() == 0 ) { // inside a XML? int slashIndex = nameToLookup.lastIndexOf('/'); String newName; while( slashIndex != -1 ) { newName = nameToLookup.substring(0,slashIndex); recordName = newName.substring(newName.lastIndexOf('/')+1); elements = dal.list_nodes(newName); if (elements.indexOf(recordName + ".xml") != -1) { String xml = dal.get_DAO(newName); recordName = nameToLookup.substring(slashIndex+1); return new JNDIXMLContext(newName, elements, xml).lookup(recordName); } slashIndex = newName.lastIndexOf('/'); } throw new NamingException("No name " + nameToLookup ); } return new JNDIContext(nameToLookup, elements); } } catch (CDBRecordDoesNotExistEx e) { if it does not exists then it is just a context return new JNDIContext(nameToLookup, elements); } catch (CDBXMLErrorEx e) { AcsJCDBXMLErrorEx acse = new AcsJCDBXMLErrorEx(e); throw new NamingException(acse.getFilename()); } } This methos returns either a new JNDI_Context or a new JNDI_XMLContxt obj.

Reimplemented in com.cosylab.cdb.jdal.JNDIXMLContext, com.cosylab.cdb.browser.BrowserJNDIContext, and com.cosylab.cdb.browser.BrowserJNDIXMLContext.

References com.cosylab.cdb.jdal.JNDIContext.dal, com.cosylab.cdb.jdal.JNDIContext.elements, com.cosylab.cdb.jdal.JNDIContext.JNDIContext(), com.cosylab.cdb.jdal.JNDIContext.logger, and com.cosylab.cdb.jdal.JNDIContext.name.

Referenced by com.cosylab.cdb.jdal.JNDIContext.list(), and com.cosylab.cdb.jdal.JNDIContext.lookup().

Object com.cosylab.cdb.jdal.JNDIContext.lookup ( String  name  )  throws NamingException
See also:
Context.lookup(String)

References com.cosylab.cdb.jdal.JNDIContext.lookup(), and com.cosylab.cdb.jdal.JNDIContext.name.

Object com.cosylab.cdb.jdal.JNDIContext.lookupLink ( Name  name  )  throws NamingException
See also:
Context.lookupLink(Name)
Object com.cosylab.cdb.jdal.JNDIContext.lookupLink ( String  name  )  throws NamingException
See also:
Context.lookupLink(String)
void com.cosylab.cdb.jdal.JNDIContext.rebind ( String  name,
Object  obj 
) throws NamingException
See also:
Context.rebind(String, Object)
void com.cosylab.cdb.jdal.JNDIContext.rebind ( Name  name,
Object  obj 
) throws NamingException
See also:
Context.rebind(Name, Object)
Object com.cosylab.cdb.jdal.JNDIContext.removeFromEnvironment ( String  propName  )  throws NamingException
See also:
Context.removeFromEnvironment(String)
void com.cosylab.cdb.jdal.JNDIContext.rename ( String  oldName,
String  newName 
) throws NamingException
See also:
Context.rename(String, String)
void com.cosylab.cdb.jdal.JNDIContext.rename ( Name  oldName,
Name  newName 
) throws NamingException
See also:
Context.rename(Name, Name)
static void com.cosylab.cdb.jdal.JNDIContext.setDal ( DAL  dal  )  [static]

Sets the dal.

Parameters:
dal The dal to set

Reimplemented in com.cosylab.cdb.browser.BrowserJNDIContext.

static void com.cosylab.cdb.jdal.JNDIContext.setOrb ( ORB  orb  )  [static]

Sets the orb.

Parameters:
orb The orb to set

Reimplemented in com.cosylab.cdb.browser.BrowserJNDIContext.

void com.cosylab.cdb.jdal.JNDIContext.unbind ( Name  name  )  throws NamingException
See also:
Context.unbind(Name)
void com.cosylab.cdb.jdal.JNDIContext.unbind ( String  name  )  throws NamingException
See also:
Context.unbind(String)

Member Data Documentation

ORB com.cosylab.cdb.jdal.JNDIContext.orb [static, protected]

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Enumerations Properties