Class AbstractPredicateServlet

    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String FILTER_PARAM
      default name for the filter parameter
      static java.lang.String PATH_PARAM
      default path parameter name
      static java.lang.String PREDICATE_PARAM
      default name for the predicate parameter
    • 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 javax.servlet.GenericServlet

        destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletName, init, init, log, log
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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
    • Constructor Detail

      • AbstractPredicateServlet

        public AbstractPredicateServlet()
    • 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 an AnyPredicate. If no predicates are specified in the request a TruePredicate 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