Package com.day.cq.search.eval
Interface EvaluationContext
public interface EvaluationContext
EvaluationContext is a helper class that provides access to
various elements required for PredicateEvaluators
during the query evaluation process.- Since:
- 5.2
-
Method Summary
Modifier and TypeMethodDescriptionRetrieves an object that is temporarily stored during the current evaluation.Helper method for returning the path behind a row.getPredicateEvaluator(String type) Retrieves aPredicateEvaluatorfor the given type.getResource(Row row) Helper method that returns the resource for the given row.Returns a (jcr) resource resolver based on the current session.Returns the session under which theQueryruns.voidAllows to store any object temporarily for the current evaluation.
-
Method Details
-
getPredicateEvaluator
Retrieves aPredicateEvaluatorfor the given type. -
getSession
Session getSession()Returns the session under which theQueryruns. -
getResourceResolver
ResourceResolver getResourceResolver()Returns a (jcr) resource resolver based on the current session. -
getNode
Helper method for implementations that returns theNodebehind aRow. This method will be obsolete with JCR 2.0, where the newRow.getNode()method will be available.- See Also:
-
getPath
Helper method for returning the path behind a row. If an error occurs,nullwill be returned.- See Also:
-
getResource
Helper method that returns the resource for the given row.- See Also:
-
put
Allows to store any object temporarily for the current evaluation. This is useful as the predicate evaluators can be used by multiple executions (in different threads) at the same time and thus need a safe storage - object fields are not usable.- Parameters:
key- unique key for the valuevalue- any object ornullto remove the entry under key- Since:
- 5.3
- See Also:
-
get
Retrieves an object that is temporarily stored during the current evaluation.- Parameters:
key- unique key for the value- Returns:
- the value object or
nullif there is no value stored under the given key - Since:
- 5.3
- See Also:
-