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

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

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

Partition.hasEntry介绍

[英]Fast operation to check and see if a particular entry exists.
[中]快速操作以检查是否存在特定条目。

代码示例

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

/**
 * {@inheritDoc}
 */
public boolean hasEntry( HasEntryOperationContext hasEntryContext ) throws LdapException
{
  return wrapped.hasEntry( hasEntryContext );
}

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

/**
 * {@inheritDoc}
 */
@Override
public boolean hasEntry( HasEntryOperationContext hasEntryContext ) throws LdapException
{
  Dn dn = hasEntryContext.getDn();
  if ( IS_DEBUG )
  {
    LOG.debug( "Check if Dn '" + dn + "' exists." );
  }
  if ( dn.isRootDse() )
  {
    return true;
  }
  Partition partition = getPartition( dn );
  return partition.hasEntry( hasEntryContext );
}

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

private void initializeSystemPartition() throws Exception
{
 Partition system = getSystemPartition();
 // Add root context entry for system partition
 Dn systemSuffixDn = getDnFactory().create( ServerDNConstants.SYSTEM_DN );
 CoreSession adminSession = getAdminSession();
 if ( !system.hasEntry( new HasEntryOperationContext( adminSession, systemSuffixDn ) ) )
 {
  Entry systemEntry = new DefaultEntry( schemaManager, systemSuffixDn );
  // Add the ObjectClasses
  systemEntry.put( SchemaConstants.OBJECT_CLASS_AT, SchemaConstants.TOP_OC,
    SchemaConstants.ORGANIZATIONAL_UNIT_OC, SchemaConstants.EXTENSIBLE_OBJECT_OC );
  // Add some operational attributes
  systemEntry.put( SchemaConstants.CREATORS_NAME_AT, ServerDNConstants.ADMIN_SYSTEM_DN );
  systemEntry.put( SchemaConstants.CREATE_TIMESTAMP_AT, DateUtils.getGeneralizedTime() );
  systemEntry.add( SchemaConstants.ENTRY_CSN_AT, getCSN().toString() );
  systemEntry.add( SchemaConstants.ENTRY_UUID_AT, UUID.randomUUID().toString() );
  systemEntry.put( DnUtils.getRdnAttributeType( ServerDNConstants.SYSTEM_DN ), DnUtils
    .getRdnValue( ServerDNConstants.SYSTEM_DN ) );
  AddOperationContext addOperationContext = new AddOperationContext( adminSession, systemEntry );
  system.add( addOperationContext );
 }
}

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

if ( partition.hasEntry( hasEntryContext ) )
searchContext.setTransaction( partitionTxn );
if ( partition.hasEntry( hasEntryContext ) )

相关文章