org.specrunner.hibernate3
Class PluginSessionFactory
java.lang.Object
org.specrunner.parameters.core.ParameterHolder
org.specrunner.plugins.core.AbstractPlugin
org.specrunner.plugins.core.AbstractPluginNamed
org.specrunner.plugins.core.AbstractPluginScoped
org.specrunner.plugins.core.AbstractPluginValue
org.specrunner.hibernate3.AbstractPluginFactory
org.specrunner.hibernate3.PluginSessionFactory
- All Implemented Interfaces:
- IParameterHolder, IActionType, IParalelPlugin, IPlugin, ISleepPlugin, ITestPlugin, ITimedPlugin, IWaitPlugin
public class PluginSessionFactory
- extends AbstractPluginFactory
Creates/recovers a SessionFactory instance and add it to the plugin global
context, it can be done using three strategies:
- by setting 'configuration' attribute to a name used previously by a
PluginConfiguration;
- by setting 'type' attribute to a class that implements
IConfigurationProvider, i.e.
type='myclass.SessionConfigurationImpl';
- or by setting 'factory' to any type and 'method' to a parameterless
static method which returns a
Configuration, i.e.
factory="myclass.Any" method="getConfig".
- Author:
- Thiago Santos
| Methods inherited from class org.specrunner.plugins.core.AbstractPlugin |
copy, doEnd, getCondition, getConditionModel, getNormalized, getNormalized, getNormalizer, getParent, getSleep, getSleepModel, getThreadsafe, getTimeout, getTimeoutModel, getWait, getWaitModel, setCondition, setConditionModel, setNormalized, setNormalizer, setParent, setSleep, setSleepModel, setThreadsafe, setTimeout, setTimeoutModel, setWait, setWaitModel, toString |
SESSION_FACTORY
public static final String SESSION_FACTORY
- Default session factory name.
- See Also:
- Constant Field Values
FEATURE_CONFIGURATION
public static final String FEATURE_CONFIGURATION
- Feature to set configuration.
configuration
protected String configuration
- The configuration name.
FEATURE_TYPE
public static final String FEATURE_TYPE
- The session factory provider name.
FEATURE_FACTORY
public static final String FEATURE_FACTORY
- Feature to set session factory factory.
FEATURE_METHOD
public static final String FEATURE_METHOD
- Set feature factory method name.
PluginSessionFactory
public PluginSessionFactory()
getConfiguration
public String getConfiguration()
- Gets the configuration.
- Returns:
- The configuration.
setConfiguration
public void setConfiguration(String configuration)
- Sets the configuration.
- Parameters:
configuration - The configuration.
initialize
public void initialize(IContext context)
throws PluginException
- Specified by:
initialize in interface IPlugin- Overrides:
initialize in class AbstractPlugin
- Throws:
PluginException
doStart
public ENext doStart(IContext context,
IResultSet result)
throws PluginException
- Specified by:
doStart in interface IPlugin- Overrides:
doStart in class AbstractPlugin
- Throws:
PluginException
getSessionFactory
public static org.hibernate.SessionFactory getSessionFactory(IContext context,
String name)
throws PluginException
- Get the session factory associated to a given name in test context.
- Parameters:
context - The context.name - The name.
- Returns:
- The session factory instance.
- Throws:
PluginException - On session factory lookup errors.
Copyright © 2016. All rights reserved.