Package com.github.sardine.impl.methods

Examples of com.github.sardine.impl.methods.HttpPropFind


    @Override
    public HttpUriRequest getRedirect(HttpRequest request, HttpResponse response, HttpContext context)
            throws ProtocolException {
        String method = request.getRequestLine().getMethod();
        if(method.equalsIgnoreCase(HttpPropFind.METHOD_NAME)) {
            return this.copyEntity(new HttpPropFind(this.getLocationURI(request, response, context)), request);
        }
        return super.getRedirect(request, response, context);
    }
View Full Code Here


        return list(url, depth, body);
    }

    protected List<DavResource> list(String url, int depth, Propfind body) throws IOException
    {
        HttpPropFind entity = new HttpPropFind(url);
        entity.setDepth(Integer.toString(depth));
        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


  @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())
    {
      return null;
View Full Code Here

  }

  @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())
    {
      return null;
View Full Code Here

  }

  @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())
    {
      return null;
View Full Code Here

  }

  @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())
    {
      return null;
View Full Code Here

TOP

Related Classes of com.github.sardine.impl.methods.HttpPropFind

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.