Custom Role ManagerDefining Roles in a Custom Role Manager
Class
NOTE: This section assumes
you have a working knowledge of writing, compiling and deploying Java classes.
The Custom Role Manager class extends the functionality of Enterprise RTView
by allowing you to write Java code that will get called when the user is
logging in. To implement your own Custom Role Manager, create a Java class
named MyRoleManager.java that
extends com.sl.gmsjrtview.GmsCustomRoleManager.
The following methods are
available to overwrite in the MyRoleManager:
Method
Name |
Description |
public boolean
activate () |
Activate the
role manager. Subclasses should overwrite this method to perform any initialization
necessary to implement the isAllowed() method. This method should
return true if initialization was successful, otherwise return false.
Enterprise RTView will exit if this method returns false. |
public
boolean isAllowed (String displayName, String role) |
Returns
true
if the specified display is allowed, otherwise return false. Subclasses
should overwrite this method to return the appropriate value based on the
displayName
and role. |
getSubstitutions
(String role) |
This method should
return substitutions to set on the Enterprise RTView application when the
specified role is logged in. If this role does not have any associated
substitutions, this method should return null. Otherwise, return
a pair of Vectors. Both Vectors must be the same length,
with the first Vector containing the substitution strings and the
second Vector containing the corresponding substitution values. |
Add gmsjrtview.jar
located in the lib directory (found in your installation directory)
to your classpath when you compile your Custom Role Manager. You must include
your compiled Custom Role Manager class in the classpath for Enterprise
RTView by adding it to the definition for the RTV_USERPATH environment
variable or by packing it into myclasses.jar.
If you will be using the
Custom Role Manager class with the Display Viewer Applet, include it in
a .jar that is referenced in the Applet's ARCHIVE parameter.
|