Defining own hooks
Step 1: Copying & pasting grouper hooks to own java package
The original grouper hooks are located in [grouper api installation directory]/src/grouper/edu/internet2/middleware/grouper/hooks. The root is the edu level, thus having edu.internet2.middleware.grouper.hooks as the package name.
We have introduced an additional class hierarchy [grouper api installation directory]/src/grouper/newLevel1/newLevel2/hooks.
Now copy & paste all original grouper hooks, rename the class names to "MyXXXHook.java" (or anything) and modify the package name of each class to newLevel1.newLevel2.hooks..
Step 2: Make sure the new hooks are found
Open the file [grouper api installation directory]/conf/grouper.base.properties and copy all of the
hooks.xxx.class=edu.yourSchool.it.YourSchoolGroupHooks,edu.yourSchool.it.YourSchoolxxxHooks2
lines into grouper.properties configuration file.
Now register the new classes by modifying the new entries:
hooks.attribute.class=newLevel1.newLevel2.hooks.MyAttributeHook
hooks.attributeAssign.class=newLevel1.newLevel2.hooks.MyAttributeAssignHook
(and so on for all hooks)
Step 3: Customize your hooks
Sending mails to wheel members if important member groups are deleted