Package br.com.jteam.jfcm.model.services.exception

Examples of br.com.jteam.jfcm.model.services.exception.FileListContentServiceException


      }
      zipInputStream.close();
      fileHistoryService.addToHistory(zipFile);
      return zipFile;
    } catch (IncorrectFileExtensionException ex) {
      throw new FileListContentServiceException(ex);
    } catch (FileNotFoundException ex) {
      throw new FileListContentServiceException("Error in input/output", ex);
    } catch (IOException ex) {
      throw new FileListContentServiceException("Error in input/output", ex);
    } catch (CorruptedZipFileException ex) {
      throw new FileListContentServiceException(ex);
    }
  }
View Full Code Here


  private File createZipFile(java.io.File file)
    throws IncorrectFileExtensionException,
    FileListContentServiceException
  {
    if (file == null) { throw new IllegalArgumentException("Zip File cannot be null"); }
    if (!FileTypeUtil.isFilePresentOnDisk(file.getAbsolutePath())) { throw new FileListContentServiceException(
      "File doesn't exist anymore on disc"); }
    FileExtensionValidator fileExtensionValidator = new ZipFileExtensionValidator();
    fileExtensionValidator.validate(file.getName());
    FileType fileType = FileType.getFileTypeByFileName(file.getName());
    return FileFactory.getInstance(fileType).createFile(file.getName(), file.getAbsolutePath());
View Full Code Here

TOP

Related Classes of br.com.jteam.jfcm.model.services.exception.FileListContentServiceException

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.