Examples of Propfind


Examples of com.adito.vfs.webdav.methods.PROPFIND

        this.methods.put("GET", new GET());
        this.methods.put("HEAD", new HEAD());
        this.methods.put("MKCOL", new MKCOL());
        this.methods.put("MOVE", new MOVE());
        this.methods.put("OPTIONS", new OPTIONS());
        this.methods.put("PROPFIND", new PROPFIND());
        this.methods.put("PROPPATCH", new PROPPATCH());
        this.methods.put("PUT", new PUT());
        this.methods.put("COPY", new COPY());

        Map.Entry entry;
View Full Code Here

Examples of com.github.sardine.model.Propfind

    @Override
    public List<DavResource> list(String url, int depth, boolean allProp) throws IOException
    {
        if (allProp) {
            Propfind body = new Propfind();
            body.setAllprop(new Allprop());
            return list(url, depth, body);
        } else {
            return list(url, depth, Collections.<QName>emptySet());
        }
    }
View Full Code Here

Examples of com.github.sardine.model.Propfind

    }

    @Override
    public List<DavResource> list(String url, int depth, java.util.Set<QName> props) throws IOException
    {
        Propfind body = new Propfind();
        Prop prop = new Prop();
        ObjectFactory objectFactory = new ObjectFactory();
        prop.setGetcontentlength(objectFactory.createGetcontentlength());
        prop.setGetlastmodified(objectFactory.createGetlastmodified());
        prop.setCreationdate(objectFactory.createCreationdate());
        prop.setDisplayname(objectFactory.createDisplayname());
        prop.setGetcontenttype(objectFactory.createGetcontenttype());
        prop.setResourcetype(objectFactory.createResourcetype());
        prop.setGetetag(objectFactory.createGetetag());
        List<Element> any = prop.getAny();
        for (QName entry : props) {
            Element element = SardineUtil.createElement(entry);
            any.add(element);
        }
        body.setProp(prop);
        return list(url, depth, body);
    }
View Full Code Here

Examples of com.github.sardine.model.Propfind

  @Override
  public DavAcl getAcl(String url) throws IOException
  {
    HttpPropFind entity = new HttpPropFind(url);
    entity.setDepth("0");
    Propfind body = new Propfind();
    Prop prop = new Prop();
    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())
    {
View Full Code Here

Examples of com.github.sardine.model.Propfind

  @Override
  public DavQuota getQuota(String url) throws IOException
  {
    HttpPropFind entity = new HttpPropFind(url);
    entity.setDepth("0");
    Propfind body = new Propfind();
    Prop prop = new Prop();
    prop.setQuotaAvailableBytes(new QuotaAvailableBytes());
    prop.setQuotaUsedBytes(new QuotaUsedBytes());
    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())
    {
View Full Code Here

Examples of com.github.sardine.model.Propfind

  @Override
  public List<DavPrincipal> getPrincipals(String url) throws IOException
  {
    HttpPropFind entity = new HttpPropFind(url);
    entity.setDepth("1");
    Propfind body = new Propfind();
    Prop prop = new Prop();
    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())
    {
View Full Code Here

Examples of com.github.sardine.model.Propfind

  @Override
  public List<String> getPrincipalCollectionSet(String url) throws IOException
  {
    HttpPropFind entity = new HttpPropFind(url);
    entity.setDepth("0");
    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())
    {
View Full Code Here

Examples of com.github.sardine.model.Propfind

  }

  @Test
  public void createPropfindXml() throws Exception
  {
    Propfind body = new Propfind();
    body.setAllprop(new Allprop());
    String xml = SardineUtil.toXml(body);
    checkXmlDeclaration(xml);
    assertThat(xml, containsString("propfind>"));
    assertThat(xml, containsString("allprop/>"));
  }
View Full Code Here

Examples of com.googlecode.sardine.model.Propfind

  @Override
  public List<DavResource> list(String url, int depth) throws IOException
  {
    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)
View Full Code Here

Examples of com.googlecode.sardine.model.Propfind

  @Override
  public DavAcl getAcl(String url) throws IOException
  {
    HttpPropFind entity = new HttpPropFind(url);
    entity.setDepth("0");
    Propfind body = new Propfind();
    Prop prop = new Prop();
    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())
    {
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.