com::cosylab::cdb::jdal::JNDIContext Class Reference

Inheritance diagram for com::cosylab::cdb::jdal::JNDIContext:
Inheritance graph
[legend]
Collaboration diagram for com::cosylab::cdb::jdal::JNDIContext:
Collaboration graph
[legend]

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  )  [inline]

Constructor for CDBContext.

Referenced by lookup().

com::cosylab::cdb::jdal::JNDIContext::JNDIContext ( String  name,
String  elements,
Logger  logger 
) [inline]

Constructor for CDBContext.


Member Function Documentation

Object com::cosylab::cdb::jdal::JNDIContext::addToEnvironment ( String  propName,
Object  propVal 
) throws NamingException [inline]
See also:
Context::addToEnvironment(String, Object)
void com::cosylab::cdb::jdal::JNDIContext::bind ( String  name,
Object  obj 
) throws NamingException [inline]
See also:
Context::bind(String, Object)
void com::cosylab::cdb::jdal::JNDIContext::bind ( Name  name,
Object  obj 
) throws NamingException [inline]
See also:
Context::bind(Name, Object)
void com::cosylab::cdb::jdal::JNDIContext::close (  )  throws NamingException [inline]
See also:
Context::close()
String com::cosylab::cdb::jdal::JNDIContext::composeName ( String  name,
String  prefix 
) throws NamingException [inline]
See also:
Context::composeName(String, String)
Name com::cosylab::cdb::jdal::JNDIContext::composeName ( Name  name,
Name  prefix 
) throws NamingException [inline]
See also:
Context::composeName(Name, Name)
Context com::cosylab::cdb::jdal::JNDIContext::createSubcontext ( String  name  )  throws NamingException [inline]
See also:
Context::createSubcontext(String)
Context com::cosylab::cdb::jdal::JNDIContext::createSubcontext ( Name  name  )  throws NamingException [inline]
See also:
Context::createSubcontext(Name)
void com::cosylab::cdb::jdal::JNDIContext::destroySubcontext ( String  name  )  throws NamingException [inline]
See also:
Context::destroySubcontext(String)
void com::cosylab::cdb::jdal::JNDIContext::destroySubcontext ( Name  name  )  throws NamingException [inline]
See also:
Context::destroySubcontext(Name)
Hashtable com::cosylab::cdb::jdal::JNDIContext::getEnvironment (  )  throws NamingException [inline]
See also:
Context::getEnvironment()
String com::cosylab::cdb::jdal::JNDIContext::getNameInNamespace (  )  throws NamingException [inline]
See also:
Context::getNameInNamespace()
NameParser com::cosylab::cdb::jdal::JNDIContext::getNameParser ( String  name  )  throws NamingException [inline]
See also:
Context::getNameParser(String)
NameParser com::cosylab::cdb::jdal::JNDIContext::getNameParser ( Name  name  )  throws NamingException [inline]
See also:
Context::getNameParser(Name)
NamingEnumeration com::cosylab::cdb::jdal::JNDIContext::list ( String  name  )  throws NamingException [inline]
See also:
Context::list(String)

References list(), and name.

NamingEnumeration com::cosylab::cdb::jdal::JNDIContext::list ( Name  name  )  throws NamingException [inline]
See also:
Context::list(Name)

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

References elements, lookup(), and name.

Referenced by list().

NamingEnumeration com::cosylab::cdb::jdal::JNDIContext::listBindings ( String  name  )  throws NamingException [inline]
See also:
Context::listBindings(String)
NamingEnumeration com::cosylab::cdb::jdal::JNDIContext::listBindings ( Name  name  )  throws NamingException [inline]
See also:
Context::listBindings(Name)
Object com::cosylab::cdb::jdal::JNDIContext::lookup ( String  name  )  throws NamingException [inline]
See also:
Context::lookup(String)

References lookup(), and name.

Object com::cosylab::cdb::jdal::JNDIContext::lookup ( Name  name  )  throws NamingException [inline]
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 dal, elements, com::cosylab::CDB::DALOperations::get_DAO(), alma::cdbErrType::wrappers::AcsJCDBXMLErrorEx::getErrorString(), alma::cdbErrType::wrappers::AcsJCDBXMLErrorEx::getFilename(), JNDIContext(), com::cosylab::CDB::DALOperations::list_daos(), com::cosylab::CDB::DALOperations::list_nodes(), logger, and name.

Referenced by list(), and lookup().

Object com::cosylab::cdb::jdal::JNDIContext::lookupLink ( String  name  )  throws NamingException [inline]
See also:
Context::lookupLink(String)
Object com::cosylab::cdb::jdal::JNDIContext::lookupLink ( Name  name  )  throws NamingException [inline]
See also:
Context::lookupLink(Name)
void com::cosylab::cdb::jdal::JNDIContext::rebind ( String  name,
Object  obj 
) throws NamingException [inline]
See also:
Context::rebind(String, Object)
void com::cosylab::cdb::jdal::JNDIContext::rebind ( Name  name,
Object  obj 
) throws NamingException [inline]
See also:
Context::rebind(Name, Object)
Object com::cosylab::cdb::jdal::JNDIContext::removeFromEnvironment ( String  propName  )  throws NamingException [inline]
See also:
Context::removeFromEnvironment(String)
void com::cosylab::cdb::jdal::JNDIContext::rename ( String  oldName,
String  newName 
) throws NamingException [inline]
See also:
Context::rename(String, String)
void com::cosylab::cdb::jdal::JNDIContext::rename ( Name  oldName,
Name  newName 
) throws NamingException [inline]
See also:
Context::rename(Name, Name)
static void com::cosylab::cdb::jdal::JNDIContext::setDal ( DAL  dal  )  [inline, 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  )  [inline, static]

Sets the orb.

Parameters:
orb The orb to set

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

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

Member Data Documentation


The documentation for this class was generated from the following file:

Generated by  doxygen 1.6.2