Package org.springframework.ldap.control
Class SortControlDirContextProcessor
- java.lang.Object
-
- org.springframework.ldap.control.AbstractRequestControlDirContextProcessor
-
- org.springframework.ldap.control.AbstractFallbackRequestAndResponseControlDirContextProcessor
-
- org.springframework.ldap.control.SortControlDirContextProcessor
-
- All Implemented Interfaces:
DirContextProcessor
public class SortControlDirContextProcessor extends AbstractFallbackRequestAndResponseControlDirContextProcessor
DirContextProcessor implementation for managing the SortControl. Note that this class is stateful, so a new instance needs to be instantiated for each new search.
-
-
Field Summary
-
Fields inherited from class org.springframework.ldap.control.AbstractFallbackRequestAndResponseControlDirContextProcessor
critical, defaultRequestControl, defaultResponseControl, fallbackRequestControl, fallbackResponseControl, requestControlClass, responseControlClass
-
Fields inherited from class org.springframework.ldap.control.AbstractRequestControlDirContextProcessor
log
-
-
Constructor Summary
Constructors Constructor Description SortControlDirContextProcessor(java.lang.String sortKey)Constructs a new instance using the supplied sort key.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description javax.naming.ldap.ControlcreateRequestControl()Create an instance of the appropriate RequestControl.intgetResultCode()Get the result code returned by the control.java.lang.StringgetSortKey()Get the sort key.protected voidhandleResponse(java.lang.Object control)booleanisSorted()Check whether the returned values were actually sorted by the server.-
Methods inherited from class org.springframework.ldap.control.AbstractFallbackRequestAndResponseControlDirContextProcessor
createRequestControl, invokeMethod, loadControlClasses, postProcess, setCritical, setRequestControlClass, setResponseControlClass
-
Methods inherited from class org.springframework.ldap.control.AbstractRequestControlDirContextProcessor
isReplaceSameControlEnabled, preProcess, setReplaceSameControlEnabled
-
-
-
-
Method Detail
-
isSorted
public boolean isSorted()
Check whether the returned values were actually sorted by the server.- Returns:
trueif the result was sorted,falseotherwise.
-
getResultCode
public int getResultCode()
Get the result code returned by the control.- Returns:
- result code.
-
getSortKey
public java.lang.String getSortKey()
Get the sort key.- Returns:
- the sort key.
-
createRequestControl
public javax.naming.ldap.Control createRequestControl()
Description copied from class:AbstractRequestControlDirContextProcessorCreate an instance of the appropriate RequestControl.- Specified by:
createRequestControlin classAbstractRequestControlDirContextProcessor- Returns:
- the new instance.
-
handleResponse
protected void handleResponse(java.lang.Object control)
- Specified by:
handleResponsein classAbstractFallbackRequestAndResponseControlDirContextProcessor
-
-