Package netscape.ldap.controls
Class LDAPVirtualListControl
java.lang.Object
netscape.ldap.LDAPControl
netscape.ldap.controls.LDAPVirtualListControl
- All Implemented Interfaces:
Serializable
,Cloneable
- Direct Known Subclasses:
LdapVirtualListControl
Represents control data for returning paged results from a search.
Example of usage, with JFC:
- Version:
- 1.0
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate int
private int
private String
private int
private int
private static final int
private static final int
static final String
Fields inherited from class netscape.ldap.LDAPControl
m_critical, m_value, MANAGEDSAIT, PWEXPIRED, PWEXPIRING
-
Constructor Summary
ConstructorsConstructorDescriptionBlank constructor for internal use inLDAPVirtualListControl
.LDAPVirtualListControl
(int startIndex, int beforeCount, int afterCount, int contentCount) Constructs a newLDAPVirtualListControl
object.LDAPVirtualListControl
(int startIndex, int beforeCount, int afterCount, int contentCount, String context) LDAPVirtualListControl
(String jumpTo, int beforeCount, int afterCount) Constructs a newLDAPVirtualListControl
object.LDAPVirtualListControl
(String jumpTo, int beforeCount, int afterCount, String context) -
Method Summary
Modifier and TypeMethodDescriptionprivate byte[]
createPageSpecification
(int listIndex, int listSize, int beforeCount, int afterCount) Creates a "flattened" BER encoding of the requested page specifications and return it as a byte array.private byte[]
createPageSpecification
(String subFilter, int beforeCount, int afterCount) Creates a "flattened" BER encoding of the requested page specifications and return it as a byte array.int
Gets the number of results after the top/center to return per page.int
Gets the number of results before the top/center to return per page.Gets the optional context cookie.int
getIndex()
Gets the size of the virtual result set.int
Gets the size of the virtual result set.void
setContext
(String context) Sets the optional context cookie.void
setListSize
(int listSize) Sets the size of the virtual result set.void
setRange
(int startIndex, int beforeCount, int afterCount) Sets the starting index, and the number of entries before and after to return.void
Sets the search expression, and the number of entries before and after to return.toString()
Return a string representation of the control for debuggingMethods inherited from class netscape.ldap.LDAPControl
clone, createControl, flattenBER, getID, getValue, isCritical, lookupControlClass, newInstance, register
-
Field Details
-
VIRTUALLIST
- See Also:
-
TAG_BYINDEX
private static final int TAG_BYINDEX- See Also:
-
TAG_BYFILTER
private static final int TAG_BYFILTER- See Also:
-
m_beforeCount
private int m_beforeCount -
m_afterCount
private int m_afterCount -
m_listIndex
private int m_listIndex -
m_listSize
private int m_listSize -
m_context
-
-
Constructor Details
-
LDAPVirtualListControl
LDAPVirtualListControl()Blank constructor for internal use inLDAPVirtualListControl
.- See Also:
-
LDAPVirtualListControl
Constructs a newLDAPVirtualListControl
object. Use this constructor on an initial search operation, specifying the first entry to be matched, or the initial part of it.- Parameters:
jumpTo
- an LDAP search expression defining the result setbeforeCount
- the number of results before the top/center to return per pageafterCount
- the number of results after the top/center to return per page- See Also:
-
LDAPVirtualListControl
-
LDAPVirtualListControl
public LDAPVirtualListControl(int startIndex, int beforeCount, int afterCount, int contentCount) Constructs a newLDAPVirtualListControl
object. Use this constructor on a subsquent search operation, after we know the size of the virtual list, to fetch a subset.- Parameters:
startIndex
- the index into the virtual list of an entry to returnbeforeCount
- the number of results before the top/center to return per pageafterCount
- the number of results after the top/center to return per page- See Also:
-
LDAPVirtualListControl
public LDAPVirtualListControl(int startIndex, int beforeCount, int afterCount, int contentCount, String context)
-
-
Method Details
-
setRange
public void setRange(int startIndex, int beforeCount, int afterCount) Sets the starting index, and the number of entries before and after to return. Apply this method to a control returned from a previous search, to specify what result range to return on the next search.- Parameters:
startIndex
- the index into the virtual list of an entry to returnbeforeCount
- the number of results before startIndex to return per pageafterCount
- the number of results after startIndex to return per page- See Also:
-
setRange
Sets the search expression, and the number of entries before and after to return.- Parameters:
jumpTo
- an LDAP search expression defining the result set return.beforeCount
- the number of results before startIndex to return per pageafterCount
- the number of results after startIndex to return per page- See Also:
-
getIndex
public int getIndex()Gets the size of the virtual result set.- Returns:
- the size of the virtual result set, or -1 if not known.
-
getListSize
public int getListSize()Gets the size of the virtual result set.- Returns:
- the size of the virtual result set, or -1 if not known.
-
setListSize
public void setListSize(int listSize) Sets the size of the virtual result set.- Parameters:
listSize
- the virtual result set size
-
getBeforeCount
public int getBeforeCount()Gets the number of results before the top/center to return per page.- Returns:
- the number of results before the top/center to return per page.
-
getAfterCount
public int getAfterCount()Gets the number of results after the top/center to return per page.- Returns:
- the number of results after the top/center to return per page.
-
getContext
Gets the optional context cookie.- Returns:
- the optional context cookie.
-
setContext
Sets the optional context cookie.- Parameters:
context
- the optional context cookie
-
createPageSpecification
Creates a "flattened" BER encoding of the requested page specifications and return it as a byte array.- Parameters:
subFilter
- filter expression for generating the resultsbeforeCount
- number of entries before first match to returnafterCount
- number of entries after first match to return- Returns:
- the byte array of encoded data.
-
createPageSpecification
private byte[] createPageSpecification(int listIndex, int listSize, int beforeCount, int afterCount) Creates a "flattened" BER encoding of the requested page specifications and return it as a byte array.- Parameters:
listIndex
- the center or starting entry to returnlistSize
- the virtual list sizebeforeCount
- number of entries before the first match to returnafterCount
- number of entries after the first match to return- Returns:
- the byte array of encoded data.
-
toString
Description copied from class:LDAPControl
Return a string representation of the control for debugging- Overrides:
toString
in classLDAPControl
- Returns:
- a string representation of the control.
-