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

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

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

Partition.getSuffixDn介绍

[英]Gets the normalized suffix as an Dn for this Partition after it has been initialized. Attempts to get this Dn before initialization throw an IllegalStateException.
[中]在初始化分区后,获取规范化后缀作为该分区的Dn。在初始化之前尝试获取此Dn会引发IllegalStateException。

代码示例

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

/**
 * {@inheritDoc}
 */
@Override
public Dn getSuffixDn( Dn dn ) throws LdapException
{
  Partition partition = getPartition( dn );
  return partition.getSuffixDn();
}

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

public void removePartition( Partition partition ) throws Exception
{
 // Do the backend cleanup first
 try
 {
  // can be null when called before starting up
  if ( partitionNexus != null )
  {
   partitionNexus.removeContextPartition( partition.getSuffixDn() );
  }
 }
 catch ( LdapException le )
 {
  // Bad ! We can't go any further
  throw le;
 }
 // And update the set of managed partitions
 partitions.remove( partition );
}

代码示例来源:origin: stackoverflow.com

Partition testPartition = addPartition("test", "ou=test,dc=apache,dc=org");
 Partition servicePartition = addPartition("service", "ou=service,ou=test,dc=apache,dc=org");
 addIndex(infopulsePartition, "objectClass", "ou", "uid");
 addIndex(servicePartition, "objectClass", "ou", "uid");
 service.startup();
 if (!service.getAdminSession().exists(infopulsePartition.getSuffixDn())) {
   Dn dnApache = new Dn("ou=test,dc=apache,dc=org");
   Entry entryApache = service.newEntry(dnApache);
   entryApache.add("objectClass", "top", "domain", "extensibleObject");
   entryApache.add("dc", "Apache");
   service.getAdminSession().add(entryApache);
 }
 if (!service.getAdminSession().exists(servicePartition.getSuffixDn())) {
   Dn dnApache = new Dn("ou=service,ou=test,dc=apache,dc=org");
   Entry entryApache = service.newEntry(dnApache);
   entryApache.add("objectClass", "top", "domain", "extensibleObject");
   entryApache.add("dc", "Apache");
   service.getAdminSession().add(entryApache);
 }

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

/**
 * Unregisters an ContextPartition with this BackendManager.  Called for each
 * registered Backend right befor it is to be stopped.  This prevents
 * protocol server requests from reaching the Backend and effectively puts
 * the ContextPartition's naming context offline.
 *
 * Operations against the naming context should result in an LDAP BUSY
 * result code in the returnValue if the naming context is not online.
 *
 * @param partition ContextPartition component to unregister with this
 * BackendNexus.
 * @throws Exception if there are problems unregistering the partition
 */
private void unregister( Partition partition ) throws LdapException
{
  Attribute namingContexts = rootDse.get( SchemaConstants.NAMING_CONTEXTS_AT );
  if ( namingContexts != null )
  {
    namingContexts.remove( partition.getSuffixDn().getName() );
  }
  partitions.remove( partition.getSuffixDn().getName() );
}

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

LookupOperationContext loc = new LookupOperationContext( getAdminSession(), systemPartition.getSuffixDn(),
  SchemaConstants.ALL_ATTRIBUTES_ARRAY );

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

String partitionSuffix = partition.getSuffixDn().getNormName();
  partitionLookupTree.remove( partition.getSuffixDn() );

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

LOG.warn( "Failed to destroy a partition: " + partition.getSuffixDn(), e );

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

String key = partition.getSuffixDn().getNormName();
  Dn partitionSuffix = partition.getSuffixDn();
  partitionLookupTree.add( partition.getSuffixDn(), partition );

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

Cursor<Entry> cursor = session.search( partition.getSuffixDn(), SearchScope.SUBTREE, filter,
  AliasDerefMode.NEVER_DEREF_ALIASES, MANDATORY_ENTRY_ATOP_AT );
cursor.beforeFirst();

代码示例来源:origin: com.github.livesense/org.liveSense.service.apacheds

EntryFilteringCursor cursor = session.search( partition.getSuffixDn(), SearchScope.SUBTREE, filter,
    AliasDerefMode.NEVER_DEREF_ALIASES, SchemaConstants.OBJECT_CLASS_AT_OID, SchemaConstants.ENTRY_UUID_AT_OID, SchemaConstants.ENTRY_CSN_AT_OID, SchemaConstants.CREATORS_NAME_AT_OID, SchemaConstants.CREATORS_NAME_AT_OID);
cursor.beforeFirst();

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

Dn contextDn = partition.getSuffixDn();
PartitionTxn partitionTxn = partition.beginReadTransaction();
HasEntryOperationContext hasEntryContext = new HasEntryOperationContext(
Dn contextDn = partition.getSuffixDn();
HasEntryOperationContext hasEntryContext = new HasEntryOperationContext(
  searchContext.getSession(), contextDn );

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

partitions.add( schemaPartition );
systemPartition.setCacheService( cacheService );
systemPartition.getSuffixDn().apply( schemaManager );
    .getSuffixDn().getName();
  partitionNexus.getRootDse( null ).add( SchemaConstants.CHANGELOG_CONTEXT_AT, clSuffix );

代码示例来源:origin: keeps/roda

if (!session.exists(rodaPartition.getSuffixDn())) {

相关文章