JBoss Community Archive (Read Only)

RHQ 4.9

Perspectives - Extension Points

Perspective Extension Points

An extension point is an agreed upon menu/page/area/region that the Perspective Service will modify/replace with custom content provided by a given perspective. In other words the Perspective Developers use Extension Points to customize the user experience while leveraging the RHQ UI (Core UI). Abstractly, extension points are meant to be addressing points so that a perspective developer can unambiguously define what region of the UI they are providing a replacement for. Once an extension point is identified you should be able to(where it makes sense):

  • enable(default)/disable

  • replace the content for a given area

  • add to the default rendered content

The Core UI : Jon 2.3

images/author/download/attachments/73139337/core-ui-page.png

Leveraging the existing UI as a reference to lay future functionality on top of, the following high level Extension Point regions are identified as useful for Perspective Developers.

Meeting the Extension Points

CoreMenu

images/author/download/attachments/73139337/core-menu.png
The bulk of extension points off the core UI are likely to be under the parent MENU extension point as reuse of the existing pages is assumed to be easier than reconstructing from scratch.

  • enable | disable : meaning do not show.

  • replace: the content for a given area.

    If you replace the global/parent menu then you are removing all child menu items or assuming responsibility for generating them. Using attachment points below CoreMenu.* may not work.

    When overriding an existing attachment point, the perspective subsystem will post pend all the original URL arguments to the URL of the replacement web component.

  • add: represented by CoreMenu.End. In this situation new menu items can be added to the end of the existing menu options.

Menu(top level) item removal (CoreMenu.Administration)

images/author/download/attachments/73139337/core-menu-minus-admin.png

Ex. Adminitration menu item removed

*) Menu (top level) item addition
*) Menu (top level) item replace
*) Menu (top level) item removal

Ex. Core menu item example (CoreMenu.Administration.Reports.Resource)
images/author/download/attachments/73139337/core-menu-reports-resource.png

v) Menu item addition (CoreMenu.Administration.Reports.End)
images/author/download/attachments/73139337/core-menu-reports-end.png

Ex. Core UI tab item (Dashboard.Resource.Monitor)
images/author/download/attachments/73139337/resource-monitor-tab.png

vi) Menu item replace (Dashboard.Resource.Monitor)
images/author/download/attachments/73139337/resource-monitor-tab-replace.png
vii) Tab Removal
(insert example)
viii) Tab Addition
ix) Tab Replace
vii) Sub-Tab Removal
viii) Sub-Tab Addition
ix) Sub-Tab Replace (Dashboard.Resource.Monitor.Traits)
images/author/download/attachments/73139337/resource-monitor-sub_tab.png

SubMenu Extension Point examples

There are numerous extension points that exists in the menu, we will only outline the types of extensions that can occur.

When overriding an existing attachment point, the perspective subsystem will postpend all the original URL arguments to the URL of the replacement web component.

CorePage

The bulk of remaining browser page is divided into frames/regions.
images/author/download/attachments/73139337/core-ui-page.png

CorePage.LeftNavigation

images/author/download/attachments/73139337/core-page-left-nav.png

  • enable | disable : disable if moving nav only to CorePage.Details section..

  • replace: the content for a given area

  • add: N/A. Does not make sense to add a whole new region... new content would fit in existing region.

CorePage.Details

images/author/download/attachments/73139337/core-ui-details.png

  • enable : no-op as one has to start somewhere.

  • disable : meaning do not show. Not sure this is useful.

  • replace: the content for a given point

  • add: N/A. Does not make sense to add a whole new region... new content would fit in existing region.

ResourceView.TasksPane

This region is an addition to the existing Core UI framework added to make utilizing new Tasks and Perspectives easier without additional work. In this layer, depending upon the Perspectives and Actions assigned to the logged in user, this new "Tasks Pane" region exists in the lower right area of the dashboard to provide a consistent area for users to always see Actions and Tasks specified for them.
images/author/download/attachments/73139337/dashboard-task-pane.png

The contents of the Task UI Pane will likely resemble the right most "Action " and "Getting Started" section in the following wireframe.
images/author/download/attachments/73139337/task-pane-wireframe.png

Perspective Descriptor elements related to extension points:

PERSPECTIVE DEVELOPER: must define each of these things for extension points

<perspectives>
 <perspective>
 <enableConcurrentPerspectives> TRUE\|FALSE </enableConcurrentPerspectives>
 <extension-point>
<!-- *** Whether this attachment point is not to be shown, true by default.
Removing menu items or pages?
Not sure if this works in all cases. Doc what makes sense.-->
<isEnabled>TRUE\|FALSE</isEnabled>

<!-- *** address of tree component to replace -->
<anchor>CoreMenu.Logo</anchor>

<!-- Whether embedded(runs in 95% of page, we provide nav bar and     breadcrumbs )
| standalone (core ui takes content and replaces region appropriately)-->
<ui-run-mode>embedded | standalone</ui-run-mode>

<!-- supports modal : with true need to open up api to tell when to go modal and when
to exit.  We need to define an api for this as necessarily needs to communicate back
to perspective service to send modal.end events. Thoughts? -->
<supports-modal>TRUE\|FALSE</supports-modal>

<!-- \**\* web page providing the generated html/xhtml/content. -->
<web-url>/some_local_remote_url/newContent.xhtml</web-url>

<!--  \**\* web location of image/icon. -->
<icon-url>/some_local_remote_url/newLogo.png</icon-url>

<!--  \**\* web page providing the generated html/content. -->
<label>(TEXT LOGO)</label>

<!-- \**\* NEED TO INSERT ROLE INFORMATION so Perspective service
Can disable what's not being shown.  \-->
<roles>
<role>(Name of role dependent on)</role>
</roles>
</extension-point>

Extension point syntax:

verbose way of specifying the address of an extension point for which new content will be provided.

  • CoreMenu

    • CoreMenu.Logo

    • CoreMenu.Overview : defined only replaces actual menu item.

    • CoreMenu.Overview.SubSystemViews

    • CoreMenu.Overview.SubSystemViews.ConfigurationChange

    • CoreMenu.Overview.AutoDiscovery

    • CoreMenu.Overview.Dashboard

    • CoreMenu.Overview.End

  • CorePage

    • CorePage.LeftNavigation : Provide and alternative to tree navigation

    • CorePage.Details : Provide an alternative to resource view of any one resource.

JBoss.org Content Archive (Read Only), exported from JBoss Community Documentation Editor at 2020-03-13 08:14:35 UTC, last content change 2013-09-18 19:41:01 UTC.