Class RuleDefinition

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

public class RuleDefinition extends Object
Define a rule, convert to a JSON string for attribute
  • Constructor Details

    • 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 Details

    • isValidInAttributes

      public boolean isValidInAttributes()
      if this rule is valid in the attributes (calculated)
      Returns:
      the validInAttributes
    • setValidInAttributes

      public void setValidInAttributes(boolean validInAttributes1)
      if this rule is valid in the attributes (calculated)
      Parameters:
      validInAttributes1 - the validInAttributes to set
    • 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:
    • 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 -
    • getPattern

      public RulePattern getPattern()
    • getPattern1

      public String getPattern1()