org.specrunner.plugins.core.var
Class PluginBean

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.var.PluginBean
All Implemented Interfaces:
IParameterHolder, IActionType, IParalelPlugin, IPlugin, ISleepPlugin, ITestPlugin, ITimedPlugin, IWaitPlugin

public class PluginBean
extends AbstractPluginNamed

A bean plugin.

Author:
Thiago Santos

Field Summary
static String BEAN_NAME
          The bean object name on context.
 
Fields inherited from class org.specrunner.plugins.core.AbstractPlugin
FEATURE_CONDITION, FEATURE_NORMALIZED, FEATURE_SLEEP, FEATURE_THREADSAFE, FEATURE_TIMEOUT, FEATURE_WAIT
 
Constructor Summary
PluginBean()
           
 
Method Summary
protected  Object create(String type, List<Exception> errors)
          Try to create the object instance.
 ENext doStart(IContext context, IResultSet result)
          Performs the start action. i.e. create a database schema.
 ActionType getActionType()
          Get the plugin type.
 Object getBean()
          The plugin bean.
static Object getBean(IContext context)
          Get the current bean object.
 void setBean(Object bean)
          Set the bean object.
 
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

BEAN_NAME

public static final String BEAN_NAME
The bean object name on context.

See Also:
Constant Field Values
Constructor Detail

PluginBean

public PluginBean()
Method Detail

getActionType

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

Returns:
The type.

getBean

public Object getBean()
The plugin bean.

Returns:
The bean.

setBean

public void setBean(Object bean)
Set the bean object.

Parameters:
bean - The bean object.

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.

create

protected Object create(String type,
                        List<Exception> errors)
Try to create the object instance.

Parameters:
type - The class name (fully qualified).
errors - The error list.
Returns:
A new object of the given type.

getBean

public static Object getBean(IContext context)
Get the current bean object.

Parameters:
context - The context.
Returns:
The bean object, if found, null, otherwise.


Copyright © 2014. All rights reserved.