com.day.cq.wcm.core.contentfinder
Class DefaultSuggestionHandler

java.lang.Object
  extended by javax.servlet.GenericServlet
      extended by org.apache.sling.api.servlets.SlingSafeMethodsServlet
          extended by org.apache.sling.api.servlets.SlingAllMethodsServlet
              extended by com.day.cq.commons.servlets.AbstractPredicateServlet
                  extended by com.day.cq.wcm.core.contentfinder.DefaultSuggestionHandler
All Implemented Interfaces:
Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

public class DefaultSuggestionHandler
extends AbstractPredicateServlet

Servlet that returns search results for a given gql statement.

example statement:'path:/content type:"cq:Page" About'

or url params:/bin/wcm/search/gql.json?query='path:/content type:"cq:Page" About'&pathPrefix=jcr:content

See Also:
Serialized Form

Field Summary
static String COMMON_PATH_PREFIX
          Common path prefix
static String DEFAULT_NODE_TYPE
          Default node type
static String DEFAULT_START_PATH
          default start path
static String POST
          post (query after "term")
static String PRE
          pre (query before "term")
static String QUERY
          Query clause
protected  String startPath
          start path
static String TAG_ROOT_PATH
          tag root
static String TERM
          term
 
Fields inherited from class com.day.cq.commons.servlets.AbstractPredicateServlet
FILTER_PARAM, PATH_PARAM, PREDICATE_PARAM
 
Constructor Summary
DefaultSuggestionHandler()
           
 
Method Summary
protected  void doGet(org.apache.sling.api.SlingHttpServletRequest request, org.apache.sling.api.SlingHttpServletResponse response, org.apache.commons.collections.Predicate predicate)
          Handles the HTTP GET method
 
Methods inherited from class com.day.cq.commons.servlets.AbstractPredicateServlet
doGet, getPredicate, selectorPredicateStart
 
Methods inherited from class org.apache.sling.api.servlets.SlingAllMethodsServlet
doDelete, doPost, doPut, getAllowedRequestMethods, isMethodValid, mayService
 
Methods inherited from class org.apache.sling.api.servlets.SlingSafeMethodsServlet
doGeneric, doHead, doOptions, doTrace, getServletInfo, handleMethodNotImplemented, service, service
 
Methods inherited from class javax.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, init, init, log, log
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

QUERY

public static final String QUERY
Query clause

See Also:
Constant Field Values

COMMON_PATH_PREFIX

public static final String COMMON_PATH_PREFIX
Common path prefix

See Also:
Constant Field Values

DEFAULT_NODE_TYPE

public static final String DEFAULT_NODE_TYPE
Default node type

See Also:
Constant Field Values

TERM

public static final String TERM
term

See Also:
Constant Field Values

PRE

public static final String PRE
pre (query before "term")

See Also:
Constant Field Values

POST

public static final String POST
post (query after "term")

See Also:
Constant Field Values

DEFAULT_START_PATH

public static final String DEFAULT_START_PATH
default start path

See Also:
Constant Field Values

TAG_ROOT_PATH

public static final String TAG_ROOT_PATH
tag root

See Also:
Constant Field Values

startPath

protected String startPath
start path

Constructor Detail

DefaultSuggestionHandler

public DefaultSuggestionHandler()
Method Detail

doGet

protected void doGet(org.apache.sling.api.SlingHttpServletRequest request,
                     org.apache.sling.api.SlingHttpServletResponse response,
                     org.apache.commons.collections.Predicate predicate)
              throws javax.servlet.ServletException,
                     IOException
Description copied from class: AbstractPredicateServlet
Handles the HTTP GET method

Overrides:
doGet in class AbstractPredicateServlet
Parameters:
request - The HTTP request
response - The HTTP response
predicate - the predicate retrieved from the request
Throws:
javax.servlet.ServletException - if a servlet error occurs
IOException - if an I/O error occurs


Copyright © 2008 Day Management AG. All Rights Reserved.