org.apache.directory.shared.ldap.name.DN.toString()方法的使用及代码示例

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

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

DN.toString介绍

[英]Return the normalized DN as a String. It returns the same value as the getNormName method
[中]以字符串形式返回规范化的DN。它返回与getNormalName方法相同的值

代码示例

代码示例来源:origin: org.apache.directory.shared/shared-ldap

/**
   * Return a String representing a DelRequest
   * 
   * @return A DelRequest String
   */
  public String toString()
  {

    StringBuffer sb = new StringBuffer();

    sb.append( "    Del request\n" );
    sb.append( "        Entry : '" ).append( name.toString() ).append( "'\n" );

    return sb.toString();
  }
}

代码示例来源:origin: org.apache.directory.shared/shared-ldap

public String toString()
  {
    StringBuilder buffer = new StringBuilder();
    
    boolean isFirst = true;
    buffer.append( "{ " );
    
    for ( DN name:names )
    {
      if ( isFirst )
      {
        isFirst = false;
      }
      else
      {
        buffer.append( ", " );
      }
      
      buffer.append( '"' );
      buffer.append( name.toString() );
      buffer.append( '"' );
    }
    
    buffer.append( " }" );
    
    return buffer.toString();
  }
}

代码示例来源:origin: org.apache.directory.shared/shared-ldap

/**
 * Convert a DN to a {@link javax.naming.Name}
 *
 * @param name The DN to convert
 * @return A Name
 */
public static Name toName( DN dn )
{
  try
  {
    Name name = new LdapName( dn.toString() );
  
    return name;
  }
  catch ( InvalidNameException ine )
  {
    // TODO : check if we must throw an exception.
    // Logically, the DN must be valid.
    return null;
  }
}

代码示例来源:origin: org.apache.directory.shared/shared-ldap

/**
   * Get a String representation of a ModifyDNRequest
   * 
   * @return A ModifyDNRequest String
   */
  public String toString()
  {

    StringBuffer sb = new StringBuffer();

    sb.append( "    ModifyDN Response\n" );
    sb.append( "        Entry : '" ).append( name ).append( "'\n" );
    if( newRdn != null )
    {
      sb.append( "        New RDN : '" ).append( newRdn.toString() ).append( "'\n" );
    }
    sb.append( "        Delete old RDN : " ).append( deleteOldRdn ).append( "\n" );

    if ( newSuperior != null )
    {
      sb.append( "        New superior : '" ).append( newSuperior.toString() ).append( "'\n" );
    }

    return sb.toString();
  }
}

代码示例来源:origin: org.apache.directory.shared/shared-ldap

/**
   * Get a String representation of a Compare Request
   * 
   * @return A Compare Request String
   */
  public String toString()
  {
    StringBuilder sb = new StringBuilder();

    sb.append( "    Compare request\n" );
    sb.append( "        Entry : '" ).append( name.toString() ).append( "'\n" );
    sb.append( "        Attribute description : '" ).append( attrId ).append( "'\n" );
    sb.append( "        Attribute value : '" );
    
    if ( !attrVal.isBinary() )
    {
      sb.append( attrVal.get() );
    }
    else
    {
      byte[] binVal = attrVal.getBytes();
      sb.append( StringTools.utf8ToString( binVal ) ).append( '/' ).append(
        StringTools.dumpBytes( binVal ) ).append( "'\n" );
    }

    return sb.toString();
  }
}

代码示例来源:origin: org.apache.directory.shared/shared-ldap

sb.append( "        Name : '" ).append( name.toString() ).append( "'\n" );

代码示例来源:origin: org.apache.directory.shared/shared-ldap

sb.append( "            Matched DN : '" ).append( matchedDN == null ? "": matchedDN.toString() ).append( "'\n" );
sb.append( "            Error message : '" ).append( errorMessage == null ? "" : errorMessage ).append( "'\n" );

代码示例来源:origin: org.apache.directory.shared/shared-ldap

rdn = new DN( descendant.toString() );

代码示例来源:origin: dwimberger/crowd-ldap-server

log.debug("Prefix is neither users nor groups");
log.debug("Crowd Users = " + m_CrowdUsersEntry.getDn());
log.debug("Crowd Groups = " + m_CrowdGroupsEntry.getDn().toString());
return false;

代码示例来源:origin: org.apache.directory.server/apacheds-avl-partition

if ( aliasDn.equals( movedBase.toString() ) )

相关文章