com.endeca.portal.data
Class PageId

java.lang.Object
  extended by com.endeca.portal.data.PageId

public class PageId
extends java.lang.Object

Wrapper around user session for easy storage and retrieval of page id's.

Author:
huff

Method Summary
static long get(javax.portlet.PortletRequest request)
          Get the current page id.
static void increment(javax.portlet.PortletRequest request)
          Increment won't magically turn 2 calls to it from different threads into one increment, so make sure whatever is calling it only increments it once when it needs to be incremented.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

get

public static long get(javax.portlet.PortletRequest request)
Get the current page id. Note that race conditions are still possible here, between get and increment, so make sure whatever is doing the increments avoids gets until things are in a consistent state. PageState.transition at the beginning of requests does this for us currently.


increment

public static void increment(javax.portlet.PortletRequest request)
Increment won't magically turn 2 calls to it from different threads into one increment, so make sure whatever is calling it only increments it once when it needs to be incremented. In our case, currently PageState makes these gurantees for us.