org.apache.aries.jndi
Class DelegateContext

java.lang.Object
  extended by org.apache.aries.jndi.DelegateContext
All Implemented Interfaces:
Context, DirContext, LdapContext

public class DelegateContext
extends Object
implements DirContext, LdapContext


Field Summary
 
Fields inherited from interface javax.naming.ldap.LdapContext
CONTROL_FACTORIES
 
Fields inherited from interface javax.naming.directory.DirContext
ADD_ATTRIBUTE, REMOVE_ATTRIBUTE, REPLACE_ATTRIBUTE
 
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
DelegateContext(org.osgi.framework.BundleContext bundleContext, ContextProvider contextProvider)
           
DelegateContext(org.osgi.framework.BundleContext bundleContext, Hashtable<?,?> theEnv)
           
 
Method Summary
 Object addToEnvironment(String propName, Object propVal)
           
 void bind(Name name, Object obj)
           
 void bind(Name name, Object obj, Attributes attrs)
           
 void bind(String name, Object obj)
           
 void bind(String name, Object obj, Attributes attrs)
           
 void close()
           
 Name composeName(Name name, Name prefix)
           
 String composeName(String name, String prefix)
           
 Context createSubcontext(Name name)
           
 DirContext createSubcontext(Name name, Attributes attrs)
           
 Context createSubcontext(String name)
           
 DirContext createSubcontext(String name, Attributes attrs)
           
 void destroySubcontext(Name name)
           
 void destroySubcontext(String name)
           
 ExtendedResponse extendedOperation(ExtendedRequest request)
           
protected  Context findContext(Name name)
           
protected  Context findContext(String name)
           
 Attributes getAttributes(Name name)
           
 Attributes getAttributes(Name name, String[] attrIds)
           
 Attributes getAttributes(String name)
           
 Attributes getAttributes(String name, String[] attrIds)
           
 Control[] getConnectControls()
           
 Hashtable<?,?> getEnvironment()
           
 String getNameInNamespace()
           
 NameParser getNameParser(Name name)
           
 NameParser getNameParser(String name)
           
 Control[] getRequestControls()
           
 Control[] getResponseControls()
           
 DirContext getSchema(Name name)
           
 DirContext getSchema(String name)
           
 DirContext getSchemaClassDefinition(Name name)
           
 DirContext getSchemaClassDefinition(String name)
           
 NamingEnumeration<NameClassPair> list(Name name)
           
 NamingEnumeration<NameClassPair> list(String name)
           
 NamingEnumeration<Binding> listBindings(Name name)
           
 NamingEnumeration<Binding> listBindings(String name)
           
 Object lookup(Name name)
           
 Object lookup(String name)
           
 Object lookupLink(Name name)
           
 Object lookupLink(String name)
           
 void modifyAttributes(Name name, int mod_op, Attributes attrs)
           
 void modifyAttributes(Name name, ModificationItem[] mods)
           
 void modifyAttributes(String name, int mod_op, Attributes attrs)
           
 void modifyAttributes(String name, ModificationItem[] mods)
           
 LdapContext newInstance(Control[] requestControls)
           
 void rebind(Name name, Object obj)
           
 void rebind(Name name, Object obj, Attributes attrs)
           
 void rebind(String name, Object obj)
           
 void rebind(String name, Object obj, Attributes attrs)
           
 void reconnect(Control[] connCtls)
           
 Object removeFromEnvironment(String propName)
           
 void rename(Name oldName, Name newName)
           
 void rename(String oldName, String newName)
           
 NamingEnumeration<SearchResult> search(Name name, Attributes matchingAttributes)
           
 NamingEnumeration<SearchResult> search(Name name, Attributes matchingAttributes, String[] attributesToReturn)
           
 NamingEnumeration<SearchResult> search(Name name, String filterExpr, Object[] filterArgs, SearchControls cons)
           
 NamingEnumeration<SearchResult> search(Name name, String filter, SearchControls cons)
           
 NamingEnumeration<SearchResult> search(String name, Attributes matchingAttributes)
           
 NamingEnumeration<SearchResult> search(String name, Attributes matchingAttributes, String[] attributesToReturn)
           
 NamingEnumeration<SearchResult> search(String name, String filterExpr, Object[] filterArgs, SearchControls cons)
           
 NamingEnumeration<SearchResult> search(String name, String filter, SearchControls cons)
           
 void setRequestControls(Control[] requestControls)
           
 void unbind(Name name)
           
 void unbind(String name)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DelegateContext

public DelegateContext(org.osgi.framework.BundleContext bundleContext,
                       Hashtable<?,?> theEnv)

DelegateContext

public DelegateContext(org.osgi.framework.BundleContext bundleContext,
                       ContextProvider contextProvider)
                throws NamingException
Throws:
NamingException
Method Detail

addToEnvironment

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

bind

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

bind

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

close

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

composeName

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

composeName

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

createSubcontext

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

createSubcontext

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

destroySubcontext

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

destroySubcontext

public void destroySubcontext(String name)
                       throws NamingException
Specified by:
destroySubcontext 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

getNameParser

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

getNameParser

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

list

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

list

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

listBindings

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

listBindings

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

lookup

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

lookup

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

lookupLink

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

lookupLink

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

rebind

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

rebind

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

removeFromEnvironment

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

rename

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

rename

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

unbind

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

unbind

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

findContext

protected Context findContext(Name name)
                       throws NamingException
Throws:
NamingException

findContext

protected Context findContext(String name)
                       throws NamingException
