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 the localized 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 providing localized files.
    Since:
    8.2.0
    Author:
    XIMA MEDIA GmbH
    • 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.
      • getFiles

        List<TMeta> getFiles()
        Gets the file entities.
        Returns:
        the file entities
      • 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 for
        locale - 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