|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectrailo.runtime.interpreter.VariableInterpreter
public final class VariableInterpreter
Class to check and interpret Variable Strings
Constructor Summary | |
---|---|
VariableInterpreter()
|
Method Summary | |
---|---|
static Object |
_variable(PageContext pc,
String str,
Object value,
Scope scope)
|
static Object |
getVariable(PageContext pc,
Collection collection,
String var)
reads a subelement from a struct |
static Object |
getVariable(PageContext pc,
String var)
get a variable from page context |
static Object |
getVariable(PageContext pc,
String str,
Scope scope)
|
static Object |
getVariableAsCollection(PageContext pc,
String var)
|
static Object |
getVariableEL(PageContext pc,
Collection collection,
String var)
|
static Object |
getVariableEL(PageContext pc,
String var,
Object defaultValue)
get a variable from page context |
static Object |
getVariableELAsCollection(PageContext pc,
String var,
Object defaultValue)
|
static VariableReference |
getVariableReference(PageContext pc,
String var)
return a variable reference by string syntax ("scopename.key.key" -> "url.name") a variable reference, references to variable, to modifed it, with global effect. |
static boolean |
isDefined(PageContext pc,
String var)
check if a variable is defined in Page Context |
static StringList |
parse(String var,
boolean doLowerCase)
|
static Object |
removeVariable(PageContext pc,
String var)
removes a variable eith matching name from page context |
static Object |
scope(PageContext pc,
int scope,
boolean touch)
|
static String |
scopeInt2String(int type)
|
static int |
scopeKey2Int(Collection.Key type)
|
static int |
scopeString2Int(String type)
translate a string type definition to its int representation |
static Object |
setVariable(PageContext pc,
String var,
Object value)
sets a variable to page Context |
static Object |
setVariable(PageContext pc,
String str,
Object value,
Scope scope)
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public VariableInterpreter()
Method Detail |
---|
public static Object getVariable(PageContext pc, Collection collection, String var) throws PageException
pc
- collection
- var
-
PageException
public static String scopeInt2String(int type)
public static Object getVariableEL(PageContext pc, Collection collection, String var)
public static Object getVariable(PageContext pc, String var) throws PageException
pc
- Page Contextvar
- variable string to get value to
PageException
public static Object getVariableAsCollection(PageContext pc, String var) throws PageException
PageException
public static Object getVariable(PageContext pc, String str, Scope scope) throws PageException
PageException
public static Object setVariable(PageContext pc, String str, Object value, Scope scope) throws PageException
PageException
public static Object _variable(PageContext pc, String str, Object value, Scope scope) throws PageException
PageException
public static Object getVariableEL(PageContext pc, String var, Object defaultValue)
pc
- Page Contextvar
- variable string to get value todefaultValue
- value returnded if variable was not found
public static Object getVariableELAsCollection(PageContext pc, String var, Object defaultValue)
public static VariableReference getVariableReference(PageContext pc, String var) throws PageException
pc
- var
- variable name to get
PageException
public static Object setVariable(PageContext pc, String var, Object value) throws PageException
pc
- pagecontext of the new variablevar
- String of variable definitionvalue
- value to set to variable
PageException
public static Object removeVariable(PageContext pc, String var) throws PageException
pc
- var
-
PageException
public static boolean isDefined(PageContext pc, String var)
pc
- PageContext to checkvar
- variable String
public static StringList parse(String var, boolean doLowerCase)
public static int scopeString2Int(String type)
type
- type to translate
public static int scopeKey2Int(Collection.Key type)
public static Object scope(PageContext pc, int scope, boolean touch) throws PageException
PageException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |