edu.internet2.middleware.grouper.rules
Enum RuleCheckType

java.lang.Object
  extended by java.lang.Enum<RuleCheckType>
      extended by edu.internet2.middleware.grouper.rules.RuleCheckType
All Implemented Interfaces:
Serializable, Comparable<RuleCheckType>

public enum RuleCheckType
extends Enum<RuleCheckType>

type of checking for rules

Author:
mchyzer

Enum Constant Summary
attributeDefCreate
          if a group is created
flattenedMembershipAdd
          if there is a membership remove flattened
flattenedMembershipAddInFolder
          if there is a membership(flattened) add of a group in a stem
flattenedMembershipRemove
          if there is a membership remove flattened
flattenedMembershipRemoveInFolder
          if there is a membership(flattened) remove of a group in a stem
groupCreate
          if a group is created
membershipAdd
          if there is a membership add in transaction
membershipAddInFolder
          if there is a membership remove in transaction of remove of a group in a stem
membershipDisabledDate
          query daily for memberships that are enabled, but have a disabled date coming up
membershipRemove
          if there is a membership remove in transaction of remove
membershipRemoveInFolder
          if there is a membership remove in transaction of remove of a group in a stem
permissionAssignToSubject
          if there is a permission assign in transaction to a subject, not to a role
permissionDisabledDate
          query daily for permissions that are enabled, but have a disabled date coming up
stemCreate
          if a stem is created
subjectAssignInStem
          if there is a membership add, privilege add, permission add, etc in transaction
 
Method Summary
abstract  void addElVariables(RuleDefinition ruleDefinition, Map<String,Object> variableMap, RulesBean rulesBean, boolean hasAccessToElApi)
          add EL variables to the substitute map
 RuleCheck checkKey(RuleDefinition ruleDefinition)
          get the check key for the index
static RuleCheck checkKeyForAttributeDefinition(RuleDefinition ruleDefinition)
           
static RuleCheck checkKeyForStem(RuleDefinition ruleDefinition)
           
abstract  boolean isCheckOwnerTypeAttributeDef(RuleDefinition ruleDefinition)
          Whether or not the rule check owner type is an attribute def
abstract  boolean isCheckOwnerTypeGroup(RuleDefinition ruleDefinition)
          Whether or not the rule check owner type is a group
abstract  boolean isCheckOwnerTypeStem(RuleDefinition ruleDefinition)
          Whether or not the rule check owner type is a stem
abstract  Set<RuleDefinition> ruleDefinitions(RuleEngine ruleEngine, RulesBean rulesBean)
          get the check object from the rules bean
 void runDaemon(RuleDefinition ruleDefinition)
          run the daemon to sync up the state
 String validate(boolean allowCheckArgs, RuleDefinition ruleDefinition, RuleCheck ruleCheck, boolean requireStemScope, boolean ownerIsGroup, boolean ownerIsStem, boolean ownerIsAttributeDef)
          validate this check type
abstract  String validate(RuleDefinition ruleDefinition, RuleCheck ruleCheck)
          validate this check type
static RuleCheckType valueOf(String name)
          Returns the enum constant of this type with the specified name.
static RuleCheckType valueOfIgnoreCase(String string, boolean exceptionOnNull)
          do a case-insensitive matching
