Class AbstractSchemaLoader
- java.lang.Object
-
- org.apache.directory.api.ldap.model.schema.registries.AbstractSchemaLoader
-
- All Implemented Interfaces:
SchemaLoader
- Direct Known Subclasses:
DefaultSchemaLoader,JarLdifSchemaLoader,LdifSchemaLoader,SingleLdifSchemaLoader
public abstract class AbstractSchemaLoader extends Object implements SchemaLoader
An abstract class with a utility method and setListener() implemented.- Author:
- Apache Directory Project
-
-
Constructor Summary
Constructors Constructor Description AbstractSchemaLoader()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddSchema(Schema schema)Add a new schema to the schema's listCollection<Schema>getAllEnabled()Collection<Schema>getAllSchemas()SchemagetSchema(String schemaName)Gets a schema object based on it's name.protected SchemagetSchema(Entry entry)Gets the schema.booleanisRelaxed()booleanisStrict()List<Entry>loadAttributeTypes(String... schemaNames)Build a list of AttributeTypes read from the underlying storage for a list of specific schema, using their nameList<Entry>loadComparators(String... schemaNames)Build a list of Comparators read from the underlying storage for a list of specific schema, using their nameList<Entry>loadDitContentRules(String... schemaNames)Build a list of DitContentRules read from the underlying storage for a list of specified schema namesList<Entry>loadDitStructureRules(String... schemaNames)Build a list of DitStructureRules read from the underlying storage for a list of specified schema namesList<Entry>loadMatchingRules(String... schemaNames)Build a list of MatchingRules read from the underlying storage for a list of specific schema, using their nameList<Entry>loadMatchingRuleUses(String... schemaNames)Build a list of MatchingRuleUses read from the underlying storage for a list of specified schema namesList<Entry>loadNameForms(String... schemaNames)Build a list of NameForms read from the underlying storage for a list of specified schema namesList<Entry>loadNormalizers(String... schemaNames)Build a list of Normalizers read from the underlying storage for a list of specified schema namesList<Entry>loadObjectClasses(String... schemaNames)Build a list of ObjectClasses read from the underlying storage for a list of specified schema namesList<Entry>loadSyntaxCheckers(String... schemaNames)Build a list of SyntaxCheckers read from the underlying storage for a list of specified schema namesList<Entry>loadSyntaxes(String... schemaNames)Build a list of Syntaxes read from the underlying storage for a list of specified schema namesvoidremoveSchema(Schema schema)Remove a schema from the schema's listvoidsetRelaxed(boolean relaxed)Set the SchemzLoader in STRICT or RELAXED mode.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.directory.api.ldap.model.schema.registries.SchemaLoader
loadAttributeTypes, loadComparators, loadDitContentRules, loadDitStructureRules, loadMatchingRules, loadMatchingRuleUses, loadNameForms, loadNormalizers, loadObjectClasses, loadSyntaxCheckers, loadSyntaxes
-
-
-
-
Method Detail
-
getAllEnabled
public final Collection<Schema> getAllEnabled()
- Specified by:
getAllEnabledin interfaceSchemaLoader- Returns:
- the list of enabled schemas
-
getAllSchemas
public final Collection<Schema> getAllSchemas()
- Specified by:
getAllSchemasin interfaceSchemaLoader- Returns:
- the list of all schemas
-
getSchema
public Schema getSchema(String schemaName)
Gets a schema object based on it's name.- Specified by:
getSchemain interfaceSchemaLoader- Parameters:
schemaName- the name of the schema to load- Returns:
- the Schema object associated with the name
-
addSchema
public void addSchema(Schema schema)
Add a new schema to the schema's list- Specified by:
addSchemain interfaceSchemaLoader- Parameters:
schema- The schema to add
-
removeSchema
public void removeSchema(Schema schema)
Remove a schema from the schema's list- Specified by:
removeSchemain interfaceSchemaLoader- Parameters:
schema- The schema to remove
-
getSchema
protected Schema getSchema(Entry entry) throws LdapException
Gets the schema.- Parameters:
entry- the entry- Returns:
- the schema
- Throws:
LdapException- the exception
-
loadAttributeTypes
public List<Entry> loadAttributeTypes(String... schemaNames) throws LdapException, IOException
Build a list of AttributeTypes read from the underlying storage for a list of specific schema, using their name- Specified by:
loadAttributeTypesin interfaceSchemaLoader- Parameters:
schemaNames- the schema names from which AttributeTypes are loaded- Returns:
- The list of loaded AttributeTypes
- Throws:
LdapException- if there are failures accessing AttributeType informationIOException- If we can't read the schemaObject
-
loadComparators
public List<Entry> loadComparators(String... schemaNames) throws LdapException, IOException
Build a list of Comparators read from the underlying storage for a list of specific schema, using their name- Specified by:
loadComparatorsin interfaceSchemaLoader- Parameters:
schemaNames- the schema names from which Comparators are loaded- Returns:
- The list of loaded Comparators
- Throws:
LdapException- if there are failures accessing Comparator informationIOException- If we can't read the schemaObject
-
loadDitContentRules
public List<Entry> loadDitContentRules(String... schemaNames) throws LdapException, IOException
Build a list of DitContentRules read from the underlying storage for a list of specified schema names- Specified by:
loadDitContentRulesin interfaceSchemaLoader- Parameters:
schemaNames- the schema names from which DitContentRules are loaded- Returns:
- The list of loaded DitContentRules
- Throws:
LdapException- if there are failures accessing DitContentRule informationIOException- If we can't read the schemaObject
-
loadDitStructureRules
public List<Entry> loadDitStructureRules(String... schemaNames) throws LdapException, IOException
Build a list of DitStructureRules read from the underlying storage for a list of specified schema names- Specified by:
loadDitStructureRulesin interfaceSchemaLoader- Parameters:
schemaNames- the schema names from which DitStructureRules are loaded- Returns:
- The list of loaded DitStructureRules
- Throws:
LdapException- if there are failures accessing DitStructureRule informationIOException- If we can't read the schemaObject
-
loadMatchingRules
public List<Entry> loadMatchingRules(String... schemaNames) throws LdapException, IOException
Build a list of MatchingRules read from the underlying storage for a list of specific schema, using their name- Specified by:
loadMatchingRulesin interfaceSchemaLoader- Parameters:
schemaNames- the schema names from which MatchingRules are loaded- Returns:
- The list of loaded MatchingRules
- Throws:
LdapException- if there are failures accessing MatchingRule informationIOException- If we can't read the schemaObject
-
loadMatchingRuleUses
public List<Entry> loadMatchingRuleUses(String... schemaNames) throws LdapException, IOException
Build a list of MatchingRuleUses read from the underlying storage for a list of specified schema names- Specified by:
loadMatchingRuleUsesin interfaceSchemaLoader- Parameters:
schemaNames- the schema names from which MatchingRuleUses are loaded- Returns:
- The list of loaded MatchingRuleUses
- Throws:
LdapException- if there are failures accessing MatchingRuleUses informationIOException- If we can't read the schemaObject
-
loadNameForms
public List<Entry> loadNameForms(String... schemaNames) throws LdapException, IOException
Build a list of NameForms read from the underlying storage for a list of specified schema names- Specified by:
loadNameFormsin interfaceSchemaLoader- Parameters:
schemaNames- the schema names from which NameForms are loaded- Returns:
- The list of loaded NameForms
- Throws:
LdapException- if there are failures accessing NameForms informationIOException- If we can't read the schemaObject
-
loadNormalizers
public List<Entry> loadNormalizers(String... schemaNames) throws LdapException, IOException
Build a list of Normalizers read from the underlying storage for a list of specified schema names- Specified by:
loadNormalizersin interfaceSchemaLoader- Parameters:
schemaNames- the schema names from which Normalizers are loaded- Returns:
- The list of loaded Normalizers
- Throws:
LdapException- if there are failures accessing Normalizer informationIOException- If we can't read the schemaObject
-
loadObjectClasses
public List<Entry> loadObjectClasses(String... schemaNames) throws LdapException, IOException
Build a list of ObjectClasses read from the underlying storage for a list of specified schema names- Specified by:
loadObjectClassesin interfaceSchemaLoader- Parameters:
schemaNames- the schema names from which ObjectClasses are loaded- Returns:
- The list of loaded ObjectClasses
- Throws:
LdapException- if there are failures accessing ObjectClasses informationIOException- If we can't read the schemaObject
-
loadSyntaxes
public List<Entry> loadSyntaxes(String... schemaNames) throws LdapException, IOException
Build a list of Syntaxes read from the underlying storage for a list of specified schema names- Specified by:
loadSyntaxesin interfaceSchemaLoader- Parameters:
schemaNames- the schema names from which Syntaxes are loaded- Returns:
- The list of loaded Syntaxes
- Throws:
LdapException- if there are failures accessing Syntax informationIOException- If we can't read the schemaObject
-
loadSyntaxCheckers
public List<Entry> loadSyntaxCheckers(String... schemaNames) throws LdapException, IOException
Build a list of SyntaxCheckers read from the underlying storage for a list of specified schema names- Specified by:
loadSyntaxCheckersin interfaceSchemaLoader- Parameters:
schemaNames- the schema names from which SyntaxCheckers are loaded- Returns:
- A list of loaded SyntaxCheckers
- Throws:
LdapException- if there are failures accessing SyntaxChecker informationIOException- If we had some issues loading the schemas
-
isRelaxed
public boolean isRelaxed()
- Specified by:
isRelaxedin interfaceSchemaLoader- Returns:
- Tells if the SchemaLoader is in RELAXED mode
-
isStrict
public boolean isStrict()
- Specified by:
isStrictin interfaceSchemaLoader- Returns:
- Tells if the SchemaLoader is in STRICT mode
-
setRelaxed
public void setRelaxed(boolean relaxed)
Set the SchemzLoader in STRICT or RELAXED mode.- Specified by:
setRelaxedin interfaceSchemaLoader- Parameters:
relaxed- iftrue, the SchemaLoader will be in relaxed mode, otherwise it will be in strict mode (the default)
-
-