Class NodeServlet.AbstractQueryOperation

    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      protected boolean accept​(com.composum.sling.core.filter.ResourceFilter filter, org.apache.sling.api.resource.Resource resource)  
      void doIt​(@NotNull org.apache.sling.api.SlingHttpServletRequest request, @NotNull org.apache.sling.api.SlingHttpServletResponse response, com.composum.sling.core.ResourceHandle resource)  
      protected @Nullable Long getQueryLimit()  
      String getSimpleQuery​(String path, String text)  
      protected void writeError​(org.apache.sling.api.SlingHttpServletResponse response, String queryString, Exception ex)  
      protected abstract void writeQueryResult​(org.apache.sling.api.SlingHttpServletRequest request, org.apache.sling.api.SlingHttpServletResponse response, String queryString, javax.jcr.query.QueryResult result, com.composum.sling.core.filter.ResourceFilter filter, org.apache.sling.api.resource.ResourceResolver resolver)
      Writes the query result in the format appropriate to the output.
    • Constructor Detail

      • AbstractQueryOperation

        protected AbstractQueryOperation()
    • Method Detail

      • doIt

        public void doIt​(@NotNull
                         @NotNull org.apache.sling.api.SlingHttpServletRequest request,
                         @NotNull
                         @NotNull org.apache.sling.api.SlingHttpServletResponse response,
                         com.composum.sling.core.ResourceHandle resource)
                  throws javax.servlet.ServletException,
                         IOException
        Specified by:
        doIt in interface com.composum.sling.core.servlet.ServletOperation
        Throws:
        javax.servlet.ServletException
        IOException
      • accept

        protected boolean accept​(com.composum.sling.core.filter.ResourceFilter filter,
                                 org.apache.sling.api.resource.Resource resource)
      • getQueryLimit

        @Nullable
        protected @Nullable Long getQueryLimit()
      • writeQueryResult

        protected abstract void writeQueryResult​(org.apache.sling.api.SlingHttpServletRequest request,
                                                 org.apache.sling.api.SlingHttpServletResponse response,
                                                 String queryString,
                                                 javax.jcr.query.QueryResult result,
                                                 com.composum.sling.core.filter.ResourceFilter filter,
                                                 org.apache.sling.api.resource.ResourceResolver resolver)
                                          throws javax.jcr.RepositoryException,
                                                 javax.servlet.ServletException,
                                                 IOException
        Writes the query result in the format appropriate to the output. Caution: think of escaping appropriately (XSS etc.).
        Throws:
        javax.jcr.RepositoryException
        javax.servlet.ServletException
        IOException