Class 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 Detail

      • NEVER_DEREF_ALIASES

        public static final int NEVER_DEREF_ALIASES
        alias dereference
        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.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
        attrs - 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:
        getType in interface JDAPProtocolOp
        Returns:
        operation type
      • setBaseDN

        public void setBaseDN​(java.lang.String basedn)
        Sets the base dn component.
        Specified by:
        setBaseDN in class JDAPBaseDNRequest
        Parameters:
        basedn - base dn
      • getBaseDN

        public java.lang.String getBaseDN()
        Gets the base dn component.
        Specified by:
        getBaseDN in class JDAPBaseDNRequest
        Returns:
        base dn
      • getBERElement

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

        public java.lang.String toString()
        Retrieves the string representation of the request.
        Specified by:
        toString in interface JDAPProtocolOp
        Overrides:
        toString in class java.lang.Object
        Returns:
        string representation