Package de.xima.fc.entities.interfaces
Interface IFileMapProviding<T extends IKeyDependentFileEntity<?,D>,D extends IFileDataEntity<T>>
- 
- All Superinterfaces:
 Comparable<de.xima.cmn.dao.interfaces.IEntity<Long>>,de.xima.cmn.dao.interfaces.IEntity<Long>,ITransferable,ITransferableEntity,Serializable
- All Known Implementing Classes:
 Mandant,UserProfile
public interface IFileMapProviding<T extends IKeyDependentFileEntity<?,D>,D extends IFileDataEntity<T>> extends ITransferableEntity
Common interface for classes providing a file map- Since:
 - 8.0.0
 - Author:
 - XIMA Media GmbH
 
 
- 
- 
Field Summary
- 
Fields inherited from interface de.xima.fc.entities.interfaces.ITransferableEntity
IMPORT_ID, INVALID_ID 
 - 
 
- 
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description Map<String,T>getFileMap()TnewFileEntiy()Creates a new instance of file entity which is connected to the base entity (this).default TputFile(String key, T file)default TremoveFile(String key)Removes the file mapping for the given key.default voidsetFileData(String fileKey, byte[] data, String fileName, Object userRef)default voidsetFileData(String fileKey, File file, Object userRef)voidsetFileMap(Map<String,T> fileMap)DON'T USE! Hibernate is managing this collection, so if it is overridden, Hibernate can't keep track of it anymore.- 
Methods inherited from interface java.lang.Comparable
compareTo 
 - 
 
 - 
 
- 
- 
Method Detail
- 
setFileMap
void setFileMap(Map<String,T> fileMap)
DON'T USE! Hibernate is managing this collection, so if it is overridden, Hibernate can't keep track of it anymore. UseputFile(String, IKeyDependentFileEntity),removeFile(String)orgetFileMap()instead to modify the map. 
- 
newFileEntiy
T newFileEntiy()
Creates a new instance of file entity which is connected to the base entity (this). However this entity is not yet persisted nor is it connected to file key- Returns:
 - a new file entity connected to this entity
 
 
- 
setFileData
default void setFileData(String fileKey, File file, Object userRef) throws FileNotFoundException, IOException
- Throws:
 FileNotFoundExceptionIOException
 
- 
putFile
default T putFile(String key, T file)
- Parameters:
 key-Stringto store file underfile- the file to put into file map- Returns:
 - the file previously stored for the given key or 
nullif there wasn't any 
 
- 
removeFile
default T removeFile(String key)
Removes the file mapping for the given key. SeeMap.remove(Object).- Parameters:
 key-Stringkey in the file map- Returns:
 - the removed file or 
nullif there wasn't any 
 
 - 
 
 -