Class DNUtils


  • public class DNUtils
    extends Object
    • Constructor Detail

      • DNUtils

        public DNUtils()
    • Method Detail

      • normalizeDN

        public static String normalizeDN​(String dn)
        Returns the normalized DN string.
        Parameters:
        dn - string needs to be normalized.
        Returns:
        returns the normalized DN string if the passed in string is in DN format otherwise returns null.
      • normalizeDN

        public static String normalizeDN​(org.forgerock.opendj.ldap.DN dn)
      • DNtoName

        public static String DNtoName​(String dn)
        Converts a DN string to the token value of the naming attribute.
        Parameters:
        dn - The passed in DN string
        Returns:
        returns the token value of the naming attribute in the passed in DN string. If the dn string is not in DN format, returns itself.
      • DNtoName

        public static String DNtoName​(String dn,
                                      boolean noTypes)
        Converts a DN string to the token value of the naming attribute.
        Parameters:
        dn - The passed in DN string
        noTypes - if true, returns only the values of the components and not the names(such as "cn")
        Returns:
        returns the token value of the naming attribute in the passed in DN string. If the dn string is not in DN format, returns itself.