Skip to content
Laurent Jourdren edited this page Apr 11, 2017 · 3 revisions

The Eoulsan Settings class

WARNING: This documentation is outdated and will soon be updated.

Introduction

The Settings object contains the global configuration of Eoulsan. Values of the Settings object can be set with:

The Javadoc of the Settings class is available here.

Getters and Setters

For all the common settings (listed in the configuration file documentation) the Settings define a getter and a setter. Here an example for the temporary directory or the number of local threads to use. For boolean or integer values there is no need to convert the values in string.


settings.setTempDirectory("/tmp");
settings.setTempDirectory(); // "/tmp"

settings.getLocalThreadsNumber(4);
settings.getLocalThreadsNumber(); //4

If the developer wants to use custom settings it can use the setSetting() and getSetting() method:

settings.setSetting("myplugin.setting1","hello");
settings.getSetting("myplugin.setting1"); // "hello"

We advise you to use the same convention for settings names that the default Eoulsan settings.

How access to the Settings object

  • In a execute method of a Step object: Using the Context object:
Settings settings = context.getSettings();
Settings settings = EoulsanRuntime.getSettings();