Class ClientFormThemeFile
java.lang.Object
de.xima.cmn.dao.model.AEntity<Long>
de.xima.fc.entities.AbstractEntity
de.xima.fc.entities.AbstractLockableEntity
de.xima.fc.entities.AFileEntity<ClientFormTheme, ClientFormThemeFileData>
de.xima.fc.entities.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:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classAn ID for aClientFormThemeFilethat uniquely identifies that file within a particularClientFormTheme. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringJPA attribute name for thegetResourceContext()field.static final StringDatabase column name for thegetResourceContext()field.Fields inherited from class AFileEntity
aenderungsdatum, ATTR_NAME, benutzer_erstellt, benutzer_geaendert, COL_DATE_CREATED, COL_DATE_MODIFIED, COL_NAME, COL_USER_NAME_CREATED, COL_USER_NAME_MODIFIED, dataEntities, dateiname, erstellungsdatumFields inherited from class AbstractLockableEntity
COL_LOCKINGVERSION, lockingVersionFields inherited from class AbstractEntity
COL_ID, idFields inherited from interface de.xima.cmn.dao.interfaces.IEntity
ATTR_IDFields inherited from interface IFileEntity
ATTR_AENDERUNGSDATUM, ATTR_BASE_ENTITY, ATTR_BENUTZER, ATTR_BENUTZER_GEAENDERT, ATTR_DATA_ENTITY, ATTR_DATEINAME, ATTR_DATEN, ATTR_ERSTELLUNGSDATUM, COL_BASE_ENTITYFields inherited from interface IFileSizeProviding
ATTR_SIZE, COL_SIZEFields inherited from interface de.xima.cmn.dao.interfaces.ILockableEntity
ATTR_LOCKINGVERSIONFields inherited from interface ITransferableEntity
IMPORT_ID, INVALID_IDFields inherited from interface IUUIDEntity
ATTR_UUID, COL_UUID, INVALID_UUID, INVALID_UUID_OBJECT, NULL_SAFE_UUID_TYPE, NULLABLE_UUID_TYPE, TYPE_NAME_UUID -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionCreates a copy of this file, with only the basic metadata fields copied.Gets the full path of this file, including the resource context.getId()Gets the database ID of this form theme file metadata.Gets the resource context this file is used in, seeEFormThemeResourceContextfor common contexts.intgetSize()Gets the file size in bytes.getUUID()Gets the UUID of this entity as a string.Gets the UUID of this entity.voidsetBaseEntity(ClientFormTheme baseEntity) voidsetDataEntity(ClientFormThemeFileData dataEntity) voidSets the database ID of this form theme file metadata.voidsetNewData(byte[] data) voidsetNewData(String text) Sets the data of this file to a plain text file, encoded via UTF-8.voidsetResourceContext(String resourceContext) Sets the resource context this file is used in, seeEFormThemeResourceContextfor common contexts.voidsetSize(int size) Sets the file size in bytes.voidsetSize(long size) Sets the file size in bytes.voidSets the UUID of this entity.voidsetUUIDObject(UUID uuid) Sets the UUID of this entity.Methods inherited from class AFileEntity
getAenderungsdatum, getBenutzer_erstellt, getBenutzer_geaendert, getDataEntities, getDateiname, getDaten, getErstellungsdatum, setAenderungsdatum, setBenutzer_erstellt, setBenutzer_geaendert, setDataEntities, setDateiname, setErstellungsdatumMethods inherited from class AbstractLockableEntity
entityHasChanged, getLockingVersion, setLockingVersion, toStringMethods inherited from class AbstractEntity
asIntValue, isPersisted, setIdMethods inherited from class de.xima.cmn.dao.model.AEntity
compareTo, equals, getDBTableName, hashCodeMethods inherited from interface Comparable
compareToMethods inherited from interface de.xima.cmn.dao.interfaces.IEntity
isPersistedMethods inherited from interface IFileEntity
getDateiDaten, setDateiDatenMethods inherited from interface de.xima.cmn.dao.interfaces.ILockableEntity
entityHasChanged, getLockingVersion, setLockingVersion
-
Field Details
-
ATTR_RESOURCE_CONTEXT
JPA attribute name for thegetResourceContext()field.- See Also:
-
COL_RESOURCE_CONTEXT
Database column name for thegetResourceContext()field.- See Also:
-
-
Constructor Details
-
ClientFormThemeFile
public ClientFormThemeFile()
-
-
Method Details
-
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
- Specified by:
getBaseEntityin interfaceIFileEntity<ClientFormTheme, ClientFormThemeFileData>
-
setBaseEntity
- Specified by:
setBaseEntityin interfaceIFileEntity<ClientFormTheme, ClientFormThemeFileData>
-
getDataEntity
- Specified by:
getDataEntityin interfaceIFileEntity<ClientFormTheme, ClientFormThemeFileData>
-
setDataEntity
- Specified by:
setDataEntityin interfaceIFileEntity<ClientFormTheme, ClientFormThemeFileData>
-
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
-
setId
Sets the database ID of this form theme file metadata. The database ID is unique within the system, across all clients.- Specified by:
setIdin interfacede.xima.cmn.dao.interfaces.IEntity<Long>- Overrides:
setIdin classAbstractEntity- Parameters:
id- The database ID of this form theme.
-
getResourceContext
Gets the resource context this file is used in, seeEFormThemeResourceContextfor 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
Sets the resource context this file is used in, seeEFormThemeResourceContextfor 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:
getSizein interfaceIFileSizeProviding- Returns:
- The file size in bytes.
-
setSize
public void setSize(int size) Description copied from interface:IFileSizeProvidingSets the file size in bytes.- Specified by:
setSizein interfaceIFileSizeProviding- 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
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:
getUUIDin interfaceIUUIDEntity- Returns:
- uuid The UUID of the entity.
-
setUUID
Sets the UUID of this entity. The UUID is unique amongst all form theme files belonging to the same client form theme.- Specified by:
setUUIDin interfaceIUUIDEntity- 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
Gets the UUID of this entity. The UUID is unique amongst all form theme files belonging to the same client form theme.- Specified by:
getUUIDObjectin interfaceIUUIDEntity- Returns:
- uuid The UUID of the entity.
-
setUUIDObject
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:
setNewDatain interfaceIAbstractDatei<ClientFormThemeFileData>- Specified by:
setNewDatain interfaceIFileEntity<ClientFormTheme, ClientFormThemeFileData>
-
setNewData
Sets the data of this file to a plain text file, encoded via UTF-8.- Parameters:
text- The new data of this file.
-