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

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

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

DN.toNormalizedString介绍

[英]Retrieves a normalized string representation of this DN.
[中]检索此DN的规范化字符串表示形式。

代码示例

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

  1. /**
  2. * Generates a hash code for this DN.
  3. *
  4. * @return The generated hash code for this DN.
  5. */
  6. @Override() public int hashCode()
  7. {
  8. return toNormalizedString().hashCode();
  9. }

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

  1. /**
  2. * Generates a hash code for this DN.
  3. *
  4. * @return The generated hash code for this DN.
  5. */
  6. @Override() public int hashCode()
  7. {
  8. return toNormalizedString().hashCode();
  9. }

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

  1. /**
  2. * Retrieves a normalized string representation of this DN.
  3. *
  4. * @return A normalized string representation of this DN.
  5. */
  6. public String toNormalizedString()
  7. {
  8. if (normalizedString == null)
  9. {
  10. final StringBuilder buffer = new StringBuilder();
  11. toNormalizedString(buffer);
  12. normalizedString = buffer.toString();
  13. }
  14. return normalizedString;
  15. }

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

  1. /**
  2. * Indicates whether the provided object is equal to this DN. In order for
  3. * the provided object to be considered equal, it must be a non-null DN with
  4. * the same set of RDN components.
  5. *
  6. * @param o The object for which to make the determination.
  7. *
  8. * @return {@code true} if the provided object is considered equal to this
  9. * DN, or {@code false} if not.
  10. */
  11. @Override()
  12. public boolean equals(final Object o)
  13. {
  14. if (o == null)
  15. {
  16. return false;
  17. }
  18. if (this == o)
  19. {
  20. return true;
  21. }
  22. if (! (o instanceof DN))
  23. {
  24. return false;
  25. }
  26. final DN dn = (DN) o;
  27. return (toNormalizedString().equals(dn.toNormalizedString()));
  28. }

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

  1. /**
  2. * Retrieves a normalized string representation of this DN.
  3. *
  4. * @return A normalized string representation of this DN.
  5. */
  6. public String toNormalizedString()
  7. {
  8. if (normalizedString == null)
  9. {
  10. final StringBuilder buffer = new StringBuilder();
  11. toNormalizedString(buffer);
  12. normalizedString = buffer.toString();
  13. }
  14. return normalizedString;
  15. }

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

  1. /**
  2. * Indicates whether the provided object is equal to this DN. In order for
  3. * the provided object to be considered equal, it must be a non-null DN with
  4. * the same set of RDN components.
  5. *
  6. * @param o The object for which to make the determination.
  7. *
  8. * @return {@code true} if the provided object is considered equal to this
  9. * DN, or {@code false} if not.
  10. */
  11. @Override()
  12. public boolean equals(final Object o)
  13. {
  14. if (o == null)
  15. {
  16. return false;
  17. }
  18. if (this == o)
  19. {
  20. return true;
  21. }
  22. if (! (o instanceof DN))
  23. {
  24. return false;
  25. }
  26. final DN dn = (DN) o;
  27. return (toNormalizedString().equals(dn.toNormalizedString()));
  28. }

代码示例来源:origin: com.nimbusds/common

  1. /**
  2. * Returns the authzId string representation of the specified
  3. * distinguished name (DN).
  4. *
  5. * @param dn The distinguished name (DN). Must not be {@code null}.
  6. *
  7. * @return The authzId string.
  8. */
  9. private static String toAuthzIdString(final DN dn) {
  10. if (dn == null)
  11. throw new IllegalArgumentException("The authzId DN must not be null");
  12. if (dn.equals(DN.NULL_DN))
  13. return "dn:";
  14. else
  15. return "dn:" + dn.toNormalizedString();
  16. }

代码示例来源: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
  6. * not be {@code null}.
  7. * @param schema The schema to use to generate the normalized string
  8. * representation of the DN. It may be {@code null} if no
  9. * schema is available.
  10. *
  11. * @return The normalized representation of the DN with the provided string
  12. * representation.
  13. *
  14. * @throws LDAPException If the provided string cannot be parsed as a DN.
  15. */
  16. public static String normalize(final String s, final Schema schema)
  17. throws LDAPException
  18. {
  19. return new DN(s, schema).toNormalizedString();
  20. }

代码示例来源: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
  6. * not be {@code null}.
  7. * @param schema The schema to use to generate the normalized string
  8. * representation of the DN. It may be {@code null} if no
  9. * schema is available.
  10. *
  11. * @return The normalized representation of the DN with the provided string
  12. * representation.
  13. *
  14. * @throws LDAPException If the provided string cannot be parsed as a DN.
  15. */
  16. public static String normalize(final String s, final Schema schema)
  17. throws LDAPException
  18. {
  19. return new DN(s, schema).toNormalizedString();
  20. }

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

  1. percentEncode(baseDN.toNormalizedString(), buffer);
  2. buffer.append('?');

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

  1. percentEncode(baseDN.toNormalizedString(), buffer);
  2. buffer.append('?');

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

  1. a.hasValue(dn.toNormalizedString(),
  2. DistinguishedNameMatchingRule.getInstance()))
  3. for (final String attrName : referentialIntegrityAttributes)
  4. copy.removeAttributeValue(attrName, dn.toNormalizedString(),
  5. DistinguishedNameMatchingRule.getInstance());

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

  1. a.hasValue(oldDN.toNormalizedString(),
  2. DistinguishedNameMatchingRule.getInstance()))
  3. for (final String attrName : referentialIntegrityAttributes)
  4. if (copy.removeAttributeValue(attrName, oldDN.toNormalizedString(),
  5. DistinguishedNameMatchingRule.getInstance()))

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

  1. for (final Map.Entry<DN,String> e : generationIDs.entrySet())
  2. idStrings.add(e.getKey().toNormalizedString() + ' ' + e.getValue());

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

  1. /**
  2. * {@inheritDoc}
  3. */
  4. @Override()
  5. public ASN1OctetString normalize(final ASN1OctetString value)
  6. throws LDAPException
  7. {
  8. try
  9. {
  10. final DN dn = new DN(value.stringValue());
  11. return new ASN1OctetString(dn.toNormalizedString());
  12. }
  13. catch (LDAPException le)
  14. {
  15. debugException(le);
  16. throw new LDAPException(ResultCode.INVALID_ATTRIBUTE_SYNTAX,
  17. le.getMessage(), le);
  18. }
  19. }

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

  1. /**
  2. * {@inheritDoc}
  3. */
  4. @Override()
  5. public ASN1OctetString normalize(final ASN1OctetString value)
  6. throws LDAPException
  7. {
  8. try
  9. {
  10. final DN dn = new DN(value.stringValue());
  11. return new ASN1OctetString(dn.toNormalizedString());
  12. }
  13. catch (LDAPException le)
  14. {
  15. debugException(le);
  16. throw new LDAPException(ResultCode.INVALID_ATTRIBUTE_SYNTAX,
  17. le.getMessage(), le);
  18. }
  19. }

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

  1. entry.addAttribute(new Attribute("entryDN",
  2. DistinguishedNameMatchingRule.getInstance(),
  3. dn.toNormalizedString()));
  4. entry.addAttribute(new Attribute("entryUUID",
  5. UUID.randomUUID().toString()));

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

  1. dn.toNormalizedString()));

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

  1. updatedEntry.setAttribute(new Attribute("entryDN",
  2. DistinguishedNameMatchingRule.getInstance(),
  3. newDN.toNormalizedString()));
  4. newMapEntryDN.toNormalizedString()));

相关文章