org.apache.sling.servlets.get.impl
Class DefaultGetServlet

java.lang.Object
  extended by javax.servlet.GenericServlet
      extended by org.apache.sling.api.servlets.SlingSafeMethodsServlet
          extended by org.apache.sling.servlets.get.impl.DefaultGetServlet
All Implemented Interfaces:
Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

public class DefaultGetServlet
extends SlingSafeMethodsServlet

A SlingSafeMethodsServlet that renders the current Resource as simple HTML

See Also:
Serialized Form

Field Summary
static int DEFAULT_JSON_RENDERER_MAXIMUM_RESULTS
          Default value for the maximum amount of results that should be returned by the jsonResourceWriter
static String JSON_RENDERER_MAXIMUM_RESULTS_PROPERTY
           
 
Constructor Summary
DefaultGetServlet()
           
 
Method Summary
protected  void activate(org.osgi.service.component.ComponentContext ctx)
           
protected  void deactivate(org.osgi.service.component.ComponentContext ctx)
           
 void destroy()
           
protected  void doGet(SlingHttpServletRequest request, SlingHttpServletResponse response)
          Called by the SlingSafeMethodsServlet.mayService(SlingHttpServletRequest, SlingHttpServletResponse) method to handle an HTTP GET request.
 void init()
           
 
Methods inherited from class org.apache.sling.api.servlets.SlingSafeMethodsServlet
doGeneric, doHead, doOptions, doTrace, getAllowedRequestMethods, getServletInfo, handleMethodNotImplemented, mayService, service, service
 
Methods inherited from class javax.servlet.GenericServlet
getInitParameter, getInitParameterNames, getServletConfig, getServletContext, init, log, log
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

JSON_RENDERER_MAXIMUM_RESULTS_PROPERTY

public static final String JSON_RENDERER_MAXIMUM_RESULTS_PROPERTY
See Also:
Constant Field Values

DEFAULT_JSON_RENDERER_MAXIMUM_RESULTS

public static final int DEFAULT_JSON_RENDERER_MAXIMUM_RESULTS
Default value for the maximum amount of results that should be returned by the jsonResourceWriter

See Also:
Constant Field Values
Constructor Detail

DefaultGetServlet

public DefaultGetServlet()
Method Detail

activate

protected void activate(org.osgi.service.component.ComponentContext ctx)

deactivate

protected void deactivate(org.osgi.service.component.ComponentContext ctx)

init

public void init()
          throws javax.servlet.ServletException
Overrides:
init in class javax.servlet.GenericServlet
Throws:
javax.servlet.ServletException

doGet

protected void doGet(SlingHttpServletRequest request,
                     SlingHttpServletResponse response)
              throws javax.servlet.ServletException,
                     IOException
Description copied from class: SlingSafeMethodsServlet
Called by the SlingSafeMethodsServlet.mayService(SlingHttpServletRequest, SlingHttpServletResponse) method to handle an HTTP GET request.

This default implementation reports back to the client that the method is not supported.

Implementations of this class should overwrite this method with their implementation for the HTTP GET method support.

Overrides:
doGet in class SlingSafeMethodsServlet
Parameters:
request - The HTTP request
response - The HTTP response
Throws:
ResourceNotFoundException - if the resource of the request is a non existing resource.
javax.servlet.ServletException - Not thrown by this implementation.
IOException - If the error status cannot be reported back to the client.

destroy

public void destroy()
Specified by:
destroy in interface javax.servlet.Servlet
Overrides:
destroy in class javax.servlet.GenericServlet


Copyright © 2007-2013 The Apache Software Foundation. All Rights Reserved.