|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
XScriptManager is the public interface used to
interact with the XScript component, which implements the
supporting code for the XScript language.
| Field Summary | |
static int |
ALL_SCOPES
Search for a variable in all the accessible scopes. |
static int |
GLOBAL_SCOPE
The variable's global scope. |
static int |
PAGE_SCOPE
The page scope. |
static java.lang.String |
ROLE
|
static int |
SESSION_SCOPE
The session scope. |
static java.lang.String |
XSCRIPT_NS
|
| Method Summary | |
XScriptObject |
get(java.lang.String name,
int scope,
java.lang.String context)
Obtains the object value of the name variable in scope. |
XScriptObject |
getFirst(java.lang.String name,
java.lang.String sessionContext,
java.lang.String pageContext)
Search for the first occurence of the variable name.
|
void |
put(java.lang.String name,
XScriptObject value,
int scope,
java.lang.String context)
Defines or overwrites the value of variable name in scope. |
void |
remove(java.lang.String name,
int scope,
java.lang.String context)
Removes a variable previously declared in scope
within context. |
void |
removeFirst(java.lang.String name,
java.lang.String sessionContext,
java.lang.String pageContext)
Remove the first appearance of name in the all the
currently accessible scopes. |
| Field Detail |
public static final java.lang.String ROLE
public static final java.lang.String XSCRIPT_NS
public static final int GLOBAL_SCOPE
public static final int SESSION_SCOPE
public static final int PAGE_SCOPE
public static final int ALL_SCOPES
| Method Detail |
public XScriptObject get(java.lang.String name,
int scope,
java.lang.String context)
throws java.lang.IllegalArgumentException
name variable in scope. The
context parameter is interpreted differently
depending on the value of scope, as follows:
scope is GLOBAL_SCOPE, the
value of context is ignored.
- if
scope is SESSION_SCOPE, the value of context is
interpreted as the session identifier.
- if
scope is PAGE_SCOPE, the value
of context is interpreted as an identifier of the
page. This could be the URL of the page or the path of the file
name in the file system.
name - a String valuescope - an int valuecontext - a String value whose interpretation
depends on scopeXScriptObject value
public XScriptObject getFirst(java.lang.String name,
java.lang.String sessionContext,
java.lang.String pageContext)
throws java.lang.IllegalArgumentException
name.
The search happens first in the session scope
identified by sessionContext. If no variable is
found here, the search continues in the page scope identified by
pageContext. If no variable is found here, it's
finally searched in the global scope.
The XScriptObject value of the variable is
returned if a variable is found in one of the scopes, otherwise
an exception is thrown.
name - a String valuesessionContext - a String valuepageContext - a String valueXScriptObject valuejava.lang.IllegalArgumentException - if an error occurs
public void put(java.lang.String name,
XScriptObject value,
int scope,
java.lang.String context)
throws java.lang.IllegalArgumentException
name in scope. The context
argument is interpreted as described in get(String, int,
String).name - a String valuevalue - a XScriptObject valuescope - an int valuecontext - a String value whose interpretation
depends on scope
public void remove(java.lang.String name,
int scope,
java.lang.String context)
scope
within context. Such a variable could be declared
using the put(String, XScriptObject, int, String)
method.name - a String valuescope - an int valuecontext - a String value
public void removeFirst(java.lang.String name,
java.lang.String sessionContext,
java.lang.String pageContext)
throws java.lang.IllegalArgumentException
name in the all the
currently accessible scopes. The search happens as described in
getFirst(String,String,String).name - a String valuesessionContext - a String valuepageContext - a String valuejava.lang.IllegalArgumentException - if an error occurs
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||