T-Plan Robot Enterprise 4.0
Build No. 4.0-20140924.1

com.tplan.robot.preferences
Interface Configurable

All Known Implementing Classes:
AbstractCommandHandler, DefaultReportProvider, XSLReportProvider

public interface Configurable

Interface for objects which have configurable parameters stored in or intend to store to the application configuration.


T-Plan Robot Enterprise, (C) 2009-2014 T-Plan Limited. All rights reserved.


Method Summary
 java.util.List<Preference> getPreferences()
          Get metadata of displayable/editable configurable parameters.
 void setConfiguration(UserConfiguration cfg)
          If an object implementing this interface is a plugin (i.e.
 

Method Detail

setConfiguration

void setConfiguration(UserConfiguration cfg)

If an object implementing this interface is a plugin (i.e. implements also the Plugin interface) and is instantiated through a supported plugin factory, the Plugin Manager calls this method right after an instance of this object is created.

Custom objects which do not already have their configuration parameters in the default configuration file should take advantage of this method to store their configuration into the shared User Configuration instance. It is recommended to call the UserConfiguration.saveConfiguration() method in the end to save the configuration to the hard drive.

Objects wishing to be notified of changes of configuration parameters should implement the ConfigurationChangeListener interface and register with the UserConfiguration instance through the addConfigurationChangeListener() method.

Parameters:
cfg - global shared instance of user configuration preloaded with parameters from the default and user configuration files.

getPreferences

java.util.List<Preference> getPreferences()
Get metadata of displayable/editable configurable parameters. This method should declare a list of metadata for all configurable parameters which may be editable in the GUI. If the returned list is not null and contains at least one parameter, it gets picked up by the Preferences dialog which creates a panel with GUI components allowing to edit the declared configuration parameters.

Returns:
a list of metadata for all public editable configuration parameters.

T-Plan Robot Enterprise 4.0
Build No. 4.0-20140924.1