Class HookVeto
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
edu.internet2.middleware.grouper.hooks.logic.HookVeto
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
RuleVeto
base class for grouper hook veto. Throw this or a subclass to veto an action (needs
to be thrown before a commit)
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
assignVetoType
(VetoType vetoType1, boolean overwriteIfExisting) veto type.return the keyset of attributes, but never return null.getAttribute
(String key) get the value of a key or null if not theredefault text that would be shown to user if there is no externalized string available.key of the reason, e.g.veto type.void
putAttribute
(String key, Object value) put an attributevoid
setVetoType
(VetoType vetoType1) veto type.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
HookVeto
construct a veto- Parameters:
theReasonKey
- key of the reason, e.g. something that could be used in an externalized string file e.g. for the UI. e.g. hook.veto.group.invalidExtensiontheReason
- default text that would be shown to user if there is no externalized string available. e.g. 'Invalid ID for group. ID must be less than 20 characters.
-
-
Method Details
-
getVetoType
veto type. this will be assigned automatically if not manually- Returns:
- the vetoType
-
setVetoType
veto type. this will be assigned automatically if not manually- Parameters:
vetoType1
- the vetoType to set
-
assignVetoType
veto type. this will be assigned automatically if not manually- Parameters:
vetoType1
- the vetoType to setoverwriteIfExisting
- true to overwrite if existing
-
getAttribute
get the value of a key or null if not there- Parameters:
key
-- Returns:
- the value or null if not there
-
putAttribute
put an attribute- Parameters:
key
-value
-
-
attributeKeySet
return the keyset of attributes, but never return null.- Returns:
- the keyset
-
getReasonKey
key of the reason, e.g. something that could be used in an externalized string file e.g. for the UI. e.g. hook.veto.group.invalidExtension- Returns:
- the reasonKey
-
getReason
default text that would be shown to user if there is no externalized string available. e.g. 'Invalid ID for group. ID must be less than 20 characters.- Returns:
- the reason
-