4.0

Table Of Contents
3 Map the methods in the Java class to methods in the Orchestrator JavaScript API in the
<object><methods> element.
The SolarSystemEventGenerator class defines a generateFlareEvent() method to generate solar flare
events. The solar system vso.xml maps this method to a JavaScript method of the same name, and sets its
parameters in the JavaScript method.
<methods>
<method script-name="generateFlareEvent" java-name="generateFlareEvent">
<description>Start a Solar Flare</description>
<parameters>
<parameter name="star" type="Star">The star which generates the event</parameter>
<parameter name="magnitude" type="number">The magnitude of the flare</parameter>
</parameters>
</method>
</methods>
4 Map the attributes of a Java class to JavaScript attributes in <object><attributes> elements.
The solar system vso.xml file maps the Java attributes of the Star object to attributes of the same name in
the Star JavaScript class in the Orchestrator JavaScript API.
<object script-name="Star" java-class="com.vmware.solarsystem.Star"
create="false" strict="true">
[...]
<attributes>
<attribute script-name="id" java-name="id" return-type="string">
The unique Id of the star</attribute>
<attribute script-name="name" java-name="name" return-type="string">
The name of the star</attribute>
<attribute script-name="circumference" java-name="circumference" return-type="number">
Circumference of the star</attribute>
<attribute script-name="temperature" java-name="surfaceTemp" return-type="number">
The temperature on the star's surface</attribute>
</attributes>
[...]
</object>
You mapped classes and their methods and attributes from the classes in the plugged-in technology and plug-
in implementation to a JavaScript class and methods in the Orchestrator JavaScript API.
What to do next
Create or rebuild the DAR file for the plug-in.
Solar System JavaScript API Mappings
The vso.xml file for the solar system example maps objects, classes, methods, and attributes from the solar
system application to scripting types, classes, methods, and attributes in the Orchestrator JavaScript API.
Table 7-8 lists the classes, methods, and attributes from the solar system application and plug-in implemention
that the vso.xml file maps to the Orchestrator JavaScript API.
Table 7-8. Solar System JavaScript API Mappings
Scripting Class Source Class Attributes Methods
SolarSystemEventGenerator
SolarSystemEventGenerator ,
defined by plug-in
None
generateFlareEvent( st
ar, magnitude)
SolarSystemTriggerGenerat
or
SolarSystemTriggerGenerator ,
defined by plug-in
None
createStarFlareTrigger
( star, minMagnitude)
vCenter Orchestrator Developer's Guide
208 VMware, Inc.