public class PluginIf extends AbstractPluginValue
Example of condition:
Consider x is positive the message is "Positive"
else something different happens and the message is "Negative".
With CSS annotations could be:
Consider <span class="if" value="${x > 0}">x is positive<span>
the message is "<span class="then">Positive<span>"
else something different happens and the message is "<span class="else">Negative<span>".
With complex descriptions, the order can be different and the group of
'if'/'then'/'else' can be named to avoid interferences of others
if/then/else.
Example1:
Consider <span class="if" value="${x > 0}" name="test1">x is positive<span>
the message is "<span class="then" name="test1">Positive<span>"
else something different happens and the message is "<span class="else" name="test1">Negative<span>".
Example2:
Consider <span class="if" value="${x > 0}" >x is positive<span>
Consider <span class="if" value="${y > 0}" name="testY">y is negative<span>
the message for x is "<span class="then" name="test1">Positive<span>"
the message for y is "<span class="then" name="testY">Positive<span>"
else something different happens and the message for x is "<span class="else">Negative<span>".
else something different happens and the message for y is "<span class="else" name="testY">Negative<span>".
| Modifier and Type | Field and Description |
|---|---|
static String |
TEST_NAME
The conditional default name.
|
eval, valuescopenameFEATURE_CONDITION, FEATURE_NORMALIZED, FEATURE_NORMALIZER, FEATURE_SLEEP, FEATURE_THREADSAFE, FEATURE_TIMEOUT, FEATURE_WAITparameters| Constructor and Description |
|---|
PluginIf() |
| Modifier and Type | Method and Description |
|---|---|
ENext |
doStart(IContext context,
IResultSet result)
Performs the start action.
|
ActionType |
getActionType()
Get the plugin type.
|
static Boolean |
getTest(IContext context,
String name)
Gets the previously calculated condition with the given name.
|
getValue, getValue, isEval, setEval, setValuegetScope, saveGlobal, saveLocal, saveStrict, setScopegetName, setNamecopy, doEnd, getCondition, getConditionModel, getNormalized, getNormalized, getNormalizer, getParent, getSleep, getSleepModel, getThreadsafe, getTimeout, getTimeoutModel, getWait, getWaitModel, initialize, setCondition, setConditionModel, setNormalized, setNormalizer, setParent, setSleep, setSleepModel, setThreadsafe, setTimeout, setTimeoutModel, setWait, setWaitModel, toStringgetParameters, setParametersclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetParameters, setParameterspublic static final String TEST_NAME
public ActionType getActionType()
IActionTypepublic ENext doStart(IContext context, IResultSet result) throws PluginException
IPlugindoStart in interface IPlugindoStart in class AbstractPlugincontext - The context.result - The result set.PluginException - On execution errors.public static Boolean getTest(IContext context, String name) throws PluginException
context - The context.name - The test name.PluginException - On lookup errors.Copyright © 2016. All rights reserved.