public class FileManagerService extends DefaultComponent implements FileManager
This is the component to request to perform transformations. See API.
Modifier and Type | Field and Description |
---|---|
static boolean |
DEF_VERSIONING_AFTER_ADD |
static VersioningOption |
DEF_VERSIONING_OPTION |
static String |
DEFAULT_FOLDER_TYPE_NAME |
static int |
MAX |
static ComponentName |
NAME |
static String |
QUERY |
lastModified
Constructor and Description |
---|
FileManagerService() |
Modifier and Type | Method and Description |
---|---|
DocumentModel |
createDocumentFromBlob(CoreSession documentManager,
Blob input,
String path,
boolean overwrite,
String fullName)
Returns an initialized doc based on a given blob.
|
DocumentModel |
createDocumentFromBlob(CoreSession documentManager,
Blob input,
String path,
boolean overwrite,
String fullName,
boolean noMimeTypeCheck)
Returns an initialized doc based on a given blob.
|
DocumentModel |
createFolder(CoreSession documentManager,
String fullname,
String path,
boolean overwrite)
Creates a Folder.
|
DocumentModel |
defaultCreateFolder(CoreSession documentManager,
String fullname,
String path)
Deprecated.
since 9.1, use
defaultCreateFolder(CoreSession, String, String, boolean) instead |
DocumentModel |
defaultCreateFolder(CoreSession documentManager,
String fullname,
String path,
boolean overwrite) |
DocumentModel |
defaultCreateFolder(CoreSession documentManager,
String fullname,
String path,
String containerTypeName,
boolean checkAllowedSubTypes)
Deprecated.
since 9.1, use
defaultCreateFolder(CoreSession, String, String, String, boolean, boolean)
instead |
DocumentModel |
defaultCreateFolder(CoreSession documentManager,
String fullname,
String path,
String containerTypeName,
boolean checkAllowedSubTypes,
boolean overwrite) |
boolean |
doVersioningAfterAdd()
Deprecated.
since 9.1 automatic versioning is now handled at versioning service level, remove versioning
behaviors from importers
|
List<DocumentLocation> |
findExistingDocumentWithFile(CoreSession documentManager,
String path,
String digest,
Principal 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(Principal 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() |
FileImporter |
getPluginByName(String name) |
VersioningOption |
getVersioningOption()
Deprecated.
since 9.1 automatic versioning is now handled at versioning service level, remove versioning
behaviors from importers
|
boolean |
isDigestComputingEnabled() |
boolean |
isUnicityEnabled() |
void |
registerExtension(Extension extension)
Registers the given extension.
|
void |
unregisterExtension(Extension extension)
Unregisters the given extension.
|
DocumentModel |
updateDocumentFromBlob(CoreSession documentManager,
Blob input,
String path,
String fullName)
Just applies the same actions as creation but does not changes the doc type.
|
activate, deactivate, getAdapter, getLastModified, registerContribution, setLastModified, setModifiedNow, start, stop, unregisterContribution
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
createFolder
applicationStarted, getApplicationStartedOrder
public static final ComponentName NAME
public static final String DEFAULT_FOLDER_TYPE_NAME
public static final String QUERY
public static final int MAX
public static final VersioningOption DEF_VERSIONING_OPTION
public static final boolean DEF_VERSIONING_AFTER_ADD
public FileManagerService()
public DocumentModel createFolder(CoreSession documentManager, String fullname, String path, boolean overwrite) throws IOException
FileManager
createFolder
in interface FileManager
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 notIOException
@Deprecated public DocumentModel defaultCreateFolder(CoreSession documentManager, String fullname, String path)
defaultCreateFolder(CoreSession, String, String, boolean)
insteadpublic DocumentModel defaultCreateFolder(CoreSession documentManager, String fullname, String path, boolean overwrite)
@Deprecated public DocumentModel defaultCreateFolder(CoreSession documentManager, String fullname, String path, String containerTypeName, boolean checkAllowedSubTypes)
defaultCreateFolder(CoreSession, String, String, String, boolean, boolean)
insteadpublic DocumentModel defaultCreateFolder(CoreSession documentManager, String fullname, String path, String containerTypeName, boolean checkAllowedSubTypes, boolean overwrite)
public DocumentModel createDocumentFromBlob(CoreSession documentManager, Blob input, String path, boolean overwrite, String fullName) throws IOException
FileManager
createDocumentFromBlob
in interface FileManager
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 filenameIOException
public DocumentModel createDocumentFromBlob(CoreSession documentManager, Blob input, String path, boolean overwrite, String fullName, boolean noMimeTypeCheck) throws IOException
FileManager
createDocumentFromBlob
in interface FileManager
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 fullNameIOException
public DocumentModel updateDocumentFromBlob(CoreSession documentManager, Blob input, String path, String fullName)
FileManager
updateDocumentFromBlob
in interface FileManager
input
- the blob containing the content and the mime typepath
- the path to the file to updatefullName
- the full name that contains the filenamepublic FileImporter getPluginByName(String name)
public void registerExtension(Extension extension)
Extensible
registerExtension
in interface Extensible
registerExtension
in class DefaultComponent
extension
- the extension to registerpublic void unregisterExtension(Extension extension)
Extensible
unregisterExtension
in interface Extensible
unregisterExtension
in class DefaultComponent
extension
- the extension to unregisterpublic List<DocumentLocation> findExistingDocumentWithFile(CoreSession documentManager, String path, String digest, Principal principal)
findExistingDocumentWithFile
in interface FileManager
public boolean isUnicityEnabled()
isUnicityEnabled
in interface FileManager
public boolean isDigestComputingEnabled()
isDigestComputingEnabled
in interface FileManager
public List<String> getFields()
getFields
in interface FileManager
public DocumentModelList getCreationContainers(Principal principal, String docType)
FileManager
getCreationContainers
in interface FileManager
public DocumentModelList getCreationContainers(CoreSession documentManager, String docType)
FileManager
getCreationContainers
in interface FileManager
public String getDigestAlgorithm()
getDigestAlgorithm
in interface FileManager
@Deprecated public VersioningOption getVersioningOption()
FileManager
getVersioningOption
in interface FileManager
@Deprecated public boolean doVersioningAfterAdd()
FileManager
doVersioningAfterAdd
in interface FileManager
Copyright © 2018 Nuxeo. All rights reserved.