Interface ILocalizedScopedFilesProviding<TBase extends de.xima.cmn.dao.interfaces.IEntity<Long>,TMeta extends ILocalizedScopedFileMetaEntity<TBase,TData>,TData extends IFileDataEntity<TMeta>>
-
- Type Parameters:
TBase
- type of the base entity providing thelocalized files
.TMeta
- type of the entity holding the file metadata.TData
- type of the data entity holding the actual file data.
- All Superinterfaces:
Comparable<de.xima.cmn.dao.interfaces.IEntity<Long>>
,de.xima.cmn.dao.interfaces.IEntity<Long>
,Serializable
- All Known Implementing Classes:
Projekt
,UserPortal
public interface ILocalizedScopedFilesProviding<TBase extends de.xima.cmn.dao.interfaces.IEntity<Long>,TMeta extends ILocalizedScopedFileMetaEntity<TBase,TData>,TData extends IFileDataEntity<TMeta>> extends de.xima.cmn.dao.interfaces.IEntity<Long>
Common interface for entities providinglocalized files
.- Since:
- 8.2.0
- Author:
- XIMA MEDIA GmbH
-
-
Field Summary
Fields Modifier and Type Field Description static String
ATTR_FILES
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default void
addFile(TMeta file)
Adds the given file to this base entity.default TMeta
getFile(String fileKey, Locale locale)
Finds a file with a given file key for a given locale.default TData
getFileData(String fileKey, Locale locale)
Gets the file data for the given file key and locale.@NotNull Locale
getFileDefaultLocale()
Gets the default locale for this providing entity.default Set<String>
getFileKeys()
Gets all available file keys provided by this entity.default Set<Locale>
getFileLocales()
Gets all available locales provided by this entity.List<TMeta>
getFiles()
Gets the file entities.default void
removeFile(TMeta file)
Removes the given file from this base entity.void
setFiles(List<TMeta> files)
Sets the file entities.-
Methods inherited from interface java.lang.Comparable
compareTo
-
-
-
-
Field Detail
-
ATTR_FILES
static final String ATTR_FILES
- See Also:
- Constant Field Values
-
-
Method Detail
-
getFileDefaultLocale
@NotNull @NotNull Locale getFileDefaultLocale()
Gets the default locale for this providing entity.- Returns:
- the default locale for this providing entity.
-
getFileKeys
default Set<String> getFileKeys()
Gets all available file keys provided by this entity.- Returns:
- the all available file keys provided by this entity.
-
getFileLocales
default Set<Locale> getFileLocales()
Gets all available locales provided by this entity.- Returns:
- the all available locales provided by this entity.
-
setFiles
void setFiles(List<TMeta> files)
Sets the file entities.- Parameters:
files
- the file entities to set.
-
addFile
default void addFile(TMeta file)
Adds the given file to this base entity.- Parameters:
file
- to add
-
getFile
default TMeta getFile(String fileKey, Locale locale)
Finds a file with a given file key for a given locale.- Parameters:
fileKey
- The file key to search for.locale
- The locale to search for.- Returns:
- The file with the given file key and locale, or null if no such file exists.
-
getFileData
default TData getFileData(String fileKey, Locale locale)
Gets the file data for the given file key and locale.- Parameters:
fileKey
- to get the file data forlocale
- to get the file data for.- Returns:
- The file data for the given file key and locale
-
removeFile
default void removeFile(TMeta file)
Removes the given file from this base entity.- Parameters:
file
- to remove
-
-