Defining a Relation Extension
To create a relation extension, you need only create the metadata extension definition in your user interface plug-in module plugin.xml file. You do not need to create a Flex class. Relation extensions use a single common extension point in the vSphere Web Client user interface layer, named vise.relateditems.specs. Relation extensions must specify this extension point, and provide a data object of type com.vmware.ui.relateditems.model.ObjectRelationSetSpec.
The ObjectRelationSetSpec object specifies the object type to which the relation pertains, and a list of RelationSpec objects that describe the current object’s relationship to other vSphere objects. The ObjectReltaionSetSpec contains other optional properties that you can use to set the data view in which relations are displayed, and to further refine when relations are displayed.
ObjectRelationSetSpec Extension Object Properties lists the properties you set for the ObjectRelationSetSpec object.
The type of object to which the relation pertains. For example, if you are creating a relation for the Host object type, you set the <type> property to the string “HostSystem”.
An array of objects of type com.vmware.ui.relateditems.model.RelationSpec. Each RelationSpec object describes the relation between the current object (specified in the <type> property) and a target object that you specify. See Describing the Relation Using the RelationSpec Object.
The extension ID of the Related Items data view for the current object. When the user selects the object node using the Object Navigator, the Related Items data view you specify in the <relationsViewId> property appears in the main workspace in the vSphere Web Client GUI. This property is optional. If you do not include the <relationsViewId> property in your extension definition, no Related Items data view will appear for that object.
An optional property that you can include as an additional constraint for the relation. To use this property, you specify the name of a boolean property on the target object. For example, if you are creating a relation extension for a virtual machine object, you can additionally specify a boolean property, such as the power-on state, on that virtual machine using <conditionalProperty>. The relation only appears in the vSphere Web Client if both the relation conditions are met and <conditionalProperty> is satisfied.