org.specrunner.plugins.core.factories
Class PluginFactoryElement

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

public class PluginFactoryElement
extends PluginFactoryImpl

Creates a plugin by element. To bind an element add a ' plugin_element.properties' file and map the tag.

i.e. a map of br=test.PluginNewLine will perfome the plugin each tag <br>.

Author:
Thiago Santos

Field Summary
protected static String ATT_AS
          Attribute to create a element as another type.
protected static char SEPARATOR
          Separator of name field.
 
Fields inherited from class org.specrunner.plugins.core.factories.PluginFactoryImpl
aliasToTypeNames, aliasToTypes, file, initialized, kind, templates, typeNamesToAlias
 
Constructor Summary
PluginFactoryElement()
          Creates a factory loading file 'sr_plugins_element.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

SEPARATOR

protected static final char SEPARATOR
Separator of name field.

See Also:
Constant Field Values

ATT_AS

protected static final String ATT_AS
Attribute to create a element as another type. Use as='type' to refer the actual expected type. For example: to use a select element in a specification you can do:
      <select as="options" by="id:selectField">
      ...
      </select>
 
This construction allows convert select action which select items in a verification of options in the specified select.

See Also:
Constant Field Values
Constructor Detail

PluginFactoryElement

public PluginFactoryElement()
Creates a factory loading file 'sr_plugins_element.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 © 2015. All rights reserved.