org.specrunner.plugins.core.factories
Class PluginFactoryAttribute
java.lang.Object
org.specrunner.plugins.core.factories.PluginFactoryImpl
org.specrunner.plugins.core.factories.PluginFactoryAttribute
- All Implemented Interfaces:
- IPluginFactory
public class PluginFactoryAttribute
- extends PluginFactoryImpl
An implementation which uses a attribute to return the plugin. To map a
plugin to a given attribute add a 'plugin_attribute.properties'
file and add the name of the class.
i.e. bean=test.PluginAny, then just use attribute
bean="anything" anywhere in the specification.
- Author:
- Thiago Santos
|
Constructor Summary |
PluginFactoryAttribute()
Creates the factory loading file 'sr_plugins_attribute.properties'. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PluginFactoryAttribute
public PluginFactoryAttribute()
- Creates the factory loading file 'sr_plugins_attribute.properties'.
newPlugin
public IPlugin newPlugin(nu.xom.Node node,
IContext context)
throws PluginException
- Description copied from interface:
IPluginFactory
- Creates a new plugin.
- Parameters:
node - The source node for plugin creation.context - The context.
- Returns:
- A plugin based on source information.
- Throws:
PluginException - On creation error.
byAttribute
protected void byAttribute(IContext context,
IPluginGroup result,
nu.xom.Element ele)
throws PluginException
- Lookup plugin classes using attribute enumeration as reference.
- Parameters:
context - The context.result - The result set.ele - The corresponding element.
- Throws:
PluginException - On plugin errors.
Copyright © 2014. All rights reserved.