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

java.lang.Object
  extended by edu.internet2.middleware.grouper.hooks.AttributeDefHooks
      extended by edu.internet2.middleware.grouper.hooks.examples.UniqueObjectAttributeDefHook

public class UniqueObjectAttributeDefHook
extends AttributeDefHooks

When attribute defs 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.AttributeDefHooks
METHOD_ATTRIBUTE_DEF_POST_COMMIT_DELETE, METHOD_ATTRIBUTE_DEF_POST_COMMIT_INSERT, METHOD_ATTRIBUTE_DEF_POST_COMMIT_UPDATE, METHOD_ATTRIBUTE_DEF_POST_DELETE, METHOD_ATTRIBUTE_DEF_POST_INSERT, METHOD_ATTRIBUTE_DEF_POST_UPDATE, METHOD_ATTRIBUTE_DEF_PRE_DELETE, METHOD_ATTRIBUTE_DEF_PRE_INSERT, METHOD_ATTRIBUTE_DEF_PRE_UPDATE
 
Constructor Summary
UniqueObjectAttributeDefHook()
           
 
Method Summary
static void assertNoAttributeDefsWithThisNameExist(String name)
          make sure no groups by this name exist
 void attributeDefPreInsert(HooksContext hooksContext, HooksAttributeDefBean preInsertBean)
          called right before a attribute insert
 void attributeDefPreUpdate(HooksContext hooksContext, HooksAttributeDefBean preUpdateBean)
          called right before a attribute update
 
Methods inherited from class edu.internet2.middleware.grouper.hooks.AttributeDefHooks
attributeDefPostCommitDelete, attributeDefPostCommitInsert, attributeDefPostCommitUpdate, attributeDefPostDelete, attributeDefPostInsert, attributeDefPostUpdate, attributeDefPreDelete
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UniqueObjectAttributeDefHook

public UniqueObjectAttributeDefHook()
Method Detail

attributeDefPreUpdate

public void attributeDefPreUpdate(HooksContext hooksContext,
                                  HooksAttributeDefBean preUpdateBean)
Description copied from class: AttributeDefHooks
called right before a attribute update

Overrides:
attributeDefPreUpdate in class AttributeDefHooks
See Also:
AttributeDefHooks.attributeDefPreUpdate(edu.internet2.middleware.grouper.hooks.beans.HooksContext, edu.internet2.middleware.grouper.hooks.beans.HooksAttributeDefBean)

attributeDefPreInsert

public void attributeDefPreInsert(HooksContext hooksContext,
                                  HooksAttributeDefBean preInsertBean)
Description copied from class: AttributeDefHooks
called right before a attribute insert

Overrides:
attributeDefPreInsert in class AttributeDefHooks
See Also:
AttributeDefHooks.attributeDefPreInsert(edu.internet2.middleware.grouper.hooks.beans.HooksContext, edu.internet2.middleware.grouper.hooks.beans.HooksAttributeDefBean)

assertNoAttributeDefsWithThisNameExist

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

Parameters:
name -