Class LDAPFilter


  • public class LDAPFilter
    extends Object
    Provides a class representing an LDAP filter.
    • Field Detail

      • expression_EQUAL

        public static String expression_EQUAL
        Defines an "equal" filter
      • expression_GREATERANDEQUAL

        public static String expression_GREATERANDEQUAL
        Defines a "greater and equal" filter
      • expression_LESSANDEQUAL

        public static String expression_LESSANDEQUAL
        Defines a "less and equal" filter
      • expression_NOTEQUAL

        public static String expression_NOTEQUAL
        Defines a "not equal" filter
      • prefix_AND

        public static String prefix_AND
        Defines an "and" prefix
      • prefix_OR

        public static String prefix_OR
        Defines an "or" filter
    • Constructor Detail

    • Method Detail

      • getPrefix

        public String getPrefix()
        Returns:
        the filter's prefix if set, unset value is ""
      • setPrefix

        public void setPrefix​(String prefix)
        Sets the filter's prefix to one of the values prefix_AND or prefix_OR. Unknown values will be set to prefix_AND.
        Parameters:
        prefix - the prefix to be set
      • getFilter

        public String getFilter()
        Returns the resulting LDAP filter string constructed of the provided values. E.g. for attribute with name "attrName", value set to "val" and expression set to expression_EQUAL this will result in "(attrName=val)".
        Returns:
        the LDAP filter string