static RuleCheckType[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

permissionDisabledDate

public static final RuleCheckType permissionDisabledDate
query daily for permissions that are enabled, but have a disabled date coming up


membershipDisabledDate

public static final RuleCheckType membershipDisabledDate
query daily for memberships that are enabled, but have a disabled date coming up


flattenedMembershipAddInFolder

public static final RuleCheckType flattenedMembershipAddInFolder
if there is a membership(flattened) add of a group in a stem


flattenedMembershipRemoveInFolder

public static final RuleCheckType flattenedMembershipRemoveInFolder
if there is a membership(flattened) remove of a group in a stem


flattenedMembershipRemove

public static final RuleCheckType flattenedMembershipRemove
if there is a membership remove flattened


membershipRemove

public static final RuleCheckType membershipRemove
if there is a membership remove in transaction of remove


membershipRemoveInFolder

public static final RuleCheckType membershipRemoveInFolder
if there is a membership remove in transaction of remove of a group in a stem


groupCreate

public static final RuleCheckType groupCreate
if a group is created


stemCreate

public static final RuleCheckType stemCreate
if a stem is created


membershipAdd

public static final RuleCheckType membershipAdd
if there is a membership add in transaction


subjectAssignInStem

public static final RuleCheckType subjectAssignInStem
if there is a membership add, privilege add, permission add, etc in transaction


flattenedMembershipAdd

public static final RuleCheckType flattenedMembershipAdd
if there is a membership remove flattened


membershipAddInFolder

public static final RuleCheckType membershipAddInFolder
if there is a membership remove in transaction of remove of a group in a stem


attributeDefCreate

public static final RuleCheckType attributeDefCreate
if a group is created


permissionAssignToSubject

public static final RuleCheckType permissionAssignToSubject
if there is a permission assign in transaction to a subject, not to a role

Method Detail

values

public static RuleCheckType[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (RuleCheckType c : RuleCheckType.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static RuleCheckType valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null

checkKey

public RuleCheck checkKey(RuleDefinition ruleDefinition)
get the check key for the index

Parameters:
ruleDefinition -
Returns:
the rule check for the index

validate

public abstract String validate(RuleDefinition ruleDefinition,
                                RuleCheck ruleCheck)
validate this check type

Parameters:
ruleDefinition -
ruleCheck -
Returns:
the error or null if valid

ruleDefinitions

public abstract Set<RuleDefinition> ruleDefinitions(RuleEngine ruleEngine,
                                                    RulesBean rulesBean)
get the check object from the rules bean

Parameters:
ruleEngine -
rulesBean -
Returns:
the rules

addElVariables

public abstract void addElVariables(RuleDefinition ruleDefinition,
                                    Map<String,Object> variableMap,
                                    RulesBean rulesBean,
                                    boolean hasAccessToElApi)
add EL variables to the substitute map

Parameters:
ruleDefinition -
variableMap -
rulesBean -
hasAccessToElApi -

isCheckOwnerTypeGroup

public abstract boolean isCheckOwnerTypeGroup(RuleDefinition ruleDefinition)
Whether or not the rule check owner type is a group

Parameters:
ruleDefinition -
Returns:
true if check owner type is a group

isCheckOwnerTypeStem

public abstract boolean isCheckOwnerTypeStem(RuleDefinition ruleDefinition)
Whether or not the rule check owner type is a stem

Parameters:
ruleDefinition -
Returns:
true if check owner type is a stem

isCheckOwnerTypeAttributeDef

public abstract boolean isCheckOwnerTypeAttributeDef(RuleDefinition ruleDefinition)
Whether or not the rule check owner type is an attribute def

Parameters:
ruleDefinition -
Returns:
true if check owner type is an attribute def

validate

public String validate(boolean allowCheckArgs,
                       RuleDefinition ruleDefinition,
                       RuleCheck ruleCheck,
                       boolean requireStemScope,
                       boolean ownerIsGroup,
                       boolean ownerIsStem,
                       boolean ownerIsAttributeDef)
validate this check type

Parameters:
allowCheckArgs -
ruleDefinition -
ruleCheck -
requireStemScope - true to require, false to require blank
ownerIsGroup -
ownerIsStem -
ownerIsAttributeDef -
Returns:
the error or null if valid

valueOfIgnoreCase

public static RuleCheckType valueOfIgnoreCase(String string,
                                              boolean exceptionOnNull)
do a case-insensitive matching

Parameters:
string -
exceptionOnNull - will not allow null or blank entries
Returns:
the enum or null or exception if not found

runDaemon

public void runDaemon(RuleDefinition ruleDefinition)
run the daemon to sync up the state

Parameters:
ruleDefinition -

checkKeyForStem

public static RuleCheck checkKeyForStem(RuleDefinition ruleDefinition)
Parameters:
ruleDefinition -
Returns:
rule check

checkKeyForAttributeDefinition

public static RuleCheck checkKeyForAttributeDefinition(RuleDefinition ruleDefinition)
Parameters:
ruleDefinition -
Returns:
rule check