Package com.googlecode.sardine.model

Examples of com.googlecode.sardine.model.Multistatus


    HttpPropFind entity = new HttpPropFind(url);
    entity.setDepth(Integer.toString(depth));
    Propfind body = new Propfind();
    body.setAllprop(new Allprop());
    entity.setEntity(new StringEntity(SardineUtil.toXml(body), UTF_8));
    Multistatus multistatus = this.execute(entity, new MultiStatusResponseHandler());
    List<Response> responses = multistatus.getResponse();
    List<DavResource> resources = new ArrayList<DavResource>(responses.size());
    for (Response response : responses)
    {
      try
      {
View Full Code Here


        any.add(element);
      }
      remove.setProp(prop);
    }
    entity.setEntity(new StringEntity(SardineUtil.toXml(body), UTF_8));
    Multistatus multistatus = this.execute(entity, new MultiStatusResponseHandler());
    List<Response> responses = multistatus.getResponse();
    List<DavResource> resources = new ArrayList<DavResource>(responses.size());
    for (Response response : responses)
    {
      try
      {
View Full Code Here

    prop.setOwner(new Owner());
    prop.setGroup(new Group());
    prop.setAcl(new Acl());
    body.setProp(prop);
    entity.setEntity(new StringEntity(SardineUtil.toXml(body), UTF_8));
    Multistatus multistatus = this.execute(entity, new MultiStatusResponseHandler());
    List<Response> responses = multistatus.getResponse();
    if (responses.isEmpty())
    {
      return null;
    }
    else
View Full Code Here

    prop.setDisplayname(new Displayname());
    prop.setResourcetype(new Resourcetype());
    prop.setPrincipalURL(new PrincipalURL());
    body.setProp(prop);
    entity.setEntity(new StringEntity(SardineUtil.toXml(body), UTF_8));
    Multistatus multistatus = this.execute(entity, new MultiStatusResponseHandler());
    List<Response> responses = multistatus.getResponse();
    if (responses.isEmpty())
    {
      return null;
    }
    else
View Full Code Here

    Propfind body = new Propfind();
    Prop prop = new Prop();
    prop.setPrincipalCollectionSet(new PrincipalCollectionSet());
    body.setProp(prop);
    entity.setEntity(new StringEntity(SardineUtil.toXml(body), UTF_8));
    Multistatus multistatus = this.execute(entity, new MultiStatusResponseHandler());
    List<Response> responses = multistatus.getResponse();
    if (responses.isEmpty())
    {
      return null;
    }
    else
View Full Code Here

        "<D:multistatus xmlns:D=\"DAV:\" xmlns:ns0=\"urn:uuid:c2f41010-65b3-11d1-a29f-00aa00c14882/\">" +
        "<D:response>" +
        "<D:href>http://server.local/dav/</D:href>" +
        "</D:response>" +
        "</D:multistatus>";
    final Multistatus status = handler.getMultistatus(new ByteArrayInputStream(response.getBytes()));
    assertNotNull(status);
    assertEquals(1, status.getResponse().size());
  }
View Full Code Here

        "   <d:status>HTTP/1.1 200 OK</d:status>" +
        "  </d:propstat>" +
        " </d:response>" +
        "</d:multistatus>";
    MultiStatusResponseHandler handler = new MultiStatusResponseHandler();
    Multistatus status = handler.getMultistatus(new ByteArrayInputStream(response.getBytes()));
    assertNotNull(status);
    assertEquals(2, status.getResponse().size());
    for (Response r : status.getResponse())
    {
      assertNotNull(r.getPropstat());
      assertFalse(r.getPropstat().isEmpty());
      assertTrue(new DavResource(r).isDirectory());
    }
View Full Code Here

        "   </D:prop>" +
        "   <D:status>HTTP/1.1 200 OK</D:status>" +
        "  </D:propstat>" +
        " </D:response>" +
        "</D:multistatus>";
    final Multistatus status = handler.getMultistatus(new ByteArrayInputStream(response.getBytes()));
    assertNotNull(status);
    assertEquals(12, status.getResponse().size());
  }
View Full Code Here

            "</d:multistatus>"
    };
    for (String response : responses)
    {
      MultiStatusResponseHandler handler = new MultiStatusResponseHandler();
      Multistatus status = handler.getMultistatus(new ByteArrayInputStream(response.getBytes()));
      assertNotNull(status);
      assertEquals(1, status.getResponse().size());
      Response r = status.getResponse().get(0);
      assertNotNull(r.getPropstat());
      assertFalse(r.getPropstat().isEmpty());
      DavAcl davAcl = new DavAcl(r);
      assertNotNull("Query should give a owner name " + response, davAcl.getOwner());
      assertEquals("Query should give us group name", "/group/somegroup", davAcl.getGroup());
View Full Code Here

TOP

Related Classes of com.googlecode.sardine.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.