org.apache.directory.server.core.schema
Class MetaSchemaHandler

java.lang.Object
  extended by org.apache.directory.server.core.schema.MetaSchemaHandler
All Implemented Interfaces:
SchemaChangeHandler

public class MetaSchemaHandler
extends java.lang.Object
implements SchemaChangeHandler

Handles events where entries of objectClass metaSchema are modified.

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

Constructor Summary
MetaSchemaHandler(Registries globalRegistries, PartitionSchemaLoader loader)
           
 
Method Summary
 void add(org.apache.directory.shared.ldap.name.LdapDN name, ServerEntry entry)
          Handles the addition of a metaSchema object to the schema partition.
 void delete(org.apache.directory.shared.ldap.name.LdapDN name, ServerEntry entry, boolean cascade)
          Called to react to the deletion of a metaSchema object.
 void modify(org.apache.directory.shared.ldap.name.LdapDN name, java.util.List<org.apache.directory.shared.ldap.entry.Modification> mods, ServerEntry entry, ServerEntry targetEntry, boolean cascade)
          Reacts to modification of a metaSchema object.
 void modify(org.apache.directory.shared.ldap.name.LdapDN name, org.apache.directory.shared.ldap.entry.ModificationOperation modOp, ServerEntry mods, ServerEntry entry, ServerEntry targetEntry, boolean cascade)
          Reacts to modification of a metaSchema object.
 void move(org.apache.directory.shared.ldap.name.LdapDN oriChildName, org.apache.directory.shared.ldap.name.LdapDN newParentName, org.apache.directory.shared.ldap.name.Rdn newRn, boolean deleteOldRn, ServerEntry entry, boolean cascaded)
           
 void move(org.apache.directory.shared.ldap.name.LdapDN oriChildName, org.apache.directory.shared.ldap.name.LdapDN newParentName, java.lang.String newRn, boolean deleteOldRn, ServerEntry entry, boolean cascade)
          Moves are not allowed for metaSchema objects so this always throws an UNWILLING_TO_PERFORM LdapException.
 void rename(org.apache.directory.shared.ldap.name.LdapDN name, ServerEntry entry, org.apache.directory.shared.ldap.name.Rdn newRdn, boolean cascade)
          Responds to the rdn (commonName) of the metaSchema object being changed.
 void replace(org.apache.directory.shared.ldap.name.LdapDN oriChildName, org.apache.directory.shared.ldap.name.LdapDN newParentName, ServerEntry entry, boolean cascade)
          Moves are not allowed for metaSchema objects so this always throws an UNWILLING_TO_PERFORM LdapException.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MetaSchemaHandler

public MetaSchemaHandler(Registries globalRegistries,
                         PartitionSchemaLoader loader)
                  throws javax.naming.NamingException
Throws:
javax.naming.NamingException
Method Detail

modify

public void modify(org.apache.directory.shared.ldap.name.LdapDN name,
                   org.apache.directory.shared.ldap.entry.ModificationOperation modOp,
                   ServerEntry mods,
                   ServerEntry entry,
                   ServerEntry targetEntry,
                   boolean cascade)
            throws java.lang.Exception
Reacts to modification of a metaSchema object. At this point the only considerable changes are to the m-disabled and the m-dependencies attributes.

Specified by:
modify in interface SchemaChangeHandler
Parameters:
name - the dn of the metaSchema object modified
modOp - the type of modification operation being performed
mods - the attribute modifications as an Attributes object
entry - the entry after the modifications have been applied
Throws:
java.lang.Exception

modify

public void modify(org.apache.directory.shared.ldap.name.LdapDN name,
                   java.util.List<org.apache.directory.shared.ldap.entry.Modification> mods,
                   ServerEntry entry,
                   ServerEntry targetEntry,
                   boolean cascade)
            throws java.lang.Exception
Reacts to modification of a metaSchema object. At this point the only considerable changes are to the m-disabled and the m-dependencies attributes.

Specified by:
modify in interface SchemaChangeHandler
Parameters:
name - the dn of the metaSchema object modified
mods - the attribute modifications as an ModificationItem arry
entry - the entry after the modifications have been applied
Throws:
java.lang.Exception

move

public void move(org.apache.directory.shared.ldap.name.LdapDN oriChildName,
                 org.apache.directory.shared.ldap.name.LdapDN newParentName,
                 org.apache.directory.shared.ldap.name.Rdn newRn,
                 boolean deleteOldRn,
                 ServerEntry entry,
                 boolean cascaded)
          throws javax.naming.NamingException
Specified by:
move in interface SchemaChangeHandler
Throws:
javax.naming.NamingException

add

public void add(org.apache.directory.shared.ldap.name.LdapDN name,
                ServerEntry entry)
         throws java.lang.Exception
Handles the addition of a metaSchema object to the schema partition.

Specified by:
add in interface SchemaChangeHandler
Parameters:
name - the dn of the new metaSchema object
entry - the attributes of the new metaSchema object
Throws:
java.lang.Exception

delete

public void delete(org.apache.directory.shared.ldap.name.LdapDN name,
                   ServerEntry entry,
                   boolean cascade)
            throws java.lang.Exception
Called to react to the deletion of a metaSchema object. This method simply removes the schema from the loaded schema map of the global registries.

Specified by:
delete in interface SchemaChangeHandler
Parameters:
name - the dn of the metaSchema object being deleted
entry - the attributes of the metaSchema object
Throws:
java.lang.Exception

rename

public void rename(org.apache.directory.shared.ldap.name.LdapDN name,
                   ServerEntry entry,
                   org.apache.directory.shared.ldap.name.Rdn newRdn,
                   boolean cascade)
            throws java.lang.Exception
Responds to the rdn (commonName) of the metaSchema object being changed. Changes all the schema entities associated with the renamed schema so they now map to a new schema name.

Specified by:
rename in interface SchemaChangeHandler
Parameters:
name - the dn of the metaSchema object renamed
entry - the entry of the metaSchema object before the rename
newRdn - the new commonName of the metaSchema object
Throws:
java.lang.Exception

move

public void move(org.apache.directory.shared.ldap.name.LdapDN oriChildName,
                 org.apache.directory.shared.ldap.name.LdapDN newParentName,
                 java.lang.String newRn,
                 boolean deleteOldRn,
                 ServerEntry entry,
                 boolean cascade)
          throws javax.naming.NamingException
Moves are not allowed for metaSchema objects so this always throws an UNWILLING_TO_PERFORM LdapException.

Throws:
javax.naming.NamingException

replace

public void replace(org.apache.directory.shared.ldap.name.LdapDN oriChildName,
                    org.apache.directory.shared.ldap.name.LdapDN newParentName,
                    ServerEntry entry,
                    boolean cascade)
             throws javax.naming.NamingException
Moves are not allowed for metaSchema objects so this always throws an UNWILLING_TO_PERFORM LdapException.

Specified by:
replace in interface SchemaChangeHandler
Throws:
javax.naming.NamingException


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