You create a relation extension by defining the objects relationships in the plugin.xml manifest file of your user interface plug-in module.

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 appear.

The following table lists the properties that you set for the ObjectReltaionSetSpec object.

Property

Type

Description

<type>

string

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.

<relationSpecs>

array

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 a Relation by Using the RelationSpec Object.

<relationsViewId>

string

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 appears for that object.

<conditionalProperty>

string

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 appears in the vSphere Web Client only if both the relation conditions are met and <conditionalProperty> is satisfied.