com.sapportals.portal.prt.jndisupport.util

Class AbstractHierarchicalContext

java.lang.Object
  extended by com.sapportals.portal.prt.jndisupport.util.AbstractHierarchicalContext
All Implemented Interfaces:
Context
Direct Known Subclasses:
MemoryHierarchicalContext

public abstract class AbstractHierarchicalContext
extends Object
implements Context

Base class that implements a HierarchicalContext


Field Summary
protected  String m_atomicName
           
protected  Hashtable m_env
           
protected  AbstractHierarchicalContext m_parent
           
 
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
AbstractHierarchicalContext(AbstractHierarchicalContext parent, String name, Hashtable inEnv, boolean init)
           
AbstractHierarchicalContext(Hashtable inEnv)
          This constructor will perform some initialisation
AbstractHierarchicalContext(Hashtable inEnv, boolean init)
           
 
Method Summary
 Object addToEnvironment(String propName, Object propVal)
           
 void bind(Name name, Object obj)
           
 void bind(String name, Object obj)
           
protected abstract  void bindChild(String childName, Object obj)
           
 void close()
           
 Name composeName(Name name, Name prefix)
           
 String composeName(String name, String prefix)
           
protected abstract  AbstractHierarchicalContext createChildContext(String name)
           
 Context createSubcontext(Name name)
           
 Context createSubcontext(String name)
           
 void destroySubcontext(Name name)
           
 void destroySubcontext(String name)
           
 String getContextName()
           
 Hashtable getEnvironment()
           
protected  Name getMyComponents(Name name)
          Utility method for processing composite/compound name.
 String getNameInNamespace()
           
 NameParser getNameParser()
           
 NameParser getNameParser(Name name)
           
 NameParser getNameParser(String name)
           
 AbstractHierarchicalContext getParentContext()
           
 String getSeparator()
          This method is there because we cannot we retrieve the separator from the name parser
protected  void init()
           
 NamingEnumeration list(Name name)
           
 NamingEnumeration list(String name)
           
 NamingEnumeration listBindings(Name name)
           
 NamingEnumeration listBindings(String name)
           
protected abstract  NamingEnumeration listBindingsChildren()
           
protected abstract  NamingEnumeration listNamingChildren()
           
 Object lookup(Name name)
           
 Object lookup(String name)
           
protected abstract  Object lookupChild(String childName)
           
 Object lookupLink(Name name)
           
 Object lookupLink(String name)
           
protected  void prepare()
           
 void rebind(Name name, Object obj)
           
 void rebind(String name, Object obj)
           
protected abstract  void rebindChild(String childName, Object obj)
           
protected abstract  void removeChild(String childName)
           
 Object removeFromEnvironment(String propName)
           
 void rename(Name oldname, Name newname)
           
 void rename(String oldname, String newname)
           
protected abstract  void renameChild(String oldName, String newName)
           
 String toString()
           
 void unbind(Name name)
           
 void unbind(String name)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

m_env

protected Hashtable m_env

m_parent

protected AbstractHierarchicalContext m_parent

m_atomicName

protected String m_atomicName
Constructor Detail

AbstractHierarchicalContext

public AbstractHierarchicalContext(Hashtable inEnv)
This constructor will perform some initialisation


AbstractHierarchicalContext

public AbstractHierarchicalContext(AbstractHierarchicalContext parent,
                                   String name,
                                   Hashtable inEnv,
                                   boolean init)

AbstractHierarchicalContext

public AbstractHierarchicalContext(Hashtable inEnv,
                                   boolean init)
Method Detail

getMyComponents

protected Name getMyComponents(Name name)
                        throws NamingException
Utility method for processing composite/compound name.

Parameters:
name - The non-null composite or compound name to process.
Returns:
The non-null string name in this namespace to be processed.
Throws:
NamingException

lookup

public Object lookup(String name)
              throws NamingException
Specified by:
lookup in interface Context
Throws:
NamingException

lookup

public Object lookup(Name name)
              throws NamingException
Specified by:
lookup in interface Context
Throws:
NamingException

bind

public void bind(String name,
                 Object obj)
          throws NamingException
Specified by:
bind in interface Context
Throws:
NamingException

bind

public void bind(Name name,
                 Object obj)
          throws NamingException
Specified by:
bind in interface Context
Throws:
NamingException

rebind

public void rebind(String name,
                   Object obj)
            throws NamingException
Specified by:
rebind in interface Context
Throws:
NamingException

rebind

public void rebind(Name name,
                   Object obj)
            throws NamingException
Specified by:
rebind in interface Context
Throws:
NamingException

unbind

public void unbind(String name)
            throws NamingException
Specified by:
unbind in interface Context
Throws:
NamingException

unbind

public void unbind(Name name)
            throws NamingException
Specified by:
unbind in interface Context
Throws:
NamingException

rename

public void rename(String oldname,
                   String newname)
            throws NamingException
