org.apache.sling.servlets.get.impl.helpers
Class PlainTextRendererServlet

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

public class PlainTextRendererServlet
extends SlingSafeMethodsServlet

The PlainTextRendererServlet renders the current resource in plain text on behalf of the DefaultGetServlet.

See Also:
Serialized Form

Field Summary
static String EXT_TXT
           
 
Constructor Summary
PlainTextRendererServlet()
           
 
Method Summary
protected  void doGet(SlingHttpServletRequest req, SlingHttpServletResponse resp)
          Called by the SlingSafeMethodsServlet.mayService(SlingHttpServletRequest, SlingHttpServletResponse) method to handle an HTTP GET request.
protected  void dump(PrintWriter pw, Resource r, Map map)
          Render synthetic resource
protected  void printPropertyValue(PrintWriter pw, String name, Object value, boolean includeName)
           
 
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
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

EXT_TXT

public static final String EXT_TXT
See Also:
Constant Field Values
Constructor Detail

PlainTextRendererServlet

public PlainTextRendererServlet()
Method Detail

doGet

protected void doGet(SlingHttpServletRequest req,
                     SlingHttpServletResponse resp)
              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:
req - The HTTP request
resp - The HTTP response
Throws:
javax.servlet.ServletException - Not thrown by this implementation.
IOException - If the error status cannot be reported back to the client.

dump

protected void dump(PrintWriter pw,
                    Resource r,
                    Map map)
Render synthetic resource


printPropertyValue

protected void printPropertyValue(PrintWriter pw,
                                  String name,
                                  Object value,
                                  boolean includeName)


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