public class SlingshotEvaluatorUtil
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
protected static java.lang.String |
PORTLET_HOST |
protected static java.lang.String |
PORTLET_URL |
protected org.springframework.extensions.surf.WebFrameworkServiceRegistry |
serviceRegistry |
protected static java.lang.String |
SITE |
protected static java.lang.String |
SITE_PRESET |
static java.lang.String |
SITE_PRESET_CACHE |
| Constructor and Description |
|---|
SlingshotEvaluatorUtil() |
| Modifier and Type | Method and Description |
|---|---|
protected java.lang.String |
getEvaluatorParam(java.util.Map params,
java.lang.String name,
java.lang.String defaultValue)
Helper for getting an evaluator parameter trimmed OR defaultValue if no value has been provided.
|
java.lang.String |
getPageId(org.springframework.extensions.surf.RequestContext context)
Returns the current site id OR null if we aren't in a site
|
protected java.lang.Boolean |
getPortletHost(org.springframework.extensions.surf.RequestContext context)
Returns true if we are viewed from inside a portal.
|
protected java.lang.String |
getPortletUrl(org.springframework.extensions.surf.RequestContext context)
Returns the portal url if we are inside a portal, otherwise null.
|
protected java.lang.String |
getSite(org.springframework.extensions.surf.RequestContext context)
Returns the current site id OR null if we aren't in a site
|
protected java.lang.String |
getSitePreset(org.springframework.extensions.surf.RequestContext context,
java.lang.String siteId)
The site's sitePreset OR null if something goes wrong.
|
void |
setServiceRegistry(org.springframework.extensions.surf.WebFrameworkServiceRegistry serviceRegistry) |
public static final java.lang.String SITE_PRESET_CACHE
protected static final java.lang.String PORTLET_HOST
protected static final java.lang.String PORTLET_URL
protected static final java.lang.String SITE_PRESET
protected static final java.lang.String SITE
protected org.springframework.extensions.surf.WebFrameworkServiceRegistry serviceRegistry
public void setServiceRegistry(org.springframework.extensions.surf.WebFrameworkServiceRegistry serviceRegistry)
protected java.lang.String getEvaluatorParam(java.util.Map params,
java.lang.String name,
java.lang.String defaultValue)
params - name - defaultValue - protected java.lang.Boolean getPortletHost(org.springframework.extensions.surf.RequestContext context)
context - protected java.lang.String getPortletUrl(org.springframework.extensions.surf.RequestContext context)
context - public java.lang.String getPageId(org.springframework.extensions.surf.RequestContext context)
context - protected java.lang.String getSite(org.springframework.extensions.surf.RequestContext context)
context - protected java.lang.String getSitePreset(org.springframework.extensions.surf.RequestContext context,
java.lang.String siteId)
context - siteId - The id of the site to retrieve the sitePreset for.Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.