Specified by:
rename in interface Context
Throws:
NamingException

rename

public void rename(Name oldname,
                   Name newname)
            throws NamingException
Specified by:
rename in interface Context
Throws:
NamingException

list

public NamingEnumeration list(String name)
                       throws NamingException
Specified by:
list in interface Context
Throws:
NamingException

list

public NamingEnumeration list(Name name)
                       throws NamingException
Specified by:
list in interface Context
Throws:
NamingException

listBindings

public NamingEnumeration listBindings(String name)
                               throws NamingException
Specified by:
listBindings in interface Context
Throws:
NamingException

listBindings

public NamingEnumeration listBindings(Name name)
                               throws NamingException
Specified by:
listBindings in interface Context
Throws:
NamingException

destroySubcontext

public void destroySubcontext(String name)
                       throws NamingException
Specified by:
destroySubcontext in interface Context
Throws:
NamingException

destroySubcontext

public void destroySubcontext(Name name)
                       throws NamingException
Specified by:
destroySubcontext in interface Context
Throws:
NamingException

createSubcontext

public Context createSubcontext(String name)
                         throws NamingException
Specified by:
createSubcontext in interface Context
Throws:
NamingException

createSubcontext

public Context createSubcontext(Name name)
                         throws NamingException
Specified by:
createSubcontext in interface Context
Throws:
NamingException

lookupLink

public Object lookupLink(String name)
                  throws NamingException
Specified by:
lookupLink in interface Context
Throws:
NamingException

lookupLink

public Object lookupLink(Name name)
                  throws NamingException
Specified by:
lookupLink in interface Context
Throws:
NamingException

getNameParser

public NameParser getNameParser(String name)
                         throws NamingException
Specified by:
getNameParser in interface Context
Throws:
NamingException

getNameParser

public NameParser getNameParser(Name name)
                         throws NamingException
Specified by:
getNameParser in interface Context
Throws:
NamingException

composeName

public String composeName(String name,
                          String prefix)
                   throws NamingException
Specified by:
composeName in interface Context
Throws:
NamingException

composeName

public Name composeName(Name name,
                        Name prefix)
                 throws NamingException
Specified by:
composeName in interface Context
Throws:
NamingException

addToEnvironment

public Object addToEnvironment(String propName,
                               Object propVal)
                        throws NamingException
Specified by:
addToEnvironment in interface Context
Throws:
NamingException

removeFromEnvironment

public Object removeFromEnvironment(String propName)
                             throws NamingException
Specified by:
removeFromEnvironment in interface Context
Throws:
NamingException

getEnvironment

public Hashtable getEnvironment()
                         throws NamingException
Specified by:
getEnvironment in interface Context
Throws:
NamingException

getNameInNamespace

public String getNameInNamespace()
                          throws NamingException
Specified by:
getNameInNamespace in interface Context
Throws:
NamingException

toString

public String toString()
Overrides:
toString in class Object

getNameParser

public NameParser getNameParser()

getSeparator

public String getSeparator()
This method is there because we cannot we retrieve the separator from the name parser


close

public void close()
           throws NamingException
Specified by:
close in interface Context
Throws:
NamingException

getContextName

public String getContextName()

getParentContext

public AbstractHierarchicalContext getParentContext()

init

protected void init()

prepare

protected void prepare()

createChildContext

protected abstract AbstractHierarchicalContext createChildContext(String name)
                                                           throws NamingException
Throws:
NamingException

renameChild

protected abstract void renameChild(String oldName,
                                    String newName)
                             throws NamingException
Throws:
NamingException

listNamingChildren

protected abstract NamingEnumeration listNamingChildren()
                                                 throws NamingException
Throws:
NamingException

listBindingsChildren

protected abstract NamingEnumeration listBindingsChildren()
                                                   throws NamingException
Throws:
NamingException

bindChild

protected abstract void bindChild(String childName,
                                  Object obj)
                           throws NamingException
Throws:
NamingException

lookupChild

protected abstract Object lookupChild(String childName)
                               throws NamingException
Throws:
NamingException

rebindChild

protected abstract void rebindChild(String childName,
                                    Object obj)
                             throws NamingException
Throws:
NamingException

removeChild

protected abstract void removeChild(String childName)
                             throws NamingException
Throws:
NamingException
Access Rights

This class can be accessed from:


SC DC Public Part ACH
[sap.com] EP-BASIS-API [sap.com] tc/epbc/basis/jndisupportdeprecated api EP-PIN-PRT
[sap.com] EP-BASIS-API [sap.com] tc/epbc/prt/api api EP-PIN
[sap.com] EP-BASIS-API [sap.com] tc/epbc/prt/lib/api api EP-PIN
[sap.com] EP-RUNTIME [sap.com] tc/ep/semantics/api api EP-PIN


Copyright 2015 SAP AG Complete Copyright Notice