Package org.apache.wink.webdav.model

Examples of org.apache.wink.webdav.model.Propfind


    }

    public void testAllPropertyNames() throws Exception {

        // request
        Propfind propfind = new Propfind();
        propfind.setPropname(new Propname());
        Multistatus multistatus = propfind(propfind, WebDAVCollectionResource.PATH, -1);

        // responses - depth is 1 so we have 1 + number of entries
        Map<String, Response> responses = multistatus.getResponsesAsMapByHref();
        Assert.assertEquals(1 + WebDAVDocumentResource.ENTRY_NUMBER, responses.size());
View Full Code Here


    }

    public void testAllProperties() throws Exception {

        // request
        Propfind propfind = new Propfind();
        propfind.setAllprop(new Allprop());
        Multistatus multistatus = propfind(propfind, WebDAVCollectionResource.PATH, -1);

        // responses - depth is 1 so we have 1 + number of entries
        Map<String, Response> responses = multistatus.getResponsesAsMapByHref();
        Assert.assertEquals(1 + WebDAVDocumentResource.ENTRY_NUMBER, responses.size());
View Full Code Here

    }

    public void testNonExistingProperty() throws Exception {

        // request with depth 0
        Propfind propfind = new Propfind();
        QName propertyName = new QName("blah");
        Prop prop = new Prop();
        prop.setProperty(propertyName);
        propfind.setProp(prop);
        Multistatus multistatus = propfind(propfind, WebDAVCollectionResource.PATH, 0);

        // 1 response
        Map<String, Response> responses = multistatus.getResponsesAsMapByHref();
        Assert.assertEquals(1, responses.size());
View Full Code Here

    }

    public void testAllPropertyNames() throws Exception {

        // request
        Propfind propfind = new Propfind();
        propfind.setPropname(new Propname());
        Multistatus multistatus = propfind(propfind, "/", -1);

        // responses - depth is 1 so we have 2 ('/' and '/feed')
        Map<String, Response> responses = multistatus.getResponsesAsMapByHref();
        Assert.assertEquals(2, responses.size());
View Full Code Here

    }

    public void testAllProperties() throws Exception {

        // request
        Propfind propfind = new Propfind();
        propfind.setAllprop(new Allprop());
        Multistatus multistatus = propfind(propfind, "/", -1);

        // responses - depth is 1 so we have 2 ('/' and '/feed')
        Map<String, Response> responses = multistatus.getResponsesAsMapByHref();
        Assert.assertEquals(2, responses.size());
View Full Code Here

    }

    public void testNonExistingProperty() throws Exception {

        // request with depth 0
        Propfind propfind = new Propfind();
        QName propertyName = new QName("blah");
        Prop prop = new Prop();
        prop.setProperty(propertyName);
        propfind.setProp(prop);
        Multistatus multistatus = propfind(propfind, "/", 0);

        // 1 response - '/'
        Map<String, Response> responses = multistatus.getResponsesAsMapByHref();
        Assert.assertEquals(1, responses.size());
View Full Code Here

    }

    public void testAllPropertyNames() throws Exception {

        // request
        Propfind propfind = new Propfind();
        propfind.setPropname(new Propname());
        Multistatus multistatus = propfind(propfind, "/", -1);

        // responses - depth is 1 so we have 2 ('/' and '/feed')
        Map<String, Response> responses = multistatus.getResponsesAsMapByHref();
        Assert.assertEquals(2, responses.size());
View Full Code Here

    }

    public void testAllProperties() throws Exception {

        // request
        Propfind propfind = new Propfind();
        propfind.setAllprop(new Allprop());
        Multistatus multistatus = propfind(propfind, "/", -1);

        // responses - depth is 1 so we have 2 ('/' and '/feed')
        Map<String, Response> responses = multistatus.getResponsesAsMapByHref();
        Assert.assertEquals(2, responses.size());
View Full Code Here

    }

    public void testNonExistingProperty() throws Exception {

        // request with depth 0
        Propfind propfind = new Propfind();
        QName propertyName = new QName("blah");
        Prop prop = new Prop();
        prop.setProperty(propertyName);
        propfind.setProp(prop);
        Multistatus multistatus = propfind(propfind, "/", 0);

        // 1 response - '/'
        Map<String, Response> responses = multistatus.getResponsesAsMapByHref();
        Assert.assertEquals(1, responses.size());
View Full Code Here

     */
    public Response propfind(SyndEntry entry, String propfindXml, PropertyHandler handler)
        throws IOException {

        // parse the request (no content means 'all properties')
        Propfind propfind = null;
        if (propfindXml == null || propfindXml.length() == 0) {
            propfind = new Propfind();
            propfind.setAllprop(new Allprop());
        } else {
            propfind = Propfind.unmarshal(new StringReader(propfindXml));
        }

        // make the response
View Full Code Here

TOP

Related Classes of org.apache.wink.webdav.model.Propfind

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.