Class AbstractOperation

    • Constructor Detail

      • AbstractOperation

        public AbstractOperation()
    • Method Detail

      • getResults

        public Collection<Result> getResults​(org.apache.sling.api.SlingHttpServletRequest request,
                                             org.apache.sling.api.SlingHttpServletResponse response,
                                             Command cmd)
        Gets results of the operation.
        Specified by:
        getResults in interface Operation
        Parameters:
        request - the Request object
        response - the Response object
        cmd - the Command
        Returns:
        a list of Results
        Throws:
        JSONException
      • withoutParams

        protected abstract List<Result> withoutParams​(org.apache.sling.api.SlingHttpServletRequest request,
                                                      org.apache.sling.api.SlingHttpServletResponse response,
                                                      Command cmd)
        Returns a list of results for a Command without params.
        Parameters:
        request - the Request object
        response - the Response object
        cmd - the Command object
        Returns:
        the list of Results
      • withParams

        protected abstract List<Result> withParams​(org.apache.sling.api.SlingHttpServletRequest request,
                                                   org.apache.sling.api.SlingHttpServletResponse response,
                                                   Command cmd)
        Returns a list of results for a Command with params.
        Parameters:
        request - the Request object
        response - the Response object
        cmd - the Command object
        Returns:
        the list of Results