@Service
public class MvcServlet
extends org.apache.sling.api.servlets.SlingAllMethodsServlet
mvc contexts. The first
responsible context wins.
If no context is responsible, a 404 response is returned.Enables
and disables MVC capabilities in bundles
via the injection of the MvcContext into the bean factories
of the bundles.MvcContext,
Serialized Form| Constructor and Description |
|---|
MvcServlet() |
| Modifier and Type | Method and Description |
|---|---|
protected MvcContext |
createMvcContext(org.springframework.beans.factory.config.ConfigurableListableBeanFactory factory) |
void |
disableMvc(org.osgi.framework.Bundle bundle)
Removes the
MvcContext associated with the given bundle, if any. |
protected void |
doDelete(org.apache.sling.api.SlingHttpServletRequest request,
org.apache.sling.api.SlingHttpServletResponse response) |
protected void |
doGet(org.apache.sling.api.SlingHttpServletRequest request,
org.apache.sling.api.SlingHttpServletResponse response) |
protected void |
doHead(org.apache.sling.api.SlingHttpServletRequest request,
org.apache.sling.api.SlingHttpServletResponse response) |
protected void |
doOptions(org.apache.sling.api.SlingHttpServletRequest request,
org.apache.sling.api.SlingHttpServletResponse response) |
protected void |
doPost(org.apache.sling.api.SlingHttpServletRequest request,
org.apache.sling.api.SlingHttpServletResponse response) |
protected void |
doPut(org.apache.sling.api.SlingHttpServletRequest request,
org.apache.sling.api.SlingHttpServletResponse response) |
protected void |
doTrace(org.apache.sling.api.SlingHttpServletRequest request,
org.apache.sling.api.SlingHttpServletResponse response) |
void |
enableMvc(org.springframework.beans.factory.config.ConfigurableListableBeanFactory factory,
org.osgi.framework.BundleContext context)
Enables MVC capabilities in the given factory by injecting a
MvcContext singleton. |
protected void |
handle(org.apache.sling.api.SlingHttpServletRequest request,
org.apache.sling.api.SlingHttpServletResponse response) |
getAllowedRequestMethods, isMethodValid, mayServicedoGeneric, getServletInfo, handleMethodNotImplemented, service, servicepublic void enableMvc(org.springframework.beans.factory.config.ConfigurableListableBeanFactory factory,
org.osgi.framework.BundleContext context)
MvcContext singleton.factory - must not be null.context - must not be null.public void disableMvc(org.osgi.framework.Bundle bundle)
MvcContext associated with the given bundle, if any.bundle - must not be null.protected void doPost(org.apache.sling.api.SlingHttpServletRequest request,
org.apache.sling.api.SlingHttpServletResponse response)
throws javax.servlet.ServletException,
IOException
doPost in class org.apache.sling.api.servlets.SlingAllMethodsServletjavax.servlet.ServletExceptionIOExceptionprotected void doPut(org.apache.sling.api.SlingHttpServletRequest request,
org.apache.sling.api.SlingHttpServletResponse response)
throws javax.servlet.ServletException,
IOException
doPut in class org.apache.sling.api.servlets.SlingAllMethodsServletjavax.servlet.ServletExceptionIOExceptionprotected void doDelete(org.apache.sling.api.SlingHttpServletRequest request,
org.apache.sling.api.SlingHttpServletResponse response)
throws javax.servlet.ServletException,
IOException
doDelete in class org.apache.sling.api.servlets.SlingAllMethodsServletjavax.servlet.ServletExceptionIOExceptionprotected void doHead(org.apache.sling.api.SlingHttpServletRequest request,
org.apache.sling.api.SlingHttpServletResponse response)
throws javax.servlet.ServletException,
IOException
doHead in class org.apache.sling.api.servlets.SlingSafeMethodsServletjavax.servlet.ServletExceptionIOExceptionprotected void doGet(org.apache.sling.api.SlingHttpServletRequest request,
org.apache.sling.api.SlingHttpServletResponse response)
throws javax.servlet.ServletException,
IOException
doGet in class org.apache.sling.api.servlets.SlingSafeMethodsServletjavax.servlet.ServletExceptionIOExceptionprotected void doOptions(org.apache.sling.api.SlingHttpServletRequest request,
org.apache.sling.api.SlingHttpServletResponse response)
throws javax.servlet.ServletException,
IOException
doOptions in class org.apache.sling.api.servlets.SlingSafeMethodsServletjavax.servlet.ServletExceptionIOExceptionprotected void doTrace(org.apache.sling.api.SlingHttpServletRequest request,
org.apache.sling.api.SlingHttpServletResponse response)
throws javax.servlet.ServletException,
IOException
doTrace in class org.apache.sling.api.servlets.SlingSafeMethodsServletjavax.servlet.ServletExceptionIOExceptionprotected void handle(org.apache.sling.api.SlingHttpServletRequest request,
org.apache.sling.api.SlingHttpServletResponse response)
throws javax.servlet.ServletException,
IOException
javax.servlet.ServletExceptionIOExceptionprotected MvcContext createMvcContext(org.springframework.beans.factory.config.ConfigurableListableBeanFactory factory)
Copyright © 2014–2015. All rights reserved.