org.apache.sling.servlets.post.impl
Class SlingPostServlet

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 org.apache.sling.servlets.post.impl.SlingPostServlet
All Implemented Interfaces:
Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

public class SlingPostServlet
extends SlingAllMethodsServlet

POST servlet that implements the sling client library "protocol"

See Also:
Serialized Form

Constructor Summary
SlingPostServlet()
           
 
Method Summary
protected  void activate(org.osgi.service.component.ComponentContext context)
           
protected  void bindContentImporter(ContentImporter importer)
           
protected  void bindNodeNameGenerator(org.osgi.framework.ServiceReference ref)
           
protected  void bindPostOperation(org.osgi.framework.ServiceReference ref)
           
protected  void bindPostProcessor(org.osgi.framework.ServiceReference ref)
           
protected  void deactivate(org.osgi.service.component.ComponentContext context)
           
 void destroy()
           
protected  void doPost(SlingHttpServletRequest request, SlingHttpServletResponse response)
          Called by the SlingAllMethodsServlet.mayService(SlingHttpServletRequest, SlingHttpServletResponse) method to handle an HTTP POST request.
protected  String getRedirectUrl(javax.servlet.http.HttpServletRequest request, HtmlResponse ctx)
          compute redirect URL (SLING-126)
 void init()
           
protected  boolean isSetStatus(SlingHttpServletRequest request)
           
protected  void registerNodeNameGenerator(org.osgi.framework.ServiceReference ref)
           
protected  void registerPostOperation(org.osgi.framework.ServiceReference ref)
           
protected  void registerPostProcessor(org.osgi.framework.ServiceReference ref)
           
protected  void unbindContentImporter(ContentImporter importer)
           
protected  void unbindNodeNameGenerator(org.osgi.framework.ServiceReference ref)
           
protected  void unbindPostOperation(org.osgi.framework.ServiceReference ref)
           
protected  void unbindPostProcessor(org.osgi.framework.ServiceReference ref)
           
 
Methods inherited from class org.apache.sling.api.servlets.SlingAllMethodsServlet
doDelete, doPut, getAllowedRequestMethods, isMethodValid, mayService
 
Methods inherited from class org.apache.sling.api.servlets.SlingSafeMethodsServlet
doGeneric, doGet, doHead, doOptions, doTrace, getServletInfo, handleMethodNotImplemented, 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
 

Constructor Detail

SlingPostServlet

public SlingPostServlet()
Method Detail

init

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

destroy

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

doPost

protected void doPost(SlingHttpServletRequest request,
                      SlingHttpServletResponse response)
               throws IOException
Description copied from class: SlingAllMethodsServlet
Called by the SlingAllMethodsServlet.mayService(SlingHttpServletRequest, SlingHttpServletResponse) method to handle an HTTP POST 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 POST method support.

Overrides:
doPost in class SlingAllMethodsServlet
Parameters:
request - The HTTP request
response - The HTTP response
Throws:
IOException - If the error status cannot be reported back to the client.

getRedirectUrl

protected String getRedirectUrl(javax.servlet.http.HttpServletRequest request,
                                HtmlResponse ctx)
compute redirect URL (SLING-126)

Parameters:
ctx - the post processor
Returns:
the redirect location or null

isSetStatus

protected boolean isSetStatus(SlingHttpServletRequest request)

activate

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

deactivate

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

bindPostOperation

protected void bindPostOperation(org.osgi.framework.ServiceReference ref)

registerPostOperation

protected void registerPostOperation(org.osgi.framework.ServiceReference ref)

unbindPostOperation

protected void unbindPostOperation(org.osgi.framework.ServiceReference ref)

bindPostProcessor

protected void bindPostProcessor(org.osgi.framework.ServiceReference ref)

unbindPostProcessor

protected void unbindPostProcessor(org.osgi.framework.ServiceReference ref)

registerPostProcessor

protected void registerPostProcessor(org.osgi.framework.ServiceReference ref)

bindNodeNameGenerator

protected void bindNodeNameGenerator(org.osgi.framework.ServiceReference ref)

unbindNodeNameGenerator

protected void unbindNodeNameGenerator(org.osgi.framework.ServiceReference ref)

registerNodeNameGenerator

protected void registerNodeNameGenerator(org.osgi.framework.ServiceReference ref)

bindContentImporter

protected void bindContentImporter(ContentImporter importer)

unbindContentImporter

protected void unbindContentImporter(ContentImporter importer)


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