|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.springframework.extensions.surf.extensibility.impl.DefaultSubComponentEvaluator
org.alfresco.web.extensibility.SlingshotConfigComponentElementEvaluator
public class SlingshotConfigComponentElementEvaluator
Evaluator used to decide if a shall be bound in to a and .
Finds the value of the config element in share-config.xml (or other deployed xxx-config.xml files) specificed by the parameter.
If no additional parameters has been provided it will simply test if the value equals "true". If the value instead shall match a different value that value can be specified using a regexp inside the parameter.
Note! The regexp is expressed without using the surrounding // characters.
Example:
<evaluator type="config.component.evaluator">
<params>
<element>DocumentDetails/document-details/display-web-preview</element>
</params>
</evaluator>
Will return true if we are inside a site with an id of "marketing" or "engineering".
Field Summary | |
---|---|
protected org.springframework.extensions.config.ConfigService |
configService
|
static java.lang.String |
ELEMENT
|
static java.lang.String |
MATCH
|
protected SlingshotEvaluatorUtil |
util
|
Constructor Summary | |
---|---|
SlingshotConfigComponentElementEvaluator()
|
Method Summary | |
---|---|
boolean |
evaluate(org.springframework.extensions.surf.RequestContext context,
java.util.Map params)
Decides if we are inside a site or not. |
void |
setConfigService(org.springframework.extensions.config.ConfigService configService)
Sets the config service. |
void |
setSlingshotEvaluatorUtil(SlingshotEvaluatorUtil slingshotExtensibilityUtil)
Sets the evaluator util. |
Methods inherited from class org.springframework.extensions.surf.extensibility.impl.DefaultSubComponentEvaluator |
---|
getBeanName, setBeanName |
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 ELEMENT
public static final java.lang.String MATCH
protected SlingshotEvaluatorUtil util
protected org.springframework.extensions.config.ConfigService configService
Constructor Detail |
---|
public SlingshotConfigComponentElementEvaluator()
Method Detail |
---|
public void setSlingshotEvaluatorUtil(SlingshotEvaluatorUtil slingshotExtensibilityUtil)
slingshotExtensibilityUtil
- the evaluator utilpublic void setConfigService(org.springframework.extensions.config.ConfigService configService)
configService
- the new config servicepublic boolean evaluate(org.springframework.extensions.surf.RequestContext context, java.util.Map params)
evaluate
in interface org.springframework.extensions.surf.extensibility.SubComponentEvaluator
evaluate
in class org.springframework.extensions.surf.extensibility.impl.DefaultSubComponentEvaluator
context
- params
-
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |