uPortal 2.4.1
API Documentation

org.jasig.portal.container.services.information
Class PortletStateManager

java.lang.Object
  extended byorg.jasig.portal.container.services.information.PortletStateManager

public class PortletStateManager
extends java.lang.Object

The PortletStateManager implementation. Analyzes the incoming request parameters for the given PortletWindow, changes the window states/portlet modes, stores them in the static hash maps, builds a portlet URL based on the changed modes/states and portlet render parameters for the current PortletWindow.

Version:
$Revision: 1.35 $
Author:
Michael Ivanov, mvi@immagic.com

Field Summary
static java.lang.String ACTION
           
static java.lang.String MIN_CHAN_ID
           
static java.lang.String MODE
           
static java.lang.String MULTI
           
static java.lang.String PREV_MODE
           
static java.lang.String PREV_STATE
           
static java.lang.String STATE
           
static java.lang.String UP_EDIT_TARGET
           
static java.lang.String UP_HELP_TARGET
           
static java.lang.String UP_ROOT
           
static java.lang.String UP_TCATTR
           
static java.lang.String UP_VIEW_TARGET
           
 
Constructor Summary
PortletStateManager(org.apache.pluto.om.window.PortletWindow window)
           
 
Method Summary
 void clearParameters()
          Clears the render parameters for the current PortletWindow
static void clearState(javax.servlet.http.HttpServletRequest request)
          Clears the states/modes for the porlet windows associated with the given HttpSession
static void clearState(org.apache.pluto.om.window.PortletWindow portletWindow)
          Clears the states/modes of the given PortletWindow.
static java.util.Hashtable decodeURLParameters(java.lang.String encodedParameters)
           
static java.lang.String encodeURLParameters(java.lang.String urlParameters)
           
 java.lang.String getActionURL()
           
static java.lang.String getKey(org.apache.pluto.om.window.PortletWindow window)
          Generates the hash key for the given PortletWindow based on the user session ID and portlet window ID
static javax.portlet.PortletMode getMode(org.apache.pluto.om.window.PortletWindow window)
          Returns the current portlet mode for the given PortletWindow
static javax.portlet.PortletMode getPrevMode(org.apache.pluto.om.window.PortletWindow window)
          Returns the previous portlet mode for the given PortletWindow
static javax.portlet.WindowState getPrevState(org.apache.pluto.om.window.PortletWindow window)
          Returns the previous portlet state for the given PortletWindow
static javax.portlet.WindowState getState(org.apache.pluto.om.window.PortletWindow window)
          Returns the current portlet state for the given PortletWindow
static java.util.Hashtable getURLDecodedParameters(javax.servlet.http.HttpServletRequest request)
           
 boolean isAction()
          Returns true if the current PortletRequest is ActionRequest, false - otherwise
 void setAction()
          Setting the portlet action parameter for the next request
static void setMode(org.apache.pluto.om.window.PortletWindow window, javax.portlet.PortletMode mode)
          Sets the portlet mode for the given PortletWindow
 void setNextMode(javax.portlet.PortletMode mode)
          Sets the next portlet mode for the current PortletWindow
 void setNextState(javax.portlet.WindowState state)
          Sets the next window state for the current PortletWindow
 void setParameters(java.util.Map parameters)
          Adds the render parameters to the portlet URL
static void setState(org.apache.pluto.om.window.PortletWindow window, javax.portlet.WindowState state)
          Sets the window state for the given PortletWindow
 java.lang.String toString()
          Generates the string representation of the portlet URL based on the next/current portlet modes/states and render parameters for the current PortletWindow
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ACTION

public static final java.lang.String ACTION
See Also:
Constant Field Values

MODE

public static final java.lang.String MODE
See Also:
Constant Field Values

MULTI

public static final java.lang.String MULTI
See Also:
Constant Field Values

PREV_MODE

public static final java.lang.String PREV_MODE
See Also:
Constant Field Values

PREV_STATE

public static java.lang.String PREV_STATE

STATE

public static final java.lang.String STATE
See Also:
Constant Field Values

