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 |
createFolder(CoreSession documentManager,
String fullname,
String path)
Creates a Folder.
|
DocumentModel |
defaultCreateFolder(CoreSession documentManager,
String fullname,
String path) |
DocumentModel |
defaultCreateFolder(CoreSession documentManager,
String fullname,
String path,
String containerTypeName,
boolean checkAllowedSubTypes) |
boolean |
doVersioningAfterAdd()
Checks whether versioning should also be applied after a document is added.
|
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()
Gets the versioning applied on an overwritten document before it is overwritten.
|
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, applicationStarted, deactivate, getAdapter, getApplicationStartedOrder, getLastModified, registerContribution, setLastModified, setModifiedNow, unregisterContribution
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) throws IOException
FileManager
createFolder
in interface FileManager
fullname
- the full name of the folderpath
- the path were to create the folderIOException
public DocumentModel defaultCreateFolder(CoreSession documentManager, String fullname, String path)
public DocumentModel defaultCreateFolder(CoreSession documentManager, String fullname, String path, String containerTypeName, boolean checkAllowedSubTypes)
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
- boolean how decide to overwrite or notfullName
- the fullname that contains the filenameIOException
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
public VersioningOption getVersioningOption()
FileManager
getVersioningOption
in interface FileManager
public boolean doVersioningAfterAdd()
FileManager
doVersioningAfterAdd
in interface FileManager
Copyright © 2015 Nuxeo SA. All rights reserved.