org.apache.directory.shared.ldap.schema.loader.ldif
Class SchemaEntityFactory

java.lang.Object
  extended by org.apache.directory.shared.ldap.schema.loader.ldif.SchemaEntityFactory
All Implemented Interfaces:
EntityFactory

public class SchemaEntityFactory
extends java.lang.Object
implements EntityFactory

Showing how it's done ...

Version:
$Rev$
Author:
Apache Directory Project

Constructor Summary
SchemaEntityFactory()
           
 
Method Summary
 AttributeType getAttributeType(SchemaManager schemaManager, Entry entry, Registries targetRegistries, java.lang.String schemaName)
          Construct an AttributeType from an entry representing an AttributeType.
 LdapComparator<?> getLdapComparator(SchemaManager schemaManager, Entry entry, Registries targetRegistries, java.lang.String schemaName)
          Retrieve and load a Comparator class from the DIT.
 LdapComparator<?> getLdapComparator(SchemaManager schemaManager, LdapComparatorDescription comparatorDescription, Registries targetRegistries, java.lang.String schemaName)
          Construct a LdapComparator from a description of a comparator.
 MatchingRule getMatchingRule(SchemaManager schemaManager, Entry entry, Registries targetRegistries, java.lang.String schemaName)
          Construct an MatchingRule from an entry get from the Dit
 Normalizer getNormalizer(SchemaManager schemaManager, Entry entry, Registries targetRegistries, java.lang.String schemaName)
          Retrieve and load a Normalizer class from the DIT.
 Normalizer getNormalizer(SchemaManager schemaManager, NormalizerDescription normalizerDescription, Registries targetRegistries, java.lang.String schemaName)
          Create a new instance of a Normalizer
 ObjectClass getObjectClass(SchemaManager schemaManager, Entry entry, Registries targetRegistries, java.lang.String schemaName)
          
 Schema getSchema(Entry entry)
          Return an instance of the Schema associated to the entry
 LdapSyntax getSyntax(SchemaManager schemaManager, Entry entry, Registries targetRegistries, java.lang.String schemaName)
          
 SyntaxChecker getSyntaxChecker(SchemaManager schemaManager, Entry entry, Registries targetRegistries, java.lang.String schemaName)
          Retrieve and load a syntaxChecker class from the DIT.
 SyntaxChecker getSyntaxChecker(SchemaManager schemaManager, SyntaxCheckerDescription syntaxCheckerDescription, Registries targetRegistries, java.lang.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()
                    throws java.lang.Exception
Throws:
java.lang.Exception
Method Detail

getSchema

public Schema getSchema(Entry entry)
                 throws java.lang.Exception
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:
java.lang.Exception - If the instance can't be created

getSyntaxChecker

public SyntaxChecker getSyntaxChecker(SchemaManager schemaManager,
                                      Entry entry,
                                      Registries targetRegistries,
                                      java.lang.String schemaName)
                               throws java.lang.Exception
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:
LdapException - if anything fails during loading
java.lang.Exception

getSyntaxChecker

public SyntaxChecker getSyntaxChecker(SchemaManager schemaManager,
                                      SyntaxCheckerDescription syntaxCheckerDescription,
                                      Registries targetRegistries,
                                      java.lang.String schemaName)
                               throws java.lang.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:
java.lang.Exception - If the creation has failed

getLdapComparator

public LdapComparator<?> getLdapComparator(SchemaManager schemaManager,
                                           LdapComparatorDescription comparatorDescription,
                                           Registries targetRegistries,
                                           java.lang.String schemaName)
                                    throws java.lang.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:
java.lang.Exception - If the creation has failed

getLdapComparator

public LdapComparator<?> getLdapComparator(SchemaManager schemaManager,
                                           Entry entry,
                                           Registries targetRegistries,
                                           java.lang.String schemaName)
                                    throws java.lang.Exception
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:
LdapException - if anything fails during loading
java.lang.Exception

getNormalizer

public Normalizer getNormalizer(SchemaManager schemaManager,
                                NormalizerDescription normalizerDescription,
                                Registries targetRegistries,
                                java.lang.String schemaName)
                         throws java.lang.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:
java.lang.Exception - If the creation has failed

getNormalizer

public Normalizer getNormalizer(SchemaManager schemaManager,
                                Entry entry,
                                Registries targetRegistries,
                                java.lang.String schemaName)
                         throws java.lang.Exception
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:
LdapException - if anything fails during loading
java.lang.Exception

getSyntax

public LdapSyntax getSyntax(SchemaManager schemaManager,
                            Entry entry,
                            Registries targetRegistries,
                            java.lang.String schemaName)
                     throws LdapInvalidAttributeValueException,
                            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:
LdapInvalidAttributeValueException
LdapUnwillingToPerformException

getMatchingRule

public MatchingRule getMatchingRule(SchemaManager schemaManager,
                                    Entry entry,
                                    Registries targetRegistries,
                                    java.lang.String schemaName)
                             throws LdapUnwillingToPerformException,
                                    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:
LdapUnwillingToPerformException
LdapInvalidAttributeValueException

getObjectClass

public ObjectClass getObjectClass(SchemaManager schemaManager,
                                  Entry entry,
                                  Registries targetRegistries,
                                  java.lang.String schemaName)
                           throws java.lang.Exception

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:
java.lang.Exception

getAttributeType

public AttributeType getAttributeType(SchemaManager schemaManager,
                                      Entry entry,
                                      Registries targetRegistries,
                                      java.lang.String schemaName)
                               throws LdapInvalidAttributeValueException,
                                      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:
LdapInvalidAttributeValueException
LdapUnwillingToPerformException


Copyright © 2003-2011 Apache Software Foundation. All Rights Reserved.