Package org.apache.jackrabbit.webdav

Examples of org.apache.jackrabbit.webdav.MultiStatus


            String uuid = DomUtil.getTextTrim(hrefElem);
            DavResourceLocator resourceLoc = resource.getLocator();
            Node n = getRepositorySession().getNodeByUUID(uuid);
            DavResourceLocator loc = resourceLoc.getFactory().createResourceLocator(resourceLoc.getPrefix(), resourceLoc.getWorkspacePath(), n.getPath(), false);
            DavResource locatedResource = resource.getFactory().createResource(loc, resource.getSession());
            ms = new MultiStatus();
            ms.addResourceProperties(locatedResource, info.getPropertyNameSet(), info.getDepth());
        } catch (RepositoryException e) {
            throw new JcrDavException(e);
        }
    }
View Full Code Here


            method = new SearchMethod(uri, sInfo);
            getClient(sessionInfo).executeMethod(method);
            method.checkSuccess();

            MultiStatus ms = method.getResponseBodyAsMultiStatus();
            NamePathResolver resolver = getNamePathResolver(sessionInfo);
            return new QueryInfoImpl(ms, idFactory, resolver, valueFactory, getQValueFactory());
        } catch (IOException e) {
            throw new RepositoryException(e);
        } catch (DavException e) {
View Full Code Here

                        String wspUri = getWorkspaceUri(workspaceName);
                        rm = new ReportMethod(wspUri, rInfo);

                        service.getClient(sessionInfo).executeMethod(rm);

                        MultiStatus ms = rm.getResponseBodyAsMultiStatus();
                        if (ms.getResponses().length == 1) {
                            uriBuffer.append(ms.getResponses()[0].getHref());
                            cache.add(ms.getResponses()[0].getHref(), uuidId);
                        } else {
                            throw new ItemNotFoundException("Cannot identify item with uniqueID " + uniqueID);
                        }

                    } catch (IOException e) {
View Full Code Here

            names.add(DeltaVConstants.COMMENT);
            PropFindMethod propfind = new PropFindMethod(testuri, DavConstants.PROPFIND_ALL_PROP_INCLUDE, names, 0);
            status = client.executeMethod(propfind);
            assertEquals(207, status);

            MultiStatus multistatus = propfind.getResponseBodyAsMultiStatus();
            MultiStatusResponse[] responses = multistatus.getResponses();
            assertEquals(1, responses.length);

            MultiStatusResponse response = responses[0];
            DavPropertySet found = response.getProperties(200);
            DavPropertySet notfound = response.getProperties(404);
View Full Code Here

            method = new SearchMethod(uri, sInfo);
            getClient(sessionInfo).executeMethod(method);
            method.checkSuccess();

            MultiStatus ms = method.getResponseBodyAsMultiStatus();
            NamePathResolver resolver = getNamePathResolver(sessionInfo);
            return new QueryInfoImpl(ms, idFactory, resolver, valueFactory, getQValueFactory());
        } catch (IOException e) {
            throw new RepositoryException(e);
        } catch (DavException e) {
View Full Code Here

    private MultiStatus getMultiStatus() {
        if (info == null || resource == null) {
            throw new NullPointerException("Error while running DAV:version-tree report");
        }

        MultiStatus ms = new MultiStatus();
        buildResponse(resource, info.getPropertyNameSet(), info.getDepth(), ms);
        return ms;
    }
View Full Code Here

     *
     * @return
     * @throws NullPointerException if info and resource have not been set.
     */
    private MultiStatus getMultiStatus() {
        MultiStatus ms = new MultiStatus();
        addResponses(resource, info.getDepth(), ms);
        return ms;
    }
View Full Code Here

     *
     * @return
     * @throws NullPointerException if info or resource is <code>null</code>.
     */
    private MultiStatus getMultiStatus() {
        MultiStatus ms = new MultiStatus();
        buildResponse(resource, info.getPropertyNameSet(), info.getDepth(), ms);
        return ms;
    }
View Full Code Here

        int depth = request.getDepth(DEPTH_INFINITY);
        DavPropertyNameSet requestProperties = request.getPropFindProperties();
        int propfindType = request.getPropFindType();

        MultiStatus mstatus = new MultiStatus();
        mstatus.addResourceProperties(resource, requestProperties, propfindType, depth);
        response.sendMultiStatus(mstatus);
    }
View Full Code Here

        if (setProperties.isEmpty() && removeProperties.isEmpty()) {
            response.sendError(DavServletResponse.SC_BAD_REQUEST);
            return;
        }

        MultiStatus ms = new MultiStatus();
        try {
            MultiStatusResponse msr = resource.alterProperties(setProperties, removeProperties);
            ms.addResponse(msr);
        } catch (DavException e) {
            /* NOTE: known bug with litmus, which expects the exception (e.g. 423)
               to the set instead of the MultiStatus Code. RFC 2518 explicitely
               expects the errors to be included in the multistatus.
               Remove the catch if this turns out to be an problem with clients
               in general. */
            ms.addResourceStatus(resource, e.getErrorCode(), DEPTH_0);
        }
        response.sendMultiStatus(ms);
    }
View Full Code Here

TOP

Related Classes of org.apache.jackrabbit.webdav.MultiStatus

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.