@Service(value=javax.servlet.Servlet.class)
@Properties(value={@Property(name="service.description",value="Default Query Servlet"),@Property(name="service.vendor",value="The Apache Software Foundation"),@Property(name="sling.servlet.resourceTypes",value="sling/servlet/default"),@Property(name="sling.servlet.extensions",value="json"),@Property(name="sling.servlet.selectors",value="query"),@Property(name="sling.servlet.prefix",intValue=-1,propertyPrivate=true)})
public class JsonQueryServlet
extends org.apache.sling.api.servlets.SlingSafeMethodsServlet
Modifier and Type | Field and Description |
---|---|
static String |
EXCERPT_PATH
exerpt lookup path
|
static String |
OFFSET
Result set offset
|
static String |
PROPERTY
property to append to the result
|
static String |
QUERY_TYPE
Query type
|
static String |
ROWS
Number of rows requested
|
static String |
STATEMENT
Search clause
|
static String |
TIDY |
Constructor and Description |
---|
JsonQueryServlet() |
Modifier and Type | Method and Description |
---|---|
protected void |
doGet(org.apache.sling.api.SlingHttpServletRequest req,
org.apache.sling.api.SlingHttpServletResponse resp) |
protected String |
getQueryType(org.apache.sling.api.SlingHttpServletRequest req)
Retrieve the query type from the request.
|
protected String |
getStatement(org.apache.sling.api.SlingHttpServletRequest req,
String queryType)
Retrieve the query statement from the request.
|
protected boolean |
isTidy(org.apache.sling.api.SlingHttpServletRequest req)
True if our request wants the "tidy" pretty-printed format
|
doGeneric, doHead, doOptions, doTrace, getAllowedRequestMethods, getServletInfo, handleMethodNotImplemented, mayService, service, service
public static final String STATEMENT
public static final String QUERY_TYPE
public static final String OFFSET
public static final String ROWS
public static final String PROPERTY
public static final String EXCERPT_PATH
public static final String TIDY
protected boolean isTidy(org.apache.sling.api.SlingHttpServletRequest req)
protected void doGet(org.apache.sling.api.SlingHttpServletRequest req, org.apache.sling.api.SlingHttpServletResponse resp) throws IOException
doGet
in class org.apache.sling.api.servlets.SlingSafeMethodsServlet
IOException
protected String getQueryType(org.apache.sling.api.SlingHttpServletRequest req)
req
- requestCopyright © 2007–2014 The Apache Software Foundation. All rights reserved.