4.1

Table Of Contents
to load and save configuration information. The SolarSystemConfigureAction class implements the Apache
Struts framework to obtain the configuration information from the configuration interface and pass it to the
Orchestrator configuration server. The tab that you add to the configuration interface is a Struts Web
application.
Prerequisites
n
Implement the plug-in adapter and factory interfaces.
n
Set up the configuration adapter implementation class.
n
Implement the methods of the IConfigurationAdaptor interface to load, save, and validate configuration
information.
Procedure
1 Create and save a Java file for the plug-in configuration action implementation.
In the solar system example, the configuration action class is named SolarSystemConfigureAction.java.
2 Declare the package that contains the Java classes of the plug-in configuration implementation.
The solar system example declares the following package:
com.vmware.orchestrator.api.sample.solarsystem.config;
3 Import the classes of the Orchestrator API with a Java import statement.
The SolarSystemConfigureAction class requires the following classes:
import ch.dunes.vso.configuration.web.commons.BaseAction;
import ch.dunes.vso.sdk.conf.ConfigurationError;
4 Import the third-party Java classes that the configuration action requires.
The SolarSystemConfigureAction class requires the following classes:
import org.apache.log4j.Logger;
import com.opensymphony.xwork2.ModelDriven;
5 Declare a public class that implements the BaseAction and ModelDriven classes.
The Orchestrator BaseAction class defines how Orchestrator interacts with the Struts framework. The
OpenSymphony XWork2 ModelDriven class pushes objects to the Struts framework.
The SolarSystemConfigureAction class implements these classes and creates a generic instance of the
SolarSystemConfigurationAdaptor class.
public class SolarSystemConfigureAction extends BaseAction
implements ModelDriven<SolarSystemConfigurationAdaptor> {
}
6 Define the variables that the BaseAction implementation requires.
The SolarSystemConfigureAction class declares variables for the unique identifier of each instance of the
serializable BaseAction class, a logger, an array of ConfigurationError instances, and the configuration
adapter instance.
private static final long serialVersionUID = 1L;
private static Logger log = Logger.getLogger(SolarSystemConfigureAction.class);
private ConfigurationError[] configErrors;
private SolarSystemConfigurationAdaptor solarSystemConfigurationAdaptor;
vCenter Orchestrator Developer's Guide
190 VMware, Inc.