Copyright (c) 1999, 2000 Silicon Graphics, Inc. All Rights Reserved.
Overview | Basic Concepts | GUI Components | Architecture | How To Write An App |
The Task Manager window has four parts, each of which can be customized to some degree.
myWorkArea/package/com/sgi/rhexamp/TaskManagerP.propertiesThe property names are documented in the Rhino class TaskManagerProperties and default values, when provided, exist in com.sgi.sysadm.manager.TaskManagerP.properties.
TaskManager.TOC.title = <B>Rhino Example Manager</B>Next, you will want to create the product-specific list of page links. This is accomplished via an ordered property set called TaskManager.TOC.item<n>, where each item represents one page link or a separator. For each page, you specify a page type, a page title, and a page target.
For example, to specify a text overview page as the first page, you would add the following properties to the TaskManagerP.properties file:
TaskManager.TOC.item0 = text TaskManager.TOC.item0.title = Overview TaskManager.TOC.item0.target = \ <P> Rhino Example Manager Graphical User Interface \ provides access to the tasks that help you set up and \ administer your Rhino Example objects. \ <P>The tasks are organized into the categories \ described below. To view a category, click on it in the \ <P> RhinoExample Task Manager Graphical User Interface (GUI) \ provides access to the tasks that demonstrate use of \ the Rhino infrastructure. \ <P> \ The tasks are organized into the categories described below. \ To view a category, click on it in the column at left.<P>\ <B>Overview</B> -- \ Display this overview document. <P> \ <B>Search</B> -- \ Use keywords to search for a specific task. <P>\ <B<RhinoExample Tasks</B> -- \ Example tasks that demonstrate the use of the Rhino infrastructure.Note that for text pages, the 'target' contains the actual text to be displayed on the page.
Now let's imagine that you want the next page to be a search page that allows Users to find the Task they are interested in via keyword. Rhino provides a Class Page plugin SearchPanel that indexes all of the Tasks and Tasksets by keyword. Here's how the page would be specified in TaskManagerP.properties:
TaskManager.TOC.item1 = class TaskManager.TOC.item1.title = Search TaskManager.TOC.item1.target = \ com.sgi.sysadm.manager.taskManager.SearchPanelThe target for a page of type class is the CLASSPATH relative name of the page plugin, which must implement the TaskManagerPanel interface.
Next we'll add a separator in the Table of Contents, which does not require the title or target specifiers:
TaskManager.TOC.item2 = separator
Finally, we'll add a Task List page. Task List pages display an optional list of Tasksets (also known as Metatasks), a separator, and then an optional list of Task Groups. Tasksets provide guidance in accomplishing a high level goal that may involve multiple tasks. Task Groups are (possibly ordered) lists of Tasks that are closely related, usually by the type of object they operate on. For example, Tasks that all operate on User accounts are likely to be in the same Task Group.
TaskManager.TOC.item3 = tasklist TaskManager.TOC.item3.title = RhinoExample Tasks TaskManager.TOC.item3.target = RhinoExampleTasksThe target for a Task List page will be used as a key to optional property sets that describe the list of Tasksets (also known as Metatasks) and Task groups to display on the page. For example, the RhinoExample Tasklist page will have a single Task group:
TaskManager.RhinoExampleTasks.taskGroup0 = MyTaskGroup TaskManager.RhinoExampleTaskGroup.introText = \ <B>Rhino Example Tasks</B>The introText property is the text to display at the top of the Task Group. The Task Group itself is installed in the TaskRegistry on the server, in a directory named "MyTaskGroup". See Plugging in a Task Group later in this document for details.
If we also wanted to display a list of Tasksets on the RhinoExample Tasks page, the properties might look like this:
TaskManager.RhinoExampleTasks.metatasksText = The following tasksets can \ help you keep your system up and running in production \ mode. Find the taskset that suits \ your needs, then click to launch it. TaskManager.RhinoExampleTasks.metataskItem0 = \ com.sgi.rhexamp.metatask.FirstExampleTaskset TaskManager.RhinoExampleTasks.metataskItem1 = \ com.sgi.rhexamp.metatask.SecondExampleTasksetThe metatasksText is displayed above the entire list of Taskset links (and is optional).
Each metataskItem refers to another Properties file that describes the contents of the Taskset, which will launch in a separate window when activated. Here is an example of the contents of a Taskset properties file:
# # Properties for First Example Taskset # Metatask.name = First Example Taskset Metatask.keywords = keywords to help users find this Taskset Metatask.text = \ <B>Achieve a High Level Goal</B><P> \ This taskset lists different ways to achieve a goal. \ Here are some of the options: \ <UL>\ <LI><A href=task.com.sgi.fsmgr.task.ModifyClusterTask> <B>Modify an Example</B></A> -- \ Set Example attributes \ <LI><A href=task.com.sgi.fsmgr.task.DefineMachineTask> <B>Define an Example</B></A> \ -- Create an Example. \ </UL>A Taskset (or Metatask) has three attributes set in its properties file: the name, keywords, and text. The text specified will be used to create a RichTextComponent that can contain links that launch Tasks, other Tasksets, or glossary entries when activated.
The font and color of the Table of Contents panel, title label, and page links can all be customized as well. See TaskManagerProperties for details.
Task Groups are specified in the properties for a Task List page rather than the Tasks themselves to allow new Tasks to be plugged in to the Task Manager without requiring the images to be re-shipped. For example, a new product could be created that adds Tasks to existing Task Groups, and they will automatically appear in the Task Manager the next time it is launched.
Tasks are plugged into Task Groups via the Task Registry on the server. Here are the steps needed to create a new Task Group named myTaskGroup in the Task Registry and add an ordered set of Tasks to that group:
Buttons are added by creating an ordered property set in the Task Manager properties file. For example:
TaskManager.buttonItem0 = First Button TaskManager.buttonItem0.target = com.sgi.myProduct.myFirstPlugin TaskManager.buttonItem1 = Second Button TaskManager.buttonItem1.target = com.sgi.myProduct.mySecondPluginEach button is given a name that will be displayed on that button as well as a target class that should be launched when the button is activated. The target class must implement one of TaskManagerFrame or TaskManagerAction. The first button added will be the leftmost button on the button bar. Subsequent buttons will be added to the right of the previous button but always to the left of the Close button.
TaskManager.frameTitle = RhinoExample Manager (on {0})Where the argument {0} is replaced with the server name.
If you wish to have a dynamic title that, for example, changes when the state of an object on the server changes, then you will want to use a TaskManagerTitleRenderer. A title renderer is a class that is responsible for keeping the title string up to date. It can monitor the server and make updates as desired. To plugin a title renderer, you use a property in the Task Manager properties file. For example:
TaskManager.titleRenderer = com.sgi.myProduct.plugin.MyTitleRenderer
TaskManager.initPlugins0 = com.sgi.myProduct.plugin.MyFirstInitPlugin TaskManager.initPlugins1 = com.sgi.myProduct.plugin.MySecondInitPluginThe initialization plugins will be run, in order, as the first operation when the Task Manager is launched.
java com.sgi.sysadm.manager.TaskManager -p com.sgi.myProductTo launch the Task Manager programmatically, you need to know the CLASSPATH relative name of the product (so that Task Manager can find the product-specific properties file. For example:
void launchTaskManager() { // Go busy while launching _uic.busy(new ResultListener() { public void succeeded(ResultEvent event) { TaskManager tMgr = new TaskManager("com.sgi.myProduct"); tMgr.initApp(); tMgr.run(_hc, new RApp.RAppLaunchListener() { public void launchSucceeded(RApp.RAppLaunchEvent event) { _uic.notBusy(); } public void launchFailed(RApp.RAppLaunchEvent event) { _uic.notBusy(); } public void launchAlreadyRunning( RApp.RAppLaunchEvent event) { _uic.notBusy(); } }); } public void failed(ResultEvent event) { } }); }See RApp for more information on launching a Rhino application.