org.apache.directory.api.ldap.schemaloader
Class SchemaEntityFactory

java.lang.Object
  extended by org.apache.directory.api.ldap.schemaloader.SchemaEntityFactory
All Implemented Interfaces:
EntityFactory

public class SchemaEntityFactory
extends Object
implements EntityFactory

Showing how it's done ...

Author:
Apache Directory Project

Constructor Summary
SchemaEntityFactory()
          Instantiates a new schema entity factory.
 
Method Summary
 org.apache.directory.api.ldap.model.schema.AttributeType getAttributeType(org.apache.directory.api.ldap.model.schema.SchemaManager schemaManager, org.apache.directory.api.ldap.model.entry.Entry entry, org.apache.directory.api.ldap.model.schema.registries.Registries targetRegistries, String schemaName)
          Construct an AttributeType from an entry representing an AttributeType.
 org.apache.directory.api.ldap.model.schema.LdapComparator<?> getLdapComparator(org.apache.directory.api.ldap.model.schema.SchemaManager schemaManager, org.apache.directory.api.ldap.model.entry.Entry entry, org.apache.directory.api.ldap.model.schema.registries.Registries targetRegistries, String schemaName)
          Retrieve and load a Comparator class from the DIT.
 org.apache.directory.api.ldap.model.schema.LdapComparator<?> getLdapComparator(org.apache.directory.api.ldap.model.schema.SchemaManager schemaManager, org.apache.directory.api.ldap.model.schema.parsers.LdapComparatorDescription comparatorDescription, org.apache.directory.api.ldap.model.schema.registries.Registries targetRegistries, String schemaName)
          Construct a LdapComparator from a description of a comparator.
 org.apache.directory.api.ldap.model.schema.MatchingRule getMatchingRule(org.apache.directory.api.ldap.model.schema.SchemaManager schemaManager, org.apache.directory.api.ldap.model.entry.Entry entry, org.apache.directory.api.ldap.model.schema.registries.Registries targetRegistries, String schemaName)
          Construct an MatchingRule from an entry get from the Dit
 org.apache.directory.api.ldap.model.schema.Normalizer getNormalizer(org.apache.directory.api.ldap.model.schema.SchemaManager schemaManager, org.apache.directory.api.ldap.model.entry.Entry entry, org.apache.directory.api.ldap.model.schema.registries.Registries targetRegistries, String schemaName)
          Retrieve and load a Normalizer class from the DIT.
 org.apache.directory.api.ldap.model.schema.Normalizer getNormalizer(org.apache.directory.api.ldap.model.schema.SchemaManager schemaManager, org.apache.directory.api.ldap.model.schema.parsers.NormalizerDescription normalizerDescription, org.apache.directory.api.ldap.model.schema.registries.Registries targetRegistries, String schemaName)
          Create a new instance of a Normalizer
 org.apache.directory.api.ldap.model.schema.ObjectClass getObjectClass(org.apache.directory.api.ldap.model.schema.SchemaManager schemaManager, org.apache.directory.api.ldap.model.entry.Entry entry, org.apache.directory.api.ldap.model.schema.registries.Registries targetRegistries, String schemaName)
          
 org.apache.directory.api.ldap.model.schema.registries.Schema getSchema(org.apache.directory.api.ldap.model.entry.Entry entry)
          Return an instance of the Schema associated to the entry
 org.apache.directory.api.ldap.model.schema.LdapSyntax getSyntax(org.apache.directory.api.ldap.model.schema.SchemaManager schemaManager, org.apache.directory.api.ldap.model.entry.Entry entry, org.apache.directory.api.ldap.model.schema.registries.Registries targetRegistries, String schemaName)
          
 org.apache.directory.api.ldap.model.schema.SyntaxChecker getSyntaxChecker(org.apache.directory.api.ldap.model.schema.SchemaManager schemaManager, org.apache.directory.api.ldap.model.entry.Entry entry, org.apache.directory.api.ldap.model.schema.registries.Registries targetRegistries, String schemaName)
          Retrieve and load a syntaxChecker class from the DIT.
 org.apache.directory.api.ldap.model.schema.SyntaxChecker getSyntaxChecker(org.apache.directory.api.ldap.model.schema.SchemaManager schemaManager, org.apache.directory.api.ldap.model.schema.parsers.SyntaxCheckerDescription syntaxCheckerDescription, org.apache.directory.api.ldap.model.schema.registries.Registries targetRegistries, String schemaName)
          Create a new instance of a SyntaxChecker
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SchemaEntityFactory

public SchemaEntityFactory()
Instantiates a new schema entity factory.

Method Detail

getSchema

public org.apache.directory.api.ldap.model.schema.registries.Schema getSchema(org.apache.directory.api.ldap.model.entry.Entry entry)
                                                                       throws org.apache.directory.api.ldap.model.exception.LdapException
Return an instance of the Schema associated to the entry

