|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.alfresco.web.extensibility.SlingshotSiteModuleEvaluator
public class SlingshotSiteModuleEvaluator
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 specific sites based on their ids and sitePreset ids by matching them against the regexps inside the and parameters.
Note! If we are outside a side (i.e. a "global" page: i.e. the "Repository browser", A users dashboard or the
"My Workflows" page the evaluator will return true
. In other words this evaluator will only use the
parameters if we are inside a site.
Note! The regexp is expressed without using the surrounding // characters.
Example:
<evaluator>site.module.evaluator</evaluator>
<evaluatorProperties>
<sitePresets>rm-site-dashboard</sitePresets>
</evaluatorProperties>
Will return true if we are outside a site OR inside a site with a sitePreset id of "rm-site-dashboard".
Example 2:
<evaluator>site.module.evaluator</evaluator>
<evaluatorProperties>
<sites>rm|photos</sitePresets>
</evaluatorProperties>
Will return true if we are outside a site OR inside a site with a site id of "rm" or "photos".
Field Summary | |
---|---|
static java.lang.String |
SITE_FILTER
|
static java.lang.String |
SITE_PRESET_FILTER
|
protected SlingshotEvaluatorUtil |
util
|
Constructor Summary | |
---|---|
SlingshotSiteModuleEvaluator()
|
Method Summary | |
---|---|
boolean |
applyModule(org.springframework.extensions.surf.RequestContext context,
java.util.Map params)
Will return true if we are outside a site OR inside a site with a sitePreset id of "rm-site-dashboard". |
java.lang.String[] |
getRequiredProperties()
|
void |
setSlingshotEvaluatorUtil(SlingshotEvaluatorUtil slingshotExtensibilityUtil)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String SITE_PRESET_FILTER
public static final java.lang.String SITE_FILTER
protected SlingshotEvaluatorUtil util
Constructor Detail |
---|
public SlingshotSiteModuleEvaluator()
Method Detail |
---|
public void setSlingshotEvaluatorUtil(SlingshotEvaluatorUtil slingshotExtensibilityUtil)
public java.lang.String[] getRequiredProperties()
getRequiredProperties
in interface org.springframework.extensions.surf.extensibility.ExtensionModuleEvaluator
public boolean applyModule(org.springframework.extensions.surf.RequestContext context, java.util.Map params)
applyModule
in interface org.springframework.extensions.surf.extensibility.ExtensionModuleEvaluator
context
- params
-
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |