当前位置: 首页>>代码示例>>Java>>正文


Java DirectoryService.getPartitionNexus方法代码示例

本文整理汇总了Java中org.apache.directory.server.core.api.DirectoryService.getPartitionNexus方法的典型用法代码示例。如果您正苦于以下问题:Java DirectoryService.getPartitionNexus方法的具体用法?Java DirectoryService.getPartitionNexus怎么用?Java DirectoryService.getPartitionNexus使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.apache.directory.server.core.api.DirectoryService的用法示例。


在下文中一共展示了DirectoryService.getPartitionNexus方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: init

import org.apache.directory.server.core.api.DirectoryService; //导入方法依赖的package包/类
/**
 * {@inheritDoc}
 */
public void init( DirectoryService directoryService ) throws LdapException
{
    super.init( directoryService );
    nexus = directoryService.getPartitionNexus();
    Value<?> attr = nexus.getRootDse( null ).get( SchemaConstants.SUBSCHEMA_SUBENTRY_AT ).get();
    subschemSubentryDn = directoryService.getDnFactory().create( attr.getString() );
}
 
开发者ID:TremoloSecurity,项目名称:MyVirtualDirectory,代码行数:11,代码来源:ExceptionInterceptor.java

示例2: init

import org.apache.directory.server.core.api.DirectoryService; //导入方法依赖的package包/类
/**
 * Initialize the Schema Service
 *
 * @param directoryService the directory service core
 * @throws Exception if there are problems during initialization
 */
public void init( DirectoryService directoryService ) throws LdapException
{
    if ( IS_DEBUG )
    {
        LOG.debug( "Initializing SchemaInterceptor..." );
    }

    super.init( directoryService );

    nexus = directoryService.getPartitionNexus();
    topFilter = new TopFilter();
    filters.add( topFilter );

    schemaBaseDn = directoryService.getDnFactory().create( SchemaConstants.OU_SCHEMA );

    // stuff for dealing with subentries (garbage for now)
    Value<?> subschemaSubentry = nexus.getRootDse( null ).get( SchemaConstants.SUBSCHEMA_SUBENTRY_AT ).get();
    subschemaSubentryDn = directoryService.getDnFactory().create( subschemaSubentry.getString() );
    subschemaSubentryDn.apply( schemaManager );
    subschemaSubentryDnNorm = subschemaSubentryDn.getNormName();

    schemaModificationAttributesDn = directoryService.getDnFactory().create(
        SchemaConstants.SCHEMA_MODIFICATIONS_DN );
    schemaModificationAttributesDn.apply( schemaManager );

    computeSuperiors();

    // Initialize the schema manager
    SchemaLoader loader = directoryService.getSchemaManager().getLoader();
    schemaSubEntryManager = new SchemaSubentryManager( schemaManager, loader, directoryService.getDnFactory() );

    if ( IS_DEBUG )
    {
        LOG.debug( "SchemaInterceptor Initialized !" );
    }
}
 
开发者ID:TremoloSecurity,项目名称:MyVirtualDirectory,代码行数:43,代码来源:SchemaInterceptor.java

示例3: init

import org.apache.directory.server.core.api.DirectoryService; //导入方法依赖的package包/类
/**
 * {@inheritDoc}
 */
public void init( DirectoryService directoryService ) throws LdapException
{
    super.init( directoryService );
    nexus = directoryService.getPartitionNexus();
    Value<?> attr = nexus.getRootDseValue( SUBSCHEMA_SUBENTRY_AT );
    subschemSubentryDn = dnFactory.create( attr.getString() );
}
 
开发者ID:TremoloSecurity,项目名称:MyVirtualDirectory,代码行数:11,代码来源:ExceptionInterceptor.java

示例4: init

import org.apache.directory.server.core.api.DirectoryService; //导入方法依赖的package包/类
/**
 * Initialize the Schema Service
 *
 * @param directoryService the directory service core
 * @throws Exception if there are problems during initialization
 */
public void init( DirectoryService directoryService ) throws LdapException
{
    if ( IS_DEBUG )
    {
        LOG.debug( "Initializing SchemaInterceptor..." );
    }

    super.init( directoryService );

    nexus = directoryService.getPartitionNexus();
    topFilter = new TopFilter();
    filters.add( topFilter );

    schemaBaseDn = dnFactory.create( SchemaConstants.OU_SCHEMA );

    // stuff for dealing with subentries (garbage for now)
    Value<?> subschemaSubentry = nexus.getRootDseValue( SUBSCHEMA_SUBENTRY_AT );
    subschemaSubentryDn = dnFactory.create( subschemaSubentry.getString() );
    subschemaSubentryDnNorm = subschemaSubentryDn.getNormName();

    schemaModificationAttributesDn = dnFactory.create(
        SchemaConstants.SCHEMA_MODIFICATIONS_DN );

    computeSuperiors();

    // Initialize the schema manager
    SchemaLoader loader = directoryService.getSchemaManager().getLoader();
    schemaSubEntryManager = new SchemaSubentryManager( schemaManager, loader, dnFactory );

    if ( IS_DEBUG )
    {
        LOG.debug( "SchemaInterceptor Initialized !" );
    }
}
 
开发者ID:TremoloSecurity,项目名称:MyVirtualDirectory,代码行数:41,代码来源:SchemaInterceptor.java

示例5: isSubSchemaSubEntrySearch

import org.apache.directory.server.core.api.DirectoryService; //导入方法依赖的package包/类
/**
 * <p>
 * Determines if a search request is a subSchemaSubEntry search.
 * </p>
 * <p>
 * It is a schema search if:
 * - the base Dn is the Dn of the subSchemaSubEntry of the root DSE
 * - and the scope is BASE OBJECT
 * - and the filter is (objectClass=subschema)
 * (RFC 4512, 4.4,)
 * </p>
 * <p>
 * However in this method we only check the first condition to avoid
 * performance issues.
 * </p>
 *
 * @param session the LDAP session
 * @param req the request issued
 *
 * @return true if the search is on the subSchemaSubEntry, false otherwise
 *
 * @throws Exception the exception
 */
private boolean isSubSchemaSubEntrySearch( LdapSession session, SearchRequest req ) throws Exception
{
    Dn base = req.getBase();
    String baseNormForm = ( base.isSchemaAware() ? base.getNormName() : base.getNormName() );

    DirectoryService ds = session.getCoreSession().getDirectoryService();
    PartitionNexus nexus = ds.getPartitionNexus();

    if ( SUBSCHEMA_SUBENTRY_AT == null )
    {
        SUBSCHEMA_SUBENTRY_AT = session.getCoreSession().getDirectoryService().getSchemaManager().getAttributeType(
            SchemaConstants.SUBSCHEMA_SUBENTRY_AT );
    }

    Value<?> subschemaSubentry = nexus.getRootDseValue( SUBSCHEMA_SUBENTRY_AT );
    Dn subschemaSubentryDn = ds.getDnFactory().create( subschemaSubentry.getString() );
    String subschemaSubentryDnNorm = subschemaSubentryDn.getNormName();

    return subschemaSubentryDnNorm.equals( baseNormForm );
}
 
开发者ID:TremoloSecurity,项目名称:MyVirtualDirectory,代码行数:44,代码来源:SearchRequestHandler.java

示例6: isSubSchemaSubEntrySearch

import org.apache.directory.server.core.api.DirectoryService; //导入方法依赖的package包/类
/**
 * <p>
 * Determines if a search request is a subSchemaSubEntry search.
 * </p>
 * <p>
 * It is a schema search if:
 * - the base Dn is the Dn of the subSchemaSubEntry of the root DSE
 * - and the scope is BASE OBJECT
 * - and the filter is (objectClass=subschema)
 * (RFC 4512, 4.4,)
 * </p>
 * <p>
 * However in this method we only check the first condition to avoid
 * performance issues.
 * </p>
 *
 * @param session the LDAP session
 * @param req the request issued
 *
 * @return true if the search is on the subSchemaSubEntry, false otherwise
 *
 * @throws Exception the exception
 */
private boolean isSubSchemaSubEntrySearch( LdapSession session, SearchRequest req ) throws Exception
{
    Dn base = req.getBase();
    String baseNormForm = ( base.isSchemaAware() ? base.getNormName() : base.getNormName() );

    DirectoryService ds = session.getCoreSession().getDirectoryService();
    PartitionNexus nexus = ds.getPartitionNexus();
    Value<?> subschemaSubentry = nexus.getRootDse( null ).get( SchemaConstants.SUBSCHEMA_SUBENTRY_AT ).get();
    Dn subschemaSubentryDn = new Dn( ds.getSchemaManager(), subschemaSubentry.getString() );
    String subschemaSubentryDnNorm = subschemaSubentryDn.getNormName();

    return subschemaSubentryDnNorm.equals( baseNormForm );
}
 
开发者ID:TremoloSecurity,项目名称:MyVirtualDirectory,代码行数:37,代码来源:SearchRequestHandler.java


注:本文中的org.apache.directory.server.core.api.DirectoryService.getPartitionNexus方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。