Specified by:
getSchema in interface EntityFactory
Parameters:
entry - The Schema entry
Returns:
An instance of a Schema
Throws:
org.apache.directory.api.ldap.model.exception.LdapException

getSyntaxChecker

public org.apache.directory.api.ldap.model.schema.SyntaxChecker getSyntaxChecker(org.apache.directory.api.ldap.model.schema.SchemaManager schemaManager,
                                                                                 org.apache.directory.api.ldap.model.entry.Entry entry,
                                                                                 org.apache.directory.api.ldap.model.schema.registries.Registries targetRegistries,
                                                                                 String schemaName)
                                                                          throws org.apache.directory.api.ldap.model.exception.LdapException
Retrieve and load a syntaxChecker class from the DIT.

Specified by:
getSyntaxChecker in interface EntityFactory
Parameters:
schemaManager - The Schema Manager
entry - The entry containing all the informations to build a SyntaxChecker
targetRegistries - The registries containing all the enabled SchemaObjects
schemaName - The schema this SchemaObject will be part of
Returns:
the loaded SyntaxChecker
Throws:
org.apache.directory.api.ldap.model.exception.LdapException - if anything fails during loading

getSyntaxChecker

public org.apache.directory.api.ldap.model.schema.SyntaxChecker getSyntaxChecker(org.apache.directory.api.ldap.model.schema.SchemaManager schemaManager,
                                                                                 org.apache.directory.api.ldap.model.schema.parsers.SyntaxCheckerDescription syntaxCheckerDescription,
                                                                                 org.apache.directory.api.ldap.model.schema.registries.Registries targetRegistries,
                                                                                 String schemaName)
                                                                          throws Exception
Create a new instance of a SyntaxChecker

Specified by:
getSyntaxChecker in interface EntityFactory
Parameters:
schemaManager - The Schema Manager
syntaxCheckerDescription - The SyntaxChecker description object
targetRegistries - The registries containing all the enabled SchemaObjects
schemaName - The schema this SchemaObject will be part of
Returns:
A new instance of a syntaxChecker
Throws:
Exception - If the creation has failed

getLdapComparator

public org.apache.directory.api.ldap.model.schema.LdapComparator<?> getLdapComparator(org.apache.directory.api.ldap.model.schema.SchemaManager schemaManager,
                                                                                      org.apache.directory.api.ldap.model.schema.parsers.LdapComparatorDescription comparatorDescription,
                                                                                      org.apache.directory.api.ldap.model.schema.registries.Registries targetRegistries,
                                                                                      String schemaName)
                                                                               throws Exception
Construct a LdapComparator from a description of a comparator.

Specified by:
getLdapComparator in interface EntityFactory
Parameters:
schemaManager - The Schema Manager
comparatorDescription - The LdapComparator description object
targetRegistries - The registries containing all the enabled SchemaObjects
schemaName - The schema this SchemaObject will be part of
Returns:
A new instance of a LdapComparator
Throws:
Exception - If the creation has failed

getLdapComparator

public org.apache.directory.api.ldap.model.schema.LdapComparator<?> getLdapComparator(org.apache.directory.api.ldap.model.schema.SchemaManager schemaManager,
                                                                                      org.apache.directory.api.ldap.model.entry.Entry entry,
                                                                                      org.apache.directory.api.ldap.model.schema.registries.Registries targetRegistries,
                                                                                      String schemaName)
                                                                               throws org.apache.directory.api.ldap.model.exception.LdapException
Retrieve and load a Comparator class from the DIT.

Specified by:
getLdapComparator in interface EntityFactory
Parameters:
schemaManager - The Schema Manager
entry - The entry containing all the informations to build a LdapComparator
targetRegistries - The registries containing all the enabled SchemaObjects
schemaName - The schema this SchemaObject will be part of
Returns:
the loaded Comparator
Throws:
org.apache.directory.api.ldap.model.exception.LdapException - if anything fails during loading

getNormalizer

public org.apache.directory.api.ldap.model.schema.Normalizer getNormalizer(org.apache.directory.api.ldap.model.schema.SchemaManager schemaManager,
                                                                           org.apache.directory.api.ldap.model.schema.parsers.NormalizerDescription normalizerDescription,
                                                                           org.apache.directory.api.ldap.model.schema.registries.Registries targetRegistries,
                                                                           String schemaName)
                                                                    throws Exception
Create a new instance of a Normalizer

Specified by:
getNormalizer in interface EntityFactory
Parameters:
schemaManager - The Schema Manager
normalizerDescription - The Normalizer description object
targetRegistries - The registries containing all the enabled SchemaObjects
schemaName - The schema this SchemaObject will be part of
Returns:
A new instance of a normalizer
Throws:
Exception - If the creation has failed

getNormalizer

public org.apache.directory.api.ldap.model.schema.Normalizer getNormalizer(org.apache.directory.api.ldap.model.schema.SchemaManager schemaManager,
                                                                           org.apache.directory.api.ldap.model.entry.Entry entry,
                                                                           org.apache.directory.api.ldap.model.schema.registries.Registries targetRegistries,
                                                                           String schemaName)
                                                                    throws org.apache.directory.api.ldap.model.exception.LdapException
Retrieve and load a Normalizer class from the DIT.

Specified by:
getNormalizer in interface EntityFactory
Parameters:
schemaManager - The Schema Manager
entry - The entry containing all the informations to build a Normalizer
targetRegistries - The registries containing all the enabled SchemaObjects
schemaName - The schema this SchemaObject will be part of
Returns:
the loaded Normalizer
Throws:
org.apache.directory.api.ldap.model.exception.LdapException - if anything fails during loading

getSyntax

public org.apache.directory.api.ldap.model.schema.LdapSyntax getSyntax(org.apache.directory.api.ldap.model.schema.SchemaManager schemaManager,
                                                                       org.apache.directory.api.ldap.model.entry.Entry entry,
                                                                       org.apache.directory.api.ldap.model.schema.registries.Registries targetRegistries,
                                                                       String schemaName)
                                                                throws org.apache.directory.api.ldap.model.exception.LdapInvalidAttributeValueException,
                                                                       org.apache.directory.api.ldap.model.exception.LdapUnwillingToPerformException

Specified by:
getSyntax in interface EntityFactory
Parameters:
schemaManager - The Schema Manager
entry - The entry containing all the informations to build a LdapSyntax
targetRegistries - The registries containing all the enabled SchemaObjects
schemaName - The schema this SchemaObject will be part of
Returns:
Throws:
org.apache.directory.api.ldap.model.exception.LdapInvalidAttributeValueException
org.apache.directory.api.ldap.model.exception.LdapUnwillingToPerformException

getMatchingRule

public org.apache.directory.api.ldap.model.schema.MatchingRule getMatchingRule(org.apache.directory.api.ldap.model.schema.SchemaManager schemaManager,
                                                                               org.apache.directory.api.ldap.model.entry.Entry entry,
                                                                               org.apache.directory.api.ldap.model.schema.registries.Registries targetRegistries,
                                                                               String schemaName)
                                                                        throws org.apache.directory.api.ldap.model.exception.LdapUnwillingToPerformException,
                                                                               org.apache.directory.api.ldap.model.exception.LdapInvalidAttributeValueException
Construct an MatchingRule from an entry get from the Dit

Specified by:
getMatchingRule in interface EntityFactory
Parameters:
schemaManager - The Schema Manager
entry - The entry containing all the informations to build a MatchingRule
targetRegistries - The registries containing all the enabled SchemaObjects
schemaName - The schema this SchemaObject will be part of
Returns:
A MatchingRule SchemaObject
Throws:
org.apache.directory.api.ldap.model.exception.LdapUnwillingToPerformException
org.apache.directory.api.ldap.model.exception.LdapInvalidAttributeValueException

getObjectClass

public org.apache.directory.api.ldap.model.schema.ObjectClass getObjectClass(org.apache.directory.api.ldap.model.schema.SchemaManager schemaManager,
                                                                             org.apache.directory.api.ldap.model.entry.Entry entry,
                                                                             org.apache.directory.api.ldap.model.schema.registries.Registries targetRegistries,
                                                                             String schemaName)
                                                                      throws org.apache.directory.api.ldap.model.exception.LdapException

Specified by:
getObjectClass in interface EntityFactory
Parameters:
schemaManager - The Schema Manager
entry - The entry containing all the informations to build an ObjectClass
targetRegistries - The registries containing all the enabled SchemaObjects
schemaName - The schema this SchemaObject will be part of
Returns:
Throws:
org.apache.directory.api.ldap.model.exception.LdapException

getAttributeType

public org.apache.directory.api.ldap.model.schema.AttributeType getAttributeType(org.apache.directory.api.ldap.model.schema.SchemaManager schemaManager,
                                                                                 org.apache.directory.api.ldap.model.entry.Entry entry,
                                                                                 org.apache.directory.api.ldap.model.schema.registries.Registries targetRegistries,
                                                                                 String schemaName)
                                                                          throws org.apache.directory.api.ldap.model.exception.LdapInvalidAttributeValueException,
                                                                                 org.apache.directory.api.ldap.model.exception.LdapUnwillingToPerformException
Construct an AttributeType from an entry representing an AttributeType.

Specified by:
getAttributeType in interface EntityFactory
Parameters:
schemaManager - The Schema Manager
entry - The entry containing all the informations to build an AttributeType
targetRegistries - The registries containing all the enabled SchemaObjects
schemaName - The schema this SchemaObject will be part of
Returns:
An AttributeType SchemaObject
Throws:
org.apache.directory.api.ldap.model.exception.LdapInvalidAttributeValueException
org.apache.directory.api.ldap.model.exception.LdapUnwillingToPerformException


Copyright © 2003-2013 The Apache Software Foundation. All Rights Reserved.