edu.internet2.middleware.grouper.rules
Class RuleCheck

java.lang.Object
  extended by edu.internet2.middleware.grouper.rules.RuleCheck

public class RuleCheck
extends Object

e.g. check: - type: flattenedMembershipChange - groups: X,Z the type of check and any params

Author:
mchyzer

Field Summary
static String FIELD_CHECK_ARG0
          constant for field name for: checkArg0
static String FIELD_CHECK_ARG1
          constant for field name for: checkArg1
static String FIELD_CHECK_OWNER_ID
          constant for field name for: checkOwnerId
static String FIELD_CHECK_OWNER_NAME
          constant for field name for: checkOwnerName
static String FIELD_CHECK_STEM_SCOPE
          constant for field name for: checkStemScope
static String FIELD_CHECK_TYPE
          constant for field name for: checkType
 
Constructor Summary
RuleCheck()
           
RuleCheck(String type, String ownerId, String ownerName, String theCheckStemScope, String theCheckArg0, String theCheckArg1)
           
 
Method Summary
 void addElVariables(RuleDefinition ruleDefinition, Map<String,Object> variableMap, RulesBean rulesBean, boolean hasAccessToElApi)
          add EL variables to the substitute map
 RuleCheckType checkTypeEnum()
          convert the type to an enum
 RuleCheck clone()
          deep clone the fields in this object
 boolean equals(Object obj)
           
 String getCheckArg0()
           
 String getCheckArg1()
           
 String getCheckOwnerId()
          group which fires the rule
 String getCheckOwnerName()
          group/stem/etc which fires the rule
 String getCheckStemScope()
          ALL or SUB
 String getCheckType()
          type of rule check
 int hashCode()
           
 void setCheckArg0(String _checkArg0)
           
 void setCheckArg1(String _checkArg1)
           
 void setCheckOwnerId(String group1)
          group which fires the rule
 void setCheckOwnerName(String ownerName1)
          group/stem/etc which fires the rule
 void setCheckStemScope(String checkStemScope1)
          ALL or SUB
 void setCheckType(String type1)
          type of rule check
 Stem.Scope stemScopeEnum()
          convert the scope to an enum
 String toString()
           
 String validate(RuleDefinition ruleDefinition)
          validate this
 String validateOwnerAttributeDef(RuleDefinition ruleDefinition)
          see if the owner is an attributeDef (note, owner requiredness not checked)
 String validateOwnerGroup(RuleDefinition ruleDefinition)
          see if the owner is a group (note, owner requiredness not checked)
 String validateOwnerStem(RuleDefinition ruleDefinition)
          see if the owner is a stem (note, owner requiredness not checked)
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

FIELD_CHECK_ARG0

public static final String FIELD_CHECK_ARG0
constant for field name for: checkArg0

See Also:
Constant Field Values

FIELD_CHECK_ARG1

public static final String FIELD_CHECK_ARG1
constant for field name for: checkArg1

See Also:
Constant Field Values

FIELD_CHECK_OWNER_ID

public static final String FIELD_CHECK_OWNER_ID
constant for field name for: checkOwnerId

See Also:
Constant Field Values

FIELD_CHECK_OWNER_NAME

public static final String FIELD_CHECK_OWNER_NAME
constant for field name for: checkOwnerName

See Also:
Constant Field Values

FIELD_CHECK_STEM_SCOPE

public static final String FIELD_CHECK_STEM_SCOPE
constant for field name for: checkStemScope

See Also:
Constant Field Values

FIELD_CHECK_TYPE

public static final String FIELD_CHECK_TYPE
constant for field name for: checkType

See Also:
Constant Field Values
Constructor Detail

RuleCheck

public RuleCheck()

RuleCheck

public RuleCheck(String type,
                 String ownerId,
                 String ownerName,
                 String theCheckStemScope,
                 String theCheckArg0,
                 String theCheckArg1)
Parameters:
type -
ownerId -
ownerName -
theCheckStemScope -
theCheckArg0 -
theCheckArg1 -
Method Detail

clone

public RuleCheck clone()
deep clone the fields in this object

Overrides:
clone in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object
See Also:
Object.equals(java.lang.Object)

hashCode

public int hashCode()
Overrides:
hashCode in class Object
See Also:
Object.hashCode()

getCheckArg0

public String getCheckArg0()
Returns:
the checkArg0

setCheckArg0

public void setCheckArg0(String _checkArg0)
Parameters:
_checkArg0 - the checkArg0 to set

getCheckArg1

public String getCheckArg1()
Returns:
the checkArg1

setCheckArg1

public void setCheckArg1(String _checkArg1)
Parameters:
_checkArg1 - the checkArg1 to set

getCheckStemScope

public String getCheckStemScope()
ALL or SUB

Returns:
the checkStemScope

setCheckStemScope

public void setCheckStemScope(String checkStemScope1)
ALL or SUB

Parameters:
checkStemScope1 - the checkStemScope to set

getCheckOwnerName

public String getCheckOwnerName()
group/stem/etc which fires the rule

Returns:
group/stem/etc which fires the rule

setCheckOwnerName

public void setCheckOwnerName(String ownerName1)
group/stem/etc which fires the rule

Parameters:
ownerName1 -

getCheckType

public String getCheckType()
type of rule check

Returns:
the type

setCheckType

public void setCheckType(String type1)
type of rule check

Parameters:
type1 -

checkTypeEnum

public RuleCheckType checkTypeEnum()
convert the type to an enum

Returns:
rule check type

stemScopeEnum

public Stem.Scope stemScopeEnum()
convert the scope to an enum

Returns:
rule check scope

getCheckOwnerId

public String getCheckOwnerId()
group which fires the rule

Returns:
the group

setCheckOwnerId

public void setCheckOwnerId(String group1)
group which fires the rule

Parameters:
group1 -

toString

public String toString()
Overrides:
toString in class Object
See Also:
Object.toString()

validate

public String validate(RuleDefinition ruleDefinition)
validate this

Parameters:
ruleDefinition -
Returns:
error or null if ok

addElVariables

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

Parameters:
ruleDefinition -
variableMap -
rulesBean -
hasAccessToElApi -

validateOwnerGroup

public String validateOwnerGroup(RuleDefinition ruleDefinition)
see if the owner is a group (note, owner requiredness not checked)

Parameters:
ruleDefinition -
Returns:
the error message

validateOwnerStem

public String validateOwnerStem(RuleDefinition ruleDefinition)
see if the owner is a stem (note, owner requiredness not checked)

Parameters:
ruleDefinition -
Returns:
the error message

validateOwnerAttributeDef

public String validateOwnerAttributeDef(RuleDefinition ruleDefinition)
see if the owner is an attributeDef (note, owner requiredness not checked)

Parameters:
ruleDefinition -
Returns:
the error message