Class GroupAttributeNameValidationHook
java.lang.Object
edu.internet2.middleware.grouper.hooks.GroupHooks
edu.internet2.middleware.grouper.hooks.examples.GroupAttributeNameValidationHook
built in hook to grouper, which is turned on when it is configured in the grouper.properties. you can restrict certain attributes of a group to be within a certain regex
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
default regexstatic final String
for unit testsstatic final String
for unit testsFields inherited from class edu.internet2.middleware.grouper.hooks.GroupHooks
METHOD_GROUP_POST_COMMIT_DELETE, METHOD_GROUP_POST_COMMIT_INSERT, METHOD_GROUP_POST_COMMIT_UPDATE, METHOD_GROUP_POST_DELETE, METHOD_GROUP_POST_INSERT, METHOD_GROUP_POST_UPDATE, METHOD_GROUP_PRE_DELETE, METHOD_GROUP_PRE_INSERT, METHOD_GROUP_PRE_UPDATE
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic void
addAttributeNameData
(String attributeName, String regex, String vetoMessage, String originalProperty) Add a custom validator after Grouper startup (mainly used for test classes)static void
void
groupPreInsert
(HooksContext hooksContext, HooksGroupBean preInsertBean) called right before a group insertvoid
groupPreUpdate
(HooksContext hooksContext, HooksGroupBean preUpdateBean) called right before a group updatestatic void
registerHookIfNecessary
(boolean addTestValidation) see if this is configured in the grouper.properties, if so, register this hookstatic void
removeAttributeNameData
(String attributeName) Methods inherited from class edu.internet2.middleware.grouper.hooks.GroupHooks
groupPostCommitDelete, groupPostCommitInsert, groupPostCommitUpdate, groupPostDelete, groupPostInsert, groupPostUpdate, groupPreDelete
-
Field Details
-
TEST_ATTRIBUTE_NAME
for unit tests- See Also:
-
TEST_PATTERN
for unit tests- See Also:
-
defaultRegex
default regex- See Also:
-
-
Constructor Details
-
GroupAttributeNameValidationHook
public GroupAttributeNameValidationHook()
-
-
Method Details
-
clearHook
public static void clearHook() -
registerHookIfNecessary
public static void registerHookIfNecessary(boolean addTestValidation) see if this is configured in the grouper.properties, if so, register this hook- Parameters:
addTestValidation
- if a test validation should be added
-
groupPreInsert
Description copied from class:GroupHooks
called right before a group insert -
addAttributeNameData
public static void addAttributeNameData(String attributeName, String regex, String vetoMessage, String originalProperty) Add a custom validator after Grouper startup (mainly used for test classes)- Parameters:
attributeName
- attribute key for recordregex
- pattern stringvetoMessage
- veto messageoriginalProperty
- description of where the validation came from (property, etc)
-
removeAttributeNameData
- Parameters:
attributeName
- attribute key for record
-
groupPreUpdate
Description copied from class:GroupHooks
called right before a group update
-