Defining an Object Navigator Extension
All object navigator extensions must reference a common extension point, named vise.navigator.nodespecs. object navigator extensions must specify this extension point in the extension definition, and provide a data object of type com.vmware.ui.objectnavigator.model.ObjectNavigatorNodeSpec.
An object navigator extension can add a category to the object navigator control, it can add a simple pointer node, or it can add an object collection node. You determine which type of node you add to the object navigator by which properties you include in the ObjectNavigatorNodeSpec data object, and how you set those properties. Some properties of the ObjectNavigatorNodeSpec data object are optional and not used for certain node types.
Specifying the Object Navigator Page and Category
When you add any type of extension to the object navigator, you specify where the extension appears by using the <parentUid> property in the extension definition. Your extension can appear beneath one of the predefined categories in the object navigator, or under a new category that you create with an extension.
Object Navigator Categories and IDs lists the pre-defined categories in the object navigator and the corresponding id values to which you must set the <parentUid> property.
Adding a Category to the Object Navigator
Your extension can add a category, rather than a node, to the object navigator. Table 6-6, on page 61, lists the properties of the ObjectNavigatorNodeSpec data object that you must set to add a category to the object navigator.
A string value that determines where the extension appears in the object navigator control. The value of <parentUid> property must match the extension id attribute of the parent category. The extension appears in the category that you specify in the <parentUid> property. See Specifying the Object Navigator Page and Category.
Example: Example Category Extension to Object Navigator shows an example extension definition for an object navigator extension that adds a new category. In the example, the category is named “Admin Sample”, and the extension category is added to the object navigator Administration page.
Example: Example Category Extension to Object Navigator
<extension id="mySolution.myPlugin.myAdminSampleCategory">
<extendedPoint>vise.navigator.nodespecs</extendedPoint>
<object>
<title>Admin Sample</title>
<parentUid>vsphere.core.navigator.administration</parentUid>
</object>
</extension>
 
Adding a Pointer Node to the Object Navigator
Your extension can add a pointer node to the object navigator. A pointer node extension causes a specific application, object workspace, or global view to appear in the vSphere Web Client main workspace when the user clicks the pointer node.
ObjectNavigatorNodeSpec Extension Object Properties for Pointer Node Extension lists the properties of the ObjectNavigatorNodeSpec data object that you must set to add a pointer node to the object navigator.
A string value that determines where the extension appears in the object navigator control. The value of <parentUid> property must match the extension id attribute of the parent category. The extension appears in the category that you specify in the <parentUid> property. See Specifying the Object Navigator Page and Category.
The icon that appears for the pointer in the object navigator control. The value of the <icon> property typically references a dynamic resource in your plug-in module.
Example 6-28, on page 62, shows an example extension definition for an object navigator extension that adds a new pointer node. In the example, the pointer node has the name label “Sample Dashboard” and causes the extension mySolution.myPlugin.myDashboardApp to appear in the main workspace. The pointer node appears in the object navigator control in the top-level Solutions category.
Example: Example Pointer Extension to Object Navigator
<extension id="mySolution.myPlugin.myDashboardPointer">
<extendedPoint>vise.navigator.nodespecs</extendedPoint>
<object>
<title>Sample Dashboard</title>
<parentUid>vsphere.core.navigator.solutionsCategory</parentUid>
<navigationTargetuid>mySolution.myPlugin.myDashboardApp</navigationTargetUid>
<icon>#{samplePluginImages:sample}</icon>
</object>
</extension>
 
Adding an Object Collection Node to the Object Navigator
Your extension can add a new object collection node to the object navigator. You typically add an object collection node to the object navigator if you have introduced a new type of object to the vSphere environment, and you want to provide direct access to the instances of that object.
An object collection node extension represents an aggregation of object instances, such as data centers or hosts. When the user clicks an object collection node, the node can expand to show a list of all instances of that object in the vSphere environment.
When you create an object collection node, part of your extension definition must reference a relation extension. The vSphere Web Client uses data from the relation extension to populate the expandable list of object instances. See Creating a New Relation Between vSphere Objects.
ObjectNavigatorNodeSpec Object Properties for Object Collection Node Extension lists the properties of the ObjectNavigatorNodeSpec data object that you must set to add an object collection node to the object navigator.
A string value that determines where the extension appears in the object navigator control. The value of <parentUid> property must match the extension id attribute of the parent category. The extension appears inside the category that you specify in the <parentUid> property. See Specifying the Object Navigator Page and Category.
The icon that appears for the pointer in the object navigator control. The value of the <icon> property typically references a dynamic resource in your plug-in module.
A Boolean value. If you set this value to true, when the user clicks the collection node, the object navigator control will slide to display a new page with an expandable list of every object in the collection.
A string that indicates the type of object collection the node represents. The value you specify in the <nodeObjectType> property must match the extension id of an ObjectRelationSetSpec that you create in a Relation extension for your object.
Example: Example Entity Collection Node Extension shows an example extension definition for an object navigator extension that adds an object collection node for a custom object type called a Rack. In the example, the Rack object collection node appears under the Inventory Lists category in the object navigator vCenter page.
The Rack object collection node extension references an object workspace collection data view with the identifier mySolution.myPlugin.Rack.objectCollectionView, and a relation extension with the identifier RackNodeCollection.
Example: Example Entity Collection Node Extension
<extension id="mySolution.myPlugin.myRackCollectionNode">
<extendedPoint>vise.navigator.nodespecs</extendedPoint>
<object>
<title>Rack</title>
<icon>#{myPluginImages:Rack}</icon>
<parentUid>vsphere.core.navigator.viInventoryLists</parentUid>
<navigationTargetUid>mySolution.myPlugin.Rack.objectCollectionView</navigationTargetUid>
<isFocusable>true</isFocusable>
<nodeObjectType>RackNodeCollection</nodeObjectType>
</object>
</extension>