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

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

本文整理了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

/**
 * Generates a hash code for this DN.
 *
 * @return  The generated hash code for this DN.
 */
@Override() public int hashCode()
{
 return toNormalizedString().hashCode();
}

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

/**
 * Generates a hash code for this DN.
 *
 * @return  The generated hash code for this DN.
 */
@Override() public int hashCode()
{
 return toNormalizedString().hashCode();
}

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

/**
 * Retrieves a normalized string representation of this DN.
 *
 * @return  A normalized string representation of this DN.
 */
public String toNormalizedString()
{
 if (normalizedString == null)
 {
  final StringBuilder buffer = new StringBuilder();
  toNormalizedString(buffer);
  normalizedString = buffer.toString();
 }
 return normalizedString;
}

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

/**
 * Indicates whether the provided object is equal to this DN.  In order for
 * the provided object to be considered equal, it must be a non-null DN with
 * the same set of RDN components.
 *
 * @param  o  The object for which to make the determination.
 *
 * @return  {@code true} if the provided object is considered equal to this
 *          DN, or {@code false} if not.
 */
@Override()
public boolean equals(final Object o)
{
 if (o == null)
 {
  return false;
 }
 if (this == o)
 {
  return true;
 }
 if (! (o instanceof DN))
 {
  return false;
 }
 final DN dn = (DN) o;
 return (toNormalizedString().equals(dn.toNormalizedString()));
}

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

/**
 * Retrieves a normalized string representation of this DN.
 *
 * @return  A normalized string representation of this DN.
 */
public String toNormalizedString()
{
 if (normalizedString == null)
 {
  final StringBuilder buffer = new StringBuilder();
  toNormalizedString(buffer);
  normalizedString = buffer.toString();
 }
 return normalizedString;
}

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

/**
 * Indicates whether the provided object is equal to this DN.  In order for
 * the provided object to be considered equal, it must be a non-null DN with
 * the same set of RDN components.
 *
 * @param  o  The object for which to make the determination.
 *
 * @return  {@code true} if the provided object is considered equal to this
 *          DN, or {@code false} if not.
 */
@Override()
public boolean equals(final Object o)
{
 if (o == null)
 {
  return false;
 }
 if (this == o)
 {
  return true;
 }
 if (! (o instanceof DN))
 {
  return false;
 }
 final DN dn = (DN) o;
 return (toNormalizedString().equals(dn.toNormalizedString()));
}

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

/**
 * Returns the authzId string representation of the specified 
 * distinguished name (DN).
 *
 * @param dn The distinguished name (DN). Must not be {@code null}.
 *
 * @return The authzId string.
 */
private static String toAuthzIdString(final DN dn) {

  if (dn == null)
    throw new IllegalArgumentException("The authzId DN must not be null");

  if (dn.equals(DN.NULL_DN))
    return "dn:";
  else
    return "dn:" + dn.toNormalizedString();
}

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

/**
 * Retrieves a normalized representation of the DN with the provided string
 * representation.
 *
 * @param  s       The string representation of the DN to normalize.  It must
 *                 not be {@code null}.
 * @param  schema  The schema to use to generate the normalized string
 *                 representation of the DN.  It may be {@code null} if no
 *                 schema is available.
 *
 * @return  The normalized representation of the DN with the provided string
 *          representation.
 *
 * @throws  LDAPException  If the provided string cannot be parsed as a DN.
 */
public static String normalize(final String s, final Schema schema)
    throws LDAPException
{
 return new DN(s, schema).toNormalizedString();
}

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

/**
 * Retrieves a normalized representation of the DN with the provided string
 * representation.
 *
 * @param  s       The string representation of the DN to normalize.  It must
 *                 not be {@code null}.
 * @param  schema  The schema to use to generate the normalized string
 *                 representation of the DN.  It may be {@code null} if no
 *                 schema is available.
 *
 * @return  The normalized representation of the DN with the provided string
 *          representation.
 *
 * @throws  LDAPException  If the provided string cannot be parsed as a DN.
 */
public static String normalize(final String s, final Schema schema)
    throws LDAPException
{
 return new DN(s, schema).toNormalizedString();
}

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

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

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

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

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

a.hasValue(dn.toNormalizedString(),
     DistinguishedNameMatchingRule.getInstance()))
for (final String attrName : referentialIntegrityAttributes)
 copy.removeAttributeValue(attrName, dn.toNormalizedString(),
    DistinguishedNameMatchingRule.getInstance());

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

a.hasValue(oldDN.toNormalizedString(),
     DistinguishedNameMatchingRule.getInstance()))
for (final String attrName : referentialIntegrityAttributes)
 if (copy.removeAttributeValue(attrName, oldDN.toNormalizedString(),
      DistinguishedNameMatchingRule.getInstance()))

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

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

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

/**
 * {@inheritDoc}
 */
@Override()
public ASN1OctetString normalize(final ASN1OctetString value)
    throws LDAPException
{
 try
 {
  final DN dn = new DN(value.stringValue());
  return new ASN1OctetString(dn.toNormalizedString());
 }
 catch (LDAPException le)
 {
  debugException(le);
  throw new LDAPException(ResultCode.INVALID_ATTRIBUTE_SYNTAX,
              le.getMessage(), le);
 }
}

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

/**
 * {@inheritDoc}
 */
@Override()
public ASN1OctetString normalize(final ASN1OctetString value)
    throws LDAPException
{
 try
 {
  final DN dn = new DN(value.stringValue());
  return new ASN1OctetString(dn.toNormalizedString());
 }
 catch (LDAPException le)
 {
  debugException(le);
  throw new LDAPException(ResultCode.INVALID_ATTRIBUTE_SYNTAX,
              le.getMessage(), le);
 }
}

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

entry.addAttribute(new Attribute("entryDN",
   DistinguishedNameMatchingRule.getInstance(),
   dn.toNormalizedString()));
entry.addAttribute(new Attribute("entryUUID",
   UUID.randomUUID().toString()));

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

dn.toNormalizedString()));

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

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

相关文章