org.springframework.ldap.control
Class AbstractRequestControlDirContextProcessor
java.lang.Object
org.springframework.ldap.control.AbstractRequestControlDirContextProcessor
- All Implemented Interfaces:
- DirContextProcessor
- Direct Known Subclasses:
- PagedResultsRequestControl, SortControlDirContextProcessor
public abstract class AbstractRequestControlDirContextProcessor
- extends Object
- implements DirContextProcessor
Abstract superclass with responsibility to apply a single RequestControl on
an LdapContext, preserving any existing controls. Subclasses should implement
DirContextProcessor.postProcess(DirContext) and template method
createRequestControl().
- Author:
- Mattias Arthursson, Ulrik Sandberg
|
Field Summary |
protected org.apache.commons.logging.Log |
log
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
log
protected org.apache.commons.logging.Log log
AbstractRequestControlDirContextProcessor
public AbstractRequestControlDirContextProcessor()
preProcess
public void preProcess(DirContext ctx)
throws NamingException
- Get the existing RequestControls from the LdapContext, call
createRequestControl() to get a new instance, build a new array
of Controls and set it on the LdapContext.
The Control feature is specific for LDAP v3 and thus applies only
to LdapContext. However, the generic DirContextProcessor
mechanism used for calling preProcess and
postProcess uses DirContext, since it also works for LDAP
v2. This is the reason that DirContext has to be cast to a LdapContext.
- Specified by:
preProcess in interface DirContextProcessor
- Parameters:
ctx - an LdapContext instance.
- Throws:
NamingException
IllegalArgumentException - if the supplied DirContext is not an LdapContext.
createRequestControl
public abstract Control createRequestControl()
- Create an instance of the appropriate RequestControl.
- Returns:
- the new instance.
Copyright © 2006-2009 Spring Framework. All Rights Reserved.