org.specrunner.plugins.core.elements
Class AbstractPluginResource

java.lang.Object
  extended by org.specrunner.parameters.core.ParameterHolder
      extended by org.specrunner.plugins.core.AbstractPlugin
          extended by org.specrunner.plugins.core.elements.AbstractPluginResource
All Implemented Interfaces:
IParameterHolder, IActionType, IParalelPlugin, IPlugin, ISleepPlugin, ITestPlugin, ITimedPlugin, IWaitPlugin
Direct Known Subclasses:
AbstractPluginResourceReplaceable

public abstract class AbstractPluginResource
extends AbstractPlugin

Helper class for resources plugins.

Author:
Thiago Santos

Field Summary
static String FEATURE_SAVE
          Default behavior is save resources.
 
Fields inherited from class org.specrunner.plugins.core.AbstractPlugin
FEATURE_CONDITION, FEATURE_NORMALIZED, FEATURE_SLEEP, FEATURE_THREADSAFE, FEATURE_TIMEOUT, FEATURE_WAIT
 
Constructor Summary
protected AbstractPluginResource()
          Constructor.
 
Method Summary
 Boolean getSave()
          Return true, if resources like CSS/JS should saved on error report.
 void initialize(IContext context)
          Initialize the plugin.
protected  boolean isSave()
          Check if save enabled or not.
 void setSave(Boolean save)
          Set save state.
 
Methods inherited from class org.specrunner.plugins.core.AbstractPlugin
copy, doEnd, doStart, getCondition, getConditionModel, getNormalized, getNormalized, getParent, getSleep, getSleepModel, getThreadsafe, getTimeout, getTimeoutModel, getWait, getWaitModel, 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
 
Methods inherited from interface org.specrunner.plugins.IActionType
getActionType
 

Field Detail

FEATURE_SAVE

public static final String FEATURE_SAVE
Default behavior is save resources. To speed up test execution can be disabled.

Constructor Detail

AbstractPluginResource

protected AbstractPluginResource()
Constructor.

Method Detail

getSave

public Boolean getSave()
Return true, if resources like CSS/JS should saved on error report.

Returns:
true, if save is enabled, false, otherwise.

setSave

public void setSave(Boolean save)
Set save state.

Parameters:
save - The new state.

isSave

protected boolean isSave()
Check if save enabled or not.

Returns:
true, is save is enabled, false, otherwise.

initialize

public void initialize(IContext context)
                throws PluginException
Description copied from interface: IPlugin
Initialize the plugin. Performed after set parameters.

Specified by:
initialize in interface IPlugin
Overrides:
initialize in class AbstractPlugin
Parameters:
context - The test context.
Throws:
PluginException - On initialization errors.


Copyright © 2014. All rights reserved.