org.apache.jetspeed.util
Class PortletSessionState

java.lang.Object
  extended byorg.apache.jetspeed.util.PortletSessionState

public class PortletSessionState
extends java.lang.Object

Defines standard utility functions on session attributes

Version:
$Id: PortletSessionState.java,v 1.9 2004/02/23 03:23:42 jford Exp $
Author:
David Sean Taylor, Mark Orciuch

Field Summary
static java.lang.String CONFIG_CHANGED
          Portlet attribute to save config state.
 
Constructor Summary
PortletSessionState()
           
 
Method Summary
static void clearAttribute(Portlet portlet, org.apache.turbine.util.RunData rundata, java.lang.String attrName)
          Clears the parameter for this name from Temp Uses the portlet parameter to generate a unique key.
static void clearAttribute(org.apache.turbine.util.RunData rundata, java.lang.String attrName)
          Clears the parameter for this name from Temp Uses the portlet parameter to generate a unique key.
static void clearAttribute(VelocityPortlet portlet, org.apache.turbine.util.RunData rundata, java.lang.String attrName)
          Clears the parameter for this name from Temp Uses the portlet parameter to generate a unique key.
protected static java.lang.String generateKey(Portlet portlet, java.lang.String name)
          Uses the portlet parameter to generate a unique key, using the portlet.getId.
static java.lang.Object getAttribute(Portlet portlet, org.apache.turbine.util.RunData rundata, java.lang.String attrName)
          Returns the parameter for this name from the Temp - session object Uses the portlet parameter to generate a unique key.
static java.lang.Object getAttribute(org.apache.turbine.util.RunData rundata, java.lang.String attrName)
          Returns the parameter for this name from the Temp - session object
static java.lang.Object getAttribute(org.apache.turbine.util.RunData rundata, java.lang.String attrName, java.lang.Object defValue)
           
static java.lang.Object getAttribute(VelocityPortlet portlet, org.apache.turbine.util.RunData rundata, java.lang.String attrName)
          Returns the parameter for this name from the Temp - session object Uses the portlet parameter to generate a unique key.
static java.lang.Object getAttributeWithFallback(Portlet portlet, org.apache.turbine.util.RunData rundata, java.lang.String attrName)
          Returns the attribute for this name using the following search path: request parameter session attribute instance attribute config parameter Uses the portlet parameter to generate a unique key.
static boolean getPortletConfigChanged(Portlet portlet, org.apache.turbine.util.RunData rundata)
          Returns current state of portlet config and resets it if set.
static boolean isMyRequest(org.apache.turbine.util.RunData rundata, Portlet portlet)
          Returns true if the request pertains to current portlet instance.
static void setAttribute(Portlet portlet, org.apache.turbine.util.RunData rundata, java.lang.String attrName, java.lang.Object attrValue)
          Sets the parameter for this name in Temp Uses the portlet parameter to generate a unique key.
static void setAttribute(org.apache.turbine.util.RunData rundata, java.lang.String attrName, java.lang.Object attrValue)
          Sets the parameter for this name in Temp Uses the portlet parameter to generate a unique key.
static void setAttribute(VelocityPortlet portlet, org.apache.turbine.util.RunData rundata, java.lang.String attrName, java.lang.Object attrValue)
          Sets the parameter for this name in Temp Uses the portlet parameter to generate a unique key.
static void setPortletConfigChanged(Portlet portlet, org.apache.turbine.util.RunData rundata)
          The portlet config has changed.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CONFIG_CHANGED

public static final java.lang.String CONFIG_CHANGED
Portlet attribute to save config state.

See Also:
Constant Field Values
Constructor Detail

PortletSessionState

public PortletSessionState()
Method Detail

getAttribute

public static java.lang.Object getAttribute(org.apache.turbine.util.RunData rundata,
                                            java.lang.String attrName)
Returns the parameter for this name from the Temp - session object


getAttribute

public static java.lang.Object getAttribute(org.apache.turbine.util.RunData rundata,
                                            java.lang.String attrName,
                                            java.lang.Object defValue)

setAttribute

public static void setAttribute(org.apache.turbine.util.RunData rundata,
                                java.lang.String attrName,
                                java.lang.Object attrValue)
Sets the parameter for this name in Temp Uses the portlet parameter to generate a unique key.


clearAttribute

public static void clearAttribute(org.apache.turbine.util.RunData rundata,
                                  java.lang.String attrName)
Clears the parameter for this name from Temp Uses the portlet parameter to generate a unique key.


getAttribute

public static java.lang.Object getAttribute(Portlet portlet,
                                            org.apache.turbine.util.RunData rundata,
                                            java.lang.String attrName)
Returns the parameter for this name from the Temp - session object Uses the portlet parameter to generate a unique key.


getAttributeWithFallback

public static java.lang.Object getAttributeWithFallback(Portlet portlet,
                                                        org.apache.turbine.util.RunData rundata,
                                                        java.lang.String attrName)
Returns the attribute for this name using the following search path:

isMyRequest

public static boolean isMyRequest(org.apache.turbine.util.RunData rundata,
                                  Portlet portlet)
Returns true if the request pertains to current portlet instance. It assumes that the portlet interested in recognizing its own requests, has a hidden input "js_peid". For backwards compatibility, if "js_peid" was not set, this method will return TRUE.

Parameters:
rundata -
Returns:
boolean

setAttribute

public static void setAttribute(Portlet portlet,
                                org.apache.turbine.util.RunData rundata,
                                java.lang.String attrName,
                                java.lang.Object attrValue)
Sets the parameter for this name in Temp Uses the portlet parameter to generate a unique key.


clearAttribute

public static void clearAttribute(Portlet portlet,
                                  org.apache.turbine.util.RunData rundata,
                                  java.lang.String attrName)
Clears the parameter for this name from Temp Uses the portlet parameter to generate a unique key.


generateKey

protected static java.lang.String generateKey(Portlet portlet,
                                              java.lang.String name)
Uses the portlet parameter to generate a unique key, using the portlet.getId.


getAttribute

public static java.lang.Object getAttribute(VelocityPortlet portlet,
                                            org.apache.turbine.util.RunData rundata,
                                            java.lang.String attrName)
Returns the parameter for this name from the Temp - session object Uses the portlet parameter to generate a unique key.


setAttribute

public static void setAttribute(VelocityPortlet portlet,
                                org.apache.turbine.util.RunData rundata,
                                java.lang.String attrName,
                                java.lang.Object attrValue)
Sets the parameter for this name in Temp Uses the portlet parameter to generate a unique key.


clearAttribute

public static void clearAttribute(VelocityPortlet portlet,
                                  org.apache.turbine.util.RunData rundata,
                                  java.lang.String attrName)
Clears the parameter for this name from Temp Uses the portlet parameter to generate a unique key.


setPortletConfigChanged

public static void setPortletConfigChanged(Portlet portlet,
                                           org.apache.turbine.util.RunData rundata)
The portlet config has changed. Calling getPortletConfigChanged returns the current state and resets it.

Parameters:
portlet -
rundata -

getPortletConfigChanged

public static boolean getPortletConfigChanged(Portlet portlet,
                                              org.apache.turbine.util.RunData rundata)
Returns current state of portlet config and resets it if set.

Parameters:
portlet -
rundata -
Returns:
TRUE if portlet config has changed


Copyright © 2000-2005 Apache Software Foundation. All Rights Reserved.