4.0

Table Of Contents
Load and Save Configuration Information in the Configuration Server
The IConfigurationAdaptor interface provides methods to load and save configuration information in the
Orchestrator configuration server. The configuration adapter uses these methods to locate and update the
configuration information for a plug-in by setting plug-in properties.
You also create methods in the configuration adapter to define the values that the user can configure.
Orchestrator reloads this information each time this user connects to the Orchestrator server. You can validate
the information that the user provides.
In the solar system example, the SolarSystemConfigurationAdaptor class defines methods to allow users to
select their home planet and to define Pluto as either a planet or as a dwarf planet. The
SolarSystemConfigurationAdaptor class implements the methods of the IConfigurationAdaptor interface to
load and save configuration information and to validate the information that the users provide. The methods
that SolarSystemConfigurationAdaptor defines are implemented by the SolarSystemConfigureAction class.
Prerequisites
n
Implement the plug-in adapter and factory interfaces.
n
Set up the configuration adapter implementation class.
Procedure
1 Declare variables for the plug-in name and for the configurable values.
The SolarSystemConfigurationAdaptor class declares the following variables:
private String pluginName = "SolarSystem";
private String homePlanet;
private String plutoClassifiedAsAPlanet = "yes";
2 Create a class loader to load the configuration adapter classes into the configuration server.
Orchestrator defines a utility class named Localizator to locate packages of classes.
The SolarSystemConfigurationAdaptor class creates an instance of Localizator that calls the
java.lang.Class.getClassLoader() method and directs it to the package of configuration classes.
private static Localizator local =
new Localizator(SolarSystemConfigurationAdaptor.class.getClassLoader(),
"com/vmware/orchestrator/api/sample/solarsystem/config/package");
Chapter 7 Developing Plug-Ins
VMware, Inc. 193