edu.internet2.middleware.grouper.rules
Enum RuleIfConditionEnum

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

public enum RuleIfConditionEnum
extends Enum<RuleIfConditionEnum>

built in if condition

Author:
mchyzer

Enum Constant Summary
groupHasNoEnabledMembership
          make sure a group has no enabled membership
groupHasNoImmediateEnabledMembership
          make sure a group has no immedaite enabled membership
nameMatchesSqlLikeString
          make sure the name of the object matches this sql like string (with percent signs and underscores), e.g.
never
          make sure a group has no enabled membership
noGroupInFolderHasImmediateEnabledMembership
          make sure no group in folder has an enabled membership
thisGroupAndNotFolderHasImmediateEnabledMembership
          make sure this group and not the folder has membership
thisGroupHasImmediateEnabledMembership
          if on group which has membership
thisGroupHasImmediateEnabledNoEndDateMembership
          if on group which has membership with no end date
thisPermissionDefHasAssignment
          if permission def has assignment
thisPermissionDefHasAssignmentAndNotFolder
          make sure there is not a membership in folder, but does have an attributeDef
thisPermissionDefHasNoEndDateAssignment
          if permission def has assignment with no end date
 
Method Summary
abstract  boolean isIfOwnerTypeAttributeDef(RuleDefinition ruleDefinition)
          Whether or not the rule if condition owner type is an attribute def
abstract  boolean isIfOwnerTypeGroup(RuleDefinition ruleDefinition)
          Whether or not the rule if condition owner type is a group
abstract  boolean isIfOwnerTypeStem(RuleDefinition ruleDefinition)
          Whether or not the rule if condition owner type is a stem
abstract  boolean shouldFire(RuleDefinition ruleDefinition, RuleEngine ruleEngine, RulesBean rulesBean)
          should fire
 String validate(RuleDefinition ruleDefinition)
          validate the enum
static String validateNoParams(RuleDefinition ruleDefinition)
          make sure there are no params
static RuleIfConditionEnum valueOf(String name)
          Returns the enum constant of this type with the specified name.
static RuleIfConditionEnum valueOfIgnoreCase(String string, boolean exceptionOnNull)
          do a case-insensitive matching
static RuleIfConditionEnum[] 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

noGroupInFolderHasImmediateEnabledMembership

public static final RuleIfConditionEnum noGroupInFolderHasImmediateEnabledMembership
make sure no group in folder has an enabled membership


nameMatchesSqlLikeString

public static final RuleIfConditionEnum nameMatchesSqlLikeString
make sure the name of the object matches this sql like string (with percent signs and underscores), e.g. school:folder:whatever:%groupSuffix


thisGroupAndNotFolderHasImmediateEnabledMembership

public static final RuleIfConditionEnum thisGroupAndNotFolderHasImmediateEnabledMembership
make sure this group and not the folder has membership


thisPermissionDefHasAssignmentAndNotFolder

public static final RuleIfConditionEnum thisPermissionDefHasAssignmentAndNotFolder
make sure there is not a membership in folder, but does have an attributeDef


groupHasNoImmediateEnabledMembership

public static final RuleIfConditionEnum groupHasNoImmediateEnabledMembership
make sure a group has no immedaite enabled membership


thisGroupHasImmediateEnabledMembership

public static final RuleIfConditionEnum thisGroupHasImmediateEnabledMembership
if on group which has membership


thisGroupHasImmediateEnabledNoEndDateMembership

public static final RuleIfConditionEnum thisGroupHasImmediateEnabledNoEndDateMembership
if on group which has membership with no end date


thisPermissionDefHasAssignment

public static final RuleIfConditionEnum thisPermissionDefHasAssignment
if permission def has assignment


thisPermissionDefHasNoEndDateAssignment

public static final RuleIfConditionEnum thisPermissionDefHasNoEndDateAssignment
if permission def has assignment with no end date


groupHasNoEnabledMembership

public static final RuleIfConditionEnum groupHasNoEnabledMembership
make sure a group has no enabled membership


never

public static final RuleIfConditionEnum never
make sure a group has no enabled membership

Method Detail

values

public static RuleIfConditionEnum[] 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 (RuleIfConditionEnum c : RuleIfConditionEnum.values())
    System.out.println(c);

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

valueOf

public static RuleIfConditionEnum 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

shouldFire

public abstract boolean shouldFire(RuleDefinition ruleDefinition,
                                   RuleEngine ruleEngine,
                                   RulesBean rulesBean)
should fire

Parameters:
ruleDefinition -
ruleEngine -
rulesBean -
Returns:
if should fire

isIfOwnerTypeGroup

public abstract boolean isIfOwnerTypeGroup(RuleDefinition ruleDefinition)
Whether or not the rule if condition owner type is a group

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

isIfOwnerTypeStem

public abstract boolean isIfOwnerTypeStem(RuleDefinition ruleDefinition)
Whether or not the rule if condition owner type is a stem

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

isIfOwnerTypeAttributeDef

public abstract boolean isIfOwnerTypeAttributeDef(RuleDefinition ruleDefinition)
Whether or not the rule if condition owner type is an attribute def

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

valueOfIgnoreCase

public static RuleIfConditionEnum 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

validate

public String validate(RuleDefinition ruleDefinition)
validate the enum

Parameters:
ruleDefinition -
Returns:
error message or null if ok

validateNoParams

public static String validateNoParams(RuleDefinition ruleDefinition)
make sure there are no params

Parameters:
ruleDefinition -
Returns:
error message if there are params