CLRA 0.1.2

com.clra.web
Class MemberTag

java.lang.Object
  |
  +--javax.servlet.jsp.tagext.TagSupport
        |
        +--com.clra.web.MemberTag
All Implemented Interfaces:
Serializable, javax.servlet.jsp.tagext.Tag

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

MemberTag member, used to get the CLRA member who is currently logged in. This class is a thin wrapper around the MemberView class.

MemberTag Lib Descriptor

 <name>memberId</name>
 <tagclass>com.clra.web.MemberIdTag</tagclass>
 <bodycontent>empty</bodycontent>
 <info>Gets a property of an authenticated member.</info>
 
Most properties are self-explanatory. Name, Address, Telephone and ID values require special names. The birth date is returned as "mm/dd/yyyy". If no property is specified, the default is "fullName".

Version:
$Id: MemberTag.java,v 1.2 2002/02/18 18:06:30 rphall Exp $
Author:
Serialized Form

Field Summary
static String PN_ACCOUNTNAME
           
static String PN_BIRTH
           
static String PN_CITY
           
static String PN_CLRASTATUS
           
static String PN_DAYPHONE
           
static String PN_EMAIL
           
static String PN_EVENINGPHONE
           
static String PN_FIRSTNAME
           
static String PN_FULLNAME
           
static String PN_LASTNAME
           
static String PN_MEMBERID
           
static String PN_MIDDLENAME
           
static String PN_OTHERPHONE
           
static String PN_STATE
           
static String PN_STREET1
           
static String PN_STREET2
           
static String PN_SUFFIX
           
static String PN_ZIP
           
 
Fields inherited from class javax.servlet.jsp.tagext.TagSupport
id, pageContext
 
Fields inherited from interface javax.servlet.jsp.tagext.Tag
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE
 
Constructor Summary
MemberTag()
           
 
Method Summary
 int doEndTag()
          Method called at end of Tag to output member property
 String getKey()
           
static MemberView getMemberFromAuthenticatedUser(javax.servlet.http.HttpServletRequest request)
          Utility that gets the authenticated user from the request context
static MemberView getMemberFromKey(javax.servlet.http.HttpSession session, String key)
          Utility that checks for the MEMBER_ID key in the session context
 String getProperty()
           
 void release()
          Release any acquired resources.
 void setKey()
           
static void setMemberInSession(javax.servlet.http.HttpSession session, String key, MemberView member)
          Utility that inserts member info in the session context
 void setProperty()
           
 
Methods inherited from class javax.servlet.jsp.tagext.TagSupport
doStartTag, findAncestorWithClass, getId, getParent, getValue, getValues, 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

PN_ACCOUNTNAME

public static final String PN_ACCOUNTNAME

PN_STREET1

public static final String PN_STREET1

PN_STREET2

public static final String PN_STREET2

PN_CITY

public static final String PN_CITY

PN_STATE

public static final String PN_STATE

PN_ZIP

public static final String PN_ZIP

PN_BIRTH

public static final String PN_BIRTH

PN_CLRASTATUS

public static final String PN_CLRASTATUS

PN_EMAIL

public static final String PN_EMAIL

PN_MEMBERID

public static final String PN_MEMBERID

PN_FULLNAME

public static final String PN_FULLNAME

PN_LASTNAME

public static final String PN_LASTNAME

PN_FIRSTNAME

public static final String PN_FIRSTNAME

PN_MIDDLENAME

public static final String PN_MIDDLENAME

PN_SUFFIX

public static final String PN_SUFFIX

PN_EVENINGPHONE

public static final String PN_EVENINGPHONE

PN_DAYPHONE

public static final String PN_DAYPHONE

PN_OTHERPHONE

public static final String PN_OTHERPHONE
Constructor Detail

MemberTag

public MemberTag()
Method Detail

getMemberFromKey

public static MemberView getMemberFromKey(javax.servlet.http.HttpSession session,
                                          String key)
                                   throws javax.servlet.jsp.JspException
Utility that checks for the MEMBER_ID key in the session context
Returns:
member id, or null if session attribute is not set.

getMemberFromAuthenticatedUser

public static MemberView getMemberFromAuthenticatedUser(javax.servlet.http.HttpServletRequest request)
                                                 throws javax.servlet.jsp.JspException
Utility that gets the authenticated user from the request context
Returns:
user account name
Throws:
javax.servlet.jsp.JspException - if the current user is not authenticated

setMemberInSession

public static void setMemberInSession(javax.servlet.http.HttpSession session,
                                      String key,
                                      MemberView member)
                               throws javax.servlet.jsp.JspException
Utility that inserts member info in the session context

getKey

public String getKey()

setKey

public void setKey()

getProperty

public String getProperty()

setProperty

public void setProperty()

doEndTag

public final int doEndTag()
                   throws javax.servlet.jsp.JspException
Method called at end of Tag to output member property
Overrides:
doEndTag in class javax.servlet.jsp.tagext.TagSupport
Returns:
EVAL_PAGE

release

public void release()
Release any acquired resources.
Overrides:
release in class javax.servlet.jsp.tagext.TagSupport

CLRA 0.1.2