Nuxeo Enterprise Platform 5.4

org.nuxeo.ecm.platform.filemanager.ejb
Class FileManagerBean

java.lang.Object
  extended by org.nuxeo.ecm.platform.filemanager.ejb.FileManagerBean
All Implemented Interfaces:
FileManager, FileManagerLocal

public class FileManagerBean
extends java.lang.Object
implements FileManagerLocal

File Manager bean.

EJB Facade on the file manager service.

Author:
Andreas Kalogeropoulos

Constructor Summary
FileManagerBean()
           
 
Method Summary
 java.lang.String computeDigest(Blob blob)
           
 DocumentModel createDocumentFromBlob(CoreSession documentManager, Blob input, java.lang.String path, boolean overwrite, java.lang.String fullName)
          Returns an initialized doc based on a given blob.
 DocumentModel createFolder(CoreSession documentManager, java.lang.String fullname, java.lang.String path)
          Creates a Folder.
 java.util.List<DocumentLocation> findExistingDocumentWithFile(CoreSession documentManager, java.lang.String path, java.lang.String digest, java.security.Principal principal)
           
 DocumentModelList getCreationContainers(CoreSession documentManager, java.lang.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(java.security.Principal principal, java.lang.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.
 java.lang.String getDigestAlgorithm()
           
 java.util.List<java.lang.String> getFields()
           
 boolean isDigestComputingEnabled()
           
 boolean isUnicityEnabled()
           
 DocumentModel updateDocumentFromBlob(CoreSession documentManager, Blob input, java.lang.String path, java.lang.String fullName)
          Just applies the same actions as creation but does not changes the doc type.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileManagerBean

public FileManagerBean()
Method Detail

createDocumentFromBlob

public DocumentModel createDocumentFromBlob(CoreSession documentManager,
                                            Blob input,
                                            java.lang.String path,
                                            boolean overwrite,
                                            java.lang.String fullName)
                                     throws ClientException
Description copied from interface: FileManager
Returns an initialized doc based on a given blob.

Specified by:
createDocumentFromBlob in interface FileManager
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:
ClientException

updateDocumentFromBlob

public DocumentModel updateDocumentFromBlob(CoreSession documentManager,
                                            Blob input,
                                            java.lang.String path,
                                            java.lang.String fullName)
                                     throws ClientException
Description copied from interface: FileManager
Just applies the same actions as creation but does not changes the doc type.

Specified by:
updateDocumentFromBlob in interface FileManager
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:
ClientException

createFolder

public DocumentModel createFolder(CoreSession documentManager,
                                  java.lang.String fullname,
                                  java.lang.String path)
                           throws ClientException
Description copied from interface: FileManager
Creates a Folder.

Specified by:
createFolder in interface FileManager
fullname - the full name of the folder
path - the path were to create the folder
Returns:
the Folder Created
Throws:
ClientException

computeDigest

public java.lang.String computeDigest(Blob blob)
                               throws ClientException,
                                      java.security.NoSuchAlgorithmException,
                                      java.io.IOException
Specified by:
computeDigest in interface FileManager
Throws:
ClientException
java.security.NoSuchAlgorithmException
java.io.IOException

getFields

public java.util.List<java.lang.String> getFields()
                                           throws ClientException
Specified by:
getFields in interface FileManager
Throws:
ClientException

isUnicityEnabled

public boolean isUnicityEnabled()
                         throws ClientException
Specified by:
isUnicityEnabled in interface FileManager
Throws:
ClientException

findExistingDocumentWithFile

public java.util.List<DocumentLocation> findExistingDocumentWithFile(CoreSession documentManager,
                                                                     java.lang.String path,
                                                                     java.lang.String digest,
                                                                     java.security.Principal principal)
                                                              throws ClientException
Specified by:
findExistingDocumentWithFile in interface FileManager
Throws:
ClientException

getCreationContainers

public DocumentModelList getCreationContainers(java.security.Principal principal,
                                               java.lang.String docType)
                                        throws java.lang.Exception
Description copied from interface: FileManager
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.

Specified by:
getCreationContainers in interface FileManager
Returns:
the list of candidate containers
Throws:
java.lang.Exception

getCreationContainers

public DocumentModelList getCreationContainers(CoreSession documentManager,
                                               java.lang.String docType)
                                        throws java.lang.Exception
Description copied from interface: FileManager
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.

Specified by:
getCreationContainers in interface FileManager
Returns:
the list of candidate containers
Throws:
java.lang.Exception

getDigestAlgorithm

public java.lang.String getDigestAlgorithm()
Specified by:
getDigestAlgorithm in interface FileManager

isDigestComputingEnabled

public boolean isDigestComputingEnabled()
Specified by:
isDigestComputingEnabled in interface FileManager

Nuxeo Enterprise Platform 5.4

Copyright © 2010 Nuxeo SAS. All Rights Reserved.