|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.avalon.framework.logger.AbstractLoggable | +--org.apache.cocoon.components.xscript.XScriptManagerImpl
The actual implementation of the XScriptManager
interface.
Field Summary | |
protected Context |
context
The Context instance. |
static java.lang.String |
CONTEXT
|
protected org.apache.avalon.framework.component.ComponentManager |
manager
The ComponentManager 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 |
compose(org.apache.avalon.framework.component.ComponentManager manager)
|
void |
contextualize(org.apache.avalon.framework.context.Context context)
|
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 |
parameterize(org.apache.avalon.framework.parameters.Parameters params)
|
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 . |
void |
register(XScriptObject object)
|
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. |
Methods inherited from class org.apache.avalon.framework.logger.AbstractLoggable |
getLogger, setLogger, 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 java.lang.String CONTEXT
protected org.apache.avalon.framework.component.ComponentManager manager
ComponentManager
instance.
protected Context context
Context
instance.
Constructor Detail |
public XScriptManagerImpl()
Method Detail |
public void contextualize(org.apache.avalon.framework.context.Context context) throws org.apache.avalon.framework.context.ContextException
contextualize
in interface org.apache.avalon.framework.context.Contextualizable
org.apache.avalon.framework.context.ContextException
public void compose(org.apache.avalon.framework.component.ComponentManager manager) throws org.apache.avalon.framework.component.ComponentException
compose
in interface org.apache.avalon.framework.component.Composable
org.apache.avalon.framework.component.ComponentException
public void register(XScriptObject object)
public void parameterize(org.apache.avalon.framework.parameters.Parameters params) throws org.apache.avalon.framework.parameters.ParameterException
parameterize
in interface org.apache.avalon.framework.parameters.Parameterizable
org.apache.avalon.framework.parameters.ParameterException
public XScriptObject get(XScriptVariableScope pageScope, java.util.Map objectModel, java.lang.String name, int scope) throws java.lang.IllegalArgumentException
XScriptManager
name
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 XScriptManager
objectModel
- an instance of Cocoon object model used to obtain contextname
- a String
valuescope
- an int
value
XScriptObject
value
java.lang.IllegalArgumentException
public XScriptObject getFirst(XScriptVariableScope pageScope, java.util.Map objectModel, java.lang.String name) throws java.lang.IllegalArgumentException
XScriptManager
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.
getFirst
in interface XScriptManager
objectModel
- an instance of Cocoon object model used to obtain contextname
- a String
value
XScriptObject
value
java.lang.IllegalArgumentException
- if an error occurspublic void put(XScriptVariableScope pageScope, java.util.Map objectModel, java.lang.String name, XScriptObject value, int scope)
XScriptManager
name
in scope
. The context
argument is interpreted as described in
XScriptManager.get(XScriptVariableScope, Map, String, int)
.
put
in interface XScriptManager
objectModel
- an instance of Cocoon object model used to obtain contextname
- a String
valuevalue
- a XScriptObject
valuescope
- an int
valuepublic XScriptObject remove(XScriptVariableScope pageScope, java.util.Map objectModel, java.lang.String name, int scope) throws java.lang.IllegalArgumentException
XScriptManager
scope
within context
. Such a variable could be declared
using the XScriptManager.put(XScriptVariableScope, Map, String, XScriptObject, int)
method.
remove
in interface XScriptManager
objectModel
- an instance of Cocoon object model used to obtain contextname
- a String
valuescope
- an int
value
java.lang.IllegalArgumentException
- if an error occurspublic XScriptObject removeFirst(XScriptVariableScope pageScope, java.util.Map objectModel, java.lang.String name) throws java.lang.IllegalArgumentException
XScriptManager
name
in the all the
currently accessible scopes. The search happens as described in
XScriptManager.getFirst(XScriptVariableScope, Map, String)
.
removeFirst
in interface XScriptManager
objectModel
- an instance of Cocoon object model used to obtain contextname
- a String
value
java.lang.IllegalArgumentException
- if an error occurs
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |