Package br.com.jteam.jfcm.model.validator.impl

Examples of br.com.jteam.jfcm.model.validator.impl.ZipFileExtensionValidator.validate()


  {
    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
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.