Interface FileManager
-
- All Known Implementing Classes:
FileManagerService
public interface FileManager
File Manager.File Manager to handle file
- Author:
- Andreas Kalogeropoulos
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description DocumentModel
createDocumentFromBlob(CoreSession documentManager, Blob input, String path, boolean overwrite, String fullName)
Deprecated.since 10.10.DocumentModel
createDocumentFromBlob(CoreSession documentManager, Blob input, String path, boolean overwrite, String fullName, boolean noMimeTypeCheck)
Deprecated.since 10.10.default DocumentModel
createFolder(CoreSession documentManager, String fullname, String path)
Deprecated.since 9.1, usecreateFolder(CoreSession, String, String, boolean)
insteadDocumentModel
createFolder(CoreSession documentManager, String fullname, String path, boolean overwrite)
Creates a Folder.DocumentModel
createOrUpdateDocument(FileImporterContext context)
Returns a created or updated document based on the givencontext
.boolean
doVersioningAfterAdd()
Deprecated.since 9.1 automatic versioning is now handled at versioning service level, remove versioning behaviors from importersList<DocumentLocation>
findExistingDocumentWithFile(CoreSession documentManager, String path, String digest, NuxeoPrincipal principal)
DocumentModelList
getCreationContainers(CoreSession documentManager, String docType)
Returns the list of document that are to be suggested to the principal of documentManager as a candidate container for a new document of type docType.DocumentModelList
getCreationContainers(NuxeoPrincipal principal, String docType)
Returns the list of document that are to be suggested to principalName as a candidate container for a new document of type docType on all registered repositories.String
getDigestAlgorithm()
List<String>
getFields()
VersioningOption
getVersioningOption()
Deprecated.since 9.1 automatic versioning is now handled at versioning service level, remove versioning behaviors from importersboolean
isDigestComputingEnabled()
boolean
isUnicityEnabled()
DocumentModel
updateDocumentFromBlob(CoreSession documentManager, Blob input, String path, String fullName)
Deprecated.since 10.10.
-
-
-
Method Detail
-
createDocumentFromBlob
@Deprecated DocumentModel createDocumentFromBlob(CoreSession documentManager, Blob input, String path, boolean overwrite, String fullName) throws IOException
Deprecated.since 10.10. UsecreateOrUpdateDocument(FileImporterContext)
instead.Returns an initialized doc based on a given blob.- Parameters:
input
- the blob containing the content and the mime typepath
- the path were to create the documentoverwrite
- whether to overwrite an existing file with the same title or notfullName
- the fullname that contains the filename- Returns:
- the created Document
- Throws:
IOException
-
createDocumentFromBlob
@Deprecated DocumentModel createDocumentFromBlob(CoreSession documentManager, Blob input, String path, boolean overwrite, String fullName, boolean noMimeTypeCheck) throws IOException
Deprecated.since 10.10. UsecreateOrUpdateDocument(FileImporterContext)
instead.Returns an initialized doc based on a given blob.- Parameters:
input
- the blob containing the content and the mime typepath
- the path were to create the documentoverwrite
- whether to overwrite an existing file with the same title or notfullName
- the fullname that contains the filenamenoMimeTypeCheck
- true if the blob's mime-type doesn't have to be checked against fullName- Returns:
- the created Document
- Throws:
IOException
- Since:
- 8.10
-
createOrUpdateDocument
DocumentModel createOrUpdateDocument(FileImporterContext context) throws IOException
Returns a created or updated document based on the givencontext
.The document may not be persisted according to
FileImporterContext.isPersistDocument()
. That's the caller's responsibility to actually persist the document.Note that file importers may not use
FileImporterContext.isPersistDocument()
and always persist the document.- Returns:
- the created or updated document
- Throws:
IOException
- Since:
- 10.10
- See Also:
FileImporterContext
-
updateDocumentFromBlob
@Deprecated DocumentModel updateDocumentFromBlob(CoreSession documentManager, Blob input, String path, String fullName)
Deprecated.since 10.10. Not used.Just applies the same actions as creation but does not changes the doc type.- Parameters:
input
- the blob containing the content and the mime typepath
- the path to the file to updatefullName
- the full name that contains the filename- Returns:
- the updated Document
-
createFolder
@Deprecated default DocumentModel createFolder(CoreSession documentManager, String fullname, String path) throws IOException
Deprecated.since 9.1, usecreateFolder(CoreSession, String, String, boolean)
insteadCreates a Folder.- Parameters:
fullname
- the full name of the folderpath
- the path were to create the folder- Returns:
- the Folder Created
- Throws:
IOException
-
createFolder
DocumentModel createFolder(CoreSession documentManager, String fullname, String path, boolean overwrite) throws IOException
Creates a Folder.- Parameters:
fullname
- the full name of the folderpath
- the path were to create the folderoverwrite
- whether to overwrite an existing folder with the same title or not- Returns:
- the Folder Created
- Throws:
IOException
- Since:
- 9.1
-
getCreationContainers
DocumentModelList getCreationContainers(NuxeoPrincipal principal, String docType)
Returns the list of document that are to be suggested to principalName as a candidate container for a new document of type docType on all registered repositories.- Returns:
- the list of candidate containers
-
getCreationContainers
DocumentModelList getCreationContainers(CoreSession documentManager, String docType)
Returns the list of document that are to be suggested to the principal of documentManager as a candidate container for a new document of type docType.- Returns:
- the list of candidate containers
-
findExistingDocumentWithFile
List<DocumentLocation> findExistingDocumentWithFile(CoreSession documentManager, String path, String digest, NuxeoPrincipal principal)
-
isUnicityEnabled
boolean isUnicityEnabled()
-
getDigestAlgorithm
String getDigestAlgorithm()
-
isDigestComputingEnabled
boolean isDigestComputingEnabled()
-
getVersioningOption
@Deprecated VersioningOption getVersioningOption()
Deprecated.since 9.1 automatic versioning is now handled at versioning service level, remove versioning behaviors from importersGets the versioning applied on an overwritten document before it is overwritten.- Since:
- 5.7
-
doVersioningAfterAdd
@Deprecated boolean doVersioningAfterAdd()
Deprecated.since 9.1 automatic versioning is now handled at versioning service level, remove versioning behaviors from importersChecks whether versioning should also be applied after a document is added.- Since:
- 5.7
-
-