Top 10 Downloads
  Last 15 New Files
  Web Links
  Last 15 New Tips
  NLM Programming
  Admins Club

SUPLA System
Internet of Things

Installation and Administration

Polish Forum SUSE

Who's Online

 There are currently,
6 guest(s)
that is (are) online.

Technical Information

Back to List of Categories

Technical Information about
  A Beginner's Guide to LDAP Development
  Changing Time SourceType for a 4.X server
  Common Dsrepair switches - with explanations
  Deactivating Anonymous LDAP Logins
  DSMaint -PSE (Replacing Crashed Server)
  DSRepair: Is It Overused?
  Fixing ConsoleOne Refresh Problems
  Generic Design for an iManager Plugin
  Generic Design of iManager Plugin - Part 2
  Getting ConsoleOne Running on Red Hat 9
  LDAP Directory Service: Novell eDirectory
  NMAS and Kerberos
  Removing a Crashed Server from the NDS Tree
  The DSREPAIR Utility
  Timesync Config, Issues and Definitions
  Understanding eDirectory and Clustering
  Universal Password and Containers

Technical Information
 Generic Design of iManager Plugin - Part 2

Printer-friendly version

18 Jan 2005

This article describes the procedure to auto-generate Java classes and JSP files for an iManager plugin.

The Generator tools are hosted as Open Source project in Novell Forge, using ANTLR based StringTemplates extensively.

The Generator tools provide a RAD mode of applying Generic design as described in this earlier article.

Step 1 - Describe the prototype

Do the OOAD and find out the required pages, flow and actions.

For example, a simple "Delete Container" module will have these pages:

Page 1 - Select the container
Actions in Page 1 - Next , Cancel
Page 2 - Confirm deletion
Actions in Page 2 - Back, Next, Cancel
Page 3 - Progress page
Actions in Page 3 - Cancel

This is specified in Java properties file format as:

All elements in the Prelim section are mandatory.

TEMPLATE_PATH_PREFIX is the path of string template (.st) files. This will be the root location where you unzipped the tool.

OUTPUT_PATH_PREFIX is the path where you want to have generated Java files. You will specify the root for output package structure here.

Step 2 - Write skeleton JSPs

Refer to the JSP Mapper properties file for the macro bindings; you can edit them too.

Write the JSP template using shortcuts from these macro bindings. For example, a JSPT (JSP Template file) having a OS to select containers for deletions will be like:

A JSPT file can have 3 things:

  1. Any macro keyword without arguments, ex: WH, TF, OS
  2. Any well expanded macro with optional arguments, ex: TF("tf1"), TF("tf2","34")
  3. Any text which does not have macros, ex: "This line is text"

You can easily infer the syntax of a JSPT file. You can use any keyword like WH,TF defined in JSP_Mapper.properties file. There are two types of macros: macros which take expandable optional arguments and macros which do static text replacement.

OS - Static text replacement for generating "iman:os control="osText" typeFilter="User" multiSelect="false"/>"
TF("tf1","20") - Dynamic macro for generating "<input type="text" name="tf1" size="20">"

Step 3 - Generate Java classes

After creating the properties file for the Plugin Page flow you can execute the command line utility to generate all Handler classes.

Execute "com.novell.admin.generic.HandlerGenerator" with the properties file as argument.

For this example you will get these files:




You need to have the files in com.novell.admin.generic package to use this tool.

Step 4 - Generate JSP files

Once you make the JSPT files, you are ready to generate them. You can generate JSP files before Java files too. Execute "com.novell.admin.generic.JSPGenerator" with the JSPT file as argument 1 and the output JSP file as argument 2.

The JSP file you will be getting will be well formed to work as an iManager JSP file. It will have necessary directives, footer and header.

Your definitions in JSPT will be inserted inside this template substituting $BODY$.

Step 5 - Integrate all files into a plugin

You should integrate the jsps and java files generated in these tools, with the Generic build.xml described in earlier articles to build a plugin.

Since 2003

Portal posiada akceptację firmy Novell Polska
Wszystkie materiały dotyczące produktów firmy Novell umieszczono za zgodą Novell Polska
Portal has been accepted by the Novell Polska
All materials concerning products of Novell firm are placed with Novell Polska consent.
NetWare is a registered trademark of Novell Inc. in the United States and other countries.
Windows is a trademark or a registered trademark of Microsoft Corporation in the United States and other countries.
Sybase is a registered trademark of Sybase Inc. in the United States of America.
Other company and product names are trademarks or registered trademarks of their respective owners.