|
| 以 PDF 格式下载本书 (918 KB)
Chapter 7 Plug-In User Interface SchemaThis 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 OverviewThe <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> ElementThe <pluginUI> element has the following attributes:
Child Elements of the <pluginUI> ElementThe <pluginUI> element contains the following elements:
<icon> ElementThe <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> ElementThe <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 slash (/) or dot (.) characters are not permitted. <customPage> ElementThe <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> ElementThe <customPage> element has one required attribute, name. The name attribute is used in the breadcrumb and title sections of the custom page. <section> ElementThe <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> or <section> elements and has two attributes:
Note – To create a nested custom page structure, put a <section> element within another <section> element. Any nested <section> elements must appear after all <entry> elements within the <section>. <entry> ElementThe <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> ElementThe <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:
Sample XML for the <pluginUI> ElementThe following sample XML takes fragments from various custom pages to illustrate each element in the <pluginUI> schema. Example 7–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.2">
<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"
path="/com/bigCo/logic" flatView="true"/>
</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>
<entry title="entry in a nested section"
description="this is a an entry in a nested section">
<action text="view all" toolTip="view all aType comps">
<compList
typeName="com.bigCo.logic.pluginName#aType"
path="/com/bigCo/logic" />
</action>
</entry>
</section>
</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>
<action text="list servers" toolTip="list the apache servers">
<hostList searchName="com.bigCo.logic.pluginName.WebLogic#apacheHosts"/>
</action>
<action text="custom reports" toolTip="view the custom reports">
<external url="http://reportserver/reports/dec"/>
</action>
<action text="start a Managed Server"
toolTip="run the start control of a ManagedServer component">
<compProcedureRun path="/com/sun/weblogic" name="WL Managed Server"
procedureName="start" procedureType="CONTROL"/>
</action>
</entry>
</section>
</customPage>
</pluginUI>
|
|||||||||||||