public class FileServiceImpl extends Object implements FileService
| Constructor and Description |
|---|
FileServiceImpl(DataStorage dataStorage,
BinaryProvider resourceProvider) |
| Modifier and Type | Method and Description |
|---|---|
FileInfo |
deleteFile(long id)
Delete file with the given id The file is not physically deleted, it is
only a logical deletion
|
FileItem |
getFile(long id)
Get the file (info + binary) of the given id
|
FileInfo |
getFileInfo(long id)
Get only the file info of the given id
|
FileItem |
updateFile(FileItem file)
Update the stored file using the provided DAO and binary provider.
|
FileItem |
writeFile(FileItem file)
Store the file using the provided DAO and binary provider.
|
public FileServiceImpl(DataStorage dataStorage, BinaryProvider resourceProvider) throws Exception
Exceptionpublic FileInfo getFileInfo(long id)
FileServicegetFileInfo in interface FileServiceid - file idpublic FileItem getFile(long id) throws FileStorageException
FileServicegetFile in interface FileServiceid - file idFileStorageException - signals that an I/O exception of some sort has
occurred.public FileItem writeFile(FileItem file) throws FileStorageException, IOException
FileServicewriteFile in interface FileServicefile - file itemFileStorageException - signals that an error occur on save resource.IOException - signals that an I/O exception of some sort has
occurred.public FileItem updateFile(FileItem file) throws FileStorageException, IOException
FileServiceupdateFile in interface FileServicefile - file itemFileStorageException - signals that an error occur on save resource.IOException - signals that an I/O exception of some sort has
occurred.public FileInfo deleteFile(long id)
FileServicedeleteFile in interface FileServiceid - Id of the file to deleteCopyright © 2003–2018 eXo Platform SAS. All rights reserved.