org.alfresco.web.extensibility
Class SlingshotPortletModuleEvaluator

java.lang.Object
  extended by org.alfresco.web.extensibility.SlingshotPortletModuleEvaluator
All Implemented Interfaces:
org.springframework.extensions.surf.extensibility.ExtensionModuleEvaluator

public class SlingshotPortletModuleEvaluator
extends java.lang.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>portlet.module.evaluator</evaluator>
 <evaluatorProperties>
     <portletUrls>regexp mathing a portlet url</portletUrls>
 </evaluatorProperties>
 

Will return true of we are viewed from inside a portal and that portal's url matches the regexp in the parameter.


Field Summary
static java.lang.String PORTLET_URLS_FILTER
           
protected  SlingshotEvaluatorUtil util
           
 
Constructor Summary
SlingshotPortletModuleEvaluator()
           
 
Method Summary
 boolean applyModule(org.springframework.extensions.surf.RequestContext context, java.util.Map params)
          Decides if we are inside a portal or not.
 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

PORTLET_URLS_FILTER

public static final java.lang.String PORTLET_URLS_FILTER
See Also:
Constant Field Values

util

protected SlingshotEvaluatorUtil util
Constructor Detail

SlingshotPortletModuleEvaluator

public SlingshotPortletModuleEvaluator()
Method Detail

setSlingshotEvaluatorUtil

public void setSlingshotEvaluatorUtil(SlingshotEvaluatorUtil slingshotExtensibilityUtil)

getRequiredProperties

public java.lang.String[] getRequiredProperties()
Specified by:
getRequiredProperties in interface org.springframework.extensions.surf.extensibility.ExtensionModuleEvaluator

applyModule

public boolean applyModule(org.springframework.extensions.surf.RequestContext context,
                           java.util.Map params)
Decides if we are inside a portal or not.

Specified by:
applyModule in interface org.springframework.extensions.surf.extensibility.ExtensionModuleEvaluator
Parameters:
context -
params -
Returns:
true if we are in a portlet and its url matches the param (defaults to ".*")


Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.