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 Summary
Fields Modifier and Type Field Description protected Blobblobprotected booleanbypassAllowedSubtypeCheckprotected booleanexcludeOneToManyprotected StringfileNameprotected booleanmimeTypeCheckprotected booleanoverwriteprotected StringparentPathprotected booleanpersistDocumentprotected CoreSessionsession
-
Constructor Summary
Constructors Constructor Description Builder(CoreSession session, Blob blob, String parentPath)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FileImporterContextbuild()FileImporterContext.BuilderbypassAllowedSubtypeCheck(boolean bypassAllowedSubtypeCheck)Whether to bypass the allowed subtype check.FileImporterContext.BuilderexcludeOneToMany(boolean excludeOneToMany)Whether to exclude the importers creating more than one document for the given blob when selecting the importer.FileImporterContext.BuilderfileName(String fileName)Overrides the file name from the givenblob.FileImporterContext.BuildermimeTypeCheck(boolean mimeTypeCheck)Whether to check the blob's mime-type against the file name.FileImporterContext.Builderoverwrite(boolean overwrite)Whether to overwrite an existing file with the same title.FileImporterContext.BuilderpersistDocument(boolean persistDocument)Whether to persist the created or updated document.
-
-
-
Field Detail
-
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 Detail
-
Builder
public Builder(CoreSession session, Blob blob, String parentPath)
-
-
Method Detail
-
fileName
public FileImporterContext.Builder fileName(String fileName)
Overrides the file name from the givenblob.
-
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()
-
-