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 boolean
active
static String
ATTR_ACTIVE
JPA attribute name for theisActive()
field.static String
ATTR_PLUGIN_FILE_KEY
JPA attribute name for thegetPluginFileKey()
field.static String
ATTR_PLUGIN_KEY
JPA attribute name for thegetPluginKey()
field.static String
ATTR_PLUGIN_REPOSITORY
JPA attribute name for thegetPluginRepository()
field.static String
ATTR_REMOTE_SYNC
JPA attribute name for theisRemoteSync()
field.static String
COL_ACTIVE
Database column name for theisActive()
field.static String
COL_PLUGIN_FILE_KEY
Database column name for thegetPluginFileKey()
field.static String
COL_PLUGIN_KEY
Database column name for thegetPluginKey()
field.static String
COL_PLUGIN_REPOSITORY
Database column name for thegetPluginRepository()
field.static String
COL_REMOTE_SYNC
Database column name for theisRemoteSync()
field.static String
COL_RESTRICT_SERVER_TYPE
static String
COL_UUID
Database column name for thegetUUID()
field.protected String
description
protected String
name
protected String
pluginFileKey
protected String
pluginKey
protected String
pluginRepository
protected boolean
remoteSync
protected EPluginServerRestrictionType
serverRestrictionType
protected UUID
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.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 String
getBeschreibung()
String
getName()
String
getPluginFileKey()
PluginID
getPluginId()
Gets the ID of this plugin, if it has one.String
getPluginKey()
String
getPluginRepository()
String
getRuntimeKey()
EPluginServerRestrictionType
getServerRestrictionType()
String
getUUID()
UUID
getUUIDObject()
boolean
isActive()
boolean
isRemoteSync()
void
setActive(boolean active)
void
setBeschreibung(String description)
void
setName(String name)
void
setPluginFileKey(String pluginFileKey)
void
setPluginKey(String pluginKey)
void
setPluginRepository(String pluginRepository)
void
setRemoteSync(boolean sync)
void
setServerRestrictionType(EPluginServerRestrictionType serverRestrictionType)
void
setUUID(String uuid)
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.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
-
COL_RESTRICT_SERVER_TYPE
public static final String COL_RESTRICT_SERVER_TYPE
- 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
-
serverRestrictionType
protected EPluginServerRestrictionType serverRestrictionType
-
-
Method Detail
-
getUUID
public String 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
public void setUUID(String uuid)
- Specified by:
setUUID
in interfaceIUUIDEntity
-
getUUIDObject
public UUID getUUIDObject()
- Specified by:
getUUIDObject
in 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:
getName
in interfaceINameProviding
- Returns:
- The name of this object.
-
setName
public void setName(String name)
- 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
public String getBeschreibung()
- Specified by:
getBeschreibung
in interfaceIDescriptionProviding
-
setBeschreibung
public void setBeschreibung(String description)
- 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
public String 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
public String 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
public void setPluginKey(String pluginKey)
- 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
public String 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
public void setPluginFileKey(String pluginFileKey)
- 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
public String 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
public void setPluginRepository(String pluginRepository)
- 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
public PluginID 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
public EPluginServerRestrictionType 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
public void setServerRestrictionType(EPluginServerRestrictionType serverRestrictionType)
- 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
-
-