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 void
addSchema(Schema schema)
Add a new schema to the schema's listCollection<Schema>
getAllEnabled()
Collection<Schema>
getAllSchemas()
Schema
getSchema(String schemaName)
Gets a schema object based on it's name.boolean
isRelaxed()
boolean
isStrict()
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 namesvoid
removeSchema(Schema schema)
Remove a schema from the schema's listvoid
setRelaxed(boolean relaxed)
Set the SchemzLoader in STRICT or RELAXED mode.-
Methods inherited from class java.lang.Object
equals, 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
-
-
-
-
Constructor Detail
-
AbstractSchemaLoader
public AbstractSchemaLoader()
-
-
Method Detail
-
getAllEnabled
public final Collection<Schema> getAllEnabled()
- Specified by:
getAllEnabled
in interfaceSchemaLoader
- Returns:
- the list of enabled schemas
-
getAllSchemas
public final Collection<Schema> getAllSchemas()
- Specified by:
getAllSchemas
in interfaceSchemaLoader
- Returns:
- the list of all schemas
-
getSchema
public Schema getSchema(String schemaName)
Gets a schema object based on it's name.- Specified by:
getSchema
in 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:
addSchema
in interfaceSchemaLoader
- Parameters:
schema
- The schema to add
-
removeSchema
public void removeSchema(Schema schema)
Remove a schema from the schema's list- Specified by:
removeSchema
in interfaceSchemaLoader
- Parameters:
schema
- The schema to remove
-
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:
loadAttributeTypes
in 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:
loadComparators
in 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:
loadDitContentRules
in 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:
loadDitStructureRules
in 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:
loadMatchingRules
in 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:
loadMatchingRuleUses
in 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:
loadNameForms
in 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:
loadNormalizers
in 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:
loadObjectClasses
in 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:
loadSyntaxes
in 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:
loadSyntaxCheckers
in 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:
isRelaxed
in interfaceSchemaLoader
- Returns:
- Tells if the SchemaLoader is in RELAXED mode
-
isStrict
public boolean isStrict()
- Specified by:
isStrict
in 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:
setRelaxed
in interfaceSchemaLoader
- Parameters:
relaxed
- iftrue
, the SchemaLoader will be in relaxed mode, otherwise it will be in strict mode (the default)
-
-