Throws:
NamingException

getAttributes

public Attributes getAttributes(Name name)
                         throws NamingException
Specified by:
getAttributes in interface DirContext
Throws:
NamingException

getAttributes

public Attributes getAttributes(String name)
                         throws NamingException
Specified by:
getAttributes in interface DirContext
Throws:
NamingException

getAttributes

public Attributes getAttributes(Name name,
                                String[] attrIds)
                         throws NamingException
Specified by:
getAttributes in interface DirContext
Throws:
NamingException

getAttributes

public Attributes getAttributes(String name,
                                String[] attrIds)
                         throws NamingException
Specified by:
getAttributes in interface DirContext
Throws:
NamingException

modifyAttributes

public void modifyAttributes(Name name,
                             int mod_op,
                             Attributes attrs)
                      throws NamingException
Specified by:
modifyAttributes in interface DirContext
Throws:
NamingException

modifyAttributes

public void modifyAttributes(String name,
                             int mod_op,
                             Attributes attrs)
                      throws NamingException
Specified by:
modifyAttributes in interface DirContext
Throws:
NamingException

modifyAttributes

public void modifyAttributes(Name name,
                             ModificationItem[] mods)
                      throws NamingException
Specified by:
modifyAttributes in interface DirContext
Throws:
NamingException

modifyAttributes

public void modifyAttributes(String name,
                             ModificationItem[] mods)
                      throws NamingException
Specified by:
modifyAttributes in interface DirContext
Throws:
NamingException

bind

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

bind

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

rebind

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

rebind

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

createSubcontext

public DirContext createSubcontext(Name name,
                                   Attributes attrs)
                            throws NamingException
Specified by:
createSubcontext in interface DirContext
Throws:
NamingException

createSubcontext

public DirContext createSubcontext(String name,
                                   Attributes attrs)
                            throws NamingException
Specified by:
createSubcontext in interface DirContext
Throws:
NamingException

getSchema

public DirContext getSchema(Name name)
                     throws NamingException
Specified by:
getSchema in interface DirContext
Throws:
NamingException

getSchema

public DirContext getSchema(String name)
                     throws NamingException
Specified by:
getSchema in interface DirContext
Throws:
NamingException

getSchemaClassDefinition

public DirContext getSchemaClassDefinition(Name name)
                                    throws NamingException
Specified by:
getSchemaClassDefinition in interface DirContext
Throws:
NamingException

getSchemaClassDefinition

public DirContext getSchemaClassDefinition(String name)
                                    throws NamingException
Specified by:
getSchemaClassDefinition in interface DirContext
Throws:
NamingException

search

public NamingEnumeration<SearchResult> search(Name name,
                                              Attributes matchingAttributes,
                                              String[] attributesToReturn)
                                       throws NamingException
Specified by:
search in interface DirContext
Throws:
NamingException

search

public NamingEnumeration<SearchResult> search(String name,
                                              Attributes matchingAttributes,
                                              String[] attributesToReturn)
                                       throws NamingException
Specified by:
search in interface DirContext
Throws:
NamingException

search

public NamingEnumeration<SearchResult> search(Name name,
                                              Attributes matchingAttributes)
                                       throws NamingException
Specified by:
search in interface DirContext
Throws:
NamingException

search

public NamingEnumeration<SearchResult> search(String name,
                                              Attributes matchingAttributes)
                                       throws NamingException
Specified by:
search in interface DirContext
Throws:
NamingException

search

public NamingEnumeration<SearchResult> search(Name name,
                                              String filter,
                                              SearchControls cons)
                                       throws NamingException
Specified by:
search in interface DirContext
Throws:
NamingException

search

public NamingEnumeration<SearchResult> search(String name,
                                              String filter,
                                              SearchControls cons)
                                       throws NamingException
Specified by:
search in interface DirContext
Throws:
NamingException

search

public NamingEnumeration<SearchResult> search(Name name,
                                              String filterExpr,
                                              Object[] filterArgs,
                                              SearchControls cons)
                                       throws NamingException
Specified by:
search in interface DirContext
Throws:
NamingException

search

public NamingEnumeration<SearchResult> search(String name,
                                              String filterExpr,
                                              Object[] filterArgs,
                                              SearchControls cons)
                                       throws NamingException
Specified by:
search in interface DirContext
Throws:
NamingException

extendedOperation

public ExtendedResponse extendedOperation(ExtendedRequest request)
                                   throws NamingException
Specified by:
extendedOperation in interface LdapContext
Throws:
NamingException

getConnectControls

public Control[] getConnectControls()
                             throws NamingException
Specified by:
getConnectControls in interface LdapContext
Throws:
NamingException

getRequestControls

public Control[] getRequestControls()
                             throws NamingException
Specified by:
getRequestControls in interface LdapContext
Throws:
NamingException

getResponseControls

public Control[] getResponseControls()
                              throws NamingException
Specified by:
getResponseControls in interface LdapContext
Throws:
NamingException

newInstance

public LdapContext newInstance(Control[] requestControls)
                        throws NamingException
Specified by:
newInstance in interface LdapContext
Throws:
NamingException

reconnect

public void reconnect(Control[] connCtls)
               throws NamingException
Specified by:
reconnect in interface LdapContext
Throws:
NamingException

setRequestControls

public void setRequestControls(Control[] requestControls)
                        throws NamingException
Specified by:
setRequestControls in interface LdapContext
Throws:
NamingException


Copyright © 2009-2011 The Apache Software Foundation. All Rights Reserved.