Package de.xima.fc.entities
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 aClientFormTheme
. Common files are JavaScript, CSS, fonts, and images.- Since:
- 8.3.0
- Author:
- XIMA MEDIA GmbH
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ClientFormThemeFile.ClientFormThemeFileId
An ID for aClientFormThemeFile
that uniquely identifies that file within a particularClientFormTheme
.
-
Field Summary
Fields Modifier and Type Field Description static String
ATTR_RESOURCE_CONTEXT
JPA attribute name for thegetResourceContext()
field.static String
COL_RESOURCE_CONTEXT
Database column name for thegetResourceContext()
field.-
Fields inherited from class de.xima.fc.entities.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, erstellungsdatum
-
Fields inherited from class de.xima.fc.entities.AbstractLockableEntity
COL_LOCKINGVERSION, lockingVersion
-
Fields inherited from class de.xima.fc.entities.AbstractEntity
COL_ID, id
-
Fields inherited from interface de.xima.fc.entities.interfaces.IFileEntity
ATTR_AENDERUNGSDATUM, ATTR_BASE_ENTITY, ATTR_BENUTZER, ATTR_BENUTZER_GEAENDERT, ATTR_DATA_ENTITY, ATTR_DATEINAME, ATTR_DATEN, ATTR_ERSTELLUNGSDATUM, COL_BASE_ENTITY
-
Fields inherited from interface de.xima.fc.entities.interfaces.IFileSizeProviding
ATTR_SIZE, COL_SIZE
-
Fields inherited from interface de.xima.fc.entities.interfaces.ITransferableEntity
IMPORT_ID, INVALID_ID
-
Fields inherited from interface de.xima.fc.entities.interfaces.IUUIDEntity
ATTR_UUID, COL_UUID, INVALID_UUID, INVALID_UUID_OBJECT, NULL_SAFE_UUID_TYPE, NULLABLE_UUID_TYPE, TYPE_NAME_UUID
-
-
Constructor Summary
Constructors Constructor Description ClientFormThemeFile()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ClientFormThemeFile
cloneBasics()
Creates a copy of this file, with only the basic metadata fields copied.ClientFormTheme
getBaseEntity()
ClientFormThemeFileData
getDataEntity()
String
getFullPath()
Gets the full path of this file, including the resource context.Long
getId()
Gets the database ID of this form theme file metadata.String
getResourceContext()
Gets the resource context this file is used in, seeEFormThemeResourceContext
for common contexts.int
getSize()
Gets the file size in bytes.String
getUUID()
Gets the UUID of this entity as a string.UUID
getUUIDObject()
Gets the UUID of this entity.void
setBaseEntity(ClientFormTheme baseEntity)
void
setDataEntity(ClientFormThemeFileData dataEntity)
void
setId(Long id)
Sets the database ID of this form theme file metadata.void
setNewData(byte[] data)
void
setNewData(String text)
Sets the data of this file to a plain text file, encoded via UTF-8.void
setResourceContext(String resourceContext)
Sets the resource context this file is used in, seeEFormThemeResourceContext
for common contexts.void
setSize(int size)
Sets the file size in bytes.void
setSize(long size)
Sets the file size in bytes.void
setUUID(String uuid)
Sets the UUID of this entity.void
setUUIDObject(UUID uuid)
Sets the UUID of this entity.-
Methods inherited from class de.xima.fc.entities.AFileEntity
getAenderungsdatum, getBenutzer_erstellt, getBenutzer_geaendert, getDataEntities, getDateiname, getDaten, getErstellungsdatum, setAenderungsdatum, setBenutzer_erstellt, setBenutzer_geaendert, setDataEntities, setDateiname, setErstellungsdatum
-
Methods inherited from class de.xima.fc.entities.AbstractLockableEntity
entityHasChanged, getLockingVersion, setLockingVersion, toString
-
Methods inherited from class de.xima.fc.entities.AbstractEntity
asIntValue, isPersisted, setId
-
Methods inherited from class de.xima.cmn.dao.model.AEntity
compareTo, equals, getDBTableName, hashCode
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.lang.Comparable
compareTo
-
Methods inherited from interface de.xima.fc.entities.interfaces.IFileEntity
getDateiDaten, setDateiDaten
-
-
-
-
Field Detail
-
ATTR_RESOURCE_CONTEXT
public static final String ATTR_RESOURCE_CONTEXT
JPA attribute name for thegetResourceContext()
field.- See Also:
- Constant Field Values
-
COL_RESOURCE_CONTEXT
public static final String COL_RESOURCE_CONTEXT
Database column name for thegetResourceContext()
field.- See Also:
- Constant Field Values
-
-
Method Detail
-
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 interfaceIFileEntity<ClientFormTheme,ClientFormThemeFileData>
-
setBaseEntity
public void setBaseEntity(ClientFormTheme baseEntity)
- Specified by:
setBaseEntity
in interfaceIFileEntity<ClientFormTheme,ClientFormThemeFileData>
-
getDataEntity
public ClientFormThemeFileData getDataEntity()
- Specified by:
getDataEntity
in interfaceIFileEntity<ClientFormTheme,ClientFormThemeFileData>
-
setDataEntity
public void setDataEntity(ClientFormThemeFileData dataEntity)
- Specified by:
setDataEntity
in interfaceIFileEntity<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 interfacede.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 interfacede.xima.cmn.dao.interfaces.IEntity<Long>
- Overrides:
setId
in classAbstractEntity
- Parameters:
id
- The database ID of this form theme.
-
getResourceContext
public String getResourceContext()
Gets the resource context this file is used in, seeEFormThemeResourceContext
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, seeEFormThemeResourceContext
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 interfaceIFileSizeProviding
- 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 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
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 interfaceIUUIDEntity
- 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 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
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 interfaceIUUIDEntity
- 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 interfaceIAbstractDatei<ClientFormThemeFileData>
- Specified by:
setNewData
in interfaceIFileEntity<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.
-
-