org.specrunner.plugins.core.include
Class PluginColumn

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.AbstractPluginTable
                      extended by org.specrunner.plugins.core.include.PluginColumn
All Implemented Interfaces:
IParameterHolder, IActionType, IParalelPlugin, IPlugin, ISleepPlugin, ITestPlugin, ITimedPlugin, IWaitPlugin

public class PluginColumn
extends AbstractPluginTable

This plugin stand for a SLIM/Fit Column like plugin implementation.

Author:
Thiago Santos

Field Summary
 
Fields inherited from class org.specrunner.plugins.core.AbstractPlugin
FEATURE_CONDITION, FEATURE_NORMALIZED, FEATURE_SLEEP, FEATURE_THREADSAFE, FEATURE_TIMEOUT, FEATURE_WAIT
 
Constructor Summary
PluginColumn()
           
 
Method Summary
 ENext doStart(IContext context, IResultSet result, TableAdapter tableAdapter)
          Perform the plugin start action.
protected  void extractFeatures(IContext context, RowAdapter header, List<String> features, List<IConverter> converters, List<List<String>> args)
          Get the feature names from this list.
protected  String feature(CellAdapter h)
          Get a feature name.
 ActionType getActionType()
          Get the plugin type.
protected  Object getObjectInstance(IContext context, TableAdapter tableAdapter)
          Get the object instance to be used by plugin actions.
protected  Object newInstance(Class<?> type, TableAdapter table)
          Create a instance of the object.
 
Methods inherited from class org.specrunner.plugins.core.AbstractPluginTable
doEnd, doEnd, doStart, initialize, initialize, toString
 
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, getCondition, getConditionModel, getNormalized, getNormalized, getParent, getSleep, getSleepModel, getThreadsafe, getTimeout, getTimeoutModel, getWait, getWaitModel, setCondition, setConditionModel, setNormalized, setParent, setSleep, setSleepModel, setThreadsafe, setTimeout, setTimeoutModel, setWait, setWaitModel
 
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
 

Constructor Detail

PluginColumn

public PluginColumn()
Method Detail

getActionType

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

Returns:
The type.

doStart

public ENext doStart(IContext context,
                     IResultSet result,
                     TableAdapter tableAdapter)
              throws PluginException
Description copied from class: AbstractPluginTable
Perform the plugin start action.

Overrides:
doStart in class AbstractPluginTable
Parameters:
context - The context.
result - The result.
tableAdapter - The adapter.
Returns:
The next action to be taken.
Throws:
PluginException - On plugin errors.

getObjectInstance

protected Object getObjectInstance(IContext context,
                                   TableAdapter tableAdapter)
                            throws PluginException
Get the object instance to be used by plugin actions.

Parameters:
context - The context.
tableAdapter - The adapter.
Returns:
An object instance where all actions will be taken over.
Throws:
PluginException - On creation/lookup errors.

newInstance

protected Object newInstance(Class<?> type,
                             TableAdapter table)
                      throws PluginException
Create a instance of the object.

Parameters:
type - The object type.
table - The source table.
Returns:
An instance of type.
Throws:
PluginException - On creation errors.

extractFeatures

protected void extractFeatures(IContext context,
                               RowAdapter header,
                               List<String> features,
                               List<IConverter> converters,
                               List<List<String>> args)
                        throws ConverterException,
                               PluginException
Get the feature names from this list.

Parameters:
context - The test context.
header - The table rows.
features - The feature list.
converters - The converter list.
args - The arguments. The arguments list.
Throws:
ConverterException - On converter lookup errors.
PluginException - On feature extraction errors.

feature

protected String feature(CellAdapter h)
Get a feature name.

Parameters:
h - The element.
Returns:
The name.


Copyright © 2014. All rights reserved.