Package com.netscape.jndi.ldap.controls
Class LdapVirtualListControl
java.lang.Object
netscape.ldap.LDAPControl
netscape.ldap.controls.LDAPVirtualListControl
com.netscape.jndi.ldap.controls.LdapVirtualListControl
- All Implemented Interfaces:
Serializable
,Cloneable
,Control
public class LdapVirtualListControl
extends netscape.ldap.controls.LDAPVirtualListControl
implements Control
Represents control data for returning paged results from a search.
VirtualListViewRequest ::= SEQUENCE { beforeCount INTEGER, afterCount INTEGER, CHOICE { byIndex [0] SEQUENCE { index INTEGER, contentCount INTEGER } byFilter [1] jumpTo Substring }
- See Also:
-
Field Summary
Fields inherited from class netscape.ldap.controls.LDAPVirtualListControl
VIRTUALLIST
Fields inherited from class netscape.ldap.LDAPControl
m_critical, m_value, MANAGEDSAIT, PWEXPIRED, PWEXPIRING
Fields inherited from interface javax.naming.ldap.Control
CRITICAL, NONCRITICAL
-
Constructor Summary
ConstructorsConstructorDescriptionLdapVirtualListControl
(int startIndex, int beforeCount, int afterCount, int contentCount) Constructs a newLDAPVirtualListControl
object.LdapVirtualListControl
(String jumpTo, int beforeCount, int afterCount) Constructs a newLDAPVirtualListControl
object. -
Method Summary
Modifier and TypeMethodDescriptionint
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.byte[]
Retrieves the ASN.1 BER encoded value of the LDAP control.int
getIndex()
Gets the size of the virtual result set.int
Gets the size of the virtual result set.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.Methods inherited from class netscape.ldap.controls.LDAPVirtualListControl
getContext, setContext, toString
Methods inherited from class netscape.ldap.LDAPControl
clone, createControl, flattenBER, getID, getValue, isCritical, lookupControlClass, newInstance, register
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface javax.naming.ldap.Control
getID, isCritical
-
Constructor Details
-
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 set.beforeCount
- The number of results before the top/center to return per page.afterCount
- The number of results after the top/center to return per page.
-
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 return.beforeCount
- The number of results before the top/center to return per page.afterCount
- The number of results after the top/center to return per page.
-
-
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.- Overrides:
setRange
in classnetscape.ldap.controls.LDAPVirtualListControl
- Parameters:
startIndex
- The index into the virtual list of an entry to return.beforeCount
- The number of results before startIndex to return per page.afterCount
- The number of results after startIndex to return per page.
-
setRange
Sets the search expression, and the number of entries before and after to return.- Overrides:
setRange
in classnetscape.ldap.controls.LDAPVirtualListControl
- Parameters:
jumpTo
- An LDAP search expression defining the result set. return.beforeCount
- The number of results before startIndex to return per page.afterCount
- The number of results after startIndex to return per page.
-
getIndex
public int getIndex()Gets the size of the virtual result set.- Overrides:
getIndex
in classnetscape.ldap.controls.LDAPVirtualListControl
- 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.- Overrides:
getListSize
in classnetscape.ldap.controls.LDAPVirtualListControl
- 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.- Overrides:
setListSize
in classnetscape.ldap.controls.LDAPVirtualListControl
- Parameters:
listSize
- The virtual result set size.
-
getBeforeCount
public int getBeforeCount()Gets the number of results before the top/center to return per page.- Overrides:
getBeforeCount
in classnetscape.ldap.controls.LDAPVirtualListControl
- 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.- Overrides:
getAfterCount
in classnetscape.ldap.controls.LDAPVirtualListControl
- Returns:
- The number of results after the top/center to return per page.
-
getEncodedValue
public byte[] getEncodedValue()Retrieves the ASN.1 BER encoded value of the LDAP control. Null is returned if the value is absent.- Specified by:
getEncodedValue
in interfaceControl
- Returns:
- A possibly null byte array representing the ASN.1 BER encoded value of the LDAP control.
-