Class FileHandler
java.lang.Object
de.xima.fc.handler.AMSApiHandler
de.xima.fc.handler.entity.GenericHandler
de.xima.fc.handler.file.FileHandler
- All Implemented Interfaces:
IAPIHandler, IGenericHandler, IFileHandler, Serializable
The Class FileHandler.
- Author:
- XIMA MEDIA GmbH
- See Also:
-
Field Summary
Fields inherited from class GenericHandler
LOG -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<D extends IFileDataEntity<F>, F extends IKeyDependentFileEntity<E,D>, E extends IFileMapProviding<F, D>>
byte[]getUncachedFileData(UserContext uc, E entity, String fileKey) Returns the file data of a file belonging to the given entity with the given file key.<E extends IFileDataEntity<?>, T extends IFileProviding<?,E>>
byte[]getUncachedFileData(UserContext uc, Class<T> clazz, long id) <E extends IFileDataEntity<?>, T extends IFileProviding<?,E>>
byte[]getUncachedFileData(UserContext uc, T entity) <T extends IFileEntity<?,?>>
byte[]getUncachedFileEntityData(UserContext uc, T fileEntity) <TFileMeta extends IFileMetaEntity<?,?>>
byte[]getUncachedFileEntityData(UserContext uc, TFileMeta fileEntity) Returns the file data of the given file entity.static <File extends IFileProviding<?,Data> & INameProviding, Data extends IFileDataEntity<?>>
ETagResource<ByteArrayFile> handleDataEntityRequest(IEntityContext ec, Class<Data> dataClass, File fileProviding, ETagRequest eTagRequest) <E extends IFileDataEntity<?>, T extends IFileEntity<?,E>>
TupdateFileData(UserContext uc, T entity, byte[] data) Methods inherited from class GenericHandler
create, create, delete, delete, deleteBy, deleteById, deleteById, getAll, getAllBy, getAttributes, getAttributes, getBy, getById, getById, getById, getEntityRefs, getSingleAttributes, getSingleAttributes, resultTotalCount, serializableList, update, updateMethods inherited from class AMSApiHandler
getNameMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface IAPIHandler
getNameMethods inherited from interface IGenericHandler
create, create, delete, delete, deleteBy, deleteById, deleteById, getAll, getAllBy, getAttributes, getAttributes, getBy, getById, getById, getById, getEntityRefs, getSingleAttributes, getSingleAttributes, resultTotalCount, update, update
-
Constructor Details
-
FileHandler
public FileHandler()
-
-
Method Details
-
getUncachedFileData
public <E extends IFileDataEntity<?>, T extends IFileProviding<?,E>> byte[] getUncachedFileData(UserContext uc, Class<T> clazz, long id) - Specified by:
getUncachedFileDatain interfaceIFileHandler
-
getUncachedFileData
public <E extends IFileDataEntity<?>, T extends IFileProviding<?,E>> byte[] getUncachedFileData(UserContext uc, T entity) - Specified by:
getUncachedFileDatain interfaceIFileHandler
-
getUncachedFileData
public <D extends IFileDataEntity<F>, F extends IKeyDependentFileEntity<E,D>, E extends IFileMapProviding<F, byte[] getUncachedFileDataD>> (UserContext uc, E entity, String fileKey) Description copied from interface:IFileHandlerReturns the file data of a file belonging to the given entity with the given file key.- Specified by:
getUncachedFileDatain interfaceIFileHandler- Type Parameters:
D- file data entity typeF- file entity typeE- file map providing base entity type- Parameters:
uc- user context for database transactions.entity- that owns the filefileKey- key identifying the file entity- Returns:
- file data as a byte array of the request file.
-
updateFileData
public <E extends IFileDataEntity<?>, T extends IFileEntity<?,E>> T updateFileData(UserContext uc, T entity, byte[] data) - Specified by:
updateFileDatain interfaceIFileHandler
-
getUncachedFileEntityData
- Specified by:
getUncachedFileEntityDatain interfaceIFileHandler
-
getUncachedFileEntityData
public <TFileMeta extends IFileMetaEntity<?,?>> byte[] getUncachedFileEntityData(UserContext uc, TFileMeta fileEntity) Description copied from interface:IFileHandlerReturns the file data of the given file entity.- Specified by:
getUncachedFileEntityDatain interfaceIFileHandler- Type Parameters:
TFileMeta- type of file entity.- Parameters:
uc- user context for database transactions.fileEntity- that owns the file data.- Returns:
- binary data of the file or
nullif no data exists
-
handleDataEntityRequest
public static <File extends IFileProviding<?,Data> & INameProviding, Data extends IFileDataEntity<?>> ETagResource<ByteArrayFile> handleDataEntityRequest(IEntityContext ec, Class<Data> dataClass, File fileProviding, ETagRequest eTagRequest)
-