Package org.apache.jackrabbit.webdav.client.methods

Examples of org.apache.jackrabbit.webdav.client.methods.PropFindMethod.checkSuccess()


    private DavPropertyNameSet doPropFindNames(String uri) throws Exception {
        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


    private DavPropertyNameSet doPropFindAll(String uri) throws Exception {
        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

    private DavPropertyNameSet doPropFindByProp(String uri, DavPropertyNameSet props) throws Exception {
        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

        String uri = getURI(p, sessionInfo);
        PropFindMethod method = null;
        try {
            method = new PropFindMethod(uri, LAZY_PROPERTY_NAME_SET, DavConstants.DEPTH_0);
            getClient(sessionInfo).executeMethod(method);
            method.checkSuccess();

            MultiStatusResponse[] responses = method.getResponseBodyAsMultiStatus().getResponses();
            if (responses.length != 1) {
                throw new ItemNotFoundException("Unable to retrieve the PropertyInfo. No such property " + uri);
            }
View Full Code Here

            method = new PropFindMethod(uri, nameSet, DEPTH_0);
            // TODO: not correct. pass tokens in order avoid new session to be created TOBEFIXED
            initMethod(method, sessionInfo, true);

            getClient(sessionInfo).executeMethod(method);
            method.checkSuccess();

            MultiStatusResponse[] responses = method.getResponseBodyAsMultiStatus().getResponses();
            if (responses.length != 1) {
                throw new ItemNotFoundException("Unable to retrieve the LockInfo. No such node " + saveGetIdString(nodeId, sessionInfo));
            }
View Full Code Here

            method = new PropFindMethod(uri, nameSet, DEPTH_0);
            // TODO: not correct. pass tokens in order avoid new session to be created TOBEFIXED
            initMethod(method, sessionInfo, true);

            getClient(sessionInfo).executeMethod(method);
            method.checkSuccess();

            MultiStatusResponse[] responses = method.getResponseBodyAsMultiStatus().getResponses();
            if (responses.length != 1) {
                throw new ItemNotFoundException("Unable to retrieve the LockInfo. No such node " + saveGetIdString(nodeId, sessionInfo));
            }
View Full Code Here

            method = new PropFindMethod(uri, nameSet, DEPTH_0);
            // TODO: not correct. pass tokens in order avoid new session to be created TOBEFIXED
            initMethod(method, sessionInfo, true);

            getClient(sessionInfo).executeMethod(method);
            method.checkSuccess();

            MultiStatusResponse[] responses = method.getResponseBodyAsMultiStatus().getResponses();
            if (responses.length != 1) {
                throw new ItemNotFoundException("Unable to retrieve the LockInfo. No such node " + saveGetIdString(nodeId, sessionInfo));
            }
View Full Code Here

            method = new PropFindMethod(uri, nameSet, DEPTH_0);
            // TODO: not correct. pass tokens in order avoid new session to be created TOBEFIXED
            initMethod(method, sessionInfo, true);

            getClient(sessionInfo).executeMethod(method);
            method.checkSuccess();

            MultiStatusResponse[] responses = method.getResponseBodyAsMultiStatus().getResponses();
            if (responses.length != 1) {
                throw new ItemNotFoundException("Unable to retrieve the LockInfo. No such node " + saveGetIdString(nodeId, sessionInfo));
            }
View Full Code Here

            method = new PropFindMethod(uri, nameSet, DEPTH_0);
            // TODO: not correct. pass tokens in order avoid new session to be created TOBEFIXED
            initMethod(method, sessionInfo, true);

            getClient(sessionInfo).executeMethod(method);
            method.checkSuccess();

            MultiStatusResponse[] responses = method.getResponseBodyAsMultiStatus().getResponses();
            if (responses.length != 1) {
                throw new ItemNotFoundException("Unable to retrieve the LockInfo. No such node " + saveGetIdString(nodeId, sessionInfo));
            }
View Full Code Here

            String uri = getItemUri(nodeId, sessionInfo);
            method = new PropFindMethod(uri, nameSet, DEPTH_0);
            initMethod(method, sessionInfo, false);

            getClient(sessionInfo).executeMethod(method);
            method.checkSuccess();

            MultiStatusResponse[] responses = method.getResponseBodyAsMultiStatus().getResponses();
            if (responses.length != 1) {
                throw new ItemNotFoundException("Unable to retrieve the LockInfo. No such node " + saveGetIdString(nodeId, sessionInfo));
            }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.