Package de.xima.fc.entities
Class AWorkflowElement<TElement extends IWorkflowElementEntity,TSearchTerm extends AWorkflowElementSearchTerm<TElement>>
- java.lang.Object
-
- de.xima.cmn.dao.model.AEntity<Long>
-
- de.xima.fc.entities.AbstractEntity
-
- de.xima.fc.entities.AbstractLockableEntity
-
- de.xima.fc.entities.AWorkflowElement<TElement,TSearchTerm>
-
- Type Parameters:
TElement
- Type of the workflow element entity.TSearchTerm
- Type of the workflow element search term entity.
- All Implemented Interfaces:
de.xima.cmn.dao.interfaces.IEntity<Long>
,de.xima.cmn.dao.interfaces.ILockableEntity<Long>
,IDescriptionProviding
,ILockingVersionProviding
,INameProviding
,ITransferable
,ITransferableEntity
,ITransferableLockableEntity
,IUUIDEntity
,IActiveFlagProviding
,ICustomParametersProviding
,IElementKeyProviding
,IElementSearchTermsProviding
,IIdProviding<Long>
,IUuidProviding
,IVersionedCustomParametersProviding
,IWorkflowElementEntity
,IWorkflowElementTypeProviding
,Serializable
,Comparable<de.xima.cmn.dao.interfaces.IEntity<Long>>
- Direct Known Subclasses:
WorkflowNode
,WorkflowTrigger
@MappedSuperclass public abstract class AWorkflowElement<TElement extends IWorkflowElementEntity,TSearchTerm extends AWorkflowElementSearchTerm<TElement>> extends AbstractLockableEntity implements IUUIDEntity, IWorkflowElementEntity
Base class for workflow elements, i.e. nodes and triggers.- Since:
- 7.0.0
- 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_CUSTOM_PARAMETERS
JPA attribute name for thegetCustomParameters()
field.static String
ATTR_CUSTOM_PARAMETERS_VERSION
JPA attribute name for thegetCustomParametersVersion()
field.static String
ATTR_DESCRIPTION
JPA attribute name for thegetDescription()
field.static String
ATTR_SEARCH_TERMS
JPA attribute name for theIElementSearchTermsProviding.getSearchTerms()
field.static String
ATTR_TASK
JPA attribute name for thegetTask()
field.static String
ATTR_TYPE
JPA attribute name for thegetType()
field.static String
COL_ACTIVE
Database column name for theisActive()
field.static String
COL_CUSTOM_PARAMETERS
Database column name for thegetCustomParameters()
field.static String
COL_CUSTOM_PARAMETERS_VERSION
Database column name for thegetCustomParametersVersion()
field.static String
COL_DESCRIPTION
Database column name for thegetDescription()
field.static String
COL_NAME
Database column name for thegetName()
field.static String
COL_TASK
Database column name for thegetTask()
field.static String
COL_TYPE
Database column name for thegetType()
field.protected @NotNull @JsonObject String
customParameters
protected @NotNull String
customParametersVersion
protected @Size(max=1020) String
description
protected @Size(max=100) String
name
protected @NotNull List<TSearchTerm>
searchTerms
protected @NotNull WorkflowTask
task
protected @NotEmpty String
type
protected @NotNull 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
-
Fields inherited from interface de.xima.fc.entities.interfaces.INameProviding
ATTR_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, COL_UUID, INVALID_UUID, INVALID_UUID_OBJECT, NULL_SAFE_UUID_TYPE, TYPE_NAME_UUID
-
-
Constructor Summary
Constructors Constructor Description AWorkflowElement()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TElement
cloneBasics()
String
getBeschreibung()
String
getCustomParameters()
String
getCustomParametersVersion()
String
getDescription()
String
getName()
WorkflowTask
getTask()
String
getType()
UUID
getUuid()
String
getUUID()
UUID
getUUIDObject()
boolean
isActive()
void
setActive(boolean active)
void
setCustomParameters(String customParameters)
void
setCustomParametersVersion(String customParametersVersion)
void
setDescription(String description)
void
setName(String name)
void
setSearchTerms(List<TSearchTerm> searchTerms)
void
setTask(WorkflowTask task)
void
setType(String type)
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.interfaces.workflow.ICustomParametersProviding
getCustomParametersJson
-
Methods inherited from interface de.xima.fc.interfaces.workflow.IElementKeyProviding
getKey
-
Methods inherited from interface de.xima.fc.interfaces.workflow.IElementSearchTermsProviding
getSearchTerms
-
Methods inherited from interface de.xima.fc.interfaces.workflow.IIdProviding
getId
-
Methods inherited from interface de.xima.fc.interfaces.workflow.IWorkflowElementEntity
setCustomParametersJson
-
-
-
-
Field Detail
-
ATTR_ACTIVE
public static final String ATTR_ACTIVE
JPA attribute name for theisActive()
field.- See Also:
- Constant Field Values
-
ATTR_CUSTOM_PARAMETERS
public static final String ATTR_CUSTOM_PARAMETERS
JPA attribute name for thegetCustomParameters()
field.- See Also:
- Constant Field Values
-
ATTR_CUSTOM_PARAMETERS_VERSION
public static final String ATTR_CUSTOM_PARAMETERS_VERSION
JPA attribute name for thegetCustomParametersVersion()
field.- See Also:
- Constant Field Values
-
ATTR_DESCRIPTION
public static final String ATTR_DESCRIPTION
JPA attribute name for thegetDescription()
field.- See Also:
- Constant Field Values
-
ATTR_SEARCH_TERMS
public static final String ATTR_SEARCH_TERMS
JPA attribute name for theIElementSearchTermsProviding.getSearchTerms()
field.- See Also:
- Constant Field Values
-
ATTR_TASK
public static final String ATTR_TASK
JPA attribute name for thegetTask()
field.- See Also:
- Constant Field Values
-
ATTR_TYPE
public static final String ATTR_TYPE
JPA attribute name for thegetType()
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_CUSTOM_PARAMETERS
public static final String COL_CUSTOM_PARAMETERS
Database column name for thegetCustomParameters()
field.- See Also:
- Constant Field Values
-
COL_CUSTOM_PARAMETERS_VERSION
public static final String COL_CUSTOM_PARAMETERS_VERSION
Database column name for thegetCustomParametersVersion()
field.- See Also:
- Constant Field Values
-
COL_DESCRIPTION
public static final String COL_DESCRIPTION
Database column name for thegetDescription()
field.- See Also:
- Constant Field Values
-
COL_NAME
public static final String COL_NAME
Database column name for thegetName()
field.- See Also:
- Constant Field Values
-
COL_TASK
public static final String COL_TASK
Database column name for thegetTask()
field.- See Also:
- Constant Field Values
-
COL_TYPE
public static final String COL_TYPE
Database column name for thegetType()
field.- See Also:
- Constant Field Values
-
active
protected boolean active
-
customParameters
@NotNull @JsonObject protected @NotNull @JsonObject String customParameters
-
customParametersVersion
@NotNull protected @NotNull String customParametersVersion
-
description
@Size(max=1020) protected @Size(max=1020) String description
-
name
@Size(max=100) protected @Size(max=100) String name
-
searchTerms
@NotNull protected @NotNull List<TSearchTerm extends AWorkflowElementSearchTerm<TElement>> searchTerms
-
task
@NotNull protected @NotNull WorkflowTask task
-
type
@NotEmpty protected @NotEmpty String type
-
uuid
@NotNull protected @NotNull UUID uuid
-
-
Method Detail
-
cloneBasics
public TElement cloneBasics()
- Returns:
- A new workflow element instance with all fields that do not reference other entities copied from this instance.
-
getBeschreibung
public String getBeschreibung()
- Specified by:
getBeschreibung
in interfaceIDescriptionProviding
-
getCustomParameters
public String getCustomParameters()
- Specified by:
getCustomParameters
in interfaceICustomParametersProviding
- Returns:
- A JSON string holding the custom parameters.
-
getCustomParametersVersion
public String getCustomParametersVersion()
- Specified by:
getCustomParametersVersion
in interfaceIVersionedCustomParametersProviding
- Returns:
- The version of the custom parameters. You can, for example, store the version of the product that create the custom parameters here. Then you can use this to update the the parameters for later product versions.
-
getDescription
public String getDescription()
- Specified by:
getDescription
in interfaceIDescriptionProviding
- Returns:
- A human-readable description for this object.
-
getName
public String getName()
- Specified by:
getName
in interfaceINameProviding
- Returns:
- The name of this object.
-
getTask
public WorkflowTask getTask()
- Returns:
- The task to which this workflow element belongs.
-
getType
public String getType()
- Specified by:
getType
in interfaceIWorkflowElementTypeProviding
- Returns:
- The type of this workflow element. See
EWorkflowEventName
andEWorkflowNodeKind
for a list of built-in types.
-
getUuid
public UUID getUuid()
- Specified by:
getUuid
in interfaceIUuidProviding
- Returns:
- The UUID that identifies this instance.
-
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
, ...
-
getUUIDObject
public UUID getUUIDObject()
- Specified by:
getUUIDObject
in interfaceIUUIDEntity
- Returns:
- A unique identifier for this workflow element. This ID must be unique at least among all elements of the
WorkflowProcess
to which this element belongs.
-
isActive
public boolean isActive()
- Specified by:
isActive
in interfaceIActiveFlagProviding
- Returns:
- {code true} if this instance is considered active, enabled etc. The exact meaning depends on the type.
-
setActive
public void setActive(boolean active)
- Parameters:
active
- Whether this workflow element is active. Inactive elements are not processed.
-
setCustomParameters
public void setCustomParameters(String customParameters)
- Specified by:
setCustomParameters
in interfaceIWorkflowElementEntity
- Parameters:
customParameters
- The custom parameters JSON string that is then returned byICustomParametersProviding.getCustomParameters()
.
-
setCustomParametersVersion
public void setCustomParametersVersion(String customParametersVersion)
- Specified by:
setCustomParametersVersion
in interfaceIVersionedCustomParametersProviding
- Parameters:
customParametersVersion
- The custom parameters version string that is then returned byIVersionedCustomParametersProviding.getCustomParametersVersion()
.
-
setDescription
public void setDescription(String description)
- Parameters:
description
- The human-readable description of this workflow element.
-
setName
public void setName(String name)
- Parameters:
name
- The name of this workflow element.
-
setSearchTerms
public void setSearchTerms(List<TSearchTerm> searchTerms)
- Parameters:
searchTerms
- A list of search terms for filtering database queries.
-
setTask
public void setTask(WorkflowTask task)
- Parameters:
task
- The task to which this workflow element belongs.
-
setType
public void setType(String type)
- Parameters:
type
- The type of this workflow element. SeeEWorkflowEventName
andEWorkflowNodeKind
for a list of built-in types.
-
setUUID
public void setUUID(String uuid)
- Specified by:
setUUID
in interfaceIUUIDEntity
-
setUUIDObject
public void setUUIDObject(UUID uuid)
- Parameters:
uuid
- A unique identifier for this workflow element. This ID must be unique at least among all elements of theWorkflowProcess
to which this element belongs.
-
-