Skip navigation links
oracle.iam.policyengine.vo.conditions
Class AbstractCondition
java.lang.Object
oracle.iam.policyengine.vo.conditions.AbstractCondition
- All Implemented Interfaces:
- EvaluationCondition
-
public abstract class AbstractCondition
- extends java.lang.Object
- implements EvaluationCondition
AbstractCondition Top level class for a condition that implements the EvaluationCondition interface - it can be evaluated as true or false based on a set of facts (the input ValueObject). Each condition has two arguments and an operator so it looks something like this: "arg1 OP arg2" In comments and code various terms are used for the two arguments: Left side - arg1 - attribute - attrObj (etc) Right side - arg2 - value - valObj (etc) The arguments and the operator are contained in a SearchCriteria Condition that is an attribute of the AbstractCondition. There are two types of AbstractCondition - Composite and Simple A CompositeCondition is composed of two AbstractConditions joined by the AND or OR operator - arg1 and arg2 are either Composite or Simple conditions A SimpleCondition is composed of two arguments that are not AbstractConditions and an operator that is not AND or OR. CompositeConditions: AndCondition, OrCondition SimpleConditions: BeginsWithCondition, ContainsCondition, EndsWithCondition, EqualCondition, GreaterEqualCondition, GreaterThanCondition, InCondition, LessEqualCondition, LessThanCondition, NotBeginsWithCondition, NotContainCondition, NotEndsWithCondition, NotEqualCondition, NotInCondition An example of a SimpleCondition of type EqualCondition is: role[*].Role Name EQUAL "MyRole2" NOTE: This class must be kept thread-safe. It is intended to be accessed by multiple threads during the evaluation of rule conditions.
Method Summary |
SearchCriteria.Operator |
getOperator()
Return the SearchCriteria operator associated with the condition |
java.lang.String |
getRuleName()
|
int |
getToksSize()
|
static EvaluationCondition |
newCondition(Condition cond)
Static factory method for creating an EvaluationCondition using the specified SearchCriteria Condition. |
static EvaluationCondition |
newCondition(Condition tmpCond, java.lang.String tmpRuleName)
Static factory method for creating an AbstractCondition using the specified SearchCriteria Condition and rule name Creates and returns an instance of a sub-class of CompositeCondition or SimpleCondition The class returned is based on the operator contained in the Condition. |
void |
prepopulateTokMap(java.util.Map tmpTokMap, java.util.Map tmpTokPathMap)
Walk the condition tree pre-populating the string tokenizer map with entries that we know will be used repeatedly if the condition is evaluated multiple times. |
void |
printAllTokKeys()
|
void |
printTokenizerMapSize()
|
void |
setRuleName(java.lang.String tmpRuleName)
|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
newCondition
public static EvaluationCondition newCondition(Condition cond)
- Static factory method for creating an EvaluationCondition using the specified SearchCriteria Condition. Creates and returns an instance of a sub-class of CompositeCondition or SimpleCondition The class returned is based on the operator contained in the Condition.
-
- Parameters:
cond
-
- Returns:
newCondition
public static EvaluationCondition newCondition(Condition tmpCond,
java.lang.String tmpRuleName)
- Static factory method for creating an AbstractCondition using the specified SearchCriteria Condition and rule name Creates and returns an instance of a sub-class of CompositeCondition or SimpleCondition The class returned is based on the operator contained in the Condition.
-
- Parameters:
tmpCond
-
tmpRuleName
-
- Returns:
getOperator
public final SearchCriteria.Operator getOperator()
- Return the SearchCriteria operator associated with the condition
-
- Returns:
- - SearchCriteria operator
getRuleName
public final java.lang.String getRuleName()
-
- Specified by:
getRuleName
in interface EvaluationCondition
setRuleName
public final void setRuleName(java.lang.String tmpRuleName)
-
- Specified by:
setRuleName
in interface EvaluationCondition
getToksSize
public int getToksSize()
printTokenizerMapSize
public void printTokenizerMapSize()
prepopulateTokMap
public void prepopulateTokMap(java.util.Map tmpTokMap,
java.util.Map tmpTokPathMap)
- Walk the condition tree pre-populating the string tokenizer map with entries that we know will be used repeatedly if the condition is evaluated multiple times.
-
- Parameters:
tmpTokMap
-
printAllTokKeys
public void printAllTokKeys()
Skip navigation links
Copyright © 2015, Oracle and/or its affiliates. All rights reserved.