org.rhq.jndi.context
Class URLPreferringDirContextDecorator

java.lang.Object
  extended by org.rhq.jndi.context.URLPreferringContextDecorator
      extended by org.rhq.jndi.context.URLPreferringDirContextDecorator
All Implemented Interfaces:
Serializable, Context, DirContext, ContextDecorator
Direct Known Subclasses:
URLPreferringEventDirContextDecorator, URLPreferringLdapContextDecorator

public class URLPreferringDirContextDecorator
extends URLPreferringContextDecorator
implements DirContext

Akin to URLPreferringContextDecorator this class implements the similar logic for DirContexts.

Author:
Lukas Krejci
See Also:
Serialized Form

Field Summary
 
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
URLPreferringDirContextDecorator()
           
URLPreferringDirContextDecorator(DirContext ctx)
           
 
Method Summary
 void bind(Name name, Object obj, Attributes attrs)
           
 void bind(String name, Object obj, Attributes attrs)
           
protected  DirContext checkAndCast(Context ctx)
           
 DirContext createSubcontext(Name name, Attributes attrs)
           
 DirContext createSubcontext(String name, Attributes attrs)
           
 Attributes getAttributes(Name name)
           
 Attributes getAttributes(Name name, String[] attrIds)
           
 Attributes getAttributes(String name)
           
 Attributes getAttributes(String name, String[] attrIds)
           
 DirContext getSchema(Name name)
           
 DirContext getSchema(String name)
           
 DirContext getSchemaClassDefinition(Name name)
           
 DirContext getSchemaClassDefinition(String name)
           
protected  DirContext getURLOrDefaultInitCtx(Name name)
           
protected  DirContext getURLOrDefaultInitCtx(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)
           
 void rebind(Name name, Object obj, Attributes attrs)
           
 void rebind(String name, Object obj, Attributes attrs)
           
 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)
           
 
Methods inherited from class org.rhq.jndi.context.URLPreferringContextDecorator
addToEnvironment, bind, bind, close, composeName, composeName, createSubcontext, createSubcontext, destroySubcontext, destroySubcontext, equals, getEnvironment, getNameInNamespace, getNameParser, getNameParser, getOriginal, hashCode, init, list, list, listBindings, listBindings, lookup, lookup, lookupLink, lookupLink, rebind, rebind, removeFromEnvironment, rename, rename, unbind, unbind
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.naming.Context
addToEnvironment, bind, bind, close, composeName, composeName, createSubcontext, createSubcontext, destroySubcontext, destroySubcontext, getEnvironment, getNameInNamespace, getNameParser, getNameParser, list, list, listBindings, listBindings, lookup, lookup, lookupLink, lookupLink, rebind, rebind, removeFromEnvironment, rename, rename, unbind, unbind
 

Constructor Detail

URLPreferringDirContextDecorator

public URLPreferringDirContextDecorator()

URLPreferringDirContextDecorator

public URLPreferringDirContextDecorator(DirContext ctx)
Method Detail

checkAndCast

protected DirContext checkAndCast(Context ctx)
                           throws NamingException
Throws:
NamingException

getURLOrDefaultInitCtx

protected DirContext getURLOrDefaultInitCtx(Name name)
                                     throws NamingException
Overrides:
getURLOrDefaultInitCtx in class URLPreferringContextDecorator
Throws:
NamingException

getURLOrDefaultInitCtx

protected DirContext getURLOrDefaultInitCtx(String name)
                                     throws NamingException
Overrides:
getURLOrDefaultInitCtx in class URLPreferringContextDecorator
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


Copyright © 2008-2012 Red Hat, Inc.. All Rights Reserved.