|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.apache.jetspeed.portalsite.impl.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
| Field Summary | |
private Map |
folderPageHistory
folderPageHistory - map of last page visited by folder |
private static org.apache.commons.logging.Log |
log
log - logging instance |
private Map |
menuDefinitionLocatorCache
menuDefinitionLocatorCache - cached menu definition locators for absolute menus valid for session |
private org.apache.jetspeed.page.PageManager |
pageManager
pageManager - PageManager component |
private Map |
profileLocators
profileLocators - map of session profile locators by locator names |
private SiteView |
siteView
siteView - session site view |
private boolean |
stale
stale - flag that indicates whether the state managed by this context is stale |
private boolean |
subscribed
subscribed - flag that indicates whether this context is subscribed as event listeners |
private String |
userPrincipal
userPrincipal - session user principal |
| Constructor Summary | |
PortalSiteSessionContextImpl(org.apache.jetspeed.page.PageManager pageManager)
PortalSiteSessionContextImpl - constructor |
|
| Method Summary | |
private void |
clearSessionProfileLocators()
clearSessionProfileLocators - clear cache session profile locators |
org.apache.jetspeed.om.page.Page |
getManagedPage(org.apache.jetspeed.om.page.Page page)
getManagedPage - get concrete page instance from page proxy |
SiteViewMenuDefinitionLocator |
getMenuDefinitionLocator(org.apache.jetspeed.page.document.Node node,
String name)
getMenuDefinitionLocator - get named node proxy menu definition locator from site view |
Map |
getMenuDefinitionLocatorCache()
getMenuDefinitionLocatorCache - get menu definition locators cache for absolute menus |
List |
getMenuDefinitionLocators(org.apache.jetspeed.page.document.Node node)
getMenuDefinitionLocators - get list of node proxy menu definition locators from site view |
org.apache.jetspeed.page.PageManager |
getPageManager()
getPageManager - return PageManager component instance |
Map |
getProfileLocators()
getProfileLocators - get session profile locators |
private String |
getRequestPathFromLocator(org.apache.jetspeed.profiler.ProfileLocator locator)
getRequestPathFromLocator - execute profile locator to extract request path using locator rules; this is request specific and is not part of the site view |
org.apache.jetspeed.om.folder.Folder |
getRequestRootFolder(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 |
Set |
getStandardMenuNames()
getStandardMenuNames - get set of available standard menu names |
private static String |
locatorRequestPath(org.apache.jetspeed.profiler.ProfileLocator locator)
locatorRequestPath - extract request specific path from profile locator using request path from locator |
private static String |
locatorRequestPath(org.apache.jetspeed.profiler.ProfileLocator locator,
String requestPath)
locatorRequestPath - extract request specific path from profile locator |
private static boolean |
locatorsEquals(Map locators0,
Map locators1)
locatorsEquals - test profile locator maps for equivalence ignoring request specifics |
void |
newNode(org.apache.jetspeed.page.document.Node node)
newNode - invoked when the definition of a node is created by the page manager or when the node creation is otherwise detected |
org.apache.jetspeed.portalsite.PortalSiteRequestContext |
newRequestContext(Map requestProfileLocators)
newRequestContext - create a new request context instance |
void |
removedNode(org.apache.jetspeed.page.document.Node node)
removedNode - invoked when the definition of a node is removed by the page manager or when the node removal is otherwise detected |
org.apache.jetspeed.om.page.Page |
selectRequestPage(Map requestProfileLocators)
selectRequestPage - select page proxy for request given profile locators |
private org.apache.jetspeed.om.page.Page |
selectRequestPage(String requestPath)
selectRequestPage - select page proxy for request for specified path given profile locators and site view associated with this context |
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(Map cache)
setMenuDefinitionLocatorCache - set menu definition locators cache for absolute menus |
void |
updatedNode(org.apache.jetspeed.page.document.Node node)
updatedNode - invoked when the definition of a node is updated by the page manager or when the node modification is otherwise detected |
private boolean |
updateSessionProfileLocators(Map requestProfileLocators)
updateSessionProfileLocators - detect modification of and update cached session profile locators |
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 |
| Field Detail |
private static final org.apache.commons.logging.Log log
private org.apache.jetspeed.page.PageManager pageManager
private Map profileLocators
private String userPrincipal
private SiteView siteView
private Map folderPageHistory
private Map menuDefinitionLocatorCache
private boolean subscribed
private boolean stale
| Constructor Detail |
public PortalSiteSessionContextImpl(org.apache.jetspeed.page.PageManager pageManager)
pageManager - PageManager component instance| Method Detail |
public org.apache.jetspeed.portalsite.PortalSiteRequestContext newRequestContext(Map requestProfileLocators)
newRequestContext in interface org.apache.jetspeed.portalsite.PortalSiteSessionContextrequestProfileLocators - request profile locators
public org.apache.jetspeed.om.page.Page selectRequestPage(Map requestProfileLocators)
throws org.apache.jetspeed.page.document.NodeNotFoundException
requestProfileLocators - map of profile locators for request
org.apache.jetspeed.page.document.NodeNotFoundException - if not found
SecurityException - if view access not grantedprivate String getRequestPathFromLocator(org.apache.jetspeed.profiler.ProfileLocator locator)
locator - profile locator to execute
private org.apache.jetspeed.om.page.Page selectRequestPage(String requestPath)
throws org.apache.jetspeed.page.document.NodeNotFoundException
requestPath - request path
org.apache.jetspeed.page.document.NodeNotFoundException - if not found
SecurityException - if view access not granted
public org.apache.jetspeed.om.folder.Folder getRequestRootFolder(Map requestProfileLocators)
throws org.apache.jetspeed.page.document.NodeNotFoundException
requestProfileLocators - map of profile locators for request
org.apache.jetspeed.page.document.NodeNotFoundException - if not found
SecurityException - if view access not grantedprivate boolean updateSessionProfileLocators(Map requestProfileLocators)
requestProfileLocators - map of profile locators for request
private void clearSessionProfileLocators()
public SiteView getSiteView()
public org.apache.jetspeed.page.PageManager getPageManager()
getPageManager in interface org.apache.jetspeed.portalsite.PortalSiteSessionContextpublic Map getProfileLocators()
public Set getStandardMenuNames()
public List getMenuDefinitionLocators(org.apache.jetspeed.page.document.Node node)
node - site view node proxy
public SiteViewMenuDefinitionLocator getMenuDefinitionLocator(org.apache.jetspeed.page.document.Node node,
String name)
node - site view node proxyname - menu definition name
public org.apache.jetspeed.om.page.Page getManagedPage(org.apache.jetspeed.om.page.Page page)
page - page proxy
public Map getMenuDefinitionLocatorCache()
public void setMenuDefinitionLocatorCache(Map cache)
private static boolean locatorsEquals(Map locators0,
Map locators1)
locators0 - request profile locator maplocators1 - request profile locator map
private static String locatorRequestPath(org.apache.jetspeed.profiler.ProfileLocator locator)
locator - request profile locator
private static String locatorRequestPath(org.apache.jetspeed.profiler.ProfileLocator locator,
String requestPath)
locator - request profile locatorrequestPath - request path
public void newNode(org.apache.jetspeed.page.document.Node node)
newNode in interface org.apache.jetspeed.page.PageManagerEventListenernode - new managed node if knownpublic void updatedNode(org.apache.jetspeed.page.document.Node node)
updatedNode in interface org.apache.jetspeed.page.PageManagerEventListenernode - updated managed node if knownpublic void removedNode(org.apache.jetspeed.page.document.Node node)
removedNode in interface org.apache.jetspeed.page.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 event
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||