本文整理汇总了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;
}
示例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;
}
示例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;
}
示例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 );
}
示例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 );
}
示例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;
}
示例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();
}