public static class FileImporterContext.Builder extends Object
Modifier and Type | Field and Description |
---|---|
protected Blob |
blob |
protected boolean |
excludeOneToMany |
protected String |
fileName |
protected boolean |
mimeTypeCheck |
protected boolean |
overwrite |
protected String |
parentPath |
protected boolean |
persistDocument |
protected CoreSession |
session |
Constructor and Description |
---|
Builder(CoreSession session,
Blob blob,
String parentPath) |
Modifier and Type | Method and Description |
---|---|
FileImporterContext |
build() |
FileImporterContext.Builder |
excludeOneToMany(boolean excludeOneToMany)
Whether to exclude the importers creating more than one document for the given blob when selecting the
importer.
|
FileImporterContext.Builder |
fileName(String fileName)
Overrides the file name from the given
blob . |
FileImporterContext.Builder |
mimeTypeCheck(boolean mimeTypeCheck)
Whether to check the blob's mime-type against the file name.
|
FileImporterContext.Builder |
overwrite(boolean overwrite)
Whether to overwrite an existing file with the same title.
|
FileImporterContext.Builder |
persistDocument(boolean persistDocument)
Whether to persist the created or updated document.
|
protected final CoreSession session
protected final String parentPath
protected boolean overwrite
protected boolean mimeTypeCheck
protected boolean excludeOneToMany
protected boolean persistDocument
public Builder(CoreSession session, Blob blob, String parentPath)
public FileImporterContext.Builder fileName(String fileName)
blob
.public FileImporterContext.Builder overwrite(boolean overwrite)
Defaults to false
.
public FileImporterContext.Builder mimeTypeCheck(boolean mimeTypeCheck)
Defaults to true
.
public FileImporterContext.Builder excludeOneToMany(boolean excludeOneToMany)
Defaults to false
.
public FileImporterContext.Builder persistDocument(boolean persistDocument)
If the document is not persisted, it's the caller's responsibility to persist it.
Defaults to true
.
public FileImporterContext build()
Copyright © 2019 Nuxeo. All rights reserved.