Class AttributeTypeHelper
- java.lang.Object
-
- org.apache.directory.api.ldap.model.schema.registries.helper.AttributeTypeHelper
-
public final class AttributeTypeHelper extends Object
An helper class used to store all the methods associated with an AttributeType in relation with the Registries and SchemaManager.- Author:
- Apache Directory Project
-
-
Field Summary
Fields Modifier and Type Field Description private static org.slf4j.LoggerLOGA logger for this class
-
Constructor Summary
Constructors Modifier Constructor Description privateAttributeTypeHelper()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidaddToRegistries(AttributeType attributeType, SchemaErrorHandler errorHandler, Registries registries)Inject the AttributeType into the Registries, updating the references to other SchemaObject If one of the referenced SchemaObject does not exist (SUP, EQUALITY, ORDERING, SUBSTR, SYNTAX), an exception is thrown.private static voidbuildEquality(AttributeType attributeType, SchemaErrorHandler errorHandler, Registries registries)Build the EQUALITY MR reference for an AttributeTypeprivate static voidbuildOrdering(AttributeType attributeType, SchemaErrorHandler errorHandler, Registries registries)Build the ORDERING MR reference for an AttributeTypeprivate static voidbuildSubstring(AttributeType attributeType, SchemaErrorHandler errorHandler, Registries registries)Build the SUBSTR MR reference for an AttributeTypeprivate static booleanbuildSuperior(AttributeType attributeType, SchemaErrorHandler errorHandler, Registries registries)Build the Superior AttributeType reference for an AttributeTypeprivate static voidbuildSyntax(AttributeType attributeType, SchemaErrorHandler errorHandler, Registries registries)Build the SYNTAX reference for an AttributeTypeprivate static voidcheckCollective(AttributeType attributeType, SchemaErrorHandler errorHandler)Check the constraints for the Collective field.private static voidcheckUsage(AttributeType attributeType, SchemaErrorHandler errorHandler)Check the constraints for the Usage field.static voidremoveFromRegistries(AttributeType attributeType, SchemaErrorHandler errorHandler, Registries registries)Remove the AttributeType from the registries, updating the references to other SchemaObject.
-
-
-
Method Detail
-
addToRegistries
public static void addToRegistries(AttributeType attributeType, SchemaErrorHandler errorHandler, Registries registries) throws LdapException
Inject the AttributeType into the Registries, updating the references to other SchemaObject If one of the referenced SchemaObject does not exist (SUP, EQUALITY, ORDERING, SUBSTR, SYNTAX), an exception is thrown.- Parameters:
attributeType- The AttributeType to add to the RegistrieserrorHandler- Error handlerregistries- The Registries- Throws:
LdapException- If the AttributeType is not valid
-
buildSuperior
private static boolean buildSuperior(AttributeType attributeType, SchemaErrorHandler errorHandler, Registries registries)
Build the Superior AttributeType reference for an AttributeType- Parameters:
attributeType- The AttributeType to processerrorHandler- The error handlerregistries- The Registries instance- Returns:
- true if the AttributeType superiors hierarchy is correct, or if we don't have any superior
-
buildSyntax
private static void buildSyntax(AttributeType attributeType, SchemaErrorHandler errorHandler, Registries registries)
Build the SYNTAX reference for an AttributeType- Parameters:
attributeType- The AttributeType to processerrorHandler- The error handlerregistries- The Registries instance
-
buildEquality
private static void buildEquality(AttributeType attributeType, SchemaErrorHandler errorHandler, Registries registries)
Build the EQUALITY MR reference for an AttributeType- Parameters:
attributeType- The AttributeType to processerrorHandler- The error handlerregistries- The Registries instance
-
buildSubstring
private static void buildSubstring(AttributeType attributeType, SchemaErrorHandler errorHandler, Registries registries)
Build the SUBSTR MR reference for an AttributeType- Parameters:
attributeType- The AttributeType to processerrorHandler- The error handlerregistries- The Registries instance
-
buildOrdering
private static void buildOrdering(AttributeType attributeType, SchemaErrorHandler errorHandler, Registries registries)
Build the ORDERING MR reference for an AttributeType- Parameters:
attributeType- The AttributeType to processerrorHandler- The error handlerregistries- The Registries instance
-
checkUsage
private static void checkUsage(AttributeType attributeType, SchemaErrorHandler errorHandler)
Check the constraints for the Usage field.- Parameters:
attributeType- The AttributeType to checkerrorHandler- The error handler
-
checkCollective
private static void checkCollective(AttributeType attributeType, SchemaErrorHandler errorHandler)
Check the constraints for the Collective field.- Parameters:
attributeType- The AttributeType to checkerrorHandler- The error handler
-
removeFromRegistries
public static void removeFromRegistries(AttributeType attributeType, SchemaErrorHandler errorHandler, Registries registries) throws LdapException
Remove the AttributeType from the registries, updating the references to other SchemaObject. If one of the referenced SchemaObject does not exist (SUP, EQUALITY, ORDERING, SUBSTR, SYNTAX), an exception is thrown.- Parameters:
attributeType- The AttributeType to remove from the RegistrieserrorHandler- Error handlerregistries- The Registries- Throws:
LdapException- If the AttributeType is not valid
-
-