org.specrunner.plugins.core.macro
Class PluginMacro

java.lang.Object
  extended by org.specrunner.parameters.core.ParameterHolder
      extended by org.specrunner.plugins.core.AbstractPlugin
          extended by org.specrunner.plugins.core.AbstractPluginNamed
              extended by org.specrunner.plugins.core.AbstractPluginScoped
                  extended by org.specrunner.plugins.core.macro.PluginMacro
All Implemented Interfaces:
IParameterHolder, IActionType, IParalelPlugin, IPlugin, ISleepPlugin, ITestPlugin, ITimedPlugin, IWaitPlugin

public class PluginMacro
extends AbstractPluginScoped

The plugin which creates a macro. To defined a macro just add the class 'macro' to a tag, and add a 'name' attribute to allow further references to this macro.

Author:
Thiago Santos.

Field Summary
static String CSS_DEFINED
          CSS of macro defined.
 
Fields inherited from class org.specrunner.plugins.core.AbstractPlugin
FEATURE_CONDITION, FEATURE_NORMALIZED, FEATURE_SLEEP, FEATURE_THREADSAFE, FEATURE_TIMEOUT, FEATURE_WAIT
 
Constructor Summary
PluginMacro()
           
 
Method Summary
 ENext doStart(IContext context, IResultSet result)
          Performs the start action. i.e. create a database schema.
 ActionType getActionType()
          Get the plugin type.
 boolean isGlobal()
          Says is the plugin should be placed in global context or local context.
 boolean isRun()
          Says if the macro must be execute on definition time.
 void setGlobal(boolean global)
          Sets global flag.
 void setRun(boolean run)
          Set run behavior.
 
Methods inherited from class org.specrunner.plugins.core.AbstractPluginScoped
getScope, saveGlobal, saveLocal, saveStrict, setScope
 
Methods inherited from class org.specrunner.plugins.core.AbstractPluginNamed
getName, setName
 
Methods inherited from class org.specrunner.plugins.core.AbstractPlugin
copy, doEnd, 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
 
Methods inherited from class org.specrunner.parameters.core.ParameterHolder
getParameters, setParameters
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.specrunner.parameters.IParameterHolder
getParameters, setParameters
 

Field Detail

CSS_DEFINED

public static final String CSS_DEFINED
CSS of macro defined.

See Also:
Constant Field Values
Constructor Detail

PluginMacro

public PluginMacro()
Method Detail

isRun

public boolean isRun()
Says if the macro must be execute on definition time. Default is 'false'.

Returns:
true, if perform on definition also, false, otherwise.

setRun

public void setRun(boolean run)
Set run behavior.

Parameters:
run - The new run status.

isGlobal

public boolean isGlobal()
Says is the plugin should be placed in global context or local context. Default value is 'false'.

Returns:
True, of global, false, otherwise.

setGlobal

public void setGlobal(boolean global)
Sets global flag.

Parameters:
global - If define global as global.

getActionType

public ActionType getActionType()
Description copied from interface: IActionType
Get the plugin type.

Returns:
The type.

doStart

public ENext doStart(IContext context,
                     IResultSet result)
              throws PluginException
Description copied from interface: IPlugin
Performs the start action. i.e. create a database schema. Performed after initialization.

Specified by:
doStart in interface IPlugin
Overrides:
doStart in class AbstractPlugin
Parameters:
context - The context.
result - The result set.
Returns:
SKIP, to skip node, DEEP, to go deep into the node.
Throws:
PluginException - On execution errors.


Copyright © 2014. All rights reserved.