Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

jreceiver.client.common.taglibs
Class RoleAuthIsAuthorizedTag  view RoleAuthIsAuthorizedTag download RoleAuthIsAuthorizedTag.java

java.lang.Object
  extended byjavax.servlet.jsp.tagext.TagSupport
      extended byjreceiver.client.common.taglibs.RoleAuthIsAuthorizedTag
All Implemented Interfaces:
javax.servlet.jsp.tagext.IterationTag, javax.servlet.jsp.tagext.JspTag, java.io.Serializable, javax.servlet.jsp.tagext.Tag

public class RoleAuthIsAuthorizedTag
extends javax.servlet.jsp.tagext.TagSupport

JSP Tag isAuthorized, used to determine whether the user has authorization to access the handler/method.

Example usage:

 <jrclient:isAuthorized handler="Playlists" method="getRecs">
     <b>Do I have access?</b>
 </jrclient:isAuthorized>
 
TODO: should the user be cached in the RoleAuthBean??? Adapted from JSTL's Request tag.


Field Summary
private  java.lang.String m_handler_name
           
private  java.lang.String m_method_name
           
 
Fields inherited from class javax.servlet.jsp.tagext.TagSupport
id, pageContext
 
Fields inherited from interface javax.servlet.jsp.tagext.IterationTag
EVAL_BODY_AGAIN
 
Fields inherited from interface javax.servlet.jsp.tagext.Tag
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE
 
Constructor Summary
RoleAuthIsAuthorizedTag()
           
 
Method Summary
 int doStartTag()
          Determines whether remote user is in a role.
static boolean isAuthorized(javax.servlet.jsp.PageContext pageContext, java.lang.String handler_name, java.lang.String method_name)
          test whether the user (in session) is in the specified role
 void setHandler(java.lang.String handler_name)
           
 void setMethod(java.lang.String method_name)
           
 
Methods inherited from class javax.servlet.jsp.tagext.TagSupport
doAfterBody, doEndTag, findAncestorWithClass, getId, getParent, getValue, getValues, release, removeValue, setId, setPageContext, setParent, setValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_handler_name

private java.lang.String m_handler_name

m_method_name

private java.lang.String m_method_name
Constructor Detail

RoleAuthIsAuthorizedTag

public RoleAuthIsAuthorizedTag()
Method Detail

isAuthorized

public static boolean isAuthorized(javax.servlet.jsp.PageContext pageContext,
                                   java.lang.String handler_name,
                                   java.lang.String method_name)
                            throws jreceiver.common.rpc.RpcException
test whether the user (in session) is in the specified role


doStartTag

public final int doStartTag()
                     throws javax.servlet.jsp.JspException
Determines whether remote user is in a role.


setHandler

public final void setHandler(java.lang.String handler_name)

setMethod

public final void setMethod(java.lang.String method_name)