RTView® 
User Guide


Custom Role Manager

Defining 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 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. 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.
public boolean isAllowed (String displayName, String role, String user) 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, role and user.

NOTE: This method is only invoked by the Display Server, which may call this method simultaneously on different threads.

getSubstitutions (String role) This method should return substitutions to set on the 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 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.
   


 
SL, SL-GMS, GMS, RTView, SL Corporation, and the SL logo are trademarks or registered trademarks of Sherrill-Lubinski Corporation in the United States and other countries. Copyright © 1998-2012 Sherrill-Lubinski Corporation. All Rights Reserved.

 

JMS, JMX and Java are trademarks or registered trademarks of Sun Microsystems, Inc. in the United States and other countries. They are mentioned in this document for identification purposes only. 

 

Third Party Notice Requirements