|
Compiere 3.1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.compiere.util.Evaluator
public class Evaluator
Expression Evaluator
| Field Summary | |
|---|---|
static CompiereLogger |
log
Static Logger |
| Constructor Summary | |
|---|---|
Evaluator()
|
|
| Method Summary | |
|---|---|
static boolean |
evaluateLogic(Evaluatee source,
String logic)
Evaluate Logic. |
static boolean |
evaluateLogicTuple(String value1,
String operand,
String value2)
Evaluate Logic Tuple |
static ArrayList<String> |
getVariables(String raw)
|
static boolean |
isAllVariablesDefined(Evaluatee source,
String logic)
Check if All Variables are Defined |
static void |
parseDepends(ArrayList<String> list,
String parseString)
Parse String and add variables with @ to the list. |
static String |
replaceVariables(String raw,
Ctx ctx,
WindowCtx windowCtx)
|
static String |
stripVariables(String raw)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static CompiereLogger log
| Constructor Detail |
|---|
public Evaluator()
| Method Detail |
|---|
public static boolean isAllVariablesDefined(Evaluatee source,
String logic)
source - sourcelogic - logic info
public static boolean evaluateLogic(Evaluatee source,
String logic)
format := [ ]
expression := @@
logic := <|> | <&>
exLogic := <=> | | <^> | <<> | <>>
context := any global or window context
value := strings can be with ' or "
logic operators := AND or OR with the prevoius result from left to right
Example '@AD_Table@=Test | @Language@=GERGER
source - class implementing get_ValueAsString(variable)logic - logic string
public static boolean evaluateLogicTuple(String value1,
String operand,
String value2)
value1 - valueoperand - operand = ~ ^ ! > <value2 -
public static void parseDepends(ArrayList<String> list,
String parseString)
list - list to be added toparseString - string to parse for variables
public static String replaceVariables(String raw,
Ctx ctx,
WindowCtx windowCtx)
public static String stripVariables(String raw)
public static ArrayList<String> getVariables(String raw)
|
Compiere 3.1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||