edu.internet2.middleware.grouper.hooks.examples
Class UniqueObjectStemHook

java.lang.Object
  extended by edu.internet2.middleware.grouper.hooks.StemHooks
      extended by edu.internet2.middleware.grouper.hooks.examples.UniqueObjectStemHook

public class UniqueObjectStemHook
extends StemHooks

When folders are created or saved, make sure there are no name conflicts with other object types


Field Summary
 
Fields inherited from class edu.internet2.middleware.grouper.hooks.StemHooks
METHOD_STEM_POST_COMMIT_DELETE, METHOD_STEM_POST_COMMIT_INSERT, METHOD_STEM_POST_COMMIT_UPDATE, METHOD_STEM_POST_DELETE, METHOD_STEM_POST_INSERT, METHOD_STEM_POST_UPDATE, METHOD_STEM_PRE_DELETE, METHOD_STEM_PRE_INSERT, METHOD_STEM_PRE_UPDATE
 
Constructor Summary
UniqueObjectStemHook()
           
 
Method Summary
static void assertNoStemsWithThisNameExist(String name)
          make sure no groups by this name exist
 void stemPreInsert(HooksContext hooksContext, HooksStemBean preInsertBean)
          called right before a stem insert
 void stemPreUpdate(HooksContext hooksContext, HooksStemBean preUpdateBean)
          called right before a stem update
 
Methods inherited from class edu.internet2.middleware.grouper.hooks.StemHooks
stemPostCommitDelete, stemPostCommitInsert, stemPostCommitUpdate, stemPostDelete, stemPostInsert, stemPostUpdate, stemPreDelete
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UniqueObjectStemHook

public UniqueObjectStemHook()
Method Detail

stemPreUpdate

public void stemPreUpdate(HooksContext hooksContext,
                          HooksStemBean preUpdateBean)
Description copied from class: StemHooks
called right before a stem update

Overrides:
stemPreUpdate in class StemHooks
See Also:
StemHooks.stemPreUpdate(edu.internet2.middleware.grouper.hooks.beans.HooksContext, edu.internet2.middleware.grouper.hooks.beans.HooksStemBean)

stemPreInsert

public void stemPreInsert(HooksContext hooksContext,
                          HooksStemBean preInsertBean)
Description copied from class: StemHooks
called right before a stem insert

Overrides:
stemPreInsert in class StemHooks
See Also:
StemHooks.stemPreInsert(edu.internet2.middleware.grouper.hooks.beans.HooksContext, edu.internet2.middleware.grouper.hooks.beans.HooksStemBean)

assertNoStemsWithThisNameExist

public static void assertNoStemsWithThisNameExist(String name)
make sure no groups by this name exist

Parameters:
name -