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

    Constructors
    Modifier
    Constructor
    Description
    protected
    A default constructor
     
    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 Type
    Method
    Description
    protected LdapConnection
    Get the LdapConnecgion instance
    List<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 void
    Set the LdapConnection to use
    void
    setQuirksMode(boolean enabled)
    Sets the quirks mode for all the internal parsers.
    protected void
    updateSchemas(org.apache.directory.api.ldap.model.schema.SchemaObject schemaObject)
    Update the schema with the provided schema object

    Methods 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

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • DefaultSchemaLoader

      protected DefaultSchemaLoader() throws org.apache.directory.api.ldap.model.exception.LdapException
      A 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 connection
      relaxed - 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 connection
      subschemaSubentryDn - 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

      protected LdapConnection getConnection()
      Get the LdapConnecgion instance
      Returns:
      the LdapConnecgion instance
    • setConnection

      protected void setConnection(LdapConnection connection)
      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.LdapException
      IOException
    • 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.LdapException
      IOException
    • 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.LdapException
      IOException
    • 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.LdapException
      IOException
    • 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.LdapException
      IOException
    • 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.LdapException
      IOException
    • 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.LdapException
      IOException
    • 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.LdapException
      IOException
    • 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.LdapException
      IOException
    • 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.LdapException
      IOException
    • 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.LdapException
      IOException
    • 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