| java.lang.Object com.bigbross.bossa.resource.Expression
Expression | abstract public class Expression implements Container,Serializable(Code) | | A node of one binary tree representing a compiled resource expression.
The set arithmetic operations are:
- Union:
+
- Intersection:
^
- Exclusion:
-
The operands are resource names.
Whitespace characters are ignored.
The expression is evaluated from left to right.
Parenthesis may be used to group subexpressions.
The resource is linked from the ResourceRegistry at the
compilation time, and is created if needed. A $ may be used to
delay the resource resolution to evaluation time, using a new
ResourceRegistry .
A resource expression example is: sales - $request than means
that only the users of the "sales" group minus the users that are in the
"request" group provided in the evaluation moment are in this role.
author: BigBross Team See Also: ResourceRegistry |
Field Summary | |
final protected static char | AND | final protected static String | DELIM | final protected static char | LP | final protected static char | OR | final protected static char | RP | final protected static char | SPC | final protected static char | SUB | final protected static char | VAR |
AND | final protected static char AND(Code) | | |
LP | final protected static char LP(Code) | | |
OR | final protected static char OR(Code) | | |
RP | final protected static char RP(Code) | | |
SPC | final protected static char SPC(Code) | | |
SUB | final protected static char SUB(Code) | | |
VAR | final protected static char VAR(Code) | | |
compile | public static Expression compile(ResourceRegistry registry, String expression)(Code) | | Compiles a resource expression.
Parameters: registry - a ResourceRegistry to link the resourcesin the expression. Parameters: expression - the resource expression to be compiled. a Expression representing the compiled resourceexpression. |
compile | protected static Expression compile(ResourceRegistry registry, StringTokenizer expression, Expression node)(Code) | | Parses a resource expression building a binary tree.
Parameters: registry - a ResourceRegistry to link the resourcesin the expression. Parameters: expression - the remaining resource expression to be compiled. Parameters: node - a Expression value of the left node. a Expression node of the compiled resourceexpression. |
contains | public boolean contains(Resource resource)(Code) | | Determines if a resource is contained in this.
Parameters: resource - the resource to be looked for. true if the resource is found, false otherwise. |
contains | abstract public boolean contains(ResourceRegistry registry, Resource resource)(Code) | | Determines if a resource is contained in this.
Parameters: registry - a ResourceRegistry to resolve lazy referenced resource. Parameters: resource - the resource to be looked for. true if the resource is found, false otherwise. |
|
|