Package org.apache.jackrabbit.webdav

Examples of org.apache.jackrabbit.webdav.MultiStatus


                    Namespace.EMPTY_NAMESPACE, statement, namespaces);
            method = new SearchMethod(uri, sInfo);
            getClient(sessionInfo).executeMethod(method);
            method.checkSuccess();

            MultiStatus ms = method.getResponseBodyAsMultiStatus();
            NamePathResolver resolver = getNamePathResolver(sessionInfo);
            return new QueryInfoImpl(ms, sessionInfo, uriResolver, resolver, valueFactory, getQValueFactory());
        } catch (IOException e) {
            throw new RepositoryException(e);
        } catch (DavException 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, sessionInfo, uriResolver, resolver, valueFactory, getQValueFactory());
        } catch (IOException e) {
            throw new RepositoryException(e);
        } catch (DavException e) {
View Full Code Here

     * Webdav compatible form.
     * @throws RepositoryException
     */
    private MultiStatus queryResultToMultiStatus(QueryResult qResult)
            throws RepositoryException {
        MultiStatus ms = new MultiStatus();

        String[] columnNames = qResult.getColumnNames();
        StringBuffer responseDescription = new StringBuffer();
        String delim = "";
        for (int i = 0; i < columnNames.length; i++) {
            responseDescription.append(delim);
            responseDescription.append(ISO9075.encode(columnNames[i]));
            delim = " ";
        }
        ms.setResponseDescription(responseDescription.toString());

        RowIterator rowIter = qResult.getRows();
        while (rowIter.hasNext()) {
            Row row = rowIter.nextRow();
            Value[] values = row.getValues();

            // get the jcr:path column indicating the node path and build
            // a webdav compliant resource path of it.
            String itemPath = row.getValue(JcrConstants.JCR_PATH).getString();
            // create a new ms-response for this row of the result set
            DavResourceLocator loc = locator.getFactory().createResourceLocator(locator.getPrefix(), locator.getWorkspacePath(), itemPath, false);
            String href = loc.getHref(true);
            MultiStatusResponse resp = new MultiStatusResponse(href, null);
            // build the s-r-property
            SearchResultProperty srp = new SearchResultProperty(columnNames, values);
            resp.add(srp);
            ms.addResponse(resp);
        }
        return ms;
    }
View Full Code Here

                    Namespace.EMPTY_NAMESPACE, statement, namespaces);
            method = new SearchMethod(uri, sInfo);
            getClient(sessionInfo).executeMethod(method);
            method.checkSuccess();

            MultiStatus ms = method.getResponseBodyAsMultiStatus();
            NamePathResolver resolver = getNamePathResolver(sessionInfo);
            return new QueryInfoImpl(ms, sessionInfo, uriResolver, resolver, valueFactory, getQValueFactory());
        } catch (IOException e) {
            throw new RepositoryException(e);
        } catch (DavException 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

        PropFindMethod method = new PropFindMethod(uri, DavConstants.PROPFIND_PROPERTY_NAMES, DavConstants.DEPTH_0);
        HttpClient cl = rs.getClient(si);
        cl.executeMethod(method);
        method.checkSuccess();

        MultiStatus ms = method.getResponseBodyAsMultiStatus();
        assertEquals(1, ms.getResponses().length);
        return ms.getResponses()[0].getPropertyNames(HttpStatus.SC_OK);
    }
View Full Code Here

        PropFindMethod method = new PropFindMethod(uri, DavConstants.PROPFIND_ALL_PROP, DavConstants.DEPTH_0);
        HttpClient cl = rs.getClient(si);
        cl.executeMethod(method);
        method.checkSuccess();

        MultiStatus ms = method.getResponseBodyAsMultiStatus();
        assertEquals(1, ms.getResponses().length);
        return ms.getResponses()[0].getPropertyNames(HttpStatus.SC_OK);
    }
View Full Code Here

        PropFindMethod method = new PropFindMethod(uri, DavConstants.PROPFIND_BY_PROPERTY, props, DavConstants.DEPTH_0);
        HttpClient cl = rs.getClient(si);
        cl.executeMethod(method);
        method.checkSuccess();

        MultiStatus ms = method.getResponseBodyAsMultiStatus();
        assertEquals(1, ms.getResponses().length);
        return ms.getResponses()[0].getPropertyNames(HttpStatus.SC_OK);
    }
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 (changeList.isEmpty()) {
            response.sendError(DavServletResponse.SC_BAD_REQUEST);
            return;
        }

        MultiStatus ms = new MultiStatus();
        MultiStatusResponse msr = resource.alterProperties(changeList);
        ms.addResponse(msr);
        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.