Package de.xima.fc.api.file
Class FileAPI
- java.lang.Object
 - 
- de.xima.fc.api.ASubAPI
 - 
- de.xima.fc.api.file.FileAPI
 
 
 
- 
public class FileAPI extends ASubAPI
API class for interaction with files.- Author:
 - XIMA MEDIA GmbH
 
 
- 
- 
Constructor Summary
Constructors Constructor Description FileAPI() 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <E extends IFileDataEntity<?>,T extends IFileProviding<?,E>>
byte[]getFileData(UserContext uc, T entity)<T extends IFileEntity<?,?>>
byte[]getFileEntityData(UserContext uc, T fileEntity)<T extends IFileEntity<?,?>>
InputStreamgetFileEntityStream(UserContext uc, T fileEntity)<E extends IFileDataEntity<?>,T extends IFileProviding<?,E>>
InputStreamgetFileStream(UserContext uc, T entity)Method for downloading a file by theAttachmentID.<E extends IFileDataEntity<?>,T extends IFileProviding<?,E>>
byte[]getUncachedFileData(UserContext uc, T entity)<T extends IFileEntity<?,?>>
byte[]getUncachedFileEntityData(UserContext uc, T fileEntity)<E extends IFileDataEntity<?>,T extends IFileEntity<?,E>>
TupdateFileData(UserContext uc, T entity, byte[] data)- 
Methods inherited from class de.xima.fc.api.ASubAPI
getHandlerProvider 
 - 
 
 - 
 
- 
- 
Method Detail
- 
getFileStream
public <E extends IFileDataEntity<?>,T extends IFileProviding<?,E>> InputStream getFileStream(UserContext uc, T entity) throws FileNotFoundException
Method for downloading a file by theAttachmentID.- Parameters:
 uc-UserContextthe user context in which the action is to be performed.entity-IFileDataEntitythe searched file.- Returns:
 InputStreamon the searched file.- Throws:
 FileNotFoundException- if the file operation couldn't executed successful and a error occurs.- Since:
 - 2.4.3
 
 
- 
getFileEntityStream
public <T extends IFileEntity<?,?>> InputStream getFileEntityStream(UserContext uc, T fileEntity) throws FileNotFoundException
- Throws:
 FileNotFoundException
 
- 
getFileData
public <E extends IFileDataEntity<?>,T extends IFileProviding<?,E>> byte[] getFileData(UserContext uc, T entity) throws IOException
- Throws:
 IOException
 
- 
getFileEntityData
public <T extends IFileEntity<?,?>> byte[] getFileEntityData(UserContext uc, T fileEntity) throws IOException
- Throws:
 IOException
 
- 
getUncachedFileData
public <E extends IFileDataEntity<?>,T extends IFileProviding<?,E>> byte[] getUncachedFileData(UserContext uc, T entity)
 
- 
getUncachedFileEntityData
public <T extends IFileEntity<?,?>> byte[] getUncachedFileEntityData(UserContext uc, T fileEntity)
 
- 
updateFileData
public <E extends IFileDataEntity<?>,T extends IFileEntity<?,E>> T updateFileData(UserContext uc, T entity, byte[] data)
 
 - 
 
 -