com.unboundid.ldap.sdk.DN.normalize()方法的使用及代码示例

x33g5p2x  于2022-01-18 转载在 其他  
字(1.9k)|赞(0)|评价(0)|浏览(115)

本文整理了Java中com.unboundid.ldap.sdk.DN.normalize()方法的一些代码示例,展示了DN.normalize()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。DN.normalize()方法的具体详情如下:
包路径:com.unboundid.ldap.sdk.DN
类名称:DN
方法名:normalize

DN.normalize介绍

[英]Retrieves a normalized representation of the DN with the provided string representation.
[中]使用提供的字符串表示形式检索DN的规范化表示形式。

代码示例

代码示例来源:origin: com.unboundid/unboundid-ldapsdk-minimal-edition

  1. /**
  2. * Retrieves a normalized representation of the DN with the provided string
  3. * representation.
  4. *
  5. * @param s The string representation of the DN to normalize. It must not
  6. * be {@code null}.
  7. *
  8. * @return The normalized representation of the DN with the provided string
  9. * representation.
  10. *
  11. * @throws LDAPException If the provided string cannot be parsed as a DN.
  12. */
  13. public static String normalize(final String s)
  14. throws LDAPException
  15. {
  16. return normalize(s, null);
  17. }

代码示例来源:origin: com.unboundid/unboundid-ldapsdk-commercial-edition

  1. /**
  2. * Retrieves a normalized representation of the DN with the provided string
  3. * representation.
  4. *
  5. * @param s The string representation of the DN to normalize. It must not
  6. * be {@code null}.
  7. *
  8. * @return The normalized representation of the DN with the provided string
  9. * representation.
  10. *
  11. * @throws LDAPException If the provided string cannot be parsed as a DN.
  12. */
  13. public static String normalize(final String s)
  14. throws LDAPException
  15. {
  16. return normalize(s, null);
  17. }

代码示例来源:origin: com.unboundid/unboundid-ldapsdk-commercial-edition

  1. /**
  2. * Retrieves a normalized representation of the provided DN. If the provided
  3. * string does not represent a valid distinguished name, then the value
  4. * returned by this method will not be reliable.
  5. *
  6. * @param dn The string representation of the DN to be normalized.
  7. *
  8. * @return A normalized representation of the provided DN.
  9. */
  10. public static String normalize(final String dn)
  11. {
  12. try
  13. {
  14. return DN.normalize(dn);
  15. }
  16. catch (Exception e)
  17. {
  18. debugException(e);
  19. return toLowerCase(dn.trim());
  20. }
  21. }

代码示例来源:origin: com.unboundid/unboundid-ldapsdk-commercial-edition

  1. e.addAttribute("entryDN", DN.normalize(e.getDN(), schema));

相关文章