public class SchemaEntityFactory extends Object implements EntityFactory
| Modifier and Type | Field and Description |
|---|---|
private AttributeClassLoader |
classLoader
A special ClassLoader that loads a class from the bytecode attribute
|
private static String[] |
EMPTY_ARRAY
The empty string array.
|
private static List<String> |
EMPTY_LIST
The empty string list.
|
private static org.slf4j.Logger |
LOG
Slf4j logger
|
| Constructor and Description |
|---|
SchemaEntityFactory()
Instantiates a new schema entity factory.
|
| Modifier and Type | Method and Description |
|---|---|
private void |
checkDescription(org.apache.directory.api.ldap.model.schema.SchemaObject description,
String schemaEntity)
Check that the Description is not null
|
private void |
checkEntry(org.apache.directory.api.ldap.model.entry.Entry entry,
String schemaEntity)
Check that the Entry is not null
|
private org.apache.directory.api.ldap.model.schema.LdapComparator<?> |
classLoadComparator(org.apache.directory.api.ldap.model.schema.SchemaManager schemaManager,
String oid,
String className,
org.apache.directory.api.ldap.model.entry.Attribute byteCode)
Class load a comparator instances
|
private org.apache.directory.api.ldap.model.schema.Normalizer |
classLoadNormalizer(org.apache.directory.api.ldap.model.schema.SchemaManager schemaManager,
String oid,
String className,
org.apache.directory.api.ldap.model.entry.Attribute byteCode)
Class load a normalizer instances
|
private org.apache.directory.api.ldap.model.schema.SyntaxChecker |
classLoadSyntaxChecker(org.apache.directory.api.ldap.model.schema.SchemaManager schemaManager,
String oid,
String className,
org.apache.directory.api.ldap.model.entry.Attribute byteCode)
Class load a syntaxChecker instance
|
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.
|
private org.apache.directory.api.ldap.model.entry.Attribute |
getByteCode(org.apache.directory.api.ldap.model.schema.LoadableSchemaObject description,
String objectType)
Process the ByteCode attribute
|
private String |
getFqcn(org.apache.directory.api.ldap.model.entry.Entry entry,
String objectType)
Process the FQCN attribute
|
private String |
getFqcn(org.apache.directory.api.ldap.model.schema.LoadableSchemaObject description,
String objectType)
Process the FQCN attribute
|
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) |
private String |
getOid(org.apache.directory.api.ldap.model.entry.Entry entry,
String objectType,
boolean strict)
Get an OID from an entry.
|
private String |
getOid(org.apache.directory.api.ldap.model.schema.SchemaObject description,
String objectType)
Get an OID from an entry.
|
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
|
private org.apache.directory.api.ldap.model.schema.registries.Schema |
getSchema(String schemaName,
org.apache.directory.api.ldap.model.schema.registries.Registries registries)
Get the schema from its name.
|
private List<String> |
getStrings(org.apache.directory.api.ldap.model.entry.Attribute attr)
Create a list of string from a multivalued attribute's values
|
private String |
getStringValue(org.apache.directory.api.ldap.model.entry.Attribute attribute)
Return a String value, from teh given Valu, even if it's a binary value
|
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
|
private void |
setSchemaObjectProperties(org.apache.directory.api.ldap.model.schema.SchemaObject schemaObject,
org.apache.directory.api.ldap.model.entry.Entry entry,
org.apache.directory.api.ldap.model.schema.registries.Schema schema)
Process the common attributes to all SchemaObjects :
- obsolete
- description
- names
- schemaName
- specification (if any)
- extensions
- isReadOnly
- isEnabled
|
private void |
setSchemaObjectProperties(org.apache.directory.api.ldap.model.schema.SchemaObject schemaObject,
org.apache.directory.api.ldap.model.schema.SchemaObject description,
org.apache.directory.api.ldap.model.schema.registries.Schema schema)
Process the common attributes to all SchemaObjects :
- obsolete
- description
- names
- schemaName
- specification (if any)
- extensions
- isReadOnly
- isEnabled
|
private static final org.slf4j.Logger LOG
private static final String[] EMPTY_ARRAY
private final AttributeClassLoader classLoader
public SchemaEntityFactory()
private String getOid(org.apache.directory.api.ldap.model.entry.Entry entry, String objectType, boolean strict) throws org.apache.directory.api.ldap.model.exception.LdapInvalidAttributeValueException
org.apache.directory.api.ldap.model.exception.LdapInvalidAttributeValueExceptionprivate String getOid(org.apache.directory.api.ldap.model.schema.SchemaObject description, String objectType) throws org.apache.directory.api.ldap.model.exception.LdapInvalidAttributeValueException
org.apache.directory.api.ldap.model.exception.LdapInvalidAttributeValueExceptionprivate void checkEntry(org.apache.directory.api.ldap.model.entry.Entry entry,
String schemaEntity)
private void checkDescription(org.apache.directory.api.ldap.model.schema.SchemaObject description,
String schemaEntity)
private org.apache.directory.api.ldap.model.schema.registries.Schema getSchema(String schemaName, org.apache.directory.api.ldap.model.schema.registries.Registries registries)
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
getSchema in interface EntityFactoryentry - The Schema entryorg.apache.directory.api.ldap.model.exception.LdapException - If the instance can't be createdprivate org.apache.directory.api.ldap.model.schema.SyntaxChecker classLoadSyntaxChecker(org.apache.directory.api.ldap.model.schema.SchemaManager schemaManager,
String oid,
String className,
org.apache.directory.api.ldap.model.entry.Attribute byteCode)
throws org.apache.directory.api.ldap.model.exception.LdapException
org.apache.directory.api.ldap.model.exception.LdapExceptionpublic 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
getSyntaxChecker in interface EntityFactoryschemaManager - 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 oforg.apache.directory.api.ldap.model.exception.LdapException - if anything fails during loadingpublic 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
getSyntaxChecker in interface EntityFactoryschemaManager - The Schema ManagersyntaxCheckerDescription - The SyntaxChecker description objecttargetRegistries - The registries containing all the enabled SchemaObjectsschemaName - The schema this SchemaObject will be part oforg.apache.directory.api.ldap.model.exception.LdapException - If the creation has failedprivate org.apache.directory.api.ldap.model.schema.LdapComparator<?> classLoadComparator(org.apache.directory.api.ldap.model.schema.SchemaManager schemaManager,
String oid,
String className,
org.apache.directory.api.ldap.model.entry.Attribute byteCode)
throws org.apache.directory.api.ldap.model.exception.LdapException
org.apache.directory.api.ldap.model.exception.LdapExceptionpublic 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
getLdapComparator in interface EntityFactoryschemaManager - The Schema ManagercomparatorDescription - The LdapComparator description objecttargetRegistries - The registries containing all the enabled SchemaObjectsschemaName - The schema this SchemaObject will be part oforg.apache.directory.api.ldap.model.exception.LdapException - If the creation has failedpublic 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
getLdapComparator in interface EntityFactoryschemaManager - 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 oforg.apache.directory.api.ldap.model.exception.LdapException - if anything fails during loadingprivate org.apache.directory.api.ldap.model.schema.Normalizer classLoadNormalizer(org.apache.directory.api.ldap.model.schema.SchemaManager schemaManager,
String oid,
String className,
org.apache.directory.api.ldap.model.entry.Attribute byteCode)
throws org.apache.directory.api.ldap.model.exception.LdapException
org.apache.directory.api.ldap.model.exception.LdapExceptionpublic 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
getNormalizer in interface EntityFactoryschemaManager - The Schema ManagernormalizerDescription - The Normalizer description objecttargetRegistries - The registries containing all the enabled SchemaObjectsschemaName - The schema this SchemaObject will be part oforg.apache.directory.api.ldap.model.exception.LdapException - If the creation has failedpublic 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
getNormalizer in interface EntityFactoryschemaManager - 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 oforg.apache.directory.api.ldap.model.exception.LdapException - if anything fails during loadingpublic 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
getSyntax in interface EntityFactoryschemaManager - 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 oforg.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 loadedpublic 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
getMatchingRule in interface EntityFactoryschemaManager - 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 oforg.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 loadedprivate List<String> getStrings(org.apache.directory.api.ldap.model.entry.Attribute attr)
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
getObjectClass in interface EntityFactoryschemaManager - 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 oforg.apache.directory.api.ldap.model.exception.LdapException - if anything fails during loadingpublic 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
getAttributeType in interface EntityFactoryschemaManager - 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 oforg.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 loadedprivate String getFqcn(org.apache.directory.api.ldap.model.entry.Entry entry, String objectType) throws org.apache.directory.api.ldap.model.exception.LdapInvalidAttributeValueException
org.apache.directory.api.ldap.model.exception.LdapInvalidAttributeValueExceptionprivate String getFqcn(org.apache.directory.api.ldap.model.schema.LoadableSchemaObject description, String objectType)
private org.apache.directory.api.ldap.model.entry.Attribute getByteCode(org.apache.directory.api.ldap.model.schema.LoadableSchemaObject description,
String objectType)
private String getStringValue(org.apache.directory.api.ldap.model.entry.Attribute attribute)
private void setSchemaObjectProperties(org.apache.directory.api.ldap.model.schema.SchemaObject schemaObject,
org.apache.directory.api.ldap.model.entry.Entry entry,
org.apache.directory.api.ldap.model.schema.registries.Schema schema)
throws org.apache.directory.api.ldap.model.exception.LdapInvalidAttributeValueException
org.apache.directory.api.ldap.model.exception.LdapInvalidAttributeValueExceptionprivate void setSchemaObjectProperties(org.apache.directory.api.ldap.model.schema.SchemaObject schemaObject,
org.apache.directory.api.ldap.model.schema.SchemaObject description,
org.apache.directory.api.ldap.model.schema.registries.Schema schema)
Copyright © 2003–2017 The Apache Software Foundation. All rights reserved.