public interface Portal
| Modifier and Type | Field and Description |
|---|---|
static String |
ATTR_ERROR
ThreadLocal attribute set while we are processing an error.
|
static String |
ATTR_MAXIMIZED_URL
Session variable passing a maximized URL between a portlet and the portal
|
static String |
ATTR_SITE_PAGE
Session attribute root for storing a site's last page visited - just
append the site id.
|
static String |
CONFIG_AUTO_RESET
Configuration option to enable/disable state reset on navigation change
|
static String |
CONFIG_DEFAULT_TABS
Configuration option for default number of site tabs to display to users
|
static String |
DEFAULT_PORTAL_CONTEXT
The default portal name is none is specified.
|
static int |
ERROR_GALLERY |
static int |
ERROR_SITE
Error response modes.
|
static int |
ERROR_WORKSITE |
static String |
FORCE_CLASSIC_COOKIE_VALUE
Value that this cookie will have if we are forcing classic mode
|
static String |
FORCE_CLASSIC_REQ_PARAM
Parameter to signal that we should force the request back to the normal portal view
rather than the PDA portal view.
|
static String |
JSR_168_PRE_RENDER
Tool property used to indicate if JSR_168 tools are to be pre-rendered
as they are being placed in the context.
|
static String |
PARAM_FORCE_LOGIN
Parameter value to allow anonymous users of gallery mode to be sent to
the gateway site as anonymous user (like the /portal URL) instead of
making them log in (like worksite, site, and tool URLs).
|
static String |
PARAM_FORCE_LOGOUT |
static String |
PORTAL_MODE_COOKIE_NAME
Name of cookie that is set to signal what view we want
It is an abstract name to we can later set other preferred modes into same cookie if desired
|
static String |
PREFER_MAXIMIZE
Tool property used to indicate if a tool prefers a maximized view
with minimal portal navigation.
|
static String |
SAKAI_NAV_MINIMIZED
Name of cookie that is set to signal that the user wants us to start minimized
|
static String |
SAKAI_PORTAL_ALLOW_NEO
Constants for SAK-19455 - The NEO Portlet Feature that allows a portlet
to suppress its title and add to the system breadcrumbs.
|
static String |
SAKAI_PORTAL_BREADCRUMBS |
static String |
SAKAI_PORTAL_HELP_ACTION |
static String |
SAKAI_PORTAL_RESET_ACTION |
static String |
SAKAI_PORTAL_SUPPRESSTITLE |
static String |
TOOL_DIRECTURL_ENABLED_PROP
Tool property to allow the enabling/disabling of the direct url linking UI
|
static String |
TOOLCONFIG_HELP_DOCUMENT_ID |
static String |
TOOLCONFIG_HELP_DOCUMENT_URL |
static String |
TOOLCONFIG_SHOW_HELP_BUTTON |
static String |
TOOLCONFIG_SHOW_RESET_BUTTON
Names of tool config/registration attributes that control the rendering
of the tool's titlebar
|
| Modifier and Type | Method and Description |
|---|---|
String |
calcSiteType(String siteId)
work out the type of the site based on the site id.
|
void |
doError(HttpServletRequest req,
HttpServletResponse res,
org.sakaiproject.tool.api.Session session,
int mode)
populate the model with error status
|
void |
doLogin(HttpServletRequest req,
HttpServletResponse res,
org.sakaiproject.tool.api.Session session,
String returnPath,
boolean skipContainer)
perform login
|
void |
doLogout(HttpServletRequest req,
HttpServletResponse res,
org.sakaiproject.tool.api.Session session,
String returnPath)
Process a logout
|
Cookie |
findCookie(HttpServletRequest req,
String name)
Find a cookie by this name from the request
|
void |
forwardPortal(org.sakaiproject.tool.api.ActiveTool tool,
HttpServletRequest req,
HttpServletResponse res,
org.sakaiproject.site.api.ToolConfiguration siteTool,
String skin,
String toolContextPath,
String toolPathInfo)
forward to a portal url
|
void |
forwardTool(org.sakaiproject.tool.api.ActiveTool tool,
HttpServletRequest req,
HttpServletResponse res,
org.sakaiproject.tool.api.Placement placement,
String skin,
String toolContextPath,
String toolPathInfo)
forward the request to a tool
|
PageFilter |
getPageFilter()
Get a the page Filter Implementation
|
String |
getPlacement(HttpServletRequest req,
HttpServletResponse res,
org.sakaiproject.tool.api.Session session,
String placementId,
boolean doPage)
get the placement for the request
|
String |
getPortalContext()
Get the context name of the portal.
|
String |
getPortalPageUrl(org.sakaiproject.site.api.ToolConfiguration siteTool)
get the portal page URL base on the tool supplied
|
ServletContext |
getServletContext()
Get the servlet context associated with the portal
|
PortalSiteHelper |
getSiteHelper() |
SiteNeighbourhoodService |
getSiteNeighbourhoodService() |
String |
getUserEidBasedSiteId(String userId)
get the site id for the user
|
void |
includeBottom(PortalRenderContext rcontext)
include the model section that relates to the bottom of the page.
|
void |
includeLogin(PortalRenderContext rcontext,
HttpServletRequest req,
org.sakaiproject.tool.api.Session session)
include the part od the view tree needed to render login
|
PortalRenderContext |
includePortal(HttpServletRequest req,
HttpServletResponse res,
org.sakaiproject.tool.api.Session session,
String siteId,
String toolId,
String toolContextPath,
String prefix,
boolean doPages,
boolean resetTools,
boolean includeSummary,
boolean expandSite)
populate the view tree for the model
|
void |
includeSubSites(PortalRenderContext rcontext,
HttpServletRequest req,
org.sakaiproject.tool.api.Session session,
String siteId,
String toolContextPath,
String prefix,
boolean resetTools)
Return the sub sites below a particular site
Map.
|
Map |
includeTool(HttpServletResponse res,
HttpServletRequest req,
org.sakaiproject.site.api.ToolConfiguration placement)
include the tool part of the view tree
|
boolean |
isPortletPlacement(org.sakaiproject.tool.api.Placement placement)
Indicate if a placement is a JSR-168 placement
|
boolean |
redirectIfLoggedOut(HttpServletResponse res)
perform a redirect if logged out
|
void |
sendResponse(PortalRenderContext rcontext,
HttpServletResponse res,
String template,
String contentType)
prepare the response and send it to the render engine
|
void |
setPageFilter(PageFilter pageFilter)
Set page Filter
|
void |
setupForward(HttpServletRequest req,
HttpServletResponse res,
org.sakaiproject.tool.api.Placement p,
String skin)
setup in preparation for a forward
|
void |
setupMobileDevice(HttpServletRequest req,
PortalRenderContext rcontext)
Look at the user agent and add Mobile Browser related material to
the context.
|
PortalRenderContext |
startPageContext(String siteType,
String title,
String skin,
HttpServletRequest request)
get a new render context from the render engine
|
static final int ERROR_SITE
static final int ERROR_GALLERY
static final int ERROR_WORKSITE
static final String PARAM_FORCE_LOGIN
static final String PARAM_FORCE_LOGOUT
static final String ATTR_ERROR
static final String ATTR_SITE_PAGE
static final String ATTR_MAXIMIZED_URL
static final String DEFAULT_PORTAL_CONTEXT
static final String CONFIG_AUTO_RESET
static final String CONFIG_DEFAULT_TABS
static final String TOOLCONFIG_SHOW_RESET_BUTTON
static final String TOOLCONFIG_SHOW_HELP_BUTTON
static final String TOOLCONFIG_HELP_DOCUMENT_ID
static final String TOOLCONFIG_HELP_DOCUMENT_URL
static final String JSR_168_PRE_RENDER
static final String PREFER_MAXIMIZE
static final String FORCE_CLASSIC_REQ_PARAM
static final String PORTAL_MODE_COOKIE_NAME
static final String FORCE_CLASSIC_COOKIE_VALUE
static final String SAKAI_NAV_MINIMIZED
static final String SAKAI_PORTAL_ALLOW_NEO
static final String SAKAI_PORTAL_HELP_ACTION
static final String SAKAI_PORTAL_RESET_ACTION
static final String SAKAI_PORTAL_BREADCRUMBS
static final String SAKAI_PORTAL_SUPPRESSTITLE
static final String TOOL_DIRECTURL_ENABLED_PROP
void sendResponse(PortalRenderContext rcontext, HttpServletResponse res, String template, String contentType) throws IOException
rcontext - res - template - contentType - IOExceptionString getPlacement(HttpServletRequest req, HttpServletResponse res, org.sakaiproject.tool.api.Session session, String placementId, boolean doPage) throws org.sakaiproject.tool.api.ToolException
req - res - session - placementId - doPage - org.sakaiproject.tool.api.ToolExceptionvoid doLogin(HttpServletRequest req, HttpServletResponse res, org.sakaiproject.tool.api.Session session, String returnPath, boolean skipContainer) throws org.sakaiproject.tool.api.ToolException
req - res - session - returnPath - skipContainer - org.sakaiproject.tool.api.ToolExceptionvoid doLogout(HttpServletRequest req, HttpServletResponse res, org.sakaiproject.tool.api.Session session, String returnPath) throws org.sakaiproject.tool.api.ToolException
req - Request objectres - Response objectsession - Current sessionreturnPath - if not null, the path to use for the end-user browser redirect
after the logout is complete. Leave null to use the configured
logged out URL.org.sakaiproject.tool.api.ToolExceptionPortalRenderContext startPageContext(String siteType, String title, String skin, HttpServletRequest request)
siteType - title - skin - request - boolean redirectIfLoggedOut(HttpServletResponse res) throws IOException
res - IOExceptionString getPortalPageUrl(org.sakaiproject.site.api.ToolConfiguration siteTool)
siteTool - void doError(HttpServletRequest req, HttpServletResponse res, org.sakaiproject.tool.api.Session session, int mode) throws org.sakaiproject.tool.api.ToolException, IOException
req - res - session - mode - org.sakaiproject.tool.api.ToolExceptionIOExceptionvoid forwardPortal(org.sakaiproject.tool.api.ActiveTool tool,
HttpServletRequest req,
HttpServletResponse res,
org.sakaiproject.site.api.ToolConfiguration siteTool,
String skin,
String toolContextPath,
String toolPathInfo)
throws org.sakaiproject.tool.api.ToolException,
IOException
tool - req - res - siteTool - skin - toolContextPath - toolPathInfo - IOExceptionorg.sakaiproject.tool.api.ToolExceptionvoid setupForward(HttpServletRequest req, HttpServletResponse res, org.sakaiproject.tool.api.Placement p, String skin) throws org.sakaiproject.tool.api.ToolException
req - res - p - skin - org.sakaiproject.tool.api.ToolExceptionvoid includeBottom(PortalRenderContext rcontext)
rcontext - String calcSiteType(String siteId)
siteId - void includeLogin(PortalRenderContext rcontext, HttpServletRequest req, org.sakaiproject.tool.api.Session session)
rcontext - req - session - void forwardTool(org.sakaiproject.tool.api.ActiveTool tool,
HttpServletRequest req,
HttpServletResponse res,
org.sakaiproject.tool.api.Placement placement,
String skin,
String toolContextPath,
String toolPathInfo)
throws org.sakaiproject.tool.api.ToolException
tool - req - res - siteTool - skin - toolContextPath - toolPathInfo - org.sakaiproject.tool.api.ToolExceptionString getUserEidBasedSiteId(String userId)
userId - PortalRenderContext includePortal(HttpServletRequest req, HttpServletResponse res, org.sakaiproject.tool.api.Session session, String siteId, String toolId, String toolContextPath, String prefix, boolean doPages, boolean resetTools, boolean includeSummary, boolean expandSite) throws org.sakaiproject.tool.api.ToolException, IOException
req - res - session - siteId - toolId - toolContextPath - prefix - doPages - resetTools - includeSummary - expandSite - org.sakaiproject.tool.api.ToolExceptionIOExceptionMap includeTool(HttpServletResponse res, HttpServletRequest req, org.sakaiproject.site.api.ToolConfiguration placement) throws IOException
res - req - placement - IOExceptionString getPortalContext()
ServletContext getServletContext()
void setupMobileDevice(HttpServletRequest req, PortalRenderContext rcontext)
void includeSubSites(PortalRenderContext rcontext, HttpServletRequest req, org.sakaiproject.tool.api.Session session, String siteId, String toolContextPath, String prefix, boolean resetTools)
rcontext - req - siteId - toolContextPath - prefix - loggedIn - PageFilter getPageFilter()
void setPageFilter(PageFilter pageFilter)
PortalSiteHelper getSiteHelper()
SiteNeighbourhoodService getSiteNeighbourhoodService()
boolean isPortletPlacement(org.sakaiproject.tool.api.Placement placement)
Cookie findCookie(HttpServletRequest req, String name)
req - The servlet request.name - The cookie nameCopyright © 2003-2015 Sakai Project. All Rights Reserved.