Package com.composum.sling.nodes.servlet
Class NodeServlet.AbstractQueryOperation
- java.lang.Object
 - 
- com.composum.sling.nodes.servlet.NodeServlet.AbstractQueryOperation
 
 
- 
- All Implemented Interfaces:
 com.composum.sling.core.servlet.ServletOperation
- Direct Known Subclasses:
 NodeServlet.ExportQueryOperation,NodeServlet.HtmlQueryOperation,NodeServlet.JsonQueryOperation
- Enclosing class:
 - NodeServlet
 
protected abstract class NodeServlet.AbstractQueryOperation extends Object implements com.composum.sling.core.servlet.ServletOperation
 
- 
- 
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractQueryOperation() 
- 
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected booleanaccept(com.composum.sling.core.filter.ResourceFilter filter, org.apache.sling.api.resource.Resource resource)voiddoIt(@NotNull org.apache.sling.api.SlingHttpServletRequest request, @NotNull org.apache.sling.api.SlingHttpServletResponse response, com.composum.sling.core.ResourceHandle resource)protected @Nullable LonggetQueryLimit()StringgetSimpleQuery(String path, String text)protected voidwriteError(org.apache.sling.api.SlingHttpServletResponse response, String queryString, Exception ex)protected abstract voidwriteQueryResult(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. 
 - 
 
- 
- 
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:
 doItin interfacecom.composum.sling.core.servlet.ServletOperation- Throws:
 javax.servlet.ServletExceptionIOException
 
- 
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, IOExceptionWrites the query result in the format appropriate to the output. Caution: think of escaping appropriately (XSS etc.).- Throws:
 javax.jcr.RepositoryExceptionjavax.servlet.ServletExceptionIOException
 
- 
writeError
protected void writeError(org.apache.sling.api.SlingHttpServletResponse response, String queryString, Exception ex) throws IOException- Throws:
 IOException
 
 - 
 
 -