Package org.silverpeas.components.kmelia

# Class FileImport

java.lang.Object
org.silverpeas.components.kmelia.FileImport

public class FileImport extends Object
Class for unit and massive import

Author:
  dlesimple

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `FileImport(KmeliaSessionController kmeliaScc, File uploadedFile)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `org.silverpeas.core.importexport.report.ImportReport`
  `importFile(boolean draft)`
  Import a single file for a unique publication
  `org.silverpeas.core.importexport.report.ImportReport`
  `importFiles(boolean draft)`
  Import a zip file for a unique publication with attachments
  `org.silverpeas.core.importexport.report.ImportReport`
  `importFilesMultiPubli(boolean draft)`
  Import a zip file for a publication per file in zip
  `void`
  `setVersionType(int versionType)`
  `void`
  `writeImportToLog(org.silverpeas.core.importexport.report.ImportReport importReport, org.silverpeas.core.util.MultiSilverpeasBundle resource)`
  Write import report into a log file

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### FileImport

    public FileImport(KmeliaSessionController kmeliaScc, File uploadedFile)

- ## Method Details

  - ### setVersionType

    public void setVersionType(int versionType)

  - ### importFile

    public org.silverpeas.core.importexport.report.ImportReport importFile(boolean draft) throws org.silverpeas.core.importexport.model.ImportExportException
    Import a single file for a unique publication
    Returns:
      a report of the import
    Throws:
      `org.silverpeas.core.importexport.model.ImportExportException` - if the import fails.

  - ### importFiles

    public org.silverpeas.core.importexport.report.ImportReport importFiles(boolean draft)
    Import a zip file for a unique publication with attachments
    Returns:
      a report of the import

  - ### importFilesMultiPubli

    public org.silverpeas.core.importexport.report.ImportReport importFilesMultiPubli(boolean draft)
    Import a zip file for a publication per file in zip
    Returns:
      a report of the import

  - ### writeImportToLog

    public void writeImportToLog(org.silverpeas.core.importexport.report.ImportReport importReport, org.silverpeas.core.util.MultiSilverpeasBundle resource)
    Write import report into a log file