Package br.com.jteam.jfcm.model

Examples of br.com.jteam.jfcm.model.File


    throws ShowFileContentAdapterException
  {
    if (presentationFile == null) { throw new IllegalArgumentException(
      "PresentationFile cannot be null"); }
    try {
      File file =
        showFileContentService.createSpecificFileToBeViewed(
          presentationFile.getName(),
          presentationFile.getPath());
      FileType fileType = FileType.getFileTypeByFileName(file.getName());
      RenderedFileType renderedFileType = RenderedFileType.getRenderedFileType(fileType);
      PresentationFile<?> presentationFileToBeViewed;
      if (renderedFileType == RenderedFileType.TEXT) {
        presentationFileToBeViewed =
          new PresentationFile<String>(presentationFile.getName(), presentationFile
View Full Code Here


   *            caminho do arquivo no disco.
   * @return Arquivo criado.
   */
  public File createFile(String name, String path)
  {
    return new File(name, path);
  }
View Full Code Here

   */
  public File openZipContent(java.io.File file) throws FileListContentServiceException
  {
    ZipInputStream zipInputStream;
    try {
      File zipFile = createZipFile(file);
      zipInputStream = new ZipInputStream(new FileInputStream(zipFile.getPath()));
      ZipEntry zipEntry;
      while ((zipEntry = zipInputStream.getNextEntry()) != null) {
        String fileName = zipEntry.getName();
        System.out.println("");
        br.com.jteam.jfcm.model.File fileInZip =
          FileFactory.getInstance(FileType.DEFAULT).createFile(
            fileName,
            zipFile.getPath());
        zipFile.add(fileInZip);
        zipInputStream.closeEntry();
      }
      zipInputStream.close();
      fileHistoryService.addToHistory(zipFile);
      return zipFile;
View Full Code Here

  public PresentationFile<?> openZipContent(String path) throws FileListContentAdapterException
  {
    if (path == null) { throw new IllegalArgumentException("File path cannot be null"); }
    java.io.File file = new java.io.File(path);
    try {
      File zipFile = fileListContentService.openZipContent(file);
      PresentationFile<?> presentationZipFile = adapt2Presentation(zipFile);
      return presentationZipFile;
    } catch (FileListContentServiceException ex) {
      throw new FileListContentAdapterException(ex);
    }
View Full Code Here

  {
    PresentationFile<?> presentationFile =
      new PresentationFile(file.getName(), file.getPath(), FileType.DEFAULT);
    Iterator<File> iterator = file.iterator();
    while (iterator.hasNext()) {
      File fileToBeAdded = iterator.next();
      PresentationFile<?> presFile = adapt2Presentation(fileToBeAdded);
      presentationFile.add(presFile);
    }
    return presentationFile;
  }
View Full Code Here

TOP

Related Classes of br.com.jteam.jfcm.model.File

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.