Nuxeo ECM Projects 5.4.3-SNAPSHOT

org.nuxeo.ecm.platform.filemanager.api
Interface FileManager

All Known Implementing Classes:
FileManagerService

public interface FileManager

File Manager.

File Manager to handle file

Author:
Andreas Kalogeropoulos

Method Summary
 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.
 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()
           
 boolean isDigestComputingEnabled()
           
 boolean isUnicityEnabled()
           
 DocumentModel updateDocumentFromBlob(CoreSession documentManager, Blob input, String path, String fullName)
          Just applies the same actions as creation but does not changes the doc type.
 

Method Detail

createDocumentFromBlob

DocumentModel createDocumentFromBlob(CoreSession documentManager,
                                     Blob input,
                                     String path,
                                     boolean overwrite,
                                     String fullName)
                                     throws Exception
Returns an initialized doc based on a given blob.

Parameters:
input - the blob containing the content and the mime type
path - the path were to create the document
overwrite - boolean how decide to overwrite or not
fullName - the fullname that contains the filename
Returns:
the created Document
Throws:
Exception

updateDocumentFromBlob

DocumentModel updateDocumentFromBlob(CoreSession documentManager,
                                     Blob input,
                                     String path,
                                     String fullName)
                                     throws Exception
Just applies the same actions as creation but does not changes the doc type.

Parameters:
input - the blob containing the content and the mime type
path - the path to the file to update
fullName - the full name that contains the filename
Returns:
the updated Document
Throws:
Exception

createFolder

DocumentModel createFolder(CoreSession documentManager,
                           String fullname,
                           String path)
                           throws Exception
Creates a Folder.

Parameters:
fullname - the full name of the folder
path - the path were to create the folder
Returns:
the Folder Created
Throws:
Exception

getCreationContainers

DocumentModelList getCreationContainers(Principal principal,
                                        String docType)
                                        throws Exception
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
Throws:
Exception

getCreationContainers

DocumentModelList getCreationContainers(CoreSession documentManager,
                                        String docType)
                                        throws Exception
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
Throws:
Exception

computeDigest

String computeDigest(Blob blob)
                     throws ClientException,
                            NoSuchAlgorithmException,
                            IOException
Throws:
ClientException
NoSuchAlgorithmException
IOException

findExistingDocumentWithFile

List<DocumentLocation> findExistingDocumentWithFile(CoreSession documentManager,
                                                    String path,
                                                    String digest,
                                                    Principal principal)
                                                    throws ClientException
Throws:
ClientException

isUnicityEnabled

boolean isUnicityEnabled()
                         throws ClientException
Throws:
ClientException

getFields

List<String> getFields()
                       throws ClientException
Throws:
ClientException

getDigestAlgorithm

String getDigestAlgorithm()

isDigestComputingEnabled

boolean isDigestComputingEnabled()

Nuxeo ECM Projects 5.4.3-SNAPSHOT

Copyright © 2011 Nuxeo SAS. All Rights Reserved.