org.robotframework.javalib.library
Class SpringLibrary

java.lang.Object
  extended by org.robotframework.javalib.library.KeywordFactoryBasedLibrary<Keyword>
      extended by org.robotframework.javalib.library.SpringLibrary
All Implemented Interfaces:
RobotJavaLibrary

public class SpringLibrary
extends KeywordFactoryBasedLibrary<Keyword>

A Robot keyword library that uses Spring configuration files for defining keywords.

Before using this library, you must set the configuration file pattern with setConfigFilePattern(String) so that it will find your configuration files.

The library finds all the configuration files matching the pattern. All the defined beans that implement the Keyword interface are available as keywords.


Constructor Summary
SpringLibrary()
           
SpringLibrary(java.lang.String configFilePattern)
           
 
Method Summary
protected  KeywordFactory<Keyword> createKeywordFactory()
          Creates a keyword factory.
 void setConfigFilePattern(java.lang.String pattern)
          Sets the pattern.
 
Methods inherited from class org.robotframework.javalib.library.KeywordFactoryBasedLibrary
getClassLoader, getKeywordNames, runKeyword, setClassLoader
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SpringLibrary

public SpringLibrary(java.lang.String configFilePattern)

SpringLibrary

public SpringLibrary()
Method Detail

createKeywordFactory

protected KeywordFactory<Keyword> createKeywordFactory()
Description copied from class: KeywordFactoryBasedLibrary
Creates a keyword factory. Must be implemented by subclasses. The keyword factory is created lazily, when either KeywordFactoryBasedLibrary.getKeywordNames() or KeywordFactoryBasedLibrary.runKeyword(String, Object[]) is called for the first time.

Specified by:
createKeywordFactory in class KeywordFactoryBasedLibrary<Keyword>
Returns:
keyword factory
See Also:
KeywordFactoryBasedLibrary.createKeywordFactory()

setConfigFilePattern

public void setConfigFilePattern(java.lang.String pattern)
Sets the pattern. See class description for details. Must be set before Robot calls RobotJavaLibrary.runKeyword(String, Object[]) or RobotJavaLibrary.getKeywordNames().

Parameters:
pattern - pattern


Copyright © 2009. All Rights Reserved.