|
||||||||
| 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 int |
REQUEST_SCOPE
The request scope. |
static java.lang.String |
ROLE
|
static int |
SESSION_SCOPE
The session scope. |
static java.lang.String |
XSCRIPT_NS
|
| Method Summary | |
XScriptObject |
get(XScriptVariableScope pageScope,
java.util.Map objectModel,
java.lang.String name,
int scope)
Obtains the object value of the name variable in scope. |
XScriptObject |
getFirst(XScriptVariableScope pageScope,
java.util.Map objectModel,
java.lang.String name)
Search for the first occurence of the variable name.
|
void |
put(XScriptVariableScope pageScope,
java.util.Map objectModel,
java.lang.String name,
XScriptObject value,
int scope)
Defines or overwrites the value of variable name in scope. |
XScriptObject |
remove(XScriptVariableScope pageScope,
java.util.Map objectModel,
java.lang.String name,
int scope)
Removes a variable previously declared in scope
within context. |
XScriptObject |
removeFirst(XScriptVariableScope pageScope,
java.util.Map objectModel,
java.lang.String name)
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 REQUEST_SCOPE
public static final int ALL_SCOPES
| Method Detail |
public XScriptObject get(XScriptVariableScope pageScope,
java.util.Map objectModel,
java.lang.String name,
int scope)
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.
objectModel - an instance of Cocoon object model used to obtain contextname - a String valuescope - an int valueXScriptObject value
public XScriptObject getFirst(XScriptVariableScope pageScope,
java.util.Map objectModel,
java.lang.String name)
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.
objectModel - an instance of Cocoon object model used to obtain contextname - a String valueXScriptObject valuejava.lang.IllegalArgumentException - if an error occurs
public void put(XScriptVariableScope pageScope,
java.util.Map objectModel,
java.lang.String name,
XScriptObject value,
int scope)
throws java.lang.IllegalArgumentException
name in scope. The context
argument is interpreted as described in
get(XScriptVariableScope, Map, String, int).objectModel - an instance of Cocoon object model used to obtain contextname - a String valuevalue - a XScriptObject valuescope - an int value
public XScriptObject remove(XScriptVariableScope pageScope,
java.util.Map objectModel,
java.lang.String name,
int scope)
throws java.lang.IllegalArgumentException
scope
within context. Such a variable could be declared
using the put(XScriptVariableScope, Map, String, XScriptObject, int)
method.objectModel - an instance of Cocoon object model used to obtain contextname - a String valuescope - an int valuejava.lang.IllegalArgumentException - if an error occurs
public XScriptObject removeFirst(XScriptVariableScope pageScope,
java.util.Map objectModel,
java.lang.String name)
throws java.lang.IllegalArgumentException
name in the all the
currently accessible scopes. The search happens as described in
getFirst(XScriptVariableScope, Map, String).objectModel - an instance of Cocoon object model used to obtain contextname - 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 | |||||||