Package com.sun.identity.common
Class DNUtils
- java.lang.Object
-
- com.sun.identity.common.DNUtils
-
public class DNUtils extends Object
-
-
Constructor Summary
Constructors Constructor Description DNUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static StringDNtoName(String dn)Converts a DN string to the token value of the naming attribute.static StringDNtoName(String dn, boolean noTypes)Converts a DN string to the token value of the naming attribute.static StringnormalizeDN(String dn)Returns the normalized DN string.static StringnormalizeDN(org.forgerock.opendj.ldap.DN dn)
-
-
-
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 stringnoTypes- 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.
-
-