edu.internet2.middleware.grouper.rules
Class RuleDefinition

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

public class RuleDefinition
extends Object

Define a rule, convert to a JSON string for attribute

Author:
mchyzer

Constructor Summary
RuleDefinition()
           
RuleDefinition(Set<AttributeAssignValueContainer> attributeAssignValueContainers)
          rule definitions from attribute assigns
RuleDefinition(String attributeTypeAssignId)
          load rules for one attribute type assign id
 
Method Summary
 void addElVariables(Map<String,Object> variableMap, RulesBean rulesBean, boolean hasAccessToEl)
          add EL variables to the substitute map
 RuleSubjectActAs getActAs()
          who this rule acts as
 AttributeAssign getAttributeAssignType()
          keep a reference to this to get back to the owner etc
 RuleCheck getCheck()
          when this rules is triggered
 RuleIfCondition getIfCondition()
          only fire if this condition occurs
 String getRunDaemon()
           
 RuleThen getThen()
          do this when the rule fires
 boolean isRunDaemonBoolean()
          run daemon, true by default
 boolean runDaemonOnDefinitionIfShould()
          if we should run the daemon, then do
 void setActAs(RuleSubjectActAs actAs1)
          who this rule acts as
 void setAttributeAssignType(AttributeAssign attributeAssignType1)
          keep a reference to this to get back to the owner etc
 void setCheck(RuleCheck check1)
          when this rules is triggered
 void setIfCondition(RuleIfCondition ifCondition1)
          only fire if this condition occurs
 void setThen(RuleThen then1)
          do this when the rule fires
 boolean shouldLog()
          if we should log this rule definition
 String toString()
           
 String validate()
          validate this
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RuleDefinition

public RuleDefinition(String attributeTypeAssignId)
load rules for one attribute type assign id

Parameters:
attributeTypeAssignId -

RuleDefinition

public RuleDefinition(Set<AttributeAssignValueContainer> attributeAssignValueContainers)
rule definitions from attribute assigns

Parameters:
attributeAssignValueContainers -

RuleDefinition

public RuleDefinition()
Method Detail

getAttributeAssignType

public AttributeAssign getAttributeAssignType()
keep a reference to this to get back to the owner etc

Returns:
the attributeAssignType

setAttributeAssignType

public void setAttributeAssignType(AttributeAssign attributeAssignType1)
keep a reference to this to get back to the owner etc

Parameters:
attributeAssignType1 - the attributeAssignType to set

getActAs

public RuleSubjectActAs getActAs()
who this rule acts as

Returns:
who this rule acts as

setActAs

public void setActAs(RuleSubjectActAs actAs1)
who this rule acts as

Parameters:
actAs1 -

getCheck

public RuleCheck getCheck()
when this rules is triggered

Returns:
the check

setCheck

public void setCheck(RuleCheck check1)
when this rules is triggered

Parameters:
check1 -

getIfCondition

public RuleIfCondition getIfCondition()
only fire if this condition occurs

Returns:
the if condition

setIfCondition

public void setIfCondition(RuleIfCondition ifCondition1)
only fire if this condition occurs

Parameters:
ifCondition1 -

getThen

public RuleThen getThen()
do this when the rule fires

Returns:
the then part

setThen

public void setThen(RuleThen then1)
do this when the rule fires

Parameters:
then1 -

getRunDaemon

public String getRunDaemon()
Returns:
string for run daemon

runDaemonOnDefinitionIfShould

public boolean runDaemonOnDefinitionIfShould()
if we should run the daemon, then do

Returns:
if run

toString

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

validate

public String validate()
validate this

Returns:
the error or null if none

isRunDaemonBoolean

public boolean isRunDaemonBoolean()
run daemon, true by default

Returns:
if run daemon

shouldLog

public boolean shouldLog()
if we should log this rule definition

Returns:
true if should log

addElVariables

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

Parameters:
variableMap -
rulesBean -
hasAccessToEl -