|
Spring LDAP | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.ldap.control.AbstractRequestControlDirContextProcessor
public abstract class AbstractRequestControlDirContextProcessor
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()
.
Field Summary | |
---|---|
protected Log |
log
|
Constructor Summary | |
---|---|
AbstractRequestControlDirContextProcessor()
|
Method Summary | |
---|---|
abstract Control |
createRequestControl()
Create an instance of the appropriate RequestControl. |
boolean |
isReplaceSameControlEnabled()
If there already exists a request control of the same class as the one created by createRequestControl() in the context, the new
control can either replace the existing one (default behavior) or be
added. |
void |
preProcess(DirContext ctx)
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. |
void |
setReplaceSameControlEnabled(boolean replaceSameControlEnabled)
If there already exists a request control of the same class as the one created by createRequestControl() in the context, the new
control can either replace the existing one (default behavior) or be
added. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.springframework.ldap.core.DirContextProcessor |
---|
postProcess |
Field Detail |
---|
protected Log log
Constructor Detail |
---|
public AbstractRequestControlDirContextProcessor()
Method Detail |
---|
public boolean isReplaceSameControlEnabled()
createRequestControl()
in the context, the new
control can either replace the existing one (default behavior) or be
added.
public void setReplaceSameControlEnabled(boolean replaceSameControlEnabled)
createRequestControl()
in the context, the new
control can either replace the existing one (default behavior) or be
added.
replaceSameControlEnabled
- true
if an already
existing control should be replacedpublic void preProcess(DirContext ctx) throws NamingException
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.
preProcess
in interface DirContextProcessor
ctx
- an LdapContext instance.
NamingException
IllegalArgumentException
- if the supplied DirContext is not an
LdapContext.public abstract Control createRequestControl()
|
Spring LDAP | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |