org.specrunner.plugins.core
Class AbstractPluginValue
java.lang.Object
org.specrunner.parameters.core.ParameterHolder
org.specrunner.plugins.core.AbstractPlugin
org.specrunner.plugins.core.AbstractPluginNamed
org.specrunner.plugins.core.AbstractPluginScoped
org.specrunner.plugins.core.AbstractPluginValue
- All Implemented Interfaces:
- IParameterHolder, IActionType, IParalelPlugin, IPlugin, ISleepPlugin, ITestPlugin, ITimedPlugin, IWaitPlugin
- Direct Known Subclasses:
- AbstractPluginDual, PluginIf, PluginImport, PluginVerifyRows, PluginWhile
public abstract class AbstractPluginValue
- extends AbstractPluginScoped
Stand for a plugin with a value attribute, or a value which must be calculate
by evaluating the content of the specification.
- Author:
- Thiago Santos
| 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 |
AbstractPluginValue
public AbstractPluginValue()
isEval
public boolean isEval()
- Says if the content must be evaluated as an expression.
- Returns:
- true, if evaluate is enable, false, otherwise. Default is false.
setEval
public void setEval(boolean eval)
- Sets evaluation.
- Parameters:
eval - true, to enable evaluation, false, otherwise.
getValue
public Object getValue()
- Get the value attribute.
- Returns:
- The value.
setValue
public void setValue(Object value)
- Sets the value.
- Parameters:
value - A new value.
getValue
protected Object getValue(Object str,
boolean evaluate,
IContext context)
throws PluginException
- Gets a value based on a string. If the plugin attribute value is set use
the 'value' attribute, otherwise use the given string.
- Parameters:
str - The string to be used, in case of value attribute not set.evaluate - true, if evaluate as expression is required, false, otherwise.context - The context.
- Returns:
- The object result of the evaluation.
- Throws:
PluginException - On case of evaluation error.
Copyright © 2014. All rights reserved.