Package netscape.ldap.client.opers
Class JDAPSearchRequest
- java.lang.Object
-
- netscape.ldap.client.opers.JDAPBaseDNRequest
-
- netscape.ldap.client.opers.JDAPSearchRequest
-
- All 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
Fields Modifier and Type Field Description static intBASE_OBJECTsearch scopestatic java.lang.StringDEFAULT_FILTERstatic intDEREF_ALWAYSstatic intDEREF_FINDING_BASE_OBJstatic intDEREF_IN_SEARCHINGprotected java.lang.String[]m_attrsprotected booleanm_attrs_onlyprotected java.lang.Stringm_base_dnPrivate variablesprotected intm_derefprotected java.lang.Stringm_filterprotected JDAPFilterm_parsedFilterprotected intm_scopeprotected intm_size_limitprotected intm_time_limitstatic intNEVER_DEREF_ALIASESalias dereferencestatic intSINGLE_LEVELstatic intWHOLE_SUBTREE-
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
Constructors Constructor Description JDAPSearchRequest(java.lang.String base_dn, int scope, int deref, int size_limit, int time_limit, boolean attrs_only, java.lang.String filter, java.lang.String[] attrs)Constructs search request.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetBaseDN()Gets the base dn component.BERElementgetBERElement()Gets the ber representation of search request.intgetType()Retrieves the protocol operation type.voidsetBaseDN(java.lang.String basedn)Sets the base dn component.java.lang.StringtoString()Retrieves the string representation of the request.
-
-
-
Field Detail
-
BASE_OBJECT
public static final int BASE_OBJECT
search scope- See Also:
- Constant Field Values
-
SINGLE_LEVEL
public static final int SINGLE_LEVEL
- See Also:
- Constant Field Values
-
WHOLE_SUBTREE
public static final int WHOLE_SUBTREE
- See Also:
- Constant Field Values
-
NEVER_DEREF_ALIASES
public static final int NEVER_DEREF_ALIASES
alias dereference- See Also:
- Constant Field Values
-
DEREF_IN_SEARCHING
public static final int DEREF_IN_SEARCHING
- See Also:
- Constant Field Values
-
DEREF_FINDING_BASE_OBJ
public static final int DEREF_FINDING_BASE_OBJ
- See Also:
- Constant Field Values
-
DEREF_ALWAYS
public static final int DEREF_ALWAYS
- See Also:
- Constant Field Values
-
DEFAULT_FILTER
public static final java.lang.String DEFAULT_FILTER
- See Also:
- Constant Field Values
-
m_base_dn
protected java.lang.String m_base_dn
Private variables
-
m_scope
protected int m_scope
-
m_deref
protected int m_deref
-
m_size_limit
protected int m_size_limit
-
m_time_limit
protected int m_time_limit
-
m_attrs_only
protected boolean m_attrs_only
-
m_filter
protected java.lang.String m_filter
-
m_parsedFilter
protected JDAPFilter m_parsedFilter
-
m_attrs
protected java.lang.String[] m_attrs
-
-
Constructor Detail
-
JDAPSearchRequest
public JDAPSearchRequest(java.lang.String base_dn, int scope, int deref, int size_limit, int time_limit, boolean attrs_only, java.lang.String filter, java.lang.String[] attrs) throws java.lang.IllegalArgumentExceptionConstructs search request.- Parameters:
base_dn- base object entry relative to the searchscope- scope of the searchderef- how alias objects should be handledsize_limit- maximum number of entriestime_limit- maximum time (in time) allowedattrs_only- should return type onlyfilter- string filter based on RFC1558attrs- list of attribute types- Throws:
java.lang.IllegalArgumentException- if the filter has bad syntax
-
-
Method Detail
-
getType
public int getType()
Retrieves the protocol operation type.- Specified by:
getTypein interfaceJDAPProtocolOp- Returns:
- operation type
-
setBaseDN
public void setBaseDN(java.lang.String basedn)
Sets the base dn component.- Specified by:
setBaseDNin classJDAPBaseDNRequest- Parameters:
basedn- base dn
-
getBaseDN
public java.lang.String getBaseDN()
Gets the base dn component.- Specified by:
getBaseDNin classJDAPBaseDNRequest- Returns:
- base dn
-
getBERElement
public BERElement getBERElement()
Gets the ber representation of search request.- Specified by:
getBERElementin interfaceJDAPProtocolOp- Returns:
- ber representation of request.
-
toString
public java.lang.String toString()
Retrieves the string representation of the request.- Specified by:
toStringin interfaceJDAPProtocolOp- Overrides:
toStringin classjava.lang.Object- Returns:
- string representation
-
-