In the plugin.xml manifest file, each extension is defined in its own <extension> element. The principal characteristics of the extension are described in their own elements, the <extendedPoint> element for the extension point, the <object> element for the extension object, and the <metadata> element for filtering metadata.

The <extendedPoint> XML element contains the name of the extension point. The vSphere Web Client renders the extension at the extension point when the new plug-in module is loaded. In the Example: Extension Definition, the extension point is vsphere.core.vm.summarySectionViews

The <object> element describes the required extension data object for the target extension point. The <object> element uses standard XML syntax to describe a data object of the ActionScript class type that the extension point requires and sets values for the properties in that object. Each type of extension requires a specific extension data object. To find the required extension object type for any given extension point, see List of Extension Points.

Note

In general, you do not explicitly specify the extension data object type. The <object> element is assumed to be an object of the type that the extension point requires. The <object> element has an optional type attribute that you can use to specify explicitly a type. You only have to specify explicitly a type if your extension definition provides a subclass of the extension point’s required class, or if the extension point requires an interface rather than a class.

In the Example: Extension Definition, the extension point vsphere.core.vm.summarySectionViews requires a class of type com.vmware.ui.views.ViewSpec. The <object> element describes how the ViewSpec data object looks.

Objects of type com.vmware.ui.views.ViewSpec have a <name> property and a <componentClass> property. The <name> property contains the name that the vSphere Web Client displays for the new data view extension. In Example: Extension Definition, this name is Sample Monitor View Title. You can also specify a dynamic resource string for any <name> property.

The <componentClass> property specifies the Flex class that implements the new data view. If you are implementing an HTML component, you specify one of the HTML Bridge Flex classes provided by the SDK. Otherwise, you must create the Flex component. In Example: Extension Definition ,this class is com.vmware.samples.viewpropertiesui.views.VmSampleSummarySectionView, which appears under the Summary tab for virtual machine objects.

You can use the ActionScript API reference included with the vSphere Web Client SDK to obtain detailed information on the extension data object that you must create for each type of extension.

The <metadata> element contains filtering data that determines when the extension is available to the user. See Filtering Extensions

The following example shows an example extension definition, starting with the <extension> element. The extension that the XML definition describes adds a Data View to the object workspace for a virtual machine object. In the example, the Data View is a section view for the Summary tab in the object workspace for the virtual machine objects and appears only to users with the Global.Licenses privilege.

<!-- Add a summary Section View to the VirtualMachine Summary tab by
extending the extension point "vsphere.core.vm.summarySectionViews". -->
 
<extension id="com.vmware.samples.viewspropertiesui.vm.summarySectionView">
    <extendedPoint>vsphere.core.vm.summarySectionViews</extendedPoint>
    <object>
      <name>Sample Summary Section View</name>
      <componentClass className="com.vmware.samples.viewspropertiesui.views.VmSampleSummarySectionView"/>
    </object>
    <metadata>
       <privilege>Global.Licenses</privilege>
    </metadata>
</extension>

In the example, the <extension> element contains an id attribute, which is a unique identifier that you create. Other extensions, such as extensions to the object navigator, can reference this extension by using the extension unique identifier.