Class LdapUtil


  • public class LdapUtil
    extends Object
    This utility is a singleton and has getters / setters to access properties for filtering data bound for ldap. It is used by the Config and LdapDataProvider classes to provide escape ldap data to prevent unauthorized or inadvertent tampering with operations on the server.

    This class is not thread safe.

    Author:
    Apache Directory Project
    • Constructor Detail

      • LdapUtil

        public LdapUtil()
    • Method Detail

      • getInstance

        public static LdapUtil getInstance()
        Provided synchronized access to this.
        Returns:
        a reference to singleton instance of this class.
      • isLdapfilterSizeFound

        public boolean isLdapfilterSizeFound()
        The ldap.filter.size specifies the number of entries in the set of ldap filter properties.
        Returns:
        true if the property value was found in the fortress configs.
      • setLdapfilterSizeFound

        public void setLdapfilterSizeFound​(boolean ldapfilterSizeFound)
        Associated with fortress.property named ldap.filter.size. If the size matches the number of entries found in properties this will be set to 'true'.
        Parameters:
        ldapfilterSizeFound - true indicates the ldap.filter.size prop was set.
      • getLdapFilterSize

        public int getLdapFilterSize()
        Return the number of entries in the filter list. ldap.filter.size
        Returns:
        the number of entries in set.
      • setLdapFilterSize

        public void setLdapFilterSize​(int ldapFilterSize)
        Set the number of entries in the filter list. ldap.filter.size
        Parameters:
        ldapFilterSize - corresponds to the number of entries in the ldap filter set.
      • getLdapMetaChars

        public char[] getLdapMetaChars()
        Contains the unsafe characters set by fortress.properties named ldap.filter.
        Returns:
        the set of unsafe characters.
      • setLdapMetaChars

        public void setLdapMetaChars​(char[] ldapMetaChars)
        Set the unsafe characters by using ldap.filter specified by fortress.properties.
        Parameters:
        ldapMetaChars - contains the set of unsafe chars
      • getLdapReplVals

        public String[] getLdapReplVals()
        Contains the safe replacement characters.
        Returns:
        the safe character set.
      • setLdapReplVals

        public void setLdapReplVals​(String[] ldapReplVals)
        Set the ldap replacement chars.
        Parameters:
        ldapReplVals - contains the set of encoded chars