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 classClientFormThemeFile.ClientFormThemeFileIdAn ID for aClientFormThemeFilethat uniquely identifies that file within a particularClientFormTheme.
-
Field Summary
Fields Modifier and Type Field Description static StringATTR_RESOURCE_CONTEXTJPA attribute name for thegetResourceContext()field.static StringCOL_RESOURCE_CONTEXTDatabase 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 ClientFormThemeFilecloneBasics()Creates a copy of this file, with only the basic metadata fields copied.ClientFormThemegetBaseEntity()ClientFormThemeFileDatagetDataEntity()StringgetFullPath()Gets the full path of this file, including the resource context.LonggetId()Gets the database ID of this form theme file metadata.StringgetResourceContext()Gets the resource context this file is used in, seeEFormThemeResourceContextfor common contexts.intgetSize()Gets the file size in bytes.StringgetUUID()Gets the UUID of this entity as a string.UUIDgetUUIDObject()Gets the UUID of this entity.voidsetBaseEntity(ClientFormTheme baseEntity)voidsetDataEntity(ClientFormThemeFileData dataEntity)voidsetId(Long id)Sets 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.voidsetUUID(String uuid)Sets the UUID of this entity.voidsetUUIDObject(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:
getBaseEntityin interfaceIFileEntity<ClientFormTheme,ClientFormThemeFileData>
-
setBaseEntity
public void setBaseEntity(ClientFormTheme baseEntity)
- Specified by:
setBaseEntityin interfaceIFileEntity<ClientFormTheme,ClientFormThemeFileData>
-
getDataEntity
public ClientFormThemeFileData getDataEntity()
- Specified by:
getDataEntityin interfaceIFileEntity<ClientFormTheme,ClientFormThemeFileData>
-
setDataEntity
public void setDataEntity(ClientFormThemeFileData dataEntity)
- Specified by:
setDataEntityin 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:
getIdin 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:
setIdin interfacede.xima.cmn.dao.interfaces.IEntity<Long>- Overrides:
setIdin classAbstractEntity- Parameters:
id- The database ID of this form theme.
-
getResourceContext
public String 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
public void setResourceContext(String resourceContext)
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
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:
getUUIDin 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:
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
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:
getUUIDObjectin 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:
setNewDatain interfaceIAbstractDatei<ClientFormThemeFileData>- Specified by:
setNewDatain 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.
-
-