Class ClientFormThemeFile

All Implemented Interfaces:
de.xima.cmn.dao.interfaces.IEntity<Long>, de.xima.cmn.dao.interfaces.ILockableEntity<Long>, IAbstractDatei<ClientFormThemeFileData>, IFileEntity<ClientFormTheme, ClientFormThemeFileData>, IFileSizeProviding, ILockingVersionProviding, ITransferable, ITransferableEntity, ITransferableLockableEntity, IUUIDEntity, Serializable, Comparable<de.xima.cmn.dao.interfaces.IEntity<Long>>

@Entity public class ClientFormThemeFile extends AFileEntity<ClientFormTheme, ClientFormThemeFileData> implements IFileSizeProviding, IUUIDEntity
Entity model for the metadata of a file from a ClientFormTheme. Common files are JavaScript, CSS, fonts, and images.
Since:
8.3.0
Author:
XIMA MEDIA GmbH
See Also:
  • Field Details

  • Constructor Details

    • ClientFormThemeFile

      public ClientFormThemeFile()
  • Method Details

    • cloneBasics

      public ClientFormThemeFile cloneBasics()
      Creates a copy of this file, with only the basic metadata fields copied. Referenced entities are not copied.
      Returns:
      A copy of this file, with only the basic metadata fields copied.
    • getBaseEntity

      public ClientFormTheme getBaseEntity()
      Specified by:
      getBaseEntity in interface IFileEntity<ClientFormTheme, ClientFormThemeFileData>
    • setBaseEntity

      public void setBaseEntity(ClientFormTheme baseEntity)
      Specified by:
      setBaseEntity in interface IFileEntity<ClientFormTheme, ClientFormThemeFileData>
    • getDataEntity

      public ClientFormThemeFileData getDataEntity()
      Specified by:
      getDataEntity in interface IFileEntity<ClientFormTheme, ClientFormThemeFileData>
    • setDataEntity

      public void setDataEntity(ClientFormThemeFileData dataEntity)
      Specified by:
      setDataEntity in interface IFileEntity<ClientFormTheme, ClientFormThemeFileData>
    • getFullPath

      public String getFullPath()
      Gets the full path of this file, including the resource context. The full path is the concatenation of the resource context and the file name. For example when the resource context is "formTheme" and the file name is "sub/folder/style.css", the full path is "formTheme/sub/folder/style.css".
      Returns:
      The full path of this file.
    • getId

      public Long getId()
      Gets the database ID of this form theme file metadata. The database ID is unique within the system, across all clients.
      Specified by:
      getId in interface de.xima.cmn.dao.interfaces.IEntity<Long>
      Returns:
      The database ID of this form theme.
    • setId

      public void setId(Long id)
      Sets the database ID of this form theme file metadata. The database ID is unique within the system, across all clients.
      Specified by:
      setId in interface de.xima.cmn.dao.interfaces.IEntity<Long>
      Overrides:
      setId in class AbstractEntity
      Parameters:
      id - The database ID of this form theme.
    • getResourceContext

      public String getResourceContext()
      Gets the resource context this file is used in, see EFormThemeResourceContext for common contexts.

      The resource context indicates how or where the file is used. For example, a file may be included only in the rendered web form, or only in the success page returned by the workflow when the form is submitted.

      Returns:
      The resource context this file is used in.
    • setResourceContext

      public void setResourceContext(String resourceContext)
      Sets the resource context this file is used in, see EFormThemeResourceContext for common contexts.

      The resource context indicates how or where the file is used. For example, a file may be included only in the rendered web form, or only in the success page returned by the workflow when the form is submitted.

      Parameters:
      resourceContext - The resource context this file is used in.
    • getSize

      public int getSize()
      Gets the file size in bytes. This method lets you access the file size without loading the file data.
      Specified by:
      getSize in interface IFileSizeProviding
      Returns:
      The file size in bytes.
    • setSize

      public void setSize(int size)
      Description copied from interface: IFileSizeProviding
      Sets the file size in bytes.
      Specified by:
      setSize in interface IFileSizeProviding
      Parameters:
      size - The file size in bytes.
    • setSize

      public void setSize(long size)
      Sets the file size in bytes. Should always be updated when the file data is updated.
      Parameters:
      size - The file size in bytes.
    • getUUID

      public String getUUID()
      Gets the UUID of this entity as a string. The UUID is unique amongst all form theme files belonging to the same client form theme.
      Specified by:
      getUUID in interface IUUIDEntity
      Returns:
      uuid The UUID of the entity.
    • setUUID

      public void setUUID(String uuid)
      Sets the UUID of this entity. The UUID is unique amongst all form theme files belonging to the same client form theme.
      Specified by:
      setUUID in interface IUUIDEntity
      Parameters:
      uuid - The UUID of the entity. Must be a valid UUID-4 string.
      Throws:
      IllegalArgumentException - If the UUID is non-empty and not a valid UUID-4 string.
    • getUUIDObject

      public UUID getUUIDObject()
      Gets the UUID of this entity. The UUID is unique amongst all form theme files belonging to the same client form theme.
      Specified by:
      getUUIDObject in interface IUUIDEntity
      Returns:
      uuid The UUID of the entity.
    • setUUIDObject

      public void setUUIDObject(UUID uuid)
      Sets the UUID of this entity. The UUID is unique amongst all form theme files belonging to the same client form theme.
      Parameters:
      uuid - The UUID of the entity. Must be a valid UUID-4 string.
    • setNewData

      public void setNewData(byte[] data)
      Specified by:
      setNewData in interface IAbstractDatei<ClientFormThemeFileData>
      Specified by:
      setNewData in interface IFileEntity<ClientFormTheme, ClientFormThemeFileData>
    • setNewData

      public void setNewData(String text)
      Sets the data of this file to a plain text file, encoded via UTF-8.
      Parameters:
      text - The new data of this file.