org.apache.cocoon.components.xscript
Class XScriptManagerImpl
java.lang.Object
|
+--org.apache.avalon.framework.logger.AbstractLoggable
|
+--org.apache.cocoon.components.xscript.XScriptManagerImpl
- All Implemented Interfaces:
- org.apache.avalon.framework.component.Component, org.apache.avalon.framework.component.Composable, org.apache.avalon.framework.configuration.Configurable, org.apache.avalon.framework.logger.Loggable, org.apache.avalon.excalibur.pool.Poolable, XScriptManager
- public class XScriptManagerImpl
- extends org.apache.avalon.framework.logger.AbstractLoggable
- implements XScriptManager, org.apache.avalon.framework.component.Composable, org.apache.avalon.framework.component.Component, org.apache.avalon.framework.configuration.Configurable, org.apache.avalon.excalibur.pool.Poolable
The actual implementation of the XScriptManager interface.
- Since:
- August 4, 2001
- Author:
- Ovidiu Predescu
|
Field Summary |
protected org.apache.avalon.framework.component.ComponentManager |
manager
The ComponentManager instance. |
|
Method Summary |
void |
compose(org.apache.avalon.framework.component.ComponentManager manager)
|
void |
configure(org.apache.avalon.framework.configuration.Configuration conf)
|
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 |
register(XScriptObject object)
|
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. |
| 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 |
manager
protected org.apache.avalon.framework.component.ComponentManager manager
- The
ComponentManager instance.
XScriptManagerImpl
public XScriptManagerImpl()
compose
public void compose(org.apache.avalon.framework.component.ComponentManager manager)
throws org.apache.avalon.framework.component.ComponentException
- Specified by:
compose in interface org.apache.avalon.framework.component.Composable
register
public void register(XScriptObject object)
configure
public void configure(org.apache.avalon.framework.configuration.Configuration conf)
throws org.apache.avalon.framework.configuration.ConfigurationException
- Specified by:
configure in interface org.apache.avalon.framework.configuration.Configurable
get
public XScriptObject get(java.lang.String name,
int scope,
java.lang.String context)
throws java.lang.IllegalArgumentException
- Description copied from interface:
XScriptManager
- Obtains the object value of the
name variable in scope. The
context parameter is interpreted differently
depending on the value of scope, as follows:
- Specified by:
get in interface XScriptManager
- Following copied from interface:
org.apache.cocoon.components.xscript.XScriptManager
- Parameters:
name - a String valuescope - an int valuecontext - a String value whose interpretation
depends on scope- Returns:
- a
XScriptObject value
getFirst
public XScriptObject getFirst(java.lang.String name,
java.lang.String sessionContext,
java.lang.String pageContext)
throws java.lang.IllegalArgumentException
- Description copied from interface:
XScriptManager
- 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.
- Specified by:
getFirst in interface XScriptManager
- Following copied from interface:
org.apache.cocoon.components.xscript.XScriptManager
- Parameters:
name - a String valuesessionContext - a String valuepageContext - a String value- Returns:
- a
XScriptObject value - Throws:
java.lang.IllegalArgumentException - if an error occurs
put
public void put(java.lang.String name,
XScriptObject value,
int scope,
java.lang.String context)
- Description copied from interface:
XScriptManager
- Defines or overwrites the value of variable
name in scope. The context
argument is interpreted as described in XScriptManager.get(String, int,
String).
- Specified by:
put in interface XScriptManager
- Following copied from interface:
org.apache.cocoon.components.xscript.XScriptManager
- Parameters:
name - a String valuevalue - a XScriptObject valuescope - an int valuecontext - a String value whose interpretation
depends on scope
remove
public void remove(java.lang.String name,
int scope,
java.lang.String context)
throws java.lang.IllegalArgumentException
- Description copied from interface:
XScriptManager
- Removes a variable previously declared in
scope
within context. Such a variable could be declared
using the XScriptManager.put(String, XScriptObject, int, String)
method.
- Specified by:
remove in interface XScriptManager
- Following copied from interface:
org.apache.cocoon.components.xscript.XScriptManager
- Parameters:
name - a String valuescope - an int valuecontext - a String value
removeFirst
public void removeFirst(java.lang.String name,
java.lang.String sessionContext,
java.lang.String pageContext)
throws java.lang.IllegalArgumentException
- Description copied from interface:
XScriptManager
- Remove the first appearance of
name in the all the
currently accessible scopes. The search happens as described in
XScriptManager.getFirst(String,String,String).
- Specified by:
removeFirst in interface XScriptManager
- Following copied from interface:
org.apache.cocoon.components.xscript.XScriptManager
- Parameters:
name - a String valuesessionContext - a String valuepageContext - a String value- Throws:
java.lang.IllegalArgumentException - if an error occurs
Copyright © 1999-2002 Apache Software Foundation. All Rights Reserved.