Class FileImporterContext.Builder

java.lang.Object
org.nuxeo.ecm.platform.filemanager.api.FileImporterContext.Builder
Enclosing class:
FileImporterContext

public static class FileImporterContext.Builder extends Object
  • Field Details

    • session

      protected final CoreSession session
    • blob

      protected final Blob blob
    • parentPath

      protected final String parentPath
    • fileName

      protected String fileName
    • overwrite

      protected boolean overwrite
    • mimeTypeCheck

      protected boolean mimeTypeCheck
    • excludeOneToMany

      protected boolean excludeOneToMany
    • persistDocument

      protected boolean persistDocument
    • bypassAllowedSubtypeCheck

      protected boolean bypassAllowedSubtypeCheck
  • Constructor Details

  • Method Details

    • fileName

      public FileImporterContext.Builder fileName(String fileName)
      Overrides the file name from the given blob.
    • overwrite

      public FileImporterContext.Builder overwrite(boolean overwrite)
      Whether to overwrite an existing file with the same title.

      Defaults to false.

    • mimeTypeCheck

      public FileImporterContext.Builder mimeTypeCheck(boolean mimeTypeCheck)
      Whether to check the blob's mime-type against the file name.

      Defaults to true.

    • excludeOneToMany

      public FileImporterContext.Builder excludeOneToMany(boolean excludeOneToMany)
      Whether to exclude the importers creating more than one document for the given blob when selecting the importer.

      Defaults to false.

    • persistDocument

      public FileImporterContext.Builder persistDocument(boolean persistDocument)
      Whether to persist the created or updated document.

      If the document is not persisted, it's the caller's responsibility to persist it.

      Defaults to true.

    • bypassAllowedSubtypeCheck

      public FileImporterContext.Builder bypassAllowedSubtypeCheck(boolean bypassAllowedSubtypeCheck)
      Whether to bypass the allowed subtype check.

      Defaults to false.

      Since:
      11.3
    • build

      public FileImporterContext build()