Package org.apache.wink.webdav.model

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


    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());

        // collection
        Response response = responses.get(WebDAVCollectionResource.PATH);
        Assert.assertNotNull(response);
        checkCollectionPropertyNames(response);

        // entries
        for (int i = 1; i <= WebDAVDocumentResource.ENTRY_NUMBER; i++) {
            String path = WebDAVCollectionResource.PATH + "/" + i;
            response = multistatus.getResponseByHref(path);
            Assert.assertNotNull(response);
            checkDocumentPropertyNames(response);
        }
    }
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());

        // collection
        Response response = responses.get(WebDAVCollectionResource.PATH);
        Assert.assertNotNull(response);
View Full Code Here

        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());
        Response response = responses.get(WebDAVCollectionResource.PATH);
        Assert.assertNotNull(response);
        List<Propstat> propstats = response.getPropstat();
        Assert.assertEquals(1, propstats.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());

        // '/'
        Response response = responses.get("/");
        Assert.assertNotNull(response);
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());

        // '/'
        Response response = responses.get("/");
        Assert.assertNotNull(response);
View Full Code Here

        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());
        Response response = responses.get("/");
        Assert.assertNotNull(response);
        Assert.assertEquals(1, response.getPropstat().size());
        Propstat propstat = response.getPropstat().get(0);
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());

        // '/'
        Response response = responses.get("/");
        Assert.assertNotNull(response);
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());

        // '/'
        Response response = responses.get("/");
        Assert.assertNotNull(response);
View Full Code Here

        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());
        Response response = responses.get("/");
        Assert.assertNotNull(response);
        Assert.assertEquals(1, response.getPropstat().size());
        Propstat propstat = response.getPropstat().get(0);
View Full Code Here

        } else {
            propfind = Propfind.unmarshal(new StringReader(propfindXml));
        }

        // make the response
        Multistatus multistatus = new Multistatus();

        // fill the multistatus object with the response
        addResponseToMultistatus(multistatus, propfind, entry, handler);

        // HTTP response
View Full Code Here

TOP

Related Classes of org.apache.wink.webdav.model.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.