Package com.day.cq.commons.servlets
Class AbstractPredicateServlet
- java.lang.Object
-
- javax.servlet.GenericServlet
-
- org.apache.sling.api.servlets.SlingSafeMethodsServlet
-
- org.apache.sling.api.servlets.SlingAllMethodsServlet
-
- com.day.cq.commons.servlets.AbstractPredicateServlet
-
- All Implemented Interfaces:
java.io.Serializable
,Servlet
,ServletConfig
- Direct Known Subclasses:
AbstractCommandServlet
,AbstractListServlet
,AbstractSearchServlet
,ContentFinderListInfoProviderHelper
,OverlayServlet
public abstract class AbstractPredicateServlet extends SlingAllMethodsServlet
Abstract servlet that retrieves the predicates from the request.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
FILTER_PARAM
default name for the filter parameterstatic java.lang.String
PATH_PARAM
default path parameter namestatic java.lang.String
PREDICATE_PARAM
default name for the predicate parameter
-
Constructor Summary
Constructors Constructor Description AbstractPredicateServlet()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Predicate
getPredicate(SlingHttpServletRequest request)
Returns the predicate retrieved from the given request.-
Methods inherited from class org.apache.sling.api.servlets.SlingSafeMethodsServlet
getServletInfo, service
-
Methods inherited from class javax.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletName, init, init, log, log
-
-
-
-
Field Detail
-
PATH_PARAM
public static final java.lang.String PATH_PARAM
default path parameter name- See Also:
- Constant Field Values
-
PREDICATE_PARAM
public static final java.lang.String PREDICATE_PARAM
default name for the predicate parameter- See Also:
- Constant Field Values
-
FILTER_PARAM
public static final java.lang.String FILTER_PARAM
default name for the filter parameter- See Also:
- Constant Field Values
-
-
Method Detail
-
getPredicate
public Predicate getPredicate(SlingHttpServletRequest request)
Returns the predicate retrieved from the given request. the predicates are retrieved from the request selectors and the request parameter values of the "predicate". those predicates form anAnyPredicate
. If no predicates are specified in the request aTruePredicate
is returned.Note: the "filter" parameters are used to add
ResourceFilter
predicates. although this is discouraged because java class names should never be passed over the wire.- Parameters:
request
- servlet request- Returns:
- predicate
-
-