| org.apache.cocoon.components.xscript.XScriptManager
All known Subclasses: org.apache.cocoon.components.xscript.XScriptManagerImpl,
XScriptManager | public interface XScriptManager (Code) | | XScriptManager is the public interface used to
interact with the XScript component, which implements the
supporting code for the XScript language.
author: Ovidiu Predescu author: Vadim Gritsenko version: CVS $Id: XScriptManager.java 433543 2006-08-22 06:22:54Z crossley $ since: August 4, 2001 |
Method Summary | |
XScriptObject | get(XScriptVariableScope pageScope, Map objectModel, String name, int scope) Obtains the object value of the
name variable in scope . | XScriptObject | getFirst(XScriptVariableScope pageScope, Map objectModel, String name) Search for the first occurence of the variable
name .
The search happens first in the session scope
identified by sessionContext . | void | put(XScriptVariableScope pageScope, Map objectModel, String name, XScriptObject value, int scope) Defines or overwrites the value of variable
name in scope . | XScriptObject | remove(XScriptVariableScope pageScope, Map objectModel, String name, int scope) Removes a variable previously declared in scope
within context . | XScriptObject | removeFirst(XScriptVariableScope pageScope, Map objectModel, String name) Remove the first appearance of name in the all the
currently accessible scopes. |
ALL_SCOPES | int ALL_SCOPES(Code) | | Search for a variable in all the accessible scopes. The variable
is first searched in the current session scope. If no variable is
found here, the current page scope is searched next. If nothing
is found either, the global scope is searched.
|
GLOBAL_SCOPE | int GLOBAL_SCOPE(Code) | | The variable's global scope. Each Cocoon instance has exactly one
global scope for variables.
|
PAGE_SCOPE | int PAGE_SCOPE(Code) | | The page scope. This is scope very specific to an XSP page, and
defines variables visible only within the context of that
page. No other XSP page can access these variables, unless it
knows the identifier used by that page to store its
variables. This identifier is not necessarily the URL or full
path of that page; it is up to the page to define it.
|
REQUEST_SCOPE | int REQUEST_SCOPE(Code) | | The request scope. This is scope specific to request, and
defines variables visible only within the context of that
request. Once request is processed, these variables are lost.
|
SESSION_SCOPE | int SESSION_SCOPE(Code) | | The session scope. This scope is specific to a particular
activation of an XSP page, which is usually identified by the
session id of the user that sent the HTTP request. From XScript's
point of view however, the session identifier is not interpreted
in any way, so a client can define its own notion of "session".
|
get | XScriptObject get(XScriptVariableScope pageScope, Map objectModel, String name, int scope) throws IllegalArgumentException(Code) | | Obtains the object value of the
name variable in scope . The
context parameter is interpreted differently
depending on the value of scope , as follows:
Parameters: objectModel - an instance of Cocoon object model used to obtain context Parameters: name - a String value Parameters: scope - an int value a XScriptObject value |
getFirst | XScriptObject getFirst(XScriptVariableScope pageScope, Map objectModel, String name) throws IllegalArgumentException(Code) | | Search for the first occurence of the variable
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.
Parameters: objectModel - an instance of Cocoon object model used to obtain context Parameters: name - a String value a XScriptObject value exception: IllegalArgumentException - if an error occurs |
|
|