4.0

Table Of Contents
What to do next
Obtain configuration information that the user sets in the configuration interface by implementing the Apache
Struts framework.
Create a Configuration Action to Obtain Configuration Information from the User
Orchestrator uses the Apache Struts framework to pass to the Orchestrator server the configuration information
that the user provides in the configuration interface.
You can implement the action that passes configuration information from the Orchestrator configuration
interface to the configuration server directly in the configuration adapter implementation. However, the solar
system example defines this action in a separate class named SolarSystemConfigureAction. The
SolarSystemConfigureAction class uses the methods that the SolarSystemConfigurationAdaptor class defines
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> {
}
vCenter Orchestrator Developer's Guide
196 VMware, Inc.