Search in sources :

Example 1 with ContentManager

use of org.polymap.service.fs.ContentManager in project polymap4-core by Polymap4.

the class WebDavResourceFactory method getResource.

public Resource getResource(String host, String path) {
    Request request = WebDavServer.request();
    assert request != null;
    ContentManager contentManager = (ContentManager) SessionContext.current().getAttribute("contentManager");
    // get content
    path = StringUtils.substringAfter(path, contextPath);
    IContentNode node = contentManager.getNode(contentManager.parsePath(path));
    return node != null ? wrapContentNode(node, contentManager, securityManager) : null;
}
Also used : Request(io.milton.http.Request) ContentManager(org.polymap.service.fs.ContentManager) IContentNode(org.polymap.service.fs.spi.IContentNode)

Aggregations

Request (io.milton.http.Request)1 ContentManager (org.polymap.service.fs.ContentManager)1 IContentNode (org.polymap.service.fs.spi.IContentNode)1