org.apache.directory.server.core.api.partition.Partition.lookup()方法的使用及代码示例

x33g5p2x  于2022-01-26 转载在 其他  
字(2.5k)|赞(0)|评价(0)|浏览(366)

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

Partition.lookup介绍

[英]Looks up an entry by distinguished/absolute name. This is a simplified version of the search operation used to point read an entry used for convenience. Depending on the context parameters, we my look for a simple entry, or for a restricted set of attributes for this entry
[中]按可分辨/绝对名称查找条目。这是一个简化版的搜索操作,用于点读一个方便使用的条目。根据上下文参数,我们将查找一个简单的条目,或该条目的一组受限属性

代码示例

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

/**
 * {@inheritDoc}
 */
public Entry lookup( LookupOperationContext lookupContext ) throws LdapException
{
  return wrapped.lookup( lookupContext );
}

代码示例来源:origin: org.apache.knox/gateway-test-ldap

SchemaConstants.ALL_ATTRIBUTES_ARRAY );
Entry entry = systemPartition.lookup( loc );

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

/**
 * {@inheritDoc}
 */
@Override
public Entry lookup( LookupOperationContext lookupContext ) throws LdapException
{
  Dn dn = lookupContext.getDn();
  if ( dn.getNormName().equals( subschemaSubentryDn.getNormName() ) )
  {
    return new ClonedServerEntry( rootDse.clone() );
  }
  // This is for the case we do a lookup on the rootDSE
  if ( dn.isRootDse() )
  {
    return new ClonedServerEntry( rootDse );
  }
  Partition partition = getPartition( dn );
  Entry entry = partition.lookup( lookupContext );
  if ( entry == null )
  {
    throw new LdapNoSuchObjectException( "Attempt to lookup non-existant entry: "
      + dn.getName() );
  }
  return entry;
}

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

entry = systemPartition.lookup( lookupContext );

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

/**
 * {@inheritDoc}
 */
public void modify( ModifyOperationContext modifyContext ) throws LdapException
{
  Entry entry = modifyContext.getEntry();
  if ( entry == null )
  {
    LookupOperationContext lookupCtx = new LookupOperationContext( modifyContext.getSession(),
      modifyContext.getDn() );
    lookupCtx.setPartition( this );
    lookupCtx.setTransaction( modifyContext.getTransaction() );
    entry = wrapped.lookup( lookupCtx );
    modifyContext.setEntry( entry );
  }
  Entry targetEntry = SchemaUtils.getTargetEntry( modifyContext.getModItems(), entry );
  boolean cascade = modifyContext.hasRequestControl( Cascade.OID );
  boolean hasModification = synchronizer.modify( modifyContext, targetEntry, cascade );
  if ( hasModification )
  {
    wrapped.modify( modifyContext );
  }
  if ( !modifyContext.getDn().equals( schemaModificationDN ) )
  {
    updateSchemaModificationAttributes( modifyContext );
  }
}

相关文章