Interface FileService
- All Known Implementing Classes:
FileServiceImpl
public interface FileService
Created by The eXo Platform SAS Author : eXoPlatform exo@exoplatform.com
-
Method Summary
Modifier and TypeMethodDescriptiondeleteFile(long id) Delete file with the given id The file is not physically deleted, it is only a logical deletiongetFile(long id) Get the file (info + binary) of the given idgetFileInfo(long id) Get only the file info of the given idgetFileInfoListByChecksum(String checksum) Get the files info of the given checksumgetFilesByChecksum(String checksum) Get the files (info + binary) of the given checksumupdateFile(FileItem file) Update the stored file using the provided DAO and binary provider.Store the file using the provided DAO and binary provider.
-
Method Details
-
getFileInfo
Get only the file info of the given id- Parameters:
id- file id- Returns:
- file info
-
getFile
Get the file (info + binary) of the given id- Parameters:
id- file id- Returns:
- fileItem
- Throws:
FileStorageException- signals that an I/O exception of some sort has occurred.
-
writeFile
Store the file using the provided DAO and binary provider. This method is transactional, meaning that if the write of the info or of the binary fails, nothing must be persisted.- Parameters:
file- file item- Returns:
- updated file item
- Throws:
IOException- signals that an I/O exception of some sort has occurred.FileStorageException- signals that an error occur on save resource.
-
updateFile
Update the stored file using the provided DAO and binary provider. This method is transactional, meaning that if the write of the info or of the binary fails, nothing must be persisted.- Parameters:
file- file item- Returns:
- updated file item
- Throws:
IOException- signals that an I/O exception of some sort has occurred.FileStorageException- signals that an error occur on save resource.
-
deleteFile
Delete file with the given id The file is not physically deleted, it is only a logical deletion- Parameters:
id- Id of the file to delete- Returns:
- file Info
-
getFileInfoListByChecksum
Get the files info of the given checksum- Parameters:
checksum- files checksum- Returns:
- list file info
- Throws:
Exception
-
getFilesByChecksum
Get the files (info + binary) of the given checksum- Parameters:
checksum- files checksum- Returns:
- list fileItem
- Throws:
FileStorageException- signals that an I/O exception of some sort has occurred.
-