UP_ROOT

public static final java.lang.String UP_ROOT
See Also:
Constant Field Values

UP_TCATTR

public static final java.lang.String UP_TCATTR
See Also:
Constant Field Values

UP_HELP_TARGET

public static final java.lang.String UP_HELP_TARGET
See Also:
Constant Field Values

UP_EDIT_TARGET

public static final java.lang.String UP_EDIT_TARGET
See Also:
Constant Field Values

UP_VIEW_TARGET

public static final java.lang.String UP_VIEW_TARGET
See Also:
Constant Field Values

MIN_CHAN_ID

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

PortletStateManager

public PortletStateManager(org.apache.pluto.om.window.PortletWindow window)
Method Detail

getURLDecodedParameters

public static java.util.Hashtable getURLDecodedParameters(javax.servlet.http.HttpServletRequest request)

setNextMode

public void setNextMode(javax.portlet.PortletMode mode)
Sets the next portlet mode for the current PortletWindow

Parameters:
mode - a portlet mode

setNextState

public void setNextState(javax.portlet.WindowState state)
Sets the next window state for the current PortletWindow

Parameters:
state - a window state

setAction

public void setAction()
Setting the portlet action parameter for the next request


setParameters

public void setParameters(java.util.Map parameters)
Adds the render parameters to the portlet URL

Parameters:
parameters - a Map containing the render parameters

isAction

public boolean isAction()
Returns true if the current PortletRequest is ActionRequest, false - otherwise


decodeURLParameters

public static java.util.Hashtable decodeURLParameters(java.lang.String encodedParameters)

encodeURLParameters

public static java.lang.String encodeURLParameters(java.lang.String urlParameters)

getKey

public static java.lang.String getKey(org.apache.pluto.om.window.PortletWindow window)
Generates the hash key for the given PortletWindow based on the user session ID and portlet window ID

Parameters:
window - a portlet window
Returns:
a String hash key

clearState

public static void clearState(org.apache.pluto.om.window.PortletWindow portletWindow)
Clears the states/modes of the given PortletWindow.

Parameters:
portletWindow - a portlet window

clearState

public static void clearState(javax.servlet.http.HttpServletRequest request)
Clears the states/modes for the porlet windows associated with the given HttpSession

Parameters:
request - a HttpServletRequest instance

clearParameters

public void clearParameters()
Clears the render parameters for the current PortletWindow


getMode

public static javax.portlet.PortletMode getMode(org.apache.pluto.om.window.PortletWindow window)
Returns the current portlet mode for the given PortletWindow

Parameters:
window - a portlet window
Returns:
a PortletMode instance

getPrevMode

public static javax.portlet.PortletMode getPrevMode(org.apache.pluto.om.window.PortletWindow window)
Returns the previous portlet mode for the given PortletWindow

Parameters:
window - a portlet window
Returns:
a PortletMode instance

getState

public static javax.portlet.WindowState getState(org.apache.pluto.om.window.PortletWindow window)
Returns the current portlet state for the given PortletWindow

Parameters:
window - a portlet window
Returns:
a WindowState instance

getPrevState

public static javax.portlet.WindowState getPrevState(org.apache.pluto.om.window.PortletWindow window)
Returns the previous portlet state for the given PortletWindow

Parameters:
window - a portlet window
Returns:
a WindowState instance

setMode

public static void setMode(org.apache.pluto.om.window.PortletWindow window,
                           javax.portlet.PortletMode mode)
Sets the portlet mode for the given PortletWindow

Parameters:
window - a portlet window
mode - a portlet mode

setState

public static void setState(org.apache.pluto.om.window.PortletWindow window,
                            javax.portlet.WindowState state)
Sets the window state for the given PortletWindow

Parameters:
window - a portlet window
state - a window state

toString

public java.lang.String toString()
Generates the string representation of the portlet URL based on the next/current portlet modes/states and render parameters for the current PortletWindow


getActionURL

public java.lang.String getActionURL()

uPortal 2.4.1
API Documentation