Class DefaultSchemaLoader
- java.lang.Object
-
- org.apache.directory.api.ldap.model.schema.registries.AbstractSchemaLoader
-
- org.apache.directory.ldap.client.api.DefaultSchemaLoader
-
- All Implemented Interfaces:
SchemaLoader
public class DefaultSchemaLoader extends AbstractSchemaLoader
A schema loader which uses LdapConnection to load schema from a ApacheDS serveur- Author:
- Apache Directory Project
-
-
Constructor Summary
Constructors Constructor Description DefaultSchemaLoader(LdapConnection connection)
Creates a new instance of DefaultSchemaLoader.DefaultSchemaLoader(LdapConnection connection, boolean relaxed)
Creates a new instance of DefaultSchemaLoader.DefaultSchemaLoader(LdapConnection connection, Dn subschemaSubentryDn)
Creates a new instance of NetworkSchemaLoader.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<Entry>
loadAttributeTypes(Schema... schemas)
Build a list of AttributeTypes read from the underlying storage for a list of specified schemaList<Entry>
loadComparators(Schema... schemas)
Build a list of Comparators read from the underlying storage for a list of specific schema.List<Entry>
loadDitContentRules(Schema... schemas)
Build a list of DitContentRules read from the underlying storage for a list of specific schema.List<Entry>
loadDitStructureRules(Schema... schemas)
Build a list of DitStructureRules read from the underlying storage for a list of specific schema.List<Entry>
loadMatchingRules(Schema... schemas)
Build a list of MatchingRules read from the underlying storage for a list of specific schemaList<Entry>
loadMatchingRuleUses(Schema... schemas)
Build a list of MatchingRuleUses read from the underlying storage for a list of specific schema.List<Entry>
loadNameForms(Schema... schemas)
Build a list of NameForms read from the underlying storage for a list of specific schema.List<Entry>
loadNormalizers(Schema... schemas)
Build a list of Normalizers read from the underlying storage for a list of specified schemaList<Entry>
loadObjectClasses(Schema... schemas)
Build a list of ObjectClasses read from the underlying storage for a list of specific schema.List<Entry>
loadSyntaxCheckers(Schema... schemas)
Build a list of SyntaxCheckers read from the underlying storage for a list of specified schemaList<Entry>
loadSyntaxes(Schema... schemas)
Build a list of Syntaxes read from the underlying storage for a list of specified schemavoid
setQuirksMode(boolean enabled)
Sets the quirks mode for all the internal parsers.-
Methods inherited from class org.apache.directory.api.ldap.model.schema.registries.AbstractSchemaLoader
addSchema, getAllEnabled, getAllSchemas, getSchema, isRelaxed, isStrict, loadAttributeTypes, loadComparators, loadDitContentRules, loadDitStructureRules, loadMatchingRules, loadMatchingRuleUses, loadNameForms, loadNormalizers, loadObjectClasses, loadSyntaxCheckers, loadSyntaxes, removeSchema, setRelaxed
-
-
-
-
Constructor Detail
-
DefaultSchemaLoader
public DefaultSchemaLoader(LdapConnection connection) throws LdapException
Creates a new instance of DefaultSchemaLoader.- Parameters:
connection
- the LDAP connection- Throws:
LdapException
- if the connection is not authenticated or if there are any problems while loading the schema entries
-
DefaultSchemaLoader
public DefaultSchemaLoader(LdapConnection connection, boolean relaxed) throws LdapException
Creates a new instance of DefaultSchemaLoader.- Parameters:
connection
- the LDAP connectionrelaxed
- initial setting for the relaxed mode- Throws:
LdapException
- if the connection is not authenticated or if there are any problems while loading the schema entries
-
DefaultSchemaLoader
public DefaultSchemaLoader(LdapConnection connection, Dn subschemaSubentryDn) throws LdapException
Creates a new instance of NetworkSchemaLoader.- Parameters:
connection
- the LDAP connectionsubschemaSubentryDn
- The SubschemaSubentry- Throws:
LdapException
- if the connection is not authenticated or if there are any problems while loading the schema entries
-
-
Method Detail
-
loadAttributeTypes
public List<Entry> loadAttributeTypes(Schema... schemas) throws LdapException, IOException
Build a list of AttributeTypes read from the underlying storage for a list of specified schema- Parameters:
schemas
- the schemas 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(Schema... schemas) throws LdapException, IOException
Build a list of Comparators read from the underlying storage for a list of specific schema.- Parameters:
schemas
- the schemas 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(Schema... schemas) throws LdapException, IOException
Build a list of DitContentRules read from the underlying storage for a list of specific schema.- Parameters:
schemas
- the schemas 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(Schema... schemas) throws LdapException, IOException
Build a list of DitStructureRules read from the underlying storage for a list of specific schema.- Parameters:
schemas
- the schemas 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
-
loadMatchingRuleUses
public List<Entry> loadMatchingRuleUses(Schema... schemas) throws LdapException, IOException
Build a list of MatchingRuleUses read from the underlying storage for a list of specific schema.- Parameters:
schemas
- the schemas from which MatchingRuleUses are loaded- Returns:
- The list of loaded MatchingRuleUses
- Throws:
LdapException
- if there are failures accessing MatchingRuleUse informationIOException
- If we can't read the schemaObject
-
loadMatchingRules
public List<Entry> loadMatchingRules(Schema... schemas) throws LdapException, IOException
Build a list of MatchingRules read from the underlying storage for a list of specific schema- Parameters:
schemas
- the schemas 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
-
loadNameForms
public List<Entry> loadNameForms(Schema... schemas) throws LdapException, IOException
Build a list of NameForms read from the underlying storage for a list of specific schema.- Parameters:
schemas
- the schemas from which NameForms are loaded- Returns:
- The list of loaded NameForms
- Throws:
LdapException
- if there are failures accessing NameForm informationIOException
- If we can't read the schemaObject
-
loadNormalizers
public List<Entry> loadNormalizers(Schema... schemas) throws LdapException, IOException
Build a list of Normalizers read from the underlying storage for a list of specified schema- Parameters:
schemas
- the schemas 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(Schema... schemas) throws LdapException, IOException
Build a list of ObjectClasses read from the underlying storage for a list of specific schema.- Parameters:
schemas
- the schemas from which ObjectClasses are loaded- Returns:
- The list of loaded ObjectClasses
- Throws:
LdapException
- if there are failures accessing ObjectClass informationIOException
- If we can't read the schemaObject
-
loadSyntaxCheckers
public List<Entry> loadSyntaxCheckers(Schema... schemas) throws LdapException, IOException
Build a list of SyntaxCheckers read from the underlying storage for a list of specified schema- Parameters:
schemas
- the schemas from which SyntaxCheckers are loaded- Returns:
- The list of loaded SyntaxeCheckers
- Throws:
LdapException
- if there are failures accessing SyntaxChecker informationIOException
- If we can't read the schemaObject
-
loadSyntaxes
public List<Entry> loadSyntaxes(Schema... schemas) throws LdapException, IOException
Build a list of Syntaxes read from the underlying storage for a list of specified schema- Parameters:
schemas
- the schemas 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
-
setQuirksMode
public void setQuirksMode(boolean enabled)
Sets the quirks mode for all the internal parsers. If enabled the parser accepts non-numeric OIDs and some special characters in descriptions.- Parameters:
enabled
- the new quirks mode
-
-