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 |
| Constructor and Description |
|---|
FileManagerService() |
| Modifier and Type | Method and Description |
|---|---|
String |
computeDigest(Blob blob) |
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, unregisterContributionpublic 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 DocumentModel createFolder(CoreSession documentManager, String fullname, String path) throws ClientException, IOException
FileManagercreateFolder in interface FileManagerfullname - the full name of the folderpath - the path were to create the folderClientExceptionIOExceptionpublic DocumentModel defaultCreateFolder(CoreSession documentManager, String fullname, String path) throws ClientException
ClientExceptionpublic DocumentModel defaultCreateFolder(CoreSession documentManager, String fullname, String path, String containerTypeName, boolean checkAllowedSubTypes) throws ClientException
ClientExceptionpublic DocumentModel createDocumentFromBlob(CoreSession documentManager, Blob input, String path, boolean overwrite, String fullName) throws IOException, ClientException
FileManagercreateDocumentFromBlob in interface FileManagerinput - 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 filenameIOExceptionClientExceptionpublic DocumentModel updateDocumentFromBlob(CoreSession documentManager, Blob input, String path, String fullName) throws ClientException
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 filenameClientExceptionpublic FileImporter getPluginByName(String name)
public void registerExtension(Extension extension) throws Exception
ExtensibleregisterExtension in interface ExtensibleregisterExtension in class DefaultComponentextension - the extension to registerException - if any error occurspublic void unregisterExtension(Extension extension) throws Exception
ExtensibleunregisterExtension in interface ExtensibleunregisterExtension in class DefaultComponentextension - the extension to unregisterException - if any error occurspublic String computeDigest(Blob blob) throws NoSuchAlgorithmException, IOException
computeDigest in interface FileManagerNoSuchAlgorithmExceptionIOExceptionpublic List<DocumentLocation> findExistingDocumentWithFile(CoreSession documentManager, String path, String digest, Principal principal) throws ClientException
findExistingDocumentWithFile in interface FileManagerClientExceptionpublic 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) throws Exception
FileManagergetCreationContainers in interface FileManagerExceptionpublic DocumentModelList getCreationContainers(CoreSession documentManager, String docType) throws Exception
FileManagergetCreationContainers in interface FileManagerExceptionpublic String getDigestAlgorithm()
getDigestAlgorithm in interface FileManagerpublic VersioningOption getVersioningOption()
FileManagergetVersioningOption in interface FileManagerpublic boolean doVersioningAfterAdd()
FileManagerdoVersioningAfterAdd in interface FileManagerCopyright © 2014 Nuxeo SA. All Rights Reserved.