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


Java Schema.isEnabled方法代码示例

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


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

示例1: getEnabled

import org.apache.directory.api.ldap.model.schema.registries.Schema; //导入方法依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
public List<Schema> getEnabled()
{
    List<Schema> enabled = new ArrayList<>();

    for ( Schema schema : registries.getLoadedSchemas().values() )
    {
        if ( schema.isEnabled() )
        {
            enabled.add( schema );
        }
    }

    return enabled;
}
 
开发者ID:apache,项目名称:directory-ldap-api,代码行数:19,代码来源:DefaultSchemaManager.java

示例2: getAllSchemas

import org.apache.directory.api.ldap.model.schema.registries.Schema; //导入方法依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
public List<Schema> getAllSchemas()
{
    List<Schema> schemas = new ArrayList<>();

    for ( Schema schema : schemaMap.values() )
    {
        if ( schema.isEnabled() )
        {
            schemas.add( schema );
        }
    }

    return schemas;
}
 
开发者ID:apache,项目名称:directory-ldap-api,代码行数:19,代码来源:DefaultSchemaManager.java

示例3: unload

import org.apache.directory.api.ldap.model.schema.registries.Schema; //导入方法依赖的package包/类
/**
 * Unload the schema from the registries. We will unload everything accordingly to the two flags :
 * - isRelaxed
 * - disabledAccepted
 */
private boolean unload( Registries registries, Schema schema ) throws LdapException
{
    if ( schema == null )
    {
        LOG.info( "The schema is null" );
        return false;
    }

    // First avoid unloading twice the same schema
    if ( !registries.isSchemaLoaded( schema.getSchemaName() ) )
    {
        return true;
    }

    if ( schema.isEnabled() )
    {
        LOG.info( "Unloading {} schema: \n{}", schema.getSchemaName(), schema );

        deleteSchemaObjects( schema, registries );
        registries.schemaUnloaded( schema );
    }

    return true;
}
 
开发者ID:apache,项目名称:directory-ldap-api,代码行数:30,代码来源:DefaultSchemaManager.java

示例4: loadAllEnabled

import org.apache.directory.api.ldap.model.schema.registries.Schema; //导入方法依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
public boolean loadAllEnabled() throws LdapException
{
    Schema[] schemas = new Schema[schemaMap.size()];
    int i = 0;
    
    for ( Schema schema : schemaMap.values() )
    {
        if ( schema.isEnabled() )
        {
            schemas[i++] = schema;
        }
    }
    
    Schema[] enabledSchemas = new Schema[i];
    System.arraycopy( schemas, 0, enabledSchemas, 0, i );
    
    return loadWithDeps( enabledSchemas );
}
 
开发者ID:apache,项目名称:directory-ldap-api,代码行数:23,代码来源:DefaultSchemaManager.java

示例5: loadAllEnabledRelaxed

import org.apache.directory.api.ldap.model.schema.registries.Schema; //导入方法依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
public boolean loadAllEnabledRelaxed() throws LdapException
{
    Schema[] enabledSchemas = new Schema[schemaMap.size()];
    int i = 0;
    
    for ( Schema schema : schemaMap.values() )
    {
        if ( schema.isEnabled() )
        {
            enabledSchemas[i++] = schema;
        }
    }
    
    return loadWithDepsRelaxed( enabledSchemas );
}
 
开发者ID:apache,项目名称:directory-ldap-api,代码行数:20,代码来源:DefaultSchemaManager.java

示例6: addSchemaObject

import org.apache.directory.api.ldap.model.schema.registries.Schema; //导入方法依赖的package包/类
/**
 * Add the schemaObject into the registries.
 *
 * @param registries The Registries
 * @param schemaObject The SchemaObject containing the SchemaObject description
 * @param schema The associated schema
 * @return the created schemaObject instance
 * @throws LdapException If the registering failed
 */
private SchemaObject addSchemaObject( Registries registries, SchemaObject schemaObject, Schema schema )
    throws LdapException
{
    if ( registries.isRelaxed() )
    {
        if ( registries.isDisabledAccepted() || ( schema.isEnabled() && schemaObject.isEnabled() ) )
        {
            registries.add( errors, schemaObject, false );
        }
        else
        {
            errors.add( new Throwable() );
        }
    }
    else
    {
        if ( schema.isEnabled() && schemaObject.isEnabled() )
        {
            registries.add( errors, schemaObject, false );
        }
        else
        {
            errors.add( new Throwable() );
        }
    }

    return schemaObject;
}
 
开发者ID:apache,项目名称:directory-ldap-api,代码行数:38,代码来源:DefaultSchemaManager.java

示例7: isEnabled

import org.apache.directory.api.ldap.model.schema.registries.Schema; //导入方法依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
public boolean isEnabled( String schemaName )
{
    Schema schema = registries.getLoadedSchema( schemaName );

    return ( schema != null ) && schema.isEnabled();
}
 
开发者ID:apache,项目名称:directory-ldap-api,代码行数:11,代码来源:DefaultSchemaManager.java


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