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

java.lang.Object
  extended by edu.internet2.middleware.grouper.hooks.AttributeHooks
      extended by edu.internet2.middleware.grouper.hooks.examples.AttributeSecurityFromTypeHook

public class AttributeSecurityFromTypeHook
extends AttributeHooks

 built in hook to grouper, which is turned on when it is configured in the grouper.properties.
 
 you can secure certain attributes from group types which can only be edited (added/removed/deleted)
 based on if the user doing the work is in a certain group (or wheel), or if the user is only a wheel group member.
 
 normally a user with admin rights on a group can edit the group attributes
 
 


Field Summary
 
Fields inherited from class edu.internet2.middleware.grouper.hooks.AttributeHooks
METHOD_ATTRIBUTE_POST_COMMIT_DELETE, METHOD_ATTRIBUTE_POST_COMMIT_INSERT, METHOD_ATTRIBUTE_POST_COMMIT_UPDATE, METHOD_ATTRIBUTE_POST_DELETE, METHOD_ATTRIBUTE_POST_INSERT, METHOD_ATTRIBUTE_POST_UPDATE, METHOD_ATTRIBUTE_PRE_DELETE, METHOD_ATTRIBUTE_PRE_INSERT, METHOD_ATTRIBUTE_PRE_UPDATE
 
Constructor Summary
AttributeSecurityFromTypeHook()
           
 
Method Summary
 void attributePostDelete(HooksContext hooksContext, HooksAttributeBean postDeleteBean)
          called right after a attribute delete
 void attributePostInsert(HooksContext hooksContext, HooksAttributeBean postInsertBean)
          called right after a attribute insert
 void attributePostUpdate(HooksContext hooksContext, HooksAttributeBean postUpdateBean)
          called right after a attribute update
static void manageSecurity(HooksAttributeBean postInsertBean, String summaryForLog)
           
 
Methods inherited from class edu.internet2.middleware.grouper.hooks.AttributeHooks
attributePostCommitDelete, attributePostCommitInsert, attributePostCommitUpdate, attributePreDelete, attributePreInsert, attributePreUpdate
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AttributeSecurityFromTypeHook

public AttributeSecurityFromTypeHook()
Method Detail

attributePostInsert

public void attributePostInsert(HooksContext hooksContext,
                                HooksAttributeBean postInsertBean)
Description copied from class: AttributeHooks
called right after a attribute insert

Overrides:
attributePostInsert in class AttributeHooks
See Also:
AttributeHooks.attributePostInsert(edu.internet2.middleware.grouper.hooks.beans.HooksContext, edu.internet2.middleware.grouper.hooks.beans.HooksAttributeBean)

attributePostDelete

public void attributePostDelete(HooksContext hooksContext,
                                HooksAttributeBean postDeleteBean)
Description copied from class: AttributeHooks
called right after a attribute delete

Overrides:
attributePostDelete in class AttributeHooks
See Also:
AttributeHooks.attributePostDelete(edu.internet2.middleware.grouper.hooks.beans.HooksContext, edu.internet2.middleware.grouper.hooks.beans.HooksAttributeBean)

attributePostUpdate

public void attributePostUpdate(HooksContext hooksContext,
                                HooksAttributeBean postUpdateBean)
Description copied from class: AttributeHooks
called right after a attribute update

Overrides:
attributePostUpdate in class AttributeHooks
See Also:
AttributeHooks.attributePostUpdate(edu.internet2.middleware.grouper.hooks.beans.HooksContext, edu.internet2.middleware.grouper.hooks.beans.HooksAttributeBean)

manageSecurity

public static void manageSecurity(HooksAttributeBean postInsertBean,
                                  String summaryForLog)
Parameters:
postInsertBean -
summaryForLog - summary for log message