org.apache.directory.server.core.schema.registries.synchronizers
Class AttributeTypeSynchronizer

java.lang.Object
  extended by org.apache.directory.server.core.schema.registries.synchronizers.AbstractRegistrySynchronizer
      extended by org.apache.directory.server.core.schema.registries.synchronizers.AttributeTypeSynchronizer
All Implemented Interfaces:
RegistrySynchronizer

public class AttributeTypeSynchronizer
extends AbstractRegistrySynchronizer

A handler for operations performed to add, delete, modify, rename and move schema normalizers.

Version:
$Rev$, $Date$
Author:
Apache Directory Project

Field Summary
 
Fields inherited from class org.apache.directory.server.core.schema.registries.synchronizers.AbstractRegistrySynchronizer
factory, m_oidAT, schemaManager
 
Fields inherited from interface org.apache.directory.server.core.schema.registries.synchronizers.RegistrySynchronizer
SCHEMA_MODIFIED, SCHEMA_UNCHANGED
 
Constructor Summary
AttributeTypeSynchronizer(org.apache.directory.shared.ldap.schema.SchemaManager schemaManager)
          Creates a new instance of AttributeTypeSynchronizer.
 
Method Summary
 void add(org.apache.directory.shared.ldap.entry.ServerEntry entry)
          Adds a new SchemaObject to its registry
 void delete(org.apache.directory.shared.ldap.entry.ServerEntry entry, boolean cascade)
          Delete the schema object and update the registries
 boolean modify(ModifyOperationContext opContext, org.apache.directory.shared.ldap.entry.ServerEntry targetEntry, boolean cascade)
          Applies a set of modification to an entry
 void move(org.apache.directory.shared.ldap.name.DN oriChildName, org.apache.directory.shared.ldap.name.DN newParentName, org.apache.directory.shared.ldap.entry.ServerEntry entry, boolean cascade)
           
 void moveAndRename(org.apache.directory.shared.ldap.name.DN oriChildName, org.apache.directory.shared.ldap.name.DN newParentName, org.apache.directory.shared.ldap.name.RDN newRn, boolean deleteOldRn, org.apache.directory.shared.ldap.entry.ServerEntry entry, boolean cascade)
           
 void rename(org.apache.directory.shared.ldap.entry.ServerEntry entry, org.apache.directory.shared.ldap.name.RDN newRdn, boolean cascade)
          Rename a schemaObject.
 
Methods inherited from class org.apache.directory.server.core.schema.registries.synchronizers.AbstractRegistrySynchronizer
addToSchema, checkOidExists, checkOidIsUnique, checkOidIsUnique, checkOidIsUnique, checkParent, deleteFromSchema, getOid, getOids, getReferenced, getSchemaName, isSchemaEnabled, isSchemaLoaded, isSchemaLoaded, registerOids, unregisterOids
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AttributeTypeSynchronizer

public AttributeTypeSynchronizer(org.apache.directory.shared.ldap.schema.SchemaManager schemaManager)
                          throws java.lang.Exception
Creates a new instance of AttributeTypeSynchronizer.

Parameters:
schemaManager - The global schemaManager
Throws:
java.lang.Exception - If the initialization failed
Method Detail

add

public void add(org.apache.directory.shared.ldap.entry.ServerEntry entry)
         throws java.lang.Exception
Adds a new SchemaObject to its registry

Parameters:
entry - The SchemObject to add
Throws:
java.lang.Exception - If the addition failed

modify

public boolean modify(ModifyOperationContext opContext,
                      org.apache.directory.shared.ldap.entry.ServerEntry targetEntry,
                      boolean cascade)
               throws java.lang.Exception
Applies a set of modification to an entry

Specified by:
modify in interface RegistrySynchronizer
Specified by:
modify in class AbstractRegistrySynchronizer
Parameters:
opContext - The OperationContext, which contains the entry and the modifications to apply
targetEntry - The modified entry
cascade - Unused
Returns:
True if the modification has been done
Throws:
java.lang.Exception - If the modification failed

delete

public void delete(org.apache.directory.shared.ldap.entry.ServerEntry entry,
                   boolean cascade)
            throws java.lang.Exception
Delete the schema object and update the registries

Parameters:
entry - The entry associated with the SchemaObject to delete
cascade - unused
Throws:
java.lang.Exception - If the deletion failed

rename

public void rename(org.apache.directory.shared.ldap.entry.ServerEntry entry,
                   org.apache.directory.shared.ldap.name.RDN newRdn,
                   boolean cascade)
            throws java.lang.Exception
Rename a schemaObject. It is not supposed to have any child

Parameters:
entry - The entry to be renamed
newRdn - The new entry name
cascade - unused
Throws:
java.lang.Exception - If the rename failed

moveAndRename

public void moveAndRename(org.apache.directory.shared.ldap.name.DN oriChildName,
                          org.apache.directory.shared.ldap.name.DN newParentName,
                          org.apache.directory.shared.ldap.name.RDN newRn,
                          boolean deleteOldRn,
                          org.apache.directory.shared.ldap.entry.ServerEntry entry,
                          boolean cascade)
                   throws java.lang.Exception
Throws:
java.lang.Exception

move

public void move(org.apache.directory.shared.ldap.name.DN oriChildName,
                 org.apache.directory.shared.ldap.name.DN newParentName,
                 org.apache.directory.shared.ldap.entry.ServerEntry entry,
                 boolean cascade)
          throws java.lang.Exception
Throws:
java.lang.Exception


Copyright © 2003-2011 Apache Software Foundation. All Rights Reserved.