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 booleanstatic final StringJPA attribute name for theisActive()field.static final StringJPA attribute name for thegetPluginFileKey()field.static final StringJPA attribute name for thegetPluginKey()field.static final StringJPA attribute name for thegetPluginRepository()field.static final StringJPA attribute name for theisRemoteSync()field.static final StringDatabase column name for theisActive()field.static final StringDatabase column name for thegetPluginFileKey()field.static final StringDatabase column name for thegetPluginKey()field.static final StringDatabase column name for thegetPluginRepository()field.static final StringDatabase column name for theisRemoteSync()field.static final Stringstatic final StringDatabase column name for thegetUUID()field.protected Stringprotected Stringprotected Stringprotected Stringprotected Stringprotected booleanprotected EPluginServerRestrictionTypeprotected UUIDFields inherited from class de.xima.fc.entities.AbstractLockableEntity
COL_LOCKINGVERSION, lockingVersionFields inherited from class de.xima.fc.entities.AbstractEntity
COL_ID, idFields inherited from interface de.xima.fc.entities.interfaces.IDescriptionProviding
ATTR_BESCHREIBUNG, ATTR_DESCRIPTION, COL_DESCRIPTIONFields inherited from interface de.xima.cmn.dao.interfaces.IEntity
ATTR_IDFields inherited from interface de.xima.cmn.dao.interfaces.ILockableEntity
ATTR_LOCKINGVERSIONFields inherited from interface de.xima.fc.entities.interfaces.INameProviding
ATTR_NAME, COL_NAMEFields inherited from interface de.xima.fc.entities.interfaces.ITransferableEntity
IMPORT_ID, INVALID_IDFields 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()booleanisActive()booleanvoidsetActive(boolean active) voidsetBeschreibung(String description) voidvoidsetPluginFileKey(String pluginFileKey) voidsetPluginKey(String pluginKey) voidsetPluginRepository(String pluginRepository) voidsetRemoteSync(boolean sync) voidsetServerRestrictionType(EPluginServerRestrictionType serverRestrictionType) voidvoidsetUUIDObject(UUID uuid) Methods inherited from class de.xima.fc.entities.AbstractLockableEntity
entityHasChanged, getLockingVersion, setLockingVersion, toStringMethods inherited from class de.xima.fc.entities.AbstractEntity
asIntValue, isPersisted, setId, setIdMethods inherited from class de.xima.cmn.dao.model.AEntity
compareTo, equals, getDBTableName, hashCodeMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.Comparable
compareToMethods inherited from interface de.xima.fc.entities.interfaces.IDescriptionProviding
getDescriptionMethods inherited from interface de.xima.cmn.dao.interfaces.IEntity
getId, isPersisted, setIdMethods 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:
getUUIDin 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:
setUUIDin interfaceIUUIDEntity
-
getUUIDObject
- Specified by:
getUUIDObjectin 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:
getNamein interfaceINameProviding- Returns:
- The name of this object.
-
setName
- 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
- Specified by:
getBeschreibungin interfaceIDescriptionProviding
-
setBeschreibung
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
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.
-
getServerRestrictionType
- Specified by:
getServerRestrictionTypein 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:
setServerRestrictionTypein 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
-