|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.avalon.framework.logger.AbstractLogEnabled
org.apache.cocoon.components.xscript.XScriptManagerImpl
public class XScriptManagerImpl
The actual implementation of the XScriptManager interface.
| Field Summary | |
|---|---|
protected Context |
context
The Context instance. |
static String |
CONTEXT
|
protected ServiceManager |
manager
The ServiceManager instance. |
| Fields inherited from interface org.apache.cocoon.components.xscript.XScriptManager |
|---|
ALL_SCOPES, GLOBAL_SCOPE, PAGE_SCOPE, REQUEST_SCOPE, ROLE, SESSION_SCOPE, XSCRIPT_NS |
| Constructor Summary | |
|---|---|
XScriptManagerImpl()
|
|
| Method Summary | |
|---|---|
void |
contextualize(Context context)
|
void |
dispose()
|
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. |
void |
parameterize(Parameters params)
|
void |
put(XScriptVariableScope pageScope,
Map objectModel,
String name,
XScriptObject value,
int scope)
Defines or overwrites the value of variable name in scope. |
void |
register(XScriptObject object)
|
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. |
void |
service(ServiceManager manager)
|
| Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled |
|---|
enableLogging, getLogger, setupLogger, setupLogger, setupLogger |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String CONTEXT
protected ServiceManager manager
ServiceManager instance.
protected Context context
Context instance.
| Constructor Detail |
|---|
public XScriptManagerImpl()
| Method Detail |
|---|
public void contextualize(Context context)
throws ContextException
contextualize in interface ContextualizableContextException
public void service(ServiceManager manager)
throws ServiceException
service in interface ServiceableServiceExceptionpublic void register(XScriptObject object)
public void parameterize(Parameters params)
throws ParameterException
parameterize in interface ParameterizableParameterExceptionpublic void dispose()
dispose in interface Disposable
public XScriptObject get(XScriptVariableScope pageScope,
Map objectModel,
String name,
int scope)
throws IllegalArgumentException
XScriptManagername variable in scope. The
context parameter is interpreted differently
depending on the value of scope, as follows:
scope is XScriptManager.GLOBAL_SCOPE, the
value of context is ignored.
- if
scope is XScriptManager.SESSION_SCOPE, the value of context is
interpreted as the session identifier.
- if
scope is XScriptManager.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.
get in interface XScriptManagerobjectModel - an instance of Cocoon object model used to obtain contextname - a String valuescope - an int value
XScriptObject value
IllegalArgumentException
public XScriptObject getFirst(XScriptVariableScope pageScope,
Map objectModel,
String name)
throws IllegalArgumentException
XScriptManagername.
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.
getFirst in interface XScriptManagerobjectModel - an instance of Cocoon object model used to obtain contextname - a String value
XScriptObject value
IllegalArgumentException - if an error occurs
public void put(XScriptVariableScope pageScope,
Map objectModel,
String name,
XScriptObject value,
int scope)
XScriptManagername in scope. The context
argument is interpreted as described in
XScriptManager.get(XScriptVariableScope, Map, String, int).
put in interface XScriptManagerobjectModel - an instance of Cocoon object model used to obtain contextname - a String valuevalue - a XScriptObject valuescope - an int value
public XScriptObject remove(XScriptVariableScope pageScope,
Map objectModel,
String name,
int scope)
throws IllegalArgumentException
XScriptManagerscope
within context. Such a variable could be declared
using the XScriptManager.put(XScriptVariableScope, Map, String, XScriptObject, int)
method.
remove in interface XScriptManagerobjectModel - an instance of Cocoon object model used to obtain contextname - a String valuescope - an int value
IllegalArgumentException - if an error occurs
public XScriptObject removeFirst(XScriptVariableScope pageScope,
Map objectModel,
String name)
throws IllegalArgumentException
XScriptManagername in the all the
currently accessible scopes. The search happens as described in
XScriptManager.getFirst(XScriptVariableScope, Map, String).
removeFirst in interface XScriptManagerobjectModel - an instance of Cocoon object model used to obtain contextname - a String value
IllegalArgumentException - if an error occurs
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||