org.apache.directory.api.ldap.model.schema.registries.helper
Class ObjectClassHelper

java.lang.Object
  extended by org.apache.directory.api.ldap.model.schema.registries.helper.ObjectClassHelper

public 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

Constructor Summary
ObjectClassHelper()
           
 
Method Summary
static void addToRegistries(ObjectClass objectClass, List<Throwable> errors, Registries registries)
          Inject the ObjectClass into the registries, updating the references to other SchemaObject
static void removeFromRegistries(ObjectClass objectClass, List<Throwable> errors, Registries registries)
          Remove the ObjectClass from the registries, updating the references to other SchemaObject.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ObjectClassHelper

public ObjectClassHelper()
Method Detail

addToRegistries

public static void addToRegistries(ObjectClass objectClass,
                                   List<Throwable> errors,
                                   Registries registries)
                            throws LdapException
Inject the ObjectClass into the registries, updating the references to other SchemaObject

Parameters:
objectClass - The ObjectClass to add to the Registries
errors - The errors we got while adding the ObjectClass to the Registries
registries - The Registries
Throws:
Exception - on failure
LdapException

removeFromRegistries

public static void removeFromRegistries(ObjectClass objectClass,
                                        List<Throwable> errors,
                                        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
errors - The errors we got while removing the ObjectClass from the registries
registries - The Registries
Throws:
If - the ObjectClass is not valid
LdapException


Copyright © 2003-2013 The Apache Software Foundation. All Rights Reserved.