Package com.bradmcevoy.http.exceptions

Examples of com.bradmcevoy.http.exceptions.ConflictException


      V7File child = file.createChild(content, newName, contentType);

      return new FileResource(child, factory);
    }
    if (existingChild instanceof FolderResource) {
      throw new ConflictException(existingChild,
          "already exists and is a folder");
    }

    ((FileResource) existingChild).file.setContent(content, contentType);
    return existingChild;
View Full Code Here


      throws NotAuthorizedException, BadRequestException,
      ConflictException {
    FolderResource newParent = (FolderResource) to;
    Resource existing = newParent.child(name);
    if (existing != null)
      throw new ConflictException();
    FolderResource copy = (FolderResource) newParent.createCollection(name);
    for (Resource child : getChildren()) {
      ((CopyableResource) child).copyTo(copy, child.getName());
    }
  }
View Full Code Here

        file.rename(name);
      else
        file.moveTo(newParent.file.getId(), name);
    } catch (IOException e) {
      System.err.println();
      throw new ConflictException(this);
    }

  }
View Full Code Here

      BadRequestException {
    try {
      file.delete();
    } catch (IOException e) {
      e.printStackTrace();
      throw new ConflictException(this);
    }
  }
View Full Code Here

      throws NotAuthorizedException, BadRequestException,
      ConflictException {
    FolderResource newParent = (FolderResource) to;
    Resource existing = newParent.child(name);
    if (existing != null)
      throw new ConflictException();
    try {
      // avoid copying the data, just copy the ContentPointer
      newParent.createNew(name, file.getContentPointer(), file
          .getContentType());
    } catch (IOException e) {
      e.printStackTrace();
      throw new ConflictException(this);
    }

  }
View Full Code Here

      DigitalAssetController.update(digitalAsset, null);
    }
    catch (Exception e)
    {
      e.printStackTrace();
      throw new ConflictException(this);
    }
  }
View Full Code Here

TOP

Related Classes of com.bradmcevoy.http.exceptions.ConflictException

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.