Search in sources :

Example 1 with SlingResourceConfig

use of org.apache.sling.jcr.webdav.impl.helper.SlingResourceConfig in project sling by apache.

the class SlingWebDavServlet method activate.

// ---------- SCR integration
protected void activate(ComponentContext context) throws NamespaceException, ServletException {
    this.ioManager.setComponentContext(context);
    this.propertyManager.setComponentContext(context);
    this.copyMoveManager.setComponentContext(context);
    this.deleteManager.setComponentContext(context);
    resourceConfig = new SlingResourceConfig(mimeTypeService, context.getProperties(), ioManager, propertyManager, copyMoveManager, deleteManager);
    // Register servlet, and set the contextPath field to signal successful
    // registration
    Servlet simpleServlet = new SlingSimpleWebDavServlet(resourceConfig, getRepository());
    httpService.registerServlet(resourceConfig.getServletContextPath(), simpleServlet, resourceConfig.getServletInitParams(), null);
    simpleWebDavServletRegistered = true;
}
Also used : SimpleWebdavServlet(org.apache.jackrabbit.webdav.simple.SimpleWebdavServlet) Servlet(javax.servlet.Servlet) SlingResourceConfig(org.apache.sling.jcr.webdav.impl.helper.SlingResourceConfig)

Aggregations

Servlet (javax.servlet.Servlet)1 SimpleWebdavServlet (org.apache.jackrabbit.webdav.simple.SimpleWebdavServlet)1 SlingResourceConfig (org.apache.sling.jcr.webdav.impl.helper.SlingResourceConfig)1