org.specrunner.plugins.core.factories
Class PluginFactoryCSS

java.lang.Object
  extended by org.specrunner.plugins.core.factories.PluginFactoryImpl
      extended by org.specrunner.plugins.core.factories.PluginFactoryCSS
All Implemented Interfaces:
IPluginFactory

public class PluginFactoryCSS
extends PluginFactoryImpl

An implementation which uses the 'class' attribute to return the plugin. To map a plugin to a given class add a 'plugin_css.properties' file and add the name of the class.

i.e. ok=test.PluginAny, then just use class="ok" anywhere in the specification.

Author:
Thiago Santos

Field Summary
static String ATTRIBUTE
          Attribute with CSS information.
 
Fields inherited from class org.specrunner.plugins.core.factories.PluginFactoryImpl
aliasToTypeNames, aliasToTypes, templates, typeNamesToAlias
 
Constructor Summary
PluginFactoryCSS()
          Creates the factory loading file 'sr_plugins_css.properties'.
 
Method Summary
 IPlugin newPlugin(nu.xom.Node node, IContext context)
          Creates a new plugin.
 
Methods inherited from class org.specrunner.plugins.core.factories.PluginFactoryImpl
bind, finalizePlugin, getAlias, getClass, getKind, initialize, test
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ATTRIBUTE

public static final String ATTRIBUTE
Attribute with CSS information.

See Also:
Constant Field Values
Constructor Detail

PluginFactoryCSS

public PluginFactoryCSS()
Creates the factory loading file 'sr_plugins_css.properties'.

Method Detail

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.


Copyright © 2014. All rights reserved.