com.ideo.sweetdevria.page
Class PageManager

java.lang.Object
  extended by com.ideo.sweetdevria.page.PageManager

public class PageManager
extends java.lang.Object

This class provides an easy and fast interaction easing the management of the pages. The pages are related to a user, defined by its session.

Author:
Julien Maupoux
See Also:
SessionRegistry, PageRegistry

Constructor Summary
PageManager()
           
 
Method Summary
static void cleanPages(javax.servlet.http.HttpSession _session)
           
static java.util.Map createPages(javax.servlet.http.HttpSession _session)
           
static IModel getModel(javax.servlet.http.HttpServletRequest _request, java.lang.String modelId)
           
static IModel getModel(javax.servlet.http.HttpSession _session, java.lang.String _idPage, java.lang.String modelId)
           
static Page getPage(javax.servlet.http.HttpServletRequest _request)
          Return the page corresponding to the request given in parameter
static Page getPage(javax.servlet.http.HttpSession _session)
          Return the current page corresponding to the session given in parameter
static Page getPage(javax.servlet.http.HttpSession _session, java.lang.String _idPage)
          Return the page corresponding to the session given in parameter and this specific id
static void removePage(javax.servlet.http.HttpSession _session, java.lang.String _idPage)
           
static void savePages(javax.servlet.http.HttpSession _session, java.util.Map _pages)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PageManager

public PageManager()
Method Detail

cleanPages

public static void cleanPages(javax.servlet.http.HttpSession _session)
Parameters:
_session -

getPage

public static Page getPage(javax.servlet.http.HttpSession _session)
Return the current page corresponding to the session given in parameter

Parameters:
_session - the session from which the page will be extracted
Returns:
the Page for this session

getPage

public static Page getPage(javax.servlet.http.HttpServletRequest _request)
Return the page corresponding to the request given in parameter

Parameters:
_request - the request from which the page will be extracted
Returns:
the Page for this request

getModel

public static IModel getModel(javax.servlet.http.HttpSession _session,
                              java.lang.String _idPage,
                              java.lang.String modelId)

getModel

public static IModel getModel(javax.servlet.http.HttpServletRequest _request,
                              java.lang.String modelId)

getPage

public static Page getPage(javax.servlet.http.HttpSession _session,
                           java.lang.String _idPage)
Return the page corresponding to the session given in parameter and this specific id

Parameters:
_session - the session from which the page will be extracted
_idPage - the id corresponding to the page to get
Returns:
the Page for this couple session/id
Throws:
java.lang.NullPointerException - if one of the arguments is null

removePage

public static void removePage(javax.servlet.http.HttpSession _session,
                              java.lang.String _idPage)

createPages

public static java.util.Map createPages(javax.servlet.http.HttpSession _session)

savePages

public static void savePages(javax.servlet.http.HttpSession _session,
                             java.util.Map _pages)


Copyright © 2010 Ideo Technologies. All Rights Reserved.