uPortal 2.4.1
API Documentation

org.jasig.portal
Class UserInstance

java.lang.Object
  extended byorg.jasig.portal.UserInstance
All Implemented Interfaces:
java.util.EventListener, javax.servlet.http.HttpSessionBindingListener
Direct Known Subclasses:
GuestUserInstance

public class UserInstance
extends java.lang.Object
implements javax.servlet.http.HttpSessionBindingListener

A class handling holding all user state information. The class is also reponsible for request processing and orchestrating the entire rendering procedure. (this is a replacement for the good old LayoutBean class)

Version:
$Revision: 1.112.2.1 $
Author:
Peter Kharchenko pkharchenko@interactivebusiness.com

Field Summary
static boolean CACHE_ENABLED
           
static boolean CHARACTER_CACHE_ENABLED
           
static int guestUserId
           
static java.lang.String USER_LAYOUT_ROOT_NODE
           
 
Constructor Summary
UserInstance(IPerson person)
           
 
Method Summary
 IPerson getPerson()
          Gets the person object from the session.
 void renderState(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res, ChannelManager channelManager, LocaleManager localeManager, IUserPreferencesManager upm, java.lang.Object rendering_lock)
          renderState method orchestrates the rendering pipeline.
 void valueBound(javax.servlet.http.HttpSessionBindingEvent bindingEvent)
          Notifies UserInstance that it has been bound to a session.
 void valueUnbound(javax.servlet.http.HttpSessionBindingEvent bindingEvent)
          This notifies UserInstance that it has been unbound from the session.
 void writeContent(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)
          Prepares for and initates the rendering cycle.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

guestUserId

public static final int guestUserId
See Also:
Constant Field Values

CACHE_ENABLED

public static final boolean CACHE_ENABLED

CHARACTER_CACHE_ENABLED

public static final boolean CHARACTER_CACHE_ENABLED

USER_LAYOUT_ROOT_NODE

public static final java.lang.String USER_LAYOUT_ROOT_NODE
See Also:
Constant Field Values
Constructor Detail

UserInstance

public UserInstance(IPerson person)
Method Detail

writeContent

public void writeContent(javax.servlet.http.HttpServletRequest req,
                         javax.servlet.http.HttpServletResponse res)
                  throws PortalException
Prepares for and initates the rendering cycle.

Parameters:
req - the servlet request object
res - the servlet response object
Throws:
PortalException

renderState

public void renderState(javax.servlet.http.HttpServletRequest req,
                        javax.servlet.http.HttpServletResponse res,
                        ChannelManager channelManager,
                        LocaleManager localeManager,
                        IUserPreferencesManager upm,
                        java.lang.Object rendering_lock)
                 throws PortalException
renderState method orchestrates the rendering pipeline.

Parameters:
req - the HttpServletRequest
res - the HttpServletResponse
channelManager - the ChannelManager instance
upm - the IUserPreferencesManager instance
rendering_lock - a lock for rendering on a single user
Throws:
PortalException - if an error occurs

getPerson

public IPerson getPerson()
Gets the person object from the session. Null is returned if no person is logged in

Returns:
the person object, null if no person is logged in

valueUnbound

public void valueUnbound(javax.servlet.http.HttpSessionBindingEvent bindingEvent)
This notifies UserInstance that it has been unbound from the session. Method triggers cleanup in ChannelManager.

Specified by:
valueUnbound in interface javax.servlet.http.HttpSessionBindingListener
Parameters:
bindingEvent - an HttpSessionBindingEvent value

valueBound

public void valueBound(javax.servlet.http.HttpSessionBindingEvent bindingEvent)
Notifies UserInstance that it has been bound to a session.

Specified by:
valueBound in interface javax.servlet.http.HttpSessionBindingListener
Parameters:
bindingEvent - a HttpSessionBindingEvent value

uPortal 2.4.1
API Documentation