Package com.adito.vfs.webdav

Examples of com.adito.vfs.webdav.DAVMultiStatus


                resource.delete();
                transaction.setStatus(204);
                resource.getMount().resourceDelete(resource, transaction, null);
            } catch (FileSystemException ex) {
                transaction.setStatus(423);
                DAVMultiStatus s = new DAVMultiStatus();
                throw s;
            }
        } catch (DAVMultiStatus multistatus) {
            multistatus.write(transaction);
            resource.getMount().resourceDelete(resource, transaction, multistatus);
View Full Code Here


      throw new DAVException(403, "Can't delete resource '" + getRelativePath()
        + "' as it is the root for the mount point "
        + this.getMount().getMountString(), this);
    } else if (this.isCollection()) {

      DAVMultiStatus multistatus = new DAVMultiStatus();

      Iterator children = this.getChildren();
      while (children.hasNext())
        try {
          ((VFSResource) children.next()).delete();
        } catch (DAVException exception) {
          multistatus.merge(exception);
        }

      if (multistatus.size() > 0)
        throw multistatus;
      try {
        if (!getFile().delete()) {
          throw new DAVException(403, "Can't delete collection", this);
        } else {
View Full Code Here

    if (this.isCollection()) {
      dest.makeCollection();
      if (!recursive)
        return;

      DAVMultiStatus multistatus = new DAVMultiStatus();
      Iterator children = this.getChildren();
      while (children.hasNext())
        try {
          FileObjectVFSResource childResource = (FileObjectVFSResource) children.next();
          try {
            FileObject child = ((FileObjectVFSResource) dest).getFile().resolveFile(childResource.getFile()
                    .getName()
                    .getBaseName());
            FileObjectVFSResource target = new FileObjectVFSResource(getLaunchSession(),
                    this.getMount(),
                    this, /* transaction, */
                    this.getMount().getMountString(),
                    repository,
                    requestCredentials);
            childResource.copy(target, overwrite, recursive);
          } catch (IOException e) {
            throw new DAVException(403, "Could not resolve child.", e);
          }
        } catch (DAVException exception) {
          multistatus.merge(exception);
        }
      if (multistatus.size() > 0)
        throw multistatus;
    }
  }
View Full Code Here

TOP

Related Classes of com.adito.vfs.webdav.DAVMultiStatus

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.