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 the
getPluginKey()
and optionally a getPluginFileKey()
(but legacy plugins may not
have such an ID).- Author:
- XIMA MEDIA GmbH
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected boolean
static final String
JPA attribute name for theisActive()
field.static final String
JPA attribute name for thegetPluginFileKey()
field.static final String
JPA attribute name for thegetPluginKey()
field.static final String
JPA attribute name for thegetPluginRepository()
field.static final String
JPA attribute name for theisRemoteSync()
field.static final String
Database column name for theisActive()
field.static final String
Database column name for thegetPluginFileKey()
field.static final String
Database column name for thegetPluginKey()
field.static final String
Database column name for thegetPluginRepository()
field.static final String
Database column name for theisRemoteSync()
field.static final String
static final String
Database column name for thegetUUID()
field.protected String
protected String
protected String
protected String
protected String
protected boolean
protected EPluginServerRestrictionType
protected UUID
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.cmn.dao.interfaces.IEntity
ATTR_ID
Fields inherited from interface de.xima.cmn.dao.interfaces.ILockableEntity
ATTR_LOCKINGVERSION
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 -
Method Summary
Modifier and TypeMethodDescriptiongetName()
Gets the ID of this plugin, if it has one.getUUID()
boolean
isActive()
boolean
void
setActive
(boolean active) void
setBeschreibung
(String description) void
void
setPluginFileKey
(String pluginFileKey) void
setPluginKey
(String pluginKey) void
setPluginRepository
(String pluginRepository) void
setRemoteSync
(boolean sync) void
setServerRestrictionType
(EPluginServerRestrictionType serverRestrictionType) void
void
setUUIDObject
(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.cmn.dao.interfaces.IEntity
getId, isPersisted, setId
Methods inherited from interface de.xima.fc.entities.interfaces.IPluginEntity
getFileEntity, getScopeKey
-
Field Details
-
ATTR_ACTIVE
JPA attribute name for theisActive()
field.- See Also:
-
ATTR_REMOTE_SYNC
JPA attribute name for theisRemoteSync()
field.- See Also:
-
ATTR_PLUGIN_KEY
JPA attribute name for thegetPluginKey()
field.- See Also:
-
ATTR_PLUGIN_FILE_KEY
JPA attribute name for thegetPluginFileKey()
field.- See Also:
-
ATTR_PLUGIN_REPOSITORY
JPA attribute name for thegetPluginRepository()
field.- See Also:
-
COL_UUID
Database column name for thegetUUID()
field.- See Also:
-
COL_PLUGIN_KEY
Database column name for thegetPluginKey()
field.- See Also:
-
COL_PLUGIN_FILE_KEY
Database column name for thegetPluginFileKey()
field.- See Also:
-
COL_PLUGIN_REPOSITORY
Database column name for thegetPluginRepository()
field.- See Also:
-
COL_REMOTE_SYNC
Database column name for theisRemoteSync()
field.- See Also:
-
COL_ACTIVE
Database column name for theisActive()
field.- See Also:
-
COL_RESTRICT_SERVER_TYPE
- See Also:
-
uuid
-
name
-
description
-
remoteSync
protected boolean remoteSync -
active
protected boolean active -
pluginKey
-
pluginFileKey
-
pluginRepository
-
serverRestrictionType
-
-
Constructor Details
-
APluginEntity
public APluginEntity()
-
-
Method Details
-
getUUID
- Specified by:
getUUID
in interfaceIUUIDEntity
- Returns:
- UUID (Universal Unique Identifier) that identifies this type of entity. Usually is unique within a
context, e.g.
Mandant
,Projekt
, ...
-
setUUID
- Specified by:
setUUID
in interfaceIUUIDEntity
-
getUUIDObject
- Specified by:
getUUIDObject
in interfaceIUUIDEntity
-
setUUIDObject
- Parameters:
uuid
- A unique identifier of this plugin entity. This ID must be unique at least among all plugins of the same scope.
-
getName
- Specified by:
getName
in interfaceINameProviding
- Returns:
- The name of this object.
-
setName
- Specified by:
setName
in 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
- Specified by:
getBeschreibung
in interfaceIDescriptionProviding
-
setBeschreibung
- Specified by:
setBeschreibung
in 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:
isRemoteSync
in 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:
setRemoteSync
in 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:
isActive
in 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:
setActive
in interfaceIPluginEntity<META extends IPluginFileEntity<?,
?, ?>, DATA extends IFileDataEntity<META>, CONFIG extends IFileDataEntity<META>> - Parameters:
active
- Whether this plugin is currently enabled.
-
getRuntimeKey
- Specified by:
getRuntimeKey
in 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
- Specified by:
getPluginKey
in 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
- Specified by:
setPluginKey
in 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
- Specified by:
getPluginFileKey
in 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
- Specified by:
setPluginFileKey
in 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
- Specified by:
getPluginRepository
in 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
- Specified by:
setPluginRepository
in 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
Description copied from interface:IPluginEntity
Gets the ID of this plugin, if it has one.- Specified by:
getPluginId
in interfaceIPluginEntity<META extends IPluginFileEntity<?,
?, ?>, DATA extends IFileDataEntity<META>, CONFIG extends IFileDataEntity<META>> - Returns:
- The ID of this plugin, or
null
if this plugin does not have an ID.
-
getServerRestrictionType
- Specified by:
getServerRestrictionType
in interfaceIPluginEntity<META extends IPluginFileEntity<?,
?, ?>, DATA extends IFileDataEntity<META>, CONFIG extends IFileDataEntity<META>> - Returns:
- server type to which the installation of a plugin should be restricted
-
setServerRestrictionType
- Specified by:
setServerRestrictionType
in interfaceIPluginEntity<META extends IPluginFileEntity<?,
?, ?>, DATA extends IFileDataEntity<META>, CONFIG extends IFileDataEntity<META>> - Parameters:
serverRestrictionType
- server type to which the installation of a plugin should be restricted
-