Class ObjectClassHelper


  • public final class ObjectClassHelper
    extends Object
    An helper class used to store all the methods associated with an ObjectClass in relation with the Registries and SchemaManager.
    Author:
    Apache Directory Project
    • Field Detail

      • LOG

        private static final org.slf4j.Logger LOG
        A logger for this class
    • Constructor Detail

      • ObjectClassHelper

        private ObjectClassHelper()
    • Method Detail

      • addToRegistries

        public static void addToRegistries​(ObjectClass objectClass,
                                           SchemaErrorHandler errorHandler,
                                           Registries registries)
        Inject the ObjectClass into the registries, updating the references to other SchemaObject
        Parameters:
        objectClass - The ObjectClass to add to the Registries
        errorHandler - Error handler
        registries - The Registries
      • buildSuperiors

        private static void buildSuperiors​(ObjectClass objectClass,
                                           SchemaErrorHandler errorHandler,
                                           Registries registries)
        Build the references to this ObjectClass SUPERIORS, checking that the type hierarchy is correct.
        Parameters:
        objectClass - The oOjectClass to process
        errorHandler - The error handler
        registries - The Registries instance
      • buildMust

        private static void buildMust​(ObjectClass objectClass,
                                      SchemaErrorHandler errorHandler,
                                      Registries registries)
        Build and check the MUST AT for this ObjectClass.
        Parameters:
        objectClass - The oOjectClass to process
        errorHandler - The error handler
        registries - The Registries instance
      • buildMay

        private static void buildMay​(ObjectClass objectClass,
                                     SchemaErrorHandler errorHandler,
                                     Registries registries)
        Build and check the MAY AT for this ObjectClass
        Parameters:
        objectClass - The oOjectClass to process
        errorHandler - The error handler
        registries - The Registries instance
      • removeFromRegistries

        public static void removeFromRegistries​(ObjectClass objectClass,
                                                SchemaErrorHandler errorHandler,
                                                Registries registries)
                                         throws LdapException
        Remove the ObjectClass from the registries, updating the references to other SchemaObject. If one of the referenced SchemaObject does not exist (SUPERIORS, MAY, MUST), an exception is thrown.
        Parameters:
        objectClass - The ObjectClass to remove fro the registries
        errorHandler - Error handler
        registries - The Registries
        Throws:
        LdapException - If the ObjectClass is not valid