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 pre-defined 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. ObjectNavigatorNodeSpec Extension Object Properties for Pointer Node Extension lists the properties of the ObjectNavigatorNodeSpec data object that you must set to add a category to the Object Navigator.
A string that appears as the text label for the category in the Object Navigator control. The string can be hard-coded, or it can be a dynamic resource string included in your plug-in module.
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.
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 that appears as the text label for the pointer node in the Object Navigator control. The string can be hard-coded, or it can be a dynamic resource string included in your plug-in module.
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.
A string value that specifies the global view, application, or object workspace that appears in the main workspace when the user clicks the pointer node. The value of the <navigationTargetUid> property must match the extension id attribute for the target view.
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: Example Pointer Extension to Object Navigator 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 datacenters 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 Related Items extension. The vSphere Web Client uses data from the Related Items extension to populate the expandable list of object instances. See Creating a New Relation Between vSphere Objects.
ObjectNavigatorNodeSpec Extension 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 that appears as the text label for the pointer node in the Object Navigator control. The string can be hard-coded, or it can be a dynamic resource string included in your plug-in module.
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.
Typically, most object collection nodes are found in the Inventory Lists category of the Object Navigator vCenter page. A best practice is to either add your object collection node to the Inventory Lists category, or to create a new category extension.
A string value that specifies the global view, application, or object workspace that appears in the main workspace when the user clicks the pointer node. The value of the <navigationTargetUid> property must match the extension id attribute for the target view.
For an object collection node, a best practice is to set this value to an object collection data view. You can create an object collection data view by using the standard template when you create an object workspace for your custom object type. See Adding to vCenter Object Workspaces.
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>