4.1

Table Of Contents
Procedure
1 Set the data sources for the plug-in <finder> elements in the <finder-datasources> element.
The plug-in adapter implementation is the point of access to all the classes of the plug-in.
The solar system plug-in vso.xml file sets the name of the data source to solar-datasource and points the
<finder> elements to the SolarSystemAdapter class that instantiates the SolarSystemFactory and the other
classes of the plug-in.
<finder-datasources>
<finder-datasource name="solar-datasource"
adaptor-class=
"com.vmware.orchestrator.api.sample.solarsystem.SolarSystemAdapter"
anonymous-login-mode="internal"/>
</finder-datasources>
2 Define how the plug-in finds objects in the plugged-in technology in <finder> elements.
The following extract from the solar system vso.xml file shows the <finder> element for objects of the type
Star.
<finders>
<finder type="Star" datasource="solar-datasource"
java-class="com.vmware.solarsystem.Star"
script-object="Star" image="images/sun_16x16.png">
[...]
</finder>
[...]
</finders>
The <finder> element for Star objects obtains their data from the data source that the <finder-
datasource> element defines. The Star finder type represents instances of the
com.vmware.solarsystem.Star class in the Orchestrator inventory. The finder element for Star objects
defines a Star scripting type that appears in the Orchestrator JavaScript API.
3 Obtain the identifier of the object in the <id> element.
The solar system example obtains the identifier of the object by calling the getId() method that the solar
system application's CelestialBody class defines.
<id accessor="getId()" />
4 Define the object's relations in the <relations> element.
The solar system example defines a relation named OrbitingPlanets to relate objects of the type Planet
to the Star object that this <finder> element finds.
<relations>
<relation type="Planet" name="OrbitingPlanets"/>
</relations>
5 Set the hierarchy of objects in the Orchestrator inventory tab according to their relation to the parent.
The solar system example places all objects related to Star objects type by the OrbitingPlanets relation
immediately beneath the star in the inventory hierarchy.
<inventory-children>
<relation-link name="OrbitingPlanets"></relation-link>
</inventory-children>
Chapter 7 Developing Plug-Ins
VMware, Inc. 197