Examples of UploadException


Examples of org.vosao.common.UploadException

  private String processResourceFileCKeditor(FileItemStream imageItem,
      byte[] data, Long pageId) {
    try {
      PageEntity page = getDao().getPageDao().getById(pageId);
      if (page == null) {
        throw new UploadException(Messages.get(
            "page.not_found", pageId));
      }
      FolderEntity folder;
      String folderPath = "/page" + page.getFriendlyURL();
      folder = getBusiness().getFolderBusiness().createFolder(folderPath);
View Full Code Here

Examples of org.vosao.common.UploadException

 
  private String processPluginFile(FileItemStream fileItem, byte[] data)
      throws UploadException {
    String ext = FolderUtil.getFileExt(fileItem.getName());
    if (!ext.toLowerCase().equals("war")) {
      throw new UploadException(Messages.get("wrong_file_extension"));
    }
    try {
      getBusiness().getPluginBusiness().install(fileItem.getName(), data);
    }
    catch (Exception e) {
      e.printStackTrace();
      throw new UploadException(e.getMessage());
    }
    return createMessage("success", Messages.get("saved_for_import"));
  }
View Full Code Here

Examples of org.vosao.common.UploadException

  private String processPicasaFile(FileItemStream fileItem, byte[] data,
      Map<String, String> parameters) throws UploadException {
    try {
      String albumId = parameters.get("albumId");
      if (StringUtils.isEmpty(albumId)) {
        throw new UploadException(Messages.get("album_not_found",
            albumId));
      }
      getBusiness().getPicasaBusiness().upload(albumId, data,
          fileItem.getName());
      return createMessage("success", Messages.get("photo_uploaded"));
    }
    catch (Exception e) {
      throw new UploadException(e.getMessage());
    }
  }
View Full Code Here

Examples of org.vosao.common.UploadException

    filterXSS(parameters);
    FormDataEntity formData = saveFormData(form, parameters, files,
        ipAddress);
    String error = sendEmail(formData);
    if (error != null) {
      throw new UploadException(error);
    }
  }
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.