Class SchemaEntityFactory
java.lang.Object
org.apache.directory.api.ldap.schema.loader.SchemaEntityFactory
- All Implemented Interfaces:
EntityFactory
Showing how it's done ...
- Author:
- Apache Directory Project
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.directory.api.ldap.model.schema.AttributeTypegetAttributeType(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.MatchingRulegetMatchingRule(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 Ditorg.apache.directory.api.ldap.model.schema.NormalizergetNormalizer(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.NormalizergetNormalizer(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 Normalizerorg.apache.directory.api.ldap.model.schema.ObjectClassgetObjectClass(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 an ObjectClass from the DITorg.apache.directory.api.ldap.model.schema.registries.SchemagetSchema(org.apache.directory.api.ldap.model.entry.Entry entry) Return an instance of the Schema associated to the entryorg.apache.directory.api.ldap.model.schema.LdapSyntaxgetSyntax(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 an LdapSyntax from the DITorg.apache.directory.api.ldap.model.schema.SyntaxCheckergetSyntaxChecker(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.SyntaxCheckergetSyntaxChecker(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
-
Constructor Details
-
SchemaEntityFactory
public SchemaEntityFactory()Instantiates a new schema entity factory.
-
-
Method Details
-
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:
getSchemain interfaceEntityFactory- Parameters:
entry- The Schema entry- Returns:
- An instance of a Schema
- Throws:
org.apache.directory.api.ldap.model.exception.LdapException- If the instance can't be created
-
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:
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:
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 org.apache.directory.api.ldap.model.exception.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:
org.apache.directory.api.ldap.model.exception.LdapException- 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 org.apache.directory.api.ldap.model.exception.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:
org.apache.directory.api.ldap.model.exception.LdapException- 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:
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:
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 org.apache.directory.api.ldap.model.exception.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:
org.apache.directory.api.ldap.model.exception.LdapException- 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:
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:
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 Retrieve and load an LdapSyntax from the DIT- 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:
org.apache.directory.api.ldap.model.exception.LdapInvalidAttributeValueException- If the Syntax does not existorg.apache.directory.api.ldap.model.exception.LdapUnwillingToPerformException- If the schema is not loaded
-
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:
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:
org.apache.directory.api.ldap.model.exception.LdapInvalidAttributeValueException- If the MatchingRule does not existorg.apache.directory.api.ldap.model.exception.LdapUnwillingToPerformException- If the schema is not loaded
-
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 Retrieve and load an ObjectClass from the DIT- 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:
org.apache.directory.api.ldap.model.exception.LdapException- if anything fails during loading
-
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:
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:
org.apache.directory.api.ldap.model.exception.LdapInvalidAttributeValueException- If the AttributeType does not existorg.apache.directory.api.ldap.model.exception.LdapUnwillingToPerformException- If the schema is not loaded
-