public class SlingshotPortletModuleEvaluator extends Object implements org.springframework.extensions.surf.extensibility.ExtensionModuleEvaluator
Evaluator used to decide if an extension module (and its & ) shall be used for this request.
Makes it possible to decide if we are viewed from a portal and (optional) which portal using a regexp in the parameter.
Note! The regexp is expressed without using the surrounding // characters.
Example:
Will return true of we are viewed from inside a portal otherwise false.
Example 2:
<evaluator type="portlet.module.evaluator">
<params>
<portletUrls>regexp mathing a portlet url</portletUrls>
</params>
</evaluator>
Will return true of we are viewed from inside a portal and that portal's url matches the regexp in the parameter.
| Modifier and Type | Field and Description |
|---|---|
static String |
PORTLET_URLS_FILTER |
protected SlingshotEvaluatorUtil |
util |
| Constructor and Description |
|---|
SlingshotPortletModuleEvaluator() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
applyModule(org.springframework.extensions.surf.RequestContext context,
Map<String,String> params)
Decides if we are inside a portal or not.
|
String[] |
getRequiredProperties() |
void |
setSlingshotEvaluatorUtil(SlingshotEvaluatorUtil slingshotExtensibilityUtil) |
public static final String PORTLET_URLS_FILTER
protected SlingshotEvaluatorUtil util
public void setSlingshotEvaluatorUtil(SlingshotEvaluatorUtil slingshotExtensibilityUtil)
public String[] getRequiredProperties()
getRequiredProperties in interface org.springframework.extensions.surf.extensibility.ExtensionModuleEvaluatorpublic boolean applyModule(org.springframework.extensions.surf.RequestContext context,
Map<String,String> params)
applyModule in interface org.springframework.extensions.surf.extensibility.ExtensionModuleEvaluatorcontext - params - Copyright © 2005–2014 Alfresco Software. All rights reserved.