Class DefaultSchemaLoader
java.lang.Object
org.apache.directory.api.ldap.model.schema.registries.AbstractSchemaLoader
org.apache.directory.ldap.client.api.DefaultSchemaLoader
- All Implemented Interfaces:
org.apache.directory.api.ldap.model.schema.registries.SchemaLoader
public class DefaultSchemaLoader
extends org.apache.directory.api.ldap.model.schema.registries.AbstractSchemaLoader
A schema loader which uses LdapConnection to load schema from a ApacheDS serveur
- Author:
- Apache Directory Project
-
Field Summary
Fields inherited from class org.apache.directory.api.ldap.model.schema.registries.AbstractSchemaLoader
schemaMap -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedA default constructorDefaultSchemaLoader(LdapConnection connection) Creates a new instance of DefaultSchemaLoader.DefaultSchemaLoader(LdapConnection connection, boolean relaxed) Creates a new instance of DefaultSchemaLoader.DefaultSchemaLoader(LdapConnection connection, org.apache.directory.api.ldap.model.name.Dn subschemaSubentryDn) Creates a new instance of NetworkSchemaLoader. -
Method Summary
Modifier and TypeMethodDescriptionprotected LdapConnectionGet the LdapConnecgion instanceList<org.apache.directory.api.ldap.model.entry.Entry> loadAttributeTypes(org.apache.directory.api.ldap.model.schema.registries.Schema... schemas) List<org.apache.directory.api.ldap.model.entry.Entry> loadComparators(org.apache.directory.api.ldap.model.schema.registries.Schema... schemas) List<org.apache.directory.api.ldap.model.entry.Entry> loadDitContentRules(org.apache.directory.api.ldap.model.schema.registries.Schema... schemas) List<org.apache.directory.api.ldap.model.entry.Entry> loadDitStructureRules(org.apache.directory.api.ldap.model.schema.registries.Schema... schemas) List<org.apache.directory.api.ldap.model.entry.Entry> loadMatchingRules(org.apache.directory.api.ldap.model.schema.registries.Schema... schemas) List<org.apache.directory.api.ldap.model.entry.Entry> loadMatchingRuleUses(org.apache.directory.api.ldap.model.schema.registries.Schema... schemas) List<org.apache.directory.api.ldap.model.entry.Entry> loadNameForms(org.apache.directory.api.ldap.model.schema.registries.Schema... schemas) List<org.apache.directory.api.ldap.model.entry.Entry> loadNormalizers(org.apache.directory.api.ldap.model.schema.registries.Schema... schemas) List<org.apache.directory.api.ldap.model.entry.Entry> loadObjectClasses(org.apache.directory.api.ldap.model.schema.registries.Schema... schemas) List<org.apache.directory.api.ldap.model.entry.Entry> loadSyntaxCheckers(org.apache.directory.api.ldap.model.schema.registries.Schema... schemas) List<org.apache.directory.api.ldap.model.entry.Entry> loadSyntaxes(org.apache.directory.api.ldap.model.schema.registries.Schema... schemas) protected voidsetConnection(LdapConnection connection) Set the LdapConnection to usevoidsetQuirksMode(boolean enabled) Sets the quirks mode for all the internal parsers.protected voidupdateSchemas(org.apache.directory.api.ldap.model.schema.SchemaObject schemaObject) Update the schema with the provided schema objectMethods inherited from class org.apache.directory.api.ldap.model.schema.registries.AbstractSchemaLoader
addSchema, getAllEnabled, getAllSchemas, getSchema, getSchema, isRelaxed, isStrict, loadAttributeTypes, loadComparators, loadDitContentRules, loadDitStructureRules, loadMatchingRules, loadMatchingRuleUses, loadNameForms, loadNormalizers, loadObjectClasses, loadSyntaxCheckers, loadSyntaxes, removeSchema, setRelaxed
-
Constructor Details
-
DefaultSchemaLoader
protected DefaultSchemaLoader() throws org.apache.directory.api.ldap.model.exception.LdapExceptionA default constructor- Throws:
org.apache.directory.api.ldap.model.exception.LdapException- If the instance creation failed
-
DefaultSchemaLoader
public DefaultSchemaLoader(LdapConnection connection) throws org.apache.directory.api.ldap.model.exception.LdapException Creates a new instance of DefaultSchemaLoader.- Parameters:
connection- the LDAP connection- Throws:
org.apache.directory.api.ldap.model.exception.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 org.apache.directory.api.ldap.model.exception.LdapException Creates a new instance of DefaultSchemaLoader.- Parameters:
connection- the LDAP connectionrelaxed- initial setting for the relaxed mode- Throws:
org.apache.directory.api.ldap.model.exception.LdapException- if the connection is not authenticated or if there are any problems while loading the schema entries
-
DefaultSchemaLoader
public DefaultSchemaLoader(LdapConnection connection, org.apache.directory.api.ldap.model.name.Dn subschemaSubentryDn) throws org.apache.directory.api.ldap.model.exception.LdapException Creates a new instance of NetworkSchemaLoader.- Parameters:
connection- the LDAP connectionsubschemaSubentryDn- The SubschemaSubentry- Throws:
org.apache.directory.api.ldap.model.exception.LdapException- if the connection is not authenticated or if there are any problems while loading the schema entries
-
-
Method Details
-
getConnection
Get the LdapConnecgion instance- Returns:
- the LdapConnecgion instance
-
setConnection
Set the LdapConnection to use- Parameters:
connection- The LdapConnection to use
-
updateSchemas
protected void updateSchemas(org.apache.directory.api.ldap.model.schema.SchemaObject schemaObject) Update the schema with the provided schema object- Parameters:
schemaObject- The schema object to add to the current schema
-
loadAttributeTypes
public List<org.apache.directory.api.ldap.model.entry.Entry> loadAttributeTypes(org.apache.directory.api.ldap.model.schema.registries.Schema... schemas) throws org.apache.directory.api.ldap.model.exception.LdapException, IOException - Throws:
org.apache.directory.api.ldap.model.exception.LdapExceptionIOException
-
loadComparators
public List<org.apache.directory.api.ldap.model.entry.Entry> loadComparators(org.apache.directory.api.ldap.model.schema.registries.Schema... schemas) throws org.apache.directory.api.ldap.model.exception.LdapException, IOException - Throws:
org.apache.directory.api.ldap.model.exception.LdapExceptionIOException
-
loadDitContentRules
public List<org.apache.directory.api.ldap.model.entry.Entry> loadDitContentRules(org.apache.directory.api.ldap.model.schema.registries.Schema... schemas) throws org.apache.directory.api.ldap.model.exception.LdapException, IOException - Throws:
org.apache.directory.api.ldap.model.exception.LdapExceptionIOException
-
loadDitStructureRules
public List<org.apache.directory.api.ldap.model.entry.Entry> loadDitStructureRules(org.apache.directory.api.ldap.model.schema.registries.Schema... schemas) throws org.apache.directory.api.ldap.model.exception.LdapException, IOException - Throws:
org.apache.directory.api.ldap.model.exception.LdapExceptionIOException
-
loadMatchingRuleUses
public List<org.apache.directory.api.ldap.model.entry.Entry> loadMatchingRuleUses(org.apache.directory.api.ldap.model.schema.registries.Schema... schemas) throws org.apache.directory.api.ldap.model.exception.LdapException, IOException - Throws:
org.apache.directory.api.ldap.model.exception.LdapExceptionIOException
-
loadMatchingRules
public List<org.apache.directory.api.ldap.model.entry.Entry> loadMatchingRules(org.apache.directory.api.ldap.model.schema.registries.Schema... schemas) throws org.apache.directory.api.ldap.model.exception.LdapException, IOException - Throws:
org.apache.directory.api.ldap.model.exception.LdapExceptionIOException
-
loadNameForms
public List<org.apache.directory.api.ldap.model.entry.Entry> loadNameForms(org.apache.directory.api.ldap.model.schema.registries.Schema... schemas) throws org.apache.directory.api.ldap.model.exception.LdapException, IOException - Throws:
org.apache.directory.api.ldap.model.exception.LdapExceptionIOException
-
loadNormalizers
public List<org.apache.directory.api.ldap.model.entry.Entry> loadNormalizers(org.apache.directory.api.ldap.model.schema.registries.Schema... schemas) throws org.apache.directory.api.ldap.model.exception.LdapException, IOException - Throws:
org.apache.directory.api.ldap.model.exception.LdapExceptionIOException
-
loadObjectClasses
public List<org.apache.directory.api.ldap.model.entry.Entry> loadObjectClasses(org.apache.directory.api.ldap.model.schema.registries.Schema... schemas) throws org.apache.directory.api.ldap.model.exception.LdapException, IOException - Throws:
org.apache.directory.api.ldap.model.exception.LdapExceptionIOException
-
loadSyntaxCheckers
public List<org.apache.directory.api.ldap.model.entry.Entry> loadSyntaxCheckers(org.apache.directory.api.ldap.model.schema.registries.Schema... schemas) throws org.apache.directory.api.ldap.model.exception.LdapException, IOException - Throws:
org.apache.directory.api.ldap.model.exception.LdapExceptionIOException
-
loadSyntaxes
public List<org.apache.directory.api.ldap.model.entry.Entry> loadSyntaxes(org.apache.directory.api.ldap.model.schema.registries.Schema... schemas) throws org.apache.directory.api.ldap.model.exception.LdapException, IOException - Throws:
org.apache.directory.api.ldap.model.exception.LdapExceptionIOException
-
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
-