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

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

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

DN.getName介绍

[英]Get the initial DN
[中]获取初始DN

代码示例

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

public String toString()
  {
    return name + " \"" + ctxName.getName() + "\"";
  }
}

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

/**
 * Return the normalized DN as a String. It returns the same value as the
 * getNormName method
 *
 * @return A String representing the normalized DN
 */
public String toString()
{
  return getName();
}

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

/**
   * @see Object#toString()
   */
  public String toString()
  {
    String name = (dn == null ? "null" : ( dn == DN.EMPTY_DN ? "\"\"" : dn.getName() ) );
    return "ServerSearchResult : " + name + "\n" + serverEntry;
  }
}

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

/**
 * {@inheritDoc}
 */
public String getSuffix()
{
  return suffix.getName();
}

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

public String getSuffixDn()
{
  if ( suffixDn == null )
  {
    return null;
  }
  return suffixDn.getName();
}

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

private boolean isCrowdGroups(DN dn) {
 return m_CrowdGroupsEntry.getDn().getName().equals(dn.getName());
}//isCrowdGroups

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

private boolean isCrowdUsers(DN dn) {
 return m_CrowdUsersEntry.getDn().getName().equals(dn.getName());
}//isCrowdUsers

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

/**
 * {@inheritDoc}
 */
public DN getUpSuffix()
{
  if ( suffixDn == null )
  {
    return null;
  }
  try
  {
    return new DN( suffixDn.getName() );
  }
  catch ( LdapInvalidDnException e )
  {
    // shouldn't happen
    LOG.error( "", e );
  }
  return null;
}

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

private BaseEntryFilteringCursor findSubTree(SearchOperationContext ctx) {
 DN dn = ctx.getDn();
 log.debug("findSubTree()::dn=" + dn.getName());
 //Will only search at one level
 return findOneLevel(ctx);
}//findSubTree

代码示例来源:origin: org.wso2.carbon.identity.userstore.ldap/org.wso2.carbon.ldap.server

@Override
public String getConnectionDomainName()
    throws DirectoryServerException {
  LdapPrincipal adminPrinciple = getAdminPrinciple();
  return adminPrinciple.getClonedName().getName();
}

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

/**
   * {@inheritDoc}
   */
  public Element toDsml( Element root )
  {
    Element element = super.toDsml( root );

    BindRequestCodec request = ( BindRequestCodec ) instance;

    // AbandonID
    String name = request.getName().getName();
    if ( ( name != null ) && ( !"".equals( name ) ) )
    {
      element.addAttribute( "principal", name );
    }

    return element;
  }
}

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

/**
 * Returns a attribute given it's id
 * 
 * @param attributeId
 *            The attribute Id
 * @return The attribute if it exists
 */
public EntryAttribute get( String attributeId )
{
  if ( "dn".equalsIgnoreCase( attributeId ) )
  {
    return new DefaultClientAttribute( "dn", entry.getDn().getName() );
  }
  return entry.get( attributeId );
}

代码示例来源:origin: org.wso2.carbon.identity.userstore.ldap/org.wso2.carbon.ldap.server

private static void addObjectClasses(ServerEntry serverEntry, List<String> objectClasses)
    throws DirectoryServerException {
  for (String objectClass : objectClasses) {
    try {
      serverEntry.add("objectClass", objectClass);
    } catch (LdapException e) {
      throwDirectoryServerException("Could not add class to partition " +
          serverEntry.getDn().getName(), e);
    }
  }
}

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

private BaseEntryFilteringCursor findObject(SearchingOperationContext ctx) {
 DN dn = ctx.getDn();
 String dnName = dn.getName();
 ServerEntry se = ctx.getEntry();
 log.debug("findObject()::dn=" + dnName + "::entry=" + se.toString());
 //1. Try cache
 se = m_EntryCache.get(dn.getName());
 if (se != null) {
  return new BaseEntryFilteringCursor(
    new SingletonCursor<ServerEntry>(se), ctx);
 }
 // return an empty result
 return new BaseEntryFilteringCursor(new EmptyCursor<ServerEntry>(), ctx);
}//findObject

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

/**
 * {@inheritDoc}
 */
public Element toDsml( Element root )
{
  Element element = super.toDsml( root );
  DelRequestCodec request = ( DelRequestCodec ) instance;
  // DN
  if ( request.getEntry() != null )
  {
    element.addAttribute( "dn", request.getEntry().getName() );
  }
  return element;
}

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

/**
 * @see javax.naming.NamingEnumeration#next()
 */
public SearchResult next() throws NamingException
{
  ServerSearchResult rec = result.next();
  
  SearchResult searchResult = new SearchResult( 
      rec.getDn().getName(), 
      rec.getObject(), 
      toBasicAttributes( rec.getServerEntry() ), 
      rec.isRelative() );
  
  return searchResult;
}

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

/**
 * Simple Bind on a server.
 *
 * @param name The name we use to authenticate the user. It must be a 
 * valid DN
 * @param credentials The password. It can't be null 
 * @return The BindResponse LdapResponse 
 */
public BindResponse bind( DN name, String credentials ) throws LdapException, IOException
{
  LOG.debug( "Bind request : {}", name );
  // Create the BindRequest
  BindRequest bindRequest = new BindRequest();
  bindRequest.setCredentials( StringTools.getBytesUtf8( credentials ) );
  if ( name == null )
  {
    bindRequest.setName( StringTools.EMPTY );
  }
  else
  {
    bindRequest.setName( name.getName() );
  }
  
  return bind( bindRequest );
}

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

/**
   * @see java.util.Enumeration#nextElement()
   */
  public SearchResult nextElement()
  {
    try
    {
      ServerSearchResult rec = result.next();
      SearchResult searchResult = new SearchResult( 
          rec.getDn().getName(), 
          rec.getObject(), 
          toBasicAttributes( rec.getServerEntry() ), 
          rec.isRelative() );
      
      return searchResult;
    }
    catch ( NamingException ne )
    {
      NoSuchElementException nsee = 
        new NoSuchElementException( I18n.err( I18n.ERR_468 ) );
      nsee.initCause( ne );
      throw nsee;
    }
  }
};

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

/**
 * {@inheritDoc}
 */
public Element toDsml( Element root )
{
  Element element = super.toDsml( root );
  ModifyDNRequestCodec request = ( ModifyDNRequestCodec ) instance;
  // DN
  if ( request.getEntry() != null )
  {
    element.addAttribute( "dn", request.getEntry().getName() );
  }
  // NewRDN
  if ( request.getNewRDN() != null )
  {
    element.addAttribute( "newrdn", request.getNewRDN().getName() );
  }
  // DeleteOldRDN
  element.addAttribute( "deleteoldrdn", ( request.isDeleteOldRDN() ? "true" : "false" ) );
  // NewSuperior
  if ( request.getNewRDN() != null )
  {
    element.addAttribute( "newSuperior", request.getNewSuperior().getName() );
  }
  return element;
}

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

reverted.setNewSuperior( oldSuperior.getName() );

相关文章