netscape.ldap.client.opers

Class JDAPSearchRequest

Implemented Interfaces:
JDAPProtocolOp

public class JDAPSearchRequest
extends JDAPBaseDNRequest
implements JDAPProtocolOp

This class implements the search request. This object is sent to the ldap server.
 SearchRequest ::= [APPLICATION 3] SEQUENCE {
   baseObject LDAPDN,
   scope ENUMERATED {
     baseObject (0),
     singleLevel (1),
     wholeSubtree (2)
   },
   derefAliases ENUMERATED {
     neverDerefAliases (0),
     derefInSearching (1),
     DerefFindingBaseObj (2),
     DerefAlways (3)
   },
   sizeLimit INTEGER(0..maxInt),
   timeLimit INTEGER(0..maxInt),
   attrsOnly BOOLEAN,
   filter Filter,
   attributes SEQUENCE OF AttributeType
 }
 
Version:
1.0

Field Summary

static int
BASE_OBJECT
search scope
static String
DEFAULT_FILTER
static int
DEREF_ALWAYS
static int
DEREF_FINDING_BASE_OBJ
static int
DEREF_IN_SEARCHING
static int
NEVER_DEREF_ALIASES
alias dereference
static int
SINGLE_LEVEL
static int
WHOLE_SUBTREE
protected String[]
m_attrs
protected boolean
m_attrs_only
protected String
m_base_dn
Private variables
protected int
m_deref
protected String
m_filter
protected JDAPFilter
m_parsedFilter
protected int
m_scope
protected int
m_size_limit
protected int
m_time_limit

Fields inherited from interface netscape.ldap.client.opers.JDAPProtocolOp

ABANDON_REQUEST, ADD_REQUEST, ADD_RESPONSE, BIND_REQUEST, BIND_RESPONSE, COMPARE_REQUEST, COMPARE_RESPONSE, DEL_REQUEST, DEL_RESPONSE, EXTENDED_REQUEST, EXTENDED_RESPONSE, MODIFY_RDN_REQUEST, MODIFY_RDN_RESPONSE, MODIFY_REQUEST, MODIFY_RESPONSE, SEARCH_REQUEST, SEARCH_RESPONSE, SEARCH_RESULT, SEARCH_RESULT_REFERENCE, UNBIND_REQUEST

Constructor Summary

JDAPSearchRequest(String base_dn, int scope, int deref, int size_limit, int time_limit, boolean attrs_only, String filter, attrs[] )
Constructs search request.

Method Summary

BERElement
getBERElement()
Gets the ber representation of search request.
String
getBaseDN()
Gets the base dn component.
int
getType()
Retrieves the protocol operation type.
void
setBaseDN(String basedn)
Sets the base dn component.
String
toString()
Retrieves the string representation of the request.

Methods inherited from class netscape.ldap.client.opers.JDAPBaseDNRequest

getBaseDN, setBaseDN

Field Details

BASE_OBJECT

public static final int BASE_OBJECT
search scope
Field Value:
0

DEFAULT_FILTER

public static final String DEFAULT_FILTER

DEREF_ALWAYS

public static final int DEREF_ALWAYS
Field Value:
3

DEREF_FINDING_BASE_OBJ

public static final int DEREF_FINDING_BASE_OBJ
Field Value:
2

DEREF_IN_SEARCHING

public static final int DEREF_IN_SEARCHING
Field Value:
1

NEVER_DEREF_ALIASES

public static final int NEVER_DEREF_ALIASES
alias dereference
Field Value:
0

SINGLE_LEVEL

public static final int SINGLE_LEVEL
Field Value:
1

WHOLE_SUBTREE

public static final int WHOLE_SUBTREE
Field Value:
2

m_attrs

protected String[] m_attrs

m_attrs_only

protected boolean m_attrs_only

m_base_dn

protected String m_base_dn
Private variables

m_deref

protected int m_deref

m_filter

protected String m_filter

m_parsedFilter

protected JDAPFilter m_parsedFilter

m_scope

protected int m_scope

m_size_limit

protected int m_size_limit

m_time_limit

protected int m_time_limit

Constructor Details

JDAPSearchRequest

public JDAPSearchRequest(String base_dn,
                         int scope,
                         int deref,
                         int size_limit,
                         int time_limit,
                         boolean attrs_only,
                         String filter,
                         attrs[] )
            throws IllegalArgumentException
Constructs search request.
Parameters:
base_dn - base object entry relative to the search
scope - scope of the search
deref - how alias objects should be handled
size_limit - maximum number of entries
time_limit - maximum time (in time) allowed
attrs_only - should return type only
filter - string filter based on RFC1558

Method Details

getBERElement

public BERElement getBERElement()
Gets the ber representation of search request.
Specified by:
getBERElement in interface JDAPProtocolOp
Returns:
ber representation of request.

getBaseDN

public String getBaseDN()
Gets the base dn component.
Overrides:
getBaseDN in interface JDAPBaseDNRequest
Returns:
base dn

getType

public int getType()
Retrieves the protocol operation type.
Specified by:
getType in interface JDAPProtocolOp
Returns:
operation type

setBaseDN

public void setBaseDN(String basedn)
Sets the base dn component.
Overrides:
setBaseDN in interface JDAPBaseDNRequest
Parameters:
basedn - base dn

toString

public String toString()
Retrieves the string representation of the request.
Specified by:
toString in interface JDAPProtocolOp
Returns:
string representation