org.apache.jetspeed.portalsite.impl
Class PortalSiteRequestContextImpl

java.lang.Object
  extended by org.apache.jetspeed.portalsite.impl.PortalSiteRequestContextImpl
All Implemented Interfaces:
PortalSiteRequestContext

public class PortalSiteRequestContextImpl
extends java.lang.Object
implements PortalSiteRequestContext

This class encapsulates managed request state for and interface to the portal-site component.

Version:
$Id: PortalSiteRequestContextImpl.java 517121 2007-03-12 07:45:49Z ate $
Author:
Randy Watler

Constructor Summary
PortalSiteRequestContextImpl(PortalSiteSessionContextImpl sessionContext, java.util.Map requestProfileLocators)
          PortalSiteRequestContextImpl - constructor
PortalSiteRequestContextImpl(PortalSiteSessionContextImpl sessionContext, java.util.Map requestProfileLocators, boolean requestFallback)
          PortalSiteRequestContextImpl - constructor
PortalSiteRequestContextImpl(PortalSiteSessionContextImpl sessionContext, java.util.Map requestProfileLocators, boolean requestFallback, boolean useHistory)
          PortalSiteRequestContextImpl - constructor
 
Method Summary
 java.util.Set getCustomMenuNames()
          getCustomMenuNames - get set of custom menu names available as defined for the request profiled page and folder
 Folder getFolder()
          getFolder - get folder proxy relative to request profiled page
 java.util.Map getLocators()
          getLocators - get profile locators by locator names
 Page getManagedPage()
          getManagedPage - get request profiled concrete page instance as managed by the page manager
 Menu getMenu(java.lang.String name)
          getMenu - get instantiated menu available for the request profiled page and folder
 Menu getMenu(java.lang.String name, java.util.Set names)
          getMenu - get instantiated menu available for the request profiled page and folder, avoiding cyclic menu definition loops by propagating related menu names set from menu construction
 Page getPage()
          getPage - get request profiled page proxy
 Folder getParentFolder()
          getParentFolder - get parent folder proxy relative to request profiled page
 Folder getRootFolder()
          getRootFolder - get root profiled folder proxy
 NodeSet getRootLinks()
          getRootLinks - get node set of link proxies relative to profiled root folder
 PortalSiteSessionContext getSessionContext()
          getSessionContext - get component session context
 NodeSet getSiblingFolders()
          getSiblingFolders - get node set of sibling folder proxies relative to request profiled page, (includes profiled page folder proxy)
 NodeSet getSiblingPages()
          getSiblingPages - get node set of sibling page proxies relative to request profiled page, (includes profiled page proxy)
 java.util.Set getStandardMenuNames()
          getStandardMenuNames - get set of available standard menu names
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PortalSiteRequestContextImpl

public PortalSiteRequestContextImpl(PortalSiteSessionContextImpl sessionContext,
                                    java.util.Map requestProfileLocators,
                                    boolean requestFallback,
                                    boolean useHistory)
PortalSiteRequestContextImpl - constructor

Parameters:
sessionContext - session context
requestProfileLocators - request profile locators
requestFallback - flag specifying whether to fallback to root folder if locators do not select a page or access is forbidden
useHistory - flag indicating whether to use visited page history to select default page per site folder

PortalSiteRequestContextImpl

public PortalSiteRequestContextImpl(PortalSiteSessionContextImpl sessionContext,
                                    java.util.Map requestProfileLocators,
                                    boolean requestFallback)
PortalSiteRequestContextImpl - constructor

Parameters:
sessionContext - session context
requestProfileLocators - request profile locators
requestFallback - flag specifying whether to fallback to root folder if locators do not select a page or access is forbidden

PortalSiteRequestContextImpl

public PortalSiteRequestContextImpl(PortalSiteSessionContextImpl sessionContext,
                                    java.util.Map requestProfileLocators)
PortalSiteRequestContextImpl - constructor

Parameters:
sessionContext - session context
requestProfileLocators - request profile locators
Method Detail

getSessionContext

public PortalSiteSessionContext getSessionContext()
getSessionContext - get component session context

Specified by:
getSessionContext in interface PortalSiteRequestContext
Returns:
component session context

getLocators

public java.util.Map getLocators()
getLocators - get profile locators by locator names

Specified by:
getLocators in interface PortalSiteRequestContext
Returns:
request profile locators

getManagedPage

public Page getManagedPage()
                    throws NodeNotFoundException
getManagedPage - get request profiled concrete page instance as managed by the page manager

Specified by:
getManagedPage in interface PortalSiteRequestContext
Returns:
managed page
Throws:
NodeNotFoundException - if page not found
java.lang.SecurityException - if page view access not granted

getPage

public Page getPage()
             throws NodeNotFoundException
getPage - get request profiled page proxy

Specified by:
getPage in interface PortalSiteRequestContext
Returns:
page proxy
Throws:
NodeNotFoundException - if page not found
java.lang.SecurityException - if page view access not granted

getFolder

public Folder getFolder()
                 throws NodeNotFoundException
getFolder - get folder proxy relative to request profiled page

Specified by:
getFolder in interface PortalSiteRequestContext
Returns:
page folder proxy
Throws:
NodeNotFoundException - if page not found
java.lang.SecurityException - if page view access not granted

getSiblingPages

public NodeSet getSiblingPages()
                        throws NodeNotFoundException
getSiblingPages - get node set of sibling page proxies relative to request profiled page, (includes profiled page proxy)

Specified by:
getSiblingPages in interface PortalSiteRequestContext
Returns:
sibling page proxies
Throws:
NodeNotFoundException - if page not found
java.lang.SecurityException - if page view access not granted

getParentFolder

public Folder getParentFolder()
                       throws NodeNotFoundException
getParentFolder - get parent folder proxy relative to request profiled page

Specified by:
getParentFolder in interface PortalSiteRequestContext
Returns:
parent folder proxy or null
Throws:
NodeNotFoundException - if page not found
java.lang.SecurityException - if page view access not granted

getSiblingFolders

public NodeSet getSiblingFolders()
                          throws NodeNotFoundException
getSiblingFolders - get node set of sibling folder proxies relative to request profiled page, (includes profiled page folder proxy)

Specified by:
getSiblingFolders in interface PortalSiteRequestContext
Returns:
sibling folder proxies
Throws:
NodeNotFoundException - if page not found
java.lang.SecurityException - if page view access not granted

getRootFolder

public Folder getRootFolder()
                     throws NodeNotFoundException
getRootFolder - get root profiled folder proxy

Specified by:
getRootFolder in interface PortalSiteRequestContext
Returns:
parent folder proxy
Throws:
NodeNotFoundException - if page not found
java.lang.SecurityException - if page view access not granted

getRootLinks

public NodeSet getRootLinks()
                     throws NodeNotFoundException
getRootLinks - get node set of link proxies relative to profiled root folder

Specified by:
getRootLinks in interface PortalSiteRequestContext
Returns:
root link proxies
Throws:
NodeNotFoundException - if page not found
java.lang.SecurityException - if page view access not granted

getStandardMenuNames

public java.util.Set getStandardMenuNames()
getStandardMenuNames - get set of available standard menu names

Specified by:
getStandardMenuNames in interface PortalSiteRequestContext
Returns:
menu names set

getCustomMenuNames

public java.util.Set getCustomMenuNames()
                                 throws NodeNotFoundException
getCustomMenuNames - get set of custom menu names available as defined for the request profiled page and folder

Specified by:
getCustomMenuNames in interface PortalSiteRequestContext
Returns:
menu names set
Throws:
NodeNotFoundException - if page not found
java.lang.SecurityException - if page view access not granted

getMenu

public Menu getMenu(java.lang.String name)
             throws NodeNotFoundException
getMenu - get instantiated menu available for the request profiled page and folder

Specified by:
getMenu in interface PortalSiteRequestContext
Parameters:
name - menu definition name
Returns:
menu instance
Throws:
NodeNotFoundException - if page not found
java.lang.SecurityException - if page view access not granted

getMenu

public Menu getMenu(java.lang.String name,
                    java.util.Set names)
             throws NodeNotFoundException
getMenu - get instantiated menu available for the request profiled page and folder, avoiding cyclic menu definition loops by propagating related menu names set from menu construction

Parameters:
name - menu definition name
names - set of related menu definition names
Returns:
menu instance
Throws:
NodeNotFoundException - if page not found
java.lang.SecurityException - if page view access not granted


Copyright © 1999-2010 Apache Software Foundation. All Rights Reserved.