Package de.xima.fc.entities
Class APluginEntity<META extends IPluginFileEntity<?,?,?>,DATA extends IFileDataEntity<META>,CONFIG extends IFileDataEntity<META>>
- java.lang.Object
-
- de.xima.cmn.dao.model.AEntity<Long>
-
- de.xima.fc.entities.AbstractEntity
-
- de.xima.fc.entities.AbstractLockableEntity
-
- de.xima.fc.entities.ALockableEntity
-
- de.xima.fc.entities.APluginEntity<META,DATA,CONFIG>
-
- Type Parameters:
META- File entity with the file meta data of the plugin file, such as the file size.DATA- Data entity with the binary data of the plugin JAR.CONFIG- Data entity with the properties configuration file of the plugin.
- All Implemented Interfaces:
de.xima.cmn.dao.interfaces.IEntity<Long>,de.xima.cmn.dao.interfaces.ILockableEntity<Long>,IDescriptionProviding,ILockingVersionProviding,INameProviding,IPluginEntity<META,DATA,CONFIG>,ITransferable,ITransferableEntity,ITransferableLockableEntity,IUUIDEntity,Serializable,Comparable<de.xima.cmn.dao.interfaces.IEntity<Long>>
- Direct Known Subclasses:
ClientPlugin,SystemPlugin
@MappedSuperclass public abstract class APluginEntity<META extends IPluginFileEntity<?,?,?>,DATA extends IFileDataEntity<META>,CONFIG extends IFileDataEntity<META>> extends ALockableEntity implements IPluginEntity<META,DATA,CONFIG>
A formcycle plugin that provides additional features to an existing formcycle application. A plugin is scoped either to a particular client (a client plugin) or to the system (a system plugin). Each plugin must have a unique ID consisting of thegetPluginKey()and optionally agetPluginFileKey()(but legacy plugins may not have such an ID).- Author:
- XIMA MEDIA GmbH
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected booleanactivestatic StringATTR_ACTIVEJPA attribute name for theisActive()field.static StringATTR_PLUGIN_FILE_KEYJPA attribute name for thegetPluginFileKey()field.static StringATTR_PLUGIN_KEYJPA attribute name for thegetPluginKey()field.static StringATTR_PLUGIN_REPOSITORYJPA attribute name for thegetPluginRepository()field.static StringATTR_REMOTE_SYNCJPA attribute name for theisRemoteSync()field.static StringCOL_ACTIVEDatabase column name for theisActive()field.static StringCOL_PLUGIN_FILE_KEYDatabase column name for thegetPluginFileKey()field.static StringCOL_PLUGIN_KEYDatabase column name for thegetPluginKey()field.static StringCOL_PLUGIN_REPOSITORYDatabase column name for thegetPluginRepository()field.static StringCOL_REMOTE_SYNCDatabase column name for theisRemoteSync()field.static StringCOL_UUIDDatabase column name for thegetUUID()field.protected Stringdescriptionprotected Stringnameprotected StringpluginFileKeyprotected StringpluginKeyprotected StringpluginRepositoryprotected booleanremoteSyncprotected UUIDuuid-
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.IDescriptionProviding
ATTR_BESCHREIBUNG, ATTR_DESCRIPTION, COL_DESCRIPTION
-
Fields inherited from interface de.xima.fc.entities.interfaces.INameProviding
ATTR_NAME, COL_NAME
-
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, INVALID_UUID, INVALID_UUID_OBJECT, NULL_SAFE_UUID_TYPE, TYPE_NAME_UUID
-
-
Constructor Summary
Constructors Constructor Description APluginEntity()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetBeschreibung()StringgetName()StringgetPluginFileKey()PluginIDgetPluginId()Gets the ID of this plugin, if it has one.StringgetPluginKey()StringgetPluginRepository()StringgetRuntimeKey()StringgetUUID()UUIDgetUUIDObject()booleanisActive()booleanisRemoteSync()voidsetActive(boolean active)voidsetBeschreibung(String description)voidsetName(String name)voidsetPluginFileKey(String pluginFileKey)voidsetPluginKey(String pluginKey)voidsetPluginRepository(String pluginRepository)voidsetRemoteSync(boolean sync)voidsetUUID(String uuid)voidsetUUIDObject(UUID uuid)-
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, 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.IDescriptionProviding
getDescription
-
Methods inherited from interface de.xima.fc.entities.interfaces.IPluginEntity
getFileEntity, getScopeKey
-
-
-
-
Field Detail
-
ATTR_ACTIVE
public static final String ATTR_ACTIVE
JPA attribute name for theisActive()field.- See Also:
- Constant Field Values
-
ATTR_REMOTE_SYNC
public static final String ATTR_REMOTE_SYNC
JPA attribute name for theisRemoteSync()field.- See Also:
- Constant Field Values
-
ATTR_PLUGIN_KEY
public static final String ATTR_PLUGIN_KEY
JPA attribute name for thegetPluginKey()field.- See Also:
- Constant Field Values
-
ATTR_PLUGIN_FILE_KEY
public static final String ATTR_PLUGIN_FILE_KEY
JPA attribute name for thegetPluginFileKey()field.- See Also:
- Constant Field Values
-
ATTR_PLUGIN_REPOSITORY
public static final String ATTR_PLUGIN_REPOSITORY
JPA attribute name for thegetPluginRepository()field.- See Also:
- Constant Field Values
-
COL_UUID
public static final String COL_UUID
Database column name for thegetUUID()field.- See Also:
- Constant Field Values
-
COL_PLUGIN_KEY
public static final String COL_PLUGIN_KEY
Database column name for thegetPluginKey()field.- See Also:
- Constant Field Values
-
COL_PLUGIN_FILE_KEY
public static final String COL_PLUGIN_FILE_KEY
Database column name for thegetPluginFileKey()field.- See Also:
- Constant Field Values
-
COL_PLUGIN_REPOSITORY
public static final String COL_PLUGIN_REPOSITORY
Database column name for thegetPluginRepository()field.- See Also:
- Constant Field Values
-
COL_REMOTE_SYNC
public static final String COL_REMOTE_SYNC
Database column name for theisRemoteSync()field.- See Also:
- Constant Field Values
-
COL_ACTIVE
public static final String COL_ACTIVE
Database column name for theisActive()field.- See Also:
- Constant Field Values
-
uuid
protected UUID uuid
-
name
protected String name
-
description
protected String description
-
remoteSync
protected boolean remoteSync
-
active
protected boolean active
-
pluginKey
protected String pluginKey
-
pluginFileKey
protected String pluginFileKey
-
pluginRepository
protected String pluginRepository
-
-
Method Detail
-
getUUID
public String getUUID()
- Specified by:
getUUIDin interfaceIUUIDEntity- Returns:
- UUID (Universal Unique Identifier) that identifies this type of entity. Usually is unique within a context,
e.g.
Mandant,Projekt, ...
-
setUUID
public void setUUID(String uuid)
- Specified by:
setUUIDin interfaceIUUIDEntity
-
getUUIDObject
public UUID getUUIDObject()
- Specified by:
getUUIDObjectin interfaceIUUIDEntity
-
setUUIDObject
public void setUUIDObject(UUID uuid)
- Parameters:
uuid- A unique identifier of this plugin entity. This ID must be unique at least among all plugins of the same scope.
-
getName
public String getName()
- Specified by:
getNamein interfaceINameProviding- Returns:
- The name of this object.
-
setName
public void setName(String name)
- Specified by:
setNamein interfaceIPluginEntity<META extends IPluginFileEntity<?,?,?>,DATA extends IFileDataEntity<META>,CONFIG extends IFileDataEntity<META>>- Parameters:
name- The name of the plugin, e.g. the file name.
-
getBeschreibung
public String getBeschreibung()
- Specified by:
getBeschreibungin interfaceIDescriptionProviding
-
setBeschreibung
public void setBeschreibung(String description)
- Specified by:
setBeschreibungin interfaceIPluginEntity<META extends IPluginFileEntity<?,?,?>,DATA extends IFileDataEntity<META>,CONFIG extends IFileDataEntity<META>>- Parameters:
description- Internal description of the plugin.
-
isRemoteSync
public boolean isRemoteSync()
- Specified by:
isRemoteSyncin interfaceIPluginEntity<META extends IPluginFileEntity<?,?,?>,DATA extends IFileDataEntity<META>,CONFIG extends IFileDataEntity<META>>- Returns:
- Whether this plugin is allowed to be enabled on the frontend server.
-
setRemoteSync
public void setRemoteSync(boolean sync)
- Specified by:
setRemoteSyncin interfaceIPluginEntity<META extends IPluginFileEntity<?,?,?>,DATA extends IFileDataEntity<META>,CONFIG extends IFileDataEntity<META>>- Parameters:
sync- Whether this plugin is allowed to be enabled on the frontend server.
-
isActive
public boolean isActive()
- Specified by:
isActivein interfaceIPluginEntity<META extends IPluginFileEntity<?,?,?>,DATA extends IFileDataEntity<META>,CONFIG extends IFileDataEntity<META>>- Returns:
- Whether this plugin is currently enabled.
-
setActive
public void setActive(boolean active)
- Specified by:
setActivein interfaceIPluginEntity<META extends IPluginFileEntity<?,?,?>,DATA extends IFileDataEntity<META>,CONFIG extends IFileDataEntity<META>>- Parameters:
active- Whether this plugin is currently enabled.
-
getRuntimeKey
public String getRuntimeKey()
- Specified by:
getRuntimeKeyin interfaceIPluginEntity<META extends IPluginFileEntity<?,?,?>,DATA extends IFileDataEntity<META>,CONFIG extends IFileDataEntity<META>>- Returns:
- The runtime key of the plugin, the UUID of the database entity.
-
getPluginKey
public String getPluginKey()
- Specified by:
getPluginKeyin interfaceIPluginEntity<META extends IPluginFileEntity<?,?,?>,DATA extends IFileDataEntity<META>,CONFIG extends IFileDataEntity<META>>- Returns:
- The plugin key as reported by the plugin, part of the ID that identifies the plugin. All plugins must have a plugin key, but legacy plugins may not have such a key yet.
-
setPluginKey
public void setPluginKey(String pluginKey)
- Specified by:
setPluginKeyin interfaceIPluginEntity<META extends IPluginFileEntity<?,?,?>,DATA extends IFileDataEntity<META>,CONFIG extends IFileDataEntity<META>>- Parameters:
pluginKey- The plugin key as reported by the plugin, part of the ID that identifies the plugin. All plugins must have a plugin key, but legacy plugins may not have such a key yet.
-
getPluginFileKey
public String getPluginFileKey()
- Specified by:
getPluginFileKeyin interfaceIPluginEntity<META extends IPluginFileEntity<?,?,?>,DATA extends IFileDataEntity<META>,CONFIG extends IFileDataEntity<META>>- Returns:
- The plugin file key as reported by the plugin, part of the ID that identifies the plugin. Plugins do not have a file key when they consist of only a single file.
-
setPluginFileKey
public void setPluginFileKey(String pluginFileKey)
- Specified by:
setPluginFileKeyin interfaceIPluginEntity<META extends IPluginFileEntity<?,?,?>,DATA extends IFileDataEntity<META>,CONFIG extends IFileDataEntity<META>>- Parameters:
pluginFileKey- The plugin file key as reported by the plugin, part of the ID that identifies the plugin. Plugins do not have a file key when they consist of only a single file.
-
getPluginRepository
public String getPluginRepository()
- Specified by:
getPluginRepositoryin interfaceIPluginEntity<META extends IPluginFileEntity<?,?,?>,DATA extends IFileDataEntity<META>,CONFIG extends IFileDataEntity<META>>- Returns:
- The repository of the plugin. Defaults to
REPOSITORY_NONE. When a repository exists, the plugin can e.g. be updated automatically.
-
setPluginRepository
public void setPluginRepository(String pluginRepository)
- Specified by:
setPluginRepositoryin interfaceIPluginEntity<META extends IPluginFileEntity<?,?,?>,DATA extends IFileDataEntity<META>,CONFIG extends IFileDataEntity<META>>- Parameters:
pluginRepository- The repository of the plugin. Defaults toREPOSITORY_NONE. When a repository exists, the plugin can e.g. be updated automatically.
-
getPluginId
public PluginID getPluginId()
Description copied from interface:IPluginEntityGets the ID of this plugin, if it has one.- Specified by:
getPluginIdin interfaceIPluginEntity<META extends IPluginFileEntity<?,?,?>,DATA extends IFileDataEntity<META>,CONFIG extends IFileDataEntity<META>>- Returns:
- The ID of this plugin, or
nullif this plugin does not have an ID.
-
-