org.specrunner.plugins.core
Class AbstractPluginScoped
java.lang.Object
org.specrunner.parameters.core.ParameterHolder
org.specrunner.plugins.core.AbstractPlugin
org.specrunner.plugins.core.AbstractPluginNamed
org.specrunner.plugins.core.AbstractPluginScoped
- All Implemented Interfaces:
- IParameterHolder, IActionType, IParalelPlugin, IPlugin, ISleepPlugin, ITestPlugin, ITimedPlugin, IWaitPlugin
- Direct Known Subclasses:
- AbstractPluginTable, AbstractPluginValue, PluginHtml, PluginIterable, PluginMacro
public abstract class AbstractPluginScoped
- extends AbstractPluginNamed
A plugin with scope information. i.e. for declaring variables a scope can be
set.
- Author:
- Thiago Santos
|
Method Summary |
String |
getScope()
The scope value. |
protected void |
saveGlobal(IContext context,
String name,
Object value)
Save the value to the context, using the given scope, if specified,
otherwise to the global scope. |
protected void |
saveLocal(IContext context,
String name,
Object value)
Save the value to the context, using the given scope, if specified,
otherwise to the local scope. |
protected void |
saveStrict(IContext context,
String name,
Object value)
Save the value to the context, using the given scope, if specified,
otherwise to the strict scope. |
void |
setScope(String scope)
Sets scope. i.e. if scope is set to 'body' means that a local variable
must be associated to the body context. |
| Methods inherited from class org.specrunner.plugins.core.AbstractPlugin |
copy, doEnd, doStart, getCondition, getConditionModel, getNormalized, getNormalized, getParent, getSleep, getSleepModel, getThreadsafe, getTimeout, getTimeoutModel, getWait, getWaitModel, initialize, setCondition, setConditionModel, setNormalized, setParent, setSleep, setSleepModel, setThreadsafe, setTimeout, setTimeoutModel, setWait, setWaitModel, toString |
AbstractPluginScoped
public AbstractPluginScoped()
getScope
public String getScope()
- The scope value.
- Returns:
- The scope.
setScope
public void setScope(String scope)
- Sets scope. i.e. if scope is set to 'body' means that a local variable
must be associated to the body context.
- Parameters:
scope - A new scope.
saveStrict
protected void saveStrict(IContext context,
String name,
Object value)
- Save the value to the context, using the given scope, if specified,
otherwise to the strict scope.
- Parameters:
context - The context.name - The variable name.value - The variable value.
saveLocal
protected void saveLocal(IContext context,
String name,
Object value)
- Save the value to the context, using the given scope, if specified,
otherwise to the local scope.
- Parameters:
context - The context.name - The variable name.value - The variable value.
saveGlobal
protected void saveGlobal(IContext context,
String name,
Object value)
- Save the value to the context, using the given scope, if specified,
otherwise to the global scope.
- Parameters:
context - The context.name - The variable name.value - The variable value.
Copyright © 2014. All rights reserved.