Class SchemaEntityFactory
- java.lang.Object
-
- org.apache.directory.api.ldap.schema.loader.SchemaEntityFactory
-
- All Implemented Interfaces:
EntityFactory
public class SchemaEntityFactory extends Object implements EntityFactory
Showing how it's done ...- Author:
- Apache Directory Project
-
-
Constructor Summary
Constructors Constructor Description SchemaEntityFactory()Instantiates a new schema entity factory.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AttributeTypegetAttributeType(SchemaManager schemaManager, Entry entry, Registries targetRegistries, String schemaName)Construct an AttributeType from an entry representing an AttributeType.LdapComparator<?>getLdapComparator(SchemaManager schemaManager, Entry entry, Registries targetRegistries, String schemaName)Retrieve and load a Comparator class from the DIT.LdapComparator<?>getLdapComparator(SchemaManager schemaManager, LdapComparatorDescription comparatorDescription, Registries targetRegistries, String schemaName)Construct a LdapComparator from a description of a comparator.MatchingRulegetMatchingRule(SchemaManager schemaManager, Entry entry, Registries targetRegistries, String schemaName)Construct an MatchingRule from an entry get from the DitNormalizergetNormalizer(SchemaManager schemaManager, Entry entry, Registries targetRegistries, String schemaName)Retrieve and load a Normalizer class from the DIT.NormalizergetNormalizer(SchemaManager schemaManager, NormalizerDescription normalizerDescription, Registries targetRegistries, String schemaName)Create a new instance of a NormalizerObjectClassgetObjectClass(SchemaManager schemaManager, Entry entry, Registries targetRegistries, String schemaName)SchemagetSchema(Entry entry)Return an instance of the Schema associated to the entryLdapSyntaxgetSyntax(SchemaManager schemaManager, Entry entry, Registries targetRegistries, String schemaName)SyntaxCheckergetSyntaxChecker(SchemaManager schemaManager, Entry entry, Registries targetRegistries, String schemaName)Retrieve and load a syntaxChecker class from the DIT.SyntaxCheckergetSyntaxChecker(SchemaManager schemaManager, SyntaxCheckerDescription syntaxCheckerDescription, Registries targetRegistries, String schemaName)Create a new instance of a SyntaxChecker
-
-
-
Method Detail
-
getSchema
public Schema getSchema(Entry entry) throws LdapException
Return an instance of the Schema associated to the entry- Specified by:
getSchemain interfaceEntityFactory- Parameters:
entry- The Schema entry- Returns:
- An instance of a Schema
- Throws:
LdapException- If the instance can't be created
-
getSyntaxChecker
public SyntaxChecker getSyntaxChecker(SchemaManager schemaManager, Entry entry, Registries targetRegistries, String schemaName) throws LdapException
Retrieve and load a syntaxChecker class from the DIT.- Specified by:
getSyntaxCheckerin interfaceEntityFactory- Parameters:
schemaManager- The Schema Managerentry- The entry containing all the informations to build a SyntaxCheckertargetRegistries- The registries containing all the enabled SchemaObjectsschemaName- The schema this SchemaObject will be part of- Returns:
- the loaded SyntaxChecker
- Throws:
LdapException- if anything fails during loading
-
getSyntaxChecker
public SyntaxChecker getSyntaxChecker(SchemaManager schemaManager, SyntaxCheckerDescription syntaxCheckerDescription, Registries targetRegistries, String schemaName) throws LdapException
Create a new instance of a SyntaxChecker- Specified by:
getSyntaxCheckerin interfaceEntityFactory- Parameters:
schemaManager- The Schema ManagersyntaxCheckerDescription- The SyntaxChecker description objecttargetRegistries- The registries containing all the enabled SchemaObjectsschemaName- The schema this SchemaObject will be part of- Returns:
- A new instance of a syntaxChecker
- Throws:
LdapException- If the creation has failed
-
getLdapComparator
public LdapComparator<?> getLdapComparator(SchemaManager schemaManager, LdapComparatorDescription comparatorDescription, Registries targetRegistries, String schemaName) throws LdapException
Construct a LdapComparator from a description of a comparator.- Specified by:
getLdapComparatorin interfaceEntityFactory- Parameters:
schemaManager- The Schema ManagercomparatorDescription- The LdapComparator description objecttargetRegistries- The registries containing all the enabled SchemaObjectsschemaName- The schema this SchemaObject will be part of- Returns:
- A new instance of a LdapComparator
- Throws:
LdapException- If the creation has failed
-
getLdapComparator
public LdapComparator<?> getLdapComparator(SchemaManager schemaManager, Entry entry, Registries targetRegistries, String schemaName) throws LdapException
Retrieve and load a Comparator class from the DIT.- Specified by:
getLdapComparatorin interfaceEntityFactory- Parameters:
schemaManager- The Schema Managerentry- The entry containing all the informations to build a LdapComparatortargetRegistries- The registries containing all the enabled SchemaObjectsschemaName- The schema this SchemaObject will be part of- Returns:
- the loaded Comparator
- Throws:
LdapException- if anything fails during loading
-
getNormalizer
public Normalizer getNormalizer(SchemaManager schemaManager, NormalizerDescription normalizerDescription, Registries targetRegistries, String schemaName) throws LdapException
Create a new instance of a Normalizer- Specified by:
getNormalizerin interfaceEntityFactory- Parameters:
schemaManager- The Schema ManagernormalizerDescription- The Normalizer description objecttargetRegistries- The registries containing all the enabled SchemaObjectsschemaName- The schema this SchemaObject will be part of- Returns:
- A new instance of a normalizer
- Throws:
LdapException- If the creation has failed
-
getNormalizer
public Normalizer getNormalizer(SchemaManager schemaManager, Entry entry, Registries targetRegistries, String schemaName) throws LdapException
Retrieve and load a Normalizer class from the DIT.- Specified by:
getNormalizerin interfaceEntityFactory- Parameters:
schemaManager- The Schema Managerentry- The entry containing all the informations to build a NormalizertargetRegistries- The registries containing all the enabled SchemaObjectsschemaName- The schema this SchemaObject will be part of- Returns:
- the loaded Normalizer
- Throws:
LdapException- if anything fails during loading
-
getSyntax
public LdapSyntax getSyntax(SchemaManager schemaManager, Entry entry, Registries targetRegistries, String schemaName) throws LdapInvalidAttributeValueException, LdapUnwillingToPerformException
- Specified by:
getSyntaxin interfaceEntityFactory- Parameters:
schemaManager- The Schema Managerentry- The entry containing all the informations to build a LdapSyntaxtargetRegistries- The registries containing all the enabled SchemaObjectsschemaName- The schema this SchemaObject will be part of- Returns:
- The loaded Syntax
- Throws:
LdapInvalidAttributeValueException- If the Syntax does not existLdapUnwillingToPerformException- If the schema is not loaded
-
getMatchingRule
public MatchingRule getMatchingRule(SchemaManager schemaManager, Entry entry, Registries targetRegistries, String schemaName) throws LdapUnwillingToPerformException, LdapInvalidAttributeValueException
Construct an MatchingRule from an entry get from the Dit- Specified by:
getMatchingRulein interfaceEntityFactory- Parameters:
schemaManager- The Schema Managerentry- The entry containing all the informations to build a MatchingRuletargetRegistries- The registries containing all the enabled SchemaObjectsschemaName- The schema this SchemaObject will be part of- Returns:
- A MatchingRule SchemaObject
- Throws:
LdapInvalidAttributeValueException- If the MatchingRule does not existLdapUnwillingToPerformException- If the schema is not loaded
-
getObjectClass
public ObjectClass getObjectClass(SchemaManager schemaManager, Entry entry, Registries targetRegistries, String schemaName) throws LdapException
- Specified by:
getObjectClassin interfaceEntityFactory- Parameters:
schemaManager- The Schema Managerentry- The entry containing all the informations to build an ObjectClasstargetRegistries- The registries containing all the enabled SchemaObjectsschemaName- The schema this SchemaObject will be part of- Returns:
- The loaded ObjectClass
- Throws:
LdapException- if anything fails during loading
-
getAttributeType
public AttributeType getAttributeType(SchemaManager schemaManager, Entry entry, Registries targetRegistries, String schemaName) throws LdapInvalidAttributeValueException, LdapUnwillingToPerformException
Construct an AttributeType from an entry representing an AttributeType.- Specified by:
getAttributeTypein interfaceEntityFactory- Parameters:
schemaManager- The Schema Managerentry- The entry containing all the informations to build an AttributeTypetargetRegistries- The registries containing all the enabled SchemaObjectsschemaName- The schema this SchemaObject will be part of- Returns:
- An AttributeType SchemaObject
- Throws:
LdapInvalidAttributeValueException- If the AttributeType does not existLdapUnwillingToPerformException- If the schema is not loaded
-
-