netscape.ldap.controls

Class LDAPVirtualListResponse

Implemented Interfaces:
Cloneable, java.io.Serializable

public class LDAPVirtualListResponse
extends LDAPControl

Represents control data for returning paged results from a search.
Version:
1.0
VirtualListViewResponse ::= SEQUENCE {
targetPosition   INTEGER (0 .. maxInt),
contentCount     INTEGER (0 .. maxInt),
virtualListViewResult ENUMERATED {
success                  (0),
operatonsError           (1),
timeLimitExceeded        (3),
adminLimitExceeded       (11),
insufficientAccessRights (50),
busy                     (51),
unwillingToPerform       (53),
sortControlMissing       (60),
offsetRangeError         (61),
other                    (80)
},
contextID     OCTET STRING OPTIONAL 
}
See Also:
Serialized Form

Field Summary

static String
VIRTUALLISTRESPONSE

Fields inherited from class netscape.ldap.LDAPControl

MANAGEDSAIT, PWEXPIRED, PWEXPIRING, m_critical, m_value

Constructor Summary

LDAPVirtualListResponse(String oid, boolean critical, byte[] value)
Contructs an LDAPVirtualListResponse object.
LDAPVirtualListResponse(byte[] value)
Constructs a new LDAPVirtualListResponse object.

Method Summary

int
getContentCount()
Gets the size of the virtual result set.
String
getContext()
Gets the context cookie, if any.
int
getFirstPosition()
Gets the index of the first entry returned.
int
getResultCode()
Gets the result code.
static LDAPVirtualListResponse
parseResponse(LDAPControl[] controls)
Deprecated. LDAPVirtualListResponse controls are now automatically instantiated.
String
toString()

Methods inherited from class netscape.ldap.LDAPControl

clone, createControl, flattenBER, getID, getValue, isCritical, lookupControlClass, newInstance, register, toString

Field Details

VIRTUALLISTRESPONSE

public static final String VIRTUALLISTRESPONSE

Constructor Details

LDAPVirtualListResponse

public LDAPVirtualListResponse(String oid,
                               boolean critical,
                               byte[] value)
            throws LDAPException
Contructs an LDAPVirtualListResponse object.
Parameters:
oid - this parameter must be equal to LDAPVirtualListResponse.VIRTUALLISTRESPONSE or an LDAPExceptionis thrown
critical - true if this control is critical
value - the value associated with this control
Throws:
LDAPException - If oid is not LDAPVirtualListResponse.VIRTUALLISTRESPONSE.

LDAPVirtualListResponse

public LDAPVirtualListResponse(byte[] value)
Constructs a new LDAPVirtualListResponse object.
Parameters:
value - a BER encoded byte array

Method Details

getContentCount

public int getContentCount()
Gets the size of the virtual result set.
Returns:
the size of the virtual result set, or -1 if not known.

getContext

public String getContext()
Gets the context cookie, if any.
Returns:
the result context cookie.

getFirstPosition

public int getFirstPosition()
Gets the index of the first entry returned.
Returns:
the index of the first entry returned.

getResultCode

public int getResultCode()
Gets the result code.
Returns:
the result code.

parseResponse

public static LDAPVirtualListResponse parseResponse(LDAPControl[] controls)

Deprecated. LDAPVirtualListResponse controls are now automatically instantiated.

Returns a control returned on a VLV search.
Parameters:
controls - an array of controls that may include a VLV results control
Returns:
the control, if any; otherwise null.

toString

public String toString()
Overrides:
toString in interface LDAPControl