This chapter describes the XML schema that you use to define the user interface for a plug-in. The chapter contains the following topics:
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:
Component type shortcuts:
List all components that extend this component type
Create a component that extends this component type
Component shortcuts:
Manage the specified component (link to component details page)
List virtual and physical hosts where this component is installed
Plan shortcuts:
Manage the specified plan (link to plan details page)
The <pluginUI> element has the following attributes:
menuItem – The text to display in the menu of the browser interface. The name should be 20 characters or less in length, although the actual character limit is defined by the attribute type.
tooltip(optional) – The tooltip to display for the menu item in the browser interface. The menuItem includes the icon, if you choose to provide an icon.
xmlns:xsi – Required value: http://www.w3.org/2001/XMLSchema-instance
xsi:schemaLocation (optional) – Recommended value: http://www.sun.com/schema/SPS pluginUI.xsd
schemaVersion – The version of the pluginUI.xsd schema being used. The only value currently permitted is 5.0.
The <pluginUI> element contains the following elements:
<icon> – Provides the path to a graphic (icon) that you want displayed within the interface for this plug-in
<customPage> – Defines the contents of the custom page linked to by the menu item in the browser interface
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.
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.
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.
The <customPage> element has one required attribute, name. The name attribute is used in the breadcrumb and title sections of the custom page.
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:
title – Section title
description (optional) – Section description, secondary text
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:
title – Entry title
description (optional) – Entry description
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:
text – Text to be rendered for the link of the user action
tooltip (optional) – Tooltip to be used for the link of the user action
Each <action> element must contain one of the following child elements:
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.
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.
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.
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.
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.
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.
<?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>