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, unregisterContributionclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcreateFolderapplicationStarted, getApplicationStartedOrderpublic 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
FileManagercreateFolder in interface FileManagerfullname - 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
FileManagercreateDocumentFromBlob in interface FileManagerinput - 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 filenameIOExceptionpublic DocumentModel createDocumentFromBlob(CoreSession documentManager, Blob input, String path, boolean overwrite, String fullName, boolean noMimeTypeCheck) throws IOException
FileManagercreateDocumentFromBlob in interface FileManagerinput - 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 fullNameIOExceptionpublic DocumentModel updateDocumentFromBlob(CoreSession documentManager, Blob input, String path, String fullName)
FileManagerupdateDocumentFromBlob in interface FileManagerinput - 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)
ExtensibleregisterExtension in interface ExtensibleregisterExtension in class DefaultComponentextension - the extension to registerpublic void unregisterExtension(Extension extension)
ExtensibleunregisterExtension in interface ExtensibleunregisterExtension in class DefaultComponentextension - the extension to unregisterpublic List<DocumentLocation> findExistingDocumentWithFile(CoreSession documentManager, String path, String digest, Principal principal)
findExistingDocumentWithFile in interface FileManagerpublic boolean isUnicityEnabled()
isUnicityEnabled in interface FileManagerpublic boolean isDigestComputingEnabled()
isDigestComputingEnabled in interface FileManagerpublic List<String> getFields()
getFields in interface FileManagerpublic DocumentModelList getCreationContainers(Principal principal, String docType)
FileManagergetCreationContainers in interface FileManagerpublic DocumentModelList getCreationContainers(CoreSession documentManager, String docType)
FileManagergetCreationContainers in interface FileManagerpublic String getDigestAlgorithm()
getDigestAlgorithm in interface FileManager@Deprecated public VersioningOption getVersioningOption()
FileManagergetVersioningOption in interface FileManager@Deprecated public boolean doVersioningAfterAdd()
FileManagerdoVersioningAfterAdd in interface FileManagerCopyright © 2017 Nuxeo. All rights reserved.