N1 Grid Service Provisioning System 5.0 XML Schema Reference Guide

Chapter 6 Plug-in User Interface Schema

This chapter describes the XML schema that you use to define the user interface for a plug-in. The chapter contains the following topics:

<pluginUI> Element Overview

The <pluginUI> element enables a plug-in author to describe a limited set of functionality to appear on a custom shortcuts page. The set of functionality exposed via the shortcuts is divided into the following categories:

Attributes for the <pluginUI> Element

The <pluginUI> element has the following attributes:

<pluginUI> Child Elements

The <pluginUI> element contains the following elements:

<icon> Element

The <icon> element is a child of the <pluginUI> element. The <icon> element declares the location of the plug-in icon. The icon is expected to be in GIF or JPEG file format. The icon should have dimensions of 32 pixels wide by 26 pixels high.

Attributes for the <icon> Element

The <icon> element has one required attribute jarPath. The jarPath attribute specifies the location of the plug-in icon, relative to the root of the plug-in JAR file. Leading / or . characters are not permitted.

<customPage> Element

The <customPage> element is a child of the <pluginUI> element and defines the contents of the custom page linked to by the menu item in the browser interface. . The <customPage> element contains one or more <section> elements and has a name attribute.

Attributes for the <customPage> Element

The <customPage> element has one required attribute, name. The name attribute is used in the breadcrumb and title sections of the custom page.

<section> Element

The <section> element is a child of the <customPage> element and defines a section for the custom page. The <section> element contains one or more <entry> elements and has two attributes:

<entry> Element

The <entry> element is a child of the <section> element and defines an entry point for user actions. An <entry> element contains zero or more <action> elements and has the following attributes:

<action> Element

The <action> element is a child of the <entry> element and defines a user action. Each <action> element must contain exactly one child element.

The <action> element has two attributes:

Each <action> element must contain one of the following child elements:

<compCreate>

The <compCreate> element is a child of the <action> element and defines a link to the component create page for the named component type.

The <compCreate> element has one required attribute:

  • typeName – Name of the component type. The component type must be contained in the plug-in or in a plug-in on which this plug-in directly depends. The component type cannot be defined as hidden. The pluginName must be prefixed to the component type name, for example, fullPluginName#componentTypeName.

<compDetails>

The <compDetails> element is a child of the <action> element and defines a link to the component details page for the latest version of the named component.

The <compDetails> element has two required attributes:

  • path – The absolute path of the component.

  • name – The name of the component. The component must be contained in the plug-in or in a plug-in on which this plug-in directly depends.

<compList>

The <compList> element is a child of the <action> element and defines a link to the component list page filtered by the named component type.

The <compList> element has one required attribute:

  • typeName – Name of the component type. The component type must be contained in the plug-in or in a plug-in on which this plug-in directly depends. The component type cannot be defined as hidden. The pluginName must be prefixed to the component type name, for example, fullPluginName#componentTypeName.

<compWhereInstalled>

The <compWhereInstalled> element is a child of the <action> element and defines a link to the Component Where Installed page for the latest version of the named component.

The <compWhereInstalled> element has two required attributes:

  • path – The absolute path of the component.

  • name – The name of the component. The component must be contained in the plug-in or in a plug-in on which this plug-in directly depends.

<hostList>

The <hostList> element is a child of the <action> element and defines a link to the host list page filtered by the named host type.

The <hostList> element has one required attribute:

  • typeName – The name of the host type. The host type must be contained in the plug-in or in a plug-in on which this plug-in directly depends. The host type cannot be defined as hidden. The pluginName must be prefixed to the host type name, for example, fullPluginName#hostTypeName.

<planDetails>

The <planDetails> element is a child of the <action> element and defines a link to the plan details page for the latest version of the named plan.

The <planDetails> element has two required attributes:

  • path – The absolute path of the plan.

  • name – The name of the plan. The plan must be contained in the plug-in or in a plug-in on which this plug-in directly depends.

Sample XML for <pluginUI> Element


Example 6–1 Sample <pluginUI> Descriptor File

<?xml version="1.0" encoding="UTF-8"?>
<pluginUI menuItem="pluginName" 
          tooltip="view wl server pages"
          xmlns="http://www.sun.com/schema/SPS"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://www.sun.com/schema/SPS
                              pluginUI.xsd"
          schemaVersion="5.0">
  <icon jarPath="custom/gui/img/WLicon-small.gif"/>
  <customPage name="WebLogic">
    <section title="WebLogic application tasks" 
             description="capture and edit your WebLogic applications...">
      <entry title="enterprise applications (EARs)" 
             description="capture, edit and deploy your enterprise applications">
        <action text="view all" toolTip="view all EARs">
          <compList typeName="com.bigCo.logic.pluginName.WebLogic enterprise application"/>
        </action>
        <action text="create new" toolTip="create new enterprise application">
          <compCreate typeName="com.bigCo.logic.pluginName.WebLogic enterprise application"/>
        </action>
      </entry>
      <entry title="web applications (WARs)" 
             description="capture, edit and deploy web applications">
        <action text="view all" toolTip="view all WARs">
          <compList typeName="com.bigCo.logic.pluginName.WebLogic web application"/>
        </action>
        <action text="create new" toolTip="create new webapp">
          <compCreate typeName="com.bigCo.logic.pluginName.WebLogic web application"/>
        </action>
      </entry>
      <entry title="java archives containing EJBs (JARs)" 
             description="capture, edit and deploy your JARS containing EJBs">
        <action text="view all" toolTip="view all JARs">
          <compList typeName="com.bigCo.logic.pluginName.WebLogic EJB"/>
        </action>
        <action text="create new" toolTip="create new java archive containing EJBs">
          <compCreate typeName="com.bigCo.logic.pluginName.WebLogic EJB"/>
        </action>
      </entry>
    </section>
    <section title="WebLogic infrastructure" 
             description="create and edit your WebLogic infrastructure...">
      <entry title="admin servers" 
             description="WebLogic domains / administration servers">
        <action text="manage admin servers" toolTip="manage WebLogic admin servers">
          <compDetails path="/com/bea/weblogic" name="WL Admin Server 7.0"/>
        </action>
        <action text="view admin servers" toolTip="list of WebLogic admin servers">
          <compWhereInstalled path="/com/bea/weblogic" name="WL Admin Server 7.0"/>
        </action>
      </entry>
      <entry title="clusters" 
             description="WebLogic clusters">
        <action text="manage clusters" toolTip="manage WebLogic clusters">
          <compDetails path="/com/bea/weblogic" name="WL Cluster"/>
        </action>
        <action text="view clusters" toolTip="list of WebLogic clusters">
          <compWhereInstalled path="/com/bea/weblogic" name="WL Cluster"/>
        </action>
      </entry>
      <entry title="managed servers" 
             description="WebLogic server instances">
        <action text="manage server instances" toolTip="WebLogic managed servers">
          <compDetails path="/com/bea/weblogic" name="WL Managed Server"/>
        </action>
        <action text="view managed servers" toolTip="list of WebLogic managed servers">
          <compWhereInstalled path="/com/bea/weblogic" name="WL Managed Server"/>
        </action>
         <action text="update managed servers" toolTip="run a plan on managed servers">
          <planDetails path="/com/bea/weblogic/updates" name="updatePlan"/>
        </action>
     </entry>
    </section>
  </customPage>
</pluginUI>