|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.jetspeed.portalsite.impl.PortalSiteSessionContextImpl
public class PortalSiteSessionContextImpl
This class encapsulates managed session state for and interface to the portal-site component and subscribes to page manager and session events to flush stale state. Note that is object is Serializable since it is designed to be cached in the session. However, because this object is cached only for these two reasons: 1. a performance optimization to reuse SiteViews, and 2. to hold optional folder page history, this object need not be relocatable between J2 instances. Consequently, all data members are marked transient and the isValid() method is used to test whether this object is a valid context for the session or if it was transferred from another server or the persistent session store and needs to be discarded.
| Constructor Summary | |
|---|---|
PortalSiteSessionContextImpl(PageManager pageManager)
PortalSiteSessionContextImpl - constructor |
|
| Method Summary | |
|---|---|
Page |
getManagedPage(Page page)
getManagedPage - get concrete page instance from page proxy |
SiteViewMenuDefinitionLocator |
getMenuDefinitionLocator(Node node,
java.lang.String name)
getMenuDefinitionLocator - get named node proxy menu definition locator from site view |
java.util.Map |
getMenuDefinitionLocatorCache()
getMenuDefinitionLocatorCache - get menu definition locators cache for absolute menus |
java.util.List |
getMenuDefinitionLocators(Node node)
getMenuDefinitionLocators - get list of node proxy menu definition locators from site view |
PageManager |
getPageManager()
getPageManager - return PageManager component instance |
java.lang.String |
getPipeline()
get which pipeline this context is stored for |
java.util.Map |
getProfileLocators()
getProfileLocators - get session profile locators |
Folder |
getRequestRootFolder(java.util.Map requestProfileLocators)
getRequestRootFolder - select root folder proxy for given profile locators |
SiteView |
getSiteView()
getSiteView - lookup and/or create site view for profile locators of this context |
java.util.Set |
getStandardMenuNames()
getStandardMenuNames - get set of available standard menu names |
boolean |
isValid()
isValid - return flag indicating whether this context instance is valid or if it is stale after being persisted and reloaded as session state |
void |
newNode(Node node)
newNode - invoked when the definition of a node is created by the page manager or when the node creation is otherwise detected |
PortalSiteRequestContext |
newRequestContext(java.util.Map requestProfileLocators)
newRequestContext - create a new request context instance with fallback and history |
PortalSiteRequestContext |
newRequestContext(java.util.Map requestProfileLocators,
boolean requestFallback)
newRequestContext - create a new request context instance with history |
PortalSiteRequestContext |
newRequestContext(java.util.Map requestProfileLocators,
boolean requestFallback,
boolean useHistory)
newRequestContext - create a new request context instance |
void |
removedNode(Node node)
removedNode - invoked when the definition of a node is removed by the page manager or when the node removal is otherwise detected |
Page |
selectRequestPage(java.util.Map requestProfileLocators,
boolean requestFallback,
boolean useHistory)
selectRequestPage - select page proxy for request given profile locators |
void |
sessionDidActivate(javax.servlet.http.HttpSessionEvent event)
sessionDidActivate - notification that the session has just been activated |
void |
sessionWillPassivate(javax.servlet.http.HttpSessionEvent event)
sessionWillPassivate - notification that the session is about to be passivated |
void |
setMenuDefinitionLocatorCache(java.util.Map cache)
setMenuDefinitionLocatorCache - set menu definition locators cache for absolute menus |
void |
setPipeline(java.lang.String pipeline)
set which pipeline this context is stored for |
void |
updatedNode(Node node)
updatedNode - invoked when the definition of a node is updated by the page manager or when the node modification is otherwise detected |
void |
valueBound(javax.servlet.http.HttpSessionBindingEvent event)
valueBound - notifies this context that it is being bound to a session and identifies the session |
void |
valueUnbound(javax.servlet.http.HttpSessionBindingEvent event)
valueUnbound - notifies this context that it is being unbound from a session and identifies the session |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PortalSiteSessionContextImpl(PageManager pageManager)
pageManager - PageManager component instance| Method Detail |
|---|
public PortalSiteRequestContext newRequestContext(java.util.Map requestProfileLocators)
newRequestContext in interface PortalSiteSessionContextrequestProfileLocators - request profile locators
public PortalSiteRequestContext newRequestContext(java.util.Map requestProfileLocators,
boolean requestFallback)
newRequestContext in interface PortalSiteSessionContextrequestProfileLocators - request profile locatorsrequestFallback - flag specifying whether to fallback to root folder
if locators do not select a page or access is forbidden
public PortalSiteRequestContext newRequestContext(java.util.Map requestProfileLocators,
boolean requestFallback,
boolean useHistory)
newRequestContext in interface PortalSiteSessionContextrequestProfileLocators - request profile locatorsrequestFallback - flag specifying whether to fallback to root folder
if locators do not select a page or access is forbiddenuseHistory - flag indicating whether to use visited page
history to select default page per site folder
public Page selectRequestPage(java.util.Map requestProfileLocators,
boolean requestFallback,
boolean useHistory)
throws NodeNotFoundException
requestProfileLocators - map of profile locators for requestrequestFallback - flag specifying whether to fallback to root folder
if locators do not select a page or access is forbiddenuseHistory - flag indicating whether to use visited page
history to select default page per site folder
NodeNotFoundException - if not found
java.lang.SecurityException - if view access not granted
public Folder getRequestRootFolder(java.util.Map requestProfileLocators)
throws NodeNotFoundException
requestProfileLocators - map of profile locators for request
NodeNotFoundException - if not found
java.lang.SecurityException - if view access not grantedpublic SiteView getSiteView()
public PageManager getPageManager()
getPageManager in interface PortalSiteSessionContextpublic boolean isValid()
isValid in interface PortalSiteSessionContextpublic java.util.Map getProfileLocators()
public java.util.Set getStandardMenuNames()
public java.util.List getMenuDefinitionLocators(Node node)
node - site view node proxy
public SiteViewMenuDefinitionLocator getMenuDefinitionLocator(Node node,
java.lang.String name)
node - site view node proxyname - menu definition name
public Page getManagedPage(Page page)
page - page proxy
public java.util.Map getMenuDefinitionLocatorCache()
public void setMenuDefinitionLocatorCache(java.util.Map cache)
public void newNode(Node node)
newNode in interface PageManagerEventListenernode - new managed node if knownpublic void updatedNode(Node node)
updatedNode in interface PageManagerEventListenernode - updated managed node if knownpublic void removedNode(Node node)
removedNode in interface PageManagerEventListenernode - removed managed node if knownpublic void sessionDidActivate(javax.servlet.http.HttpSessionEvent event)
sessionDidActivate in interface javax.servlet.http.HttpSessionActivationListenerevent - session activation eventpublic void sessionWillPassivate(javax.servlet.http.HttpSessionEvent event)
sessionWillPassivate in interface javax.servlet.http.HttpSessionActivationListenerevent - session activation eventpublic void valueBound(javax.servlet.http.HttpSessionBindingEvent event)
valueBound in interface javax.servlet.http.HttpSessionBindingListenerevent - session binding eventpublic void valueUnbound(javax.servlet.http.HttpSessionBindingEvent event)
valueUnbound in interface javax.servlet.http.HttpSessionBindingListenerevent - session binding eventpublic void setPipeline(java.lang.String pipeline)
PortalSiteSessionContext
setPipeline in interface PortalSiteSessionContextpublic java.lang.String getPipeline()
PortalSiteSessionContext
getPipeline in interface PortalSiteSessionContext
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||