Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

What is the Administration Navigation Channel Channel
Registering Links
Pluggability of User Interface (Tree anyone?)
List Model's static links file: adminNav.xml
Tutorial: Adding a Static Link
Registering Links Via CAR Descriptors

#What is the Administration Navigation Channel

When an administrator uses the portal, channels meant solely for administrators have shown up traditionally in two different ways. Prior to uPortal 2.6, the 'Channel Admin' link presented the administrator with links to 'Publish a new channel' or 'Modify a currently published channel'. Additionally, depending on how the portal instance is configured there may be an 'Admin Tools' tab pushed into the layout of an administrator. The Admin Nav channel takes the place of rendering the links presented when the 'Channel Admin' link is selected. Previously, this list was provided by the Channel Manager channel. Now it is a standalone, runtime-extensible channel to which links can be added without bloating the channel manager channel with unrelated functionality. Furthermore, unlike the fixed set of channel available on the 'Admin Tools' tab, this channel dynamically alters the list of available links it presents based on the authorizations had by its current user.

...

One of the key benefits of the Admin Nav channel is that links can now be added to this area without bloating the channel manager channel with unrelated functionality. Links are added to Admin Nav dynamically at any time after the web server has started up and are not persisted. This means that they must be registered each time that the server starts up. This was done intentionally so that when applications are removed from the portal their administrative links are also removed. To register a link, code must use an implementation of org.jasig.portal.channels.adminnav.ILinkRegistrar. An instance of this interface is acquired by calling a static method on the Admin Nav Channel. The following code snippet shows how links are added. Each step and piece used during registration will be explained.

...

The ResourceBundleProvider instance is then passed to an instance of XMLLinksFileLoader along with the path to adminNav.xml. XMLLinksFileLoader loads an XML file using an instance of XMLLinksHandler which defines the structure found in adminNav.xml and is responsible for making the calls to register the links found there-in. Copious comments are include in adminNav.xml explaining the XML structure that should be used when defining static links. Remember: for each link registered the appropriate entries should be added to the resource bundles that will provide the locale specific versions of the labels for those links.h3 .

Adding a Static Link

As an example, lets add the Number Guessing Game to the list of links that appear in Admin Nav. Using the Channel Manager channel we look at the publishing information for Number Guessing Game. It has a functional name of 'number-guessing-game'. Furthermore, since the labels for ListModel come from adminNav.properties and its derivative property resource bundles we'll use a lable id that does not conflict with any other keys in those property files, say 'NUMBER_GUESSING_GAME'. Following the comments in properties/adminNav.xml we add the following declaration:

...