public class AnyWorkObject extends Entity implements HierarchicalEntity
Represents a concrete work object. <p> Note: This class is useful when working with work objects in a generic way.
Modifier and Type | Class and Description |
---|---|
static class |
AnyWorkObject.Builder
Builder for a AnyWorkObject instance.
|
Entity.EntityBuilder<E extends Entity,SELF extends Entity.EntityBuilder<E,SELF>>
HierarchicalEntity.HierarchicalEntityBuilder<SELF extends HierarchicalEntity.HierarchicalEntityBuilder<SELF>>
Modifier and Type | Field and Description |
---|---|
static Optional<Object> |
VARIABLE_DELETED_VALUE
Variable value used inside the
DomainObjectModification as a flag to delete the variables in the next update. |
Modifier and Type | Method and Description |
---|---|
static AnyWorkObject.Builder |
builder()
Creates a builder for a new concrete work object instance.
|
static AnyWorkObject.Builder |
builder(AnyWorkObject template)
Creates a builder for a new concrete work object instance and applies the given template.
|
String |
getAssignedGroupId()
Returns the current assigned group of the entity.
|
Instant |
getAssignedGroupIdUpdateTime()
Returns the time the entity’s assigned group was last updated.
|
String |
getAssigneeId()
Returns the current assignee of the entity.
|
Instant |
getAssigneeIdUpdateTime()
Returns the time the entity’s assignee was last updated.
|
Set<String> |
getCandidateGroupIds()
Returns the candidate groups of the entity.
|
Set<String> |
getCandidateUserIds()
Returns the candidate users of the entity.
|
String |
getDefinitionId()
Returns the definition id of the entity.
|
Instant |
getDueTime()
Returns the time that the entity is due.
|
String |
getInitialAssignedGroupId()
Returns the initial assigned group of the entity.
|
String |
getInitialAssigneeId()
Returns the initial assignee of the entity.
|
Variable |
getLocalVariable(String name)
Returns the local variable with the given name.
|
List<Variable> |
getLocalVariables()
Returns the local variables of the entity.
|
List<Variable> |
getLocalVariables(com.google.common.base.Predicate<Variable> predicate)
Returns the local variables of the entity, filtered by the given predicate.
|
Map<String,Object> |
getLocalVariablesMap()
Returns the local variables of the entity as name/value pairs.
|
Map<String,Object> |
getLocalVariablesMap(com.google.common.base.Predicate<Variable> predicate)
Returns the local variables of the entity as name/value pairs, filtered by the given predicate.
|
Object |
getLocalVariableValue(String name)
Returns the value of the local variable with the given name.
|
<T> T |
getLocalVariableValue(String name,
Class<T> expectedType)
Returns the value of the local variable with the given name, cast to the expected type.
|
<T> T |
getLocalVariableValue(String name,
com.google.common.reflect.TypeToken<T> expectedType)
Returns the value of the local variable with the given name, cast to the expected type.
|
<V,W> V |
getLocalVariableValue(ValueAccessor<V> variableAccessor)
Returns the value of the local variable with the name defined by the variable accessor, deserialized and cast to the type expected by the variable accessor.
|
String |
getOwnerId()
Returns the owner of the entity.
|
String |
getParentId()
Returns the id of the parent entity.
|
List<String> |
getPath()
Returns the path of the hierarchy to which the entity belongs.
|
String |
getPreviousAssignedGroupId()
Returns the previous assigned group of the entity.
|
String |
getPreviousAssigneeId()
Returns the previous assignee of the entity.
|
Integer |
getPriority()
Returns the priority of the entity.
|
Instant |
getResubmissionTime()
Returns the time the entity needs to be resubmitted.
|
String |
getRootId()
Implements backward compatibility for data with case as a workobject root.
|
String |
getState()
Returns the current state of the entity.
|
Instant |
getStateUpdateTime()
Returns the time the entity state was last updated.
|
String |
getSubState()
Returns the current sub state of the entity.
|
Instant |
getSubStateUpdateTime()
Returns the time the entity sub state was last updated.
|
Variable |
getVariable(String name)
Deprecated.
support for non-explicit hierarchy parsing is going to be removed.
Please use the
getLocalVariable(String) method instead and recheck where you store the variables |
List<Variable> |
getVariables()
Deprecated.
support for non-explicit hierarchy parsing is going to be removed.
Please use the
getLocalVariables() method instead and recheck where you store the variables |
List<Variable> |
getVariables(com.google.common.base.Predicate<Variable> predicate)
Deprecated.
support for non-explicit hierarchy parsing is going to be removed.
Please use the
getLocalVariables(Predicate) method instead and recheck where you store the variables |
Map<String,Object> |
getVariablesMap()
Deprecated.
support for non-explicit hierarchy parsing is going to be removed.
Please use the
getLocalVariablesMap() method instead and recheck where you store the variables |
Map<String,Object> |
getVariablesMap(com.google.common.base.Predicate<Variable> predicate)
Deprecated.
support for non-explicit hierarchy parsing is going to be removed.
Please use the
getLocalVariablesMap(Predicate) method instead and recheck where you store the variables |
Object |
getVariableValue(String name)
Deprecated.
support for non-explicit hierarchy parsing is going to be removed.
Please use the
getLocalVariableValue(String) method instead and recheck where you store the variables |
<T> T |
getVariableValue(String name,
Class<T> expectedType)
Deprecated.
support for non-explicit hierarchy parsing is going to be removed.
Please use the
getLocalVariableValue(String, Class) method instead and recheck where you store the variables |
<T> T |
getVariableValue(String name,
com.google.common.reflect.TypeToken<T> expectedType)
Deprecated.
support for non-explicit hierarchy parsing is going to be removed.
Please use the
getLocalVariableValue(String, Class) method instead and recheck where you store the variables |
<V,W> V |
getVariableValue(ValueAccessor<V> variableAccessor)
Deprecated.
support for non-explicit hierarchy parsing is going to be removed.
Please use the
getLocalVariableValue(ValueAccessor) method instead and recheck where you store the variables |
boolean |
hasLocalVariable(String name)
Returns <i>true</i> if the entity has a local variable with the given name.
|
boolean |
hasLocalVariable(ValueAccessor<?> variableAccessor)
Returns <i>true</i> if the entity has a local variable with the name of the given variable accessor.
|
boolean |
hasParent()
Returns <i>true</i> if the entity has a parent.
|
boolean |
hasVariable(String name)
Deprecated.
support for non-explicit hierarchy parsing is going to be removed.
Please use the
hasLocalVariable(String) method instead and recheck where you store the variables |
boolean |
hasVariable(ValueAccessor<?> variableAccessor)
Deprecated.
support for non-explicit hierarchy parsing is going to be removed.
Please use the
hasLocalVariable(ValueAccessor) method instead and recheck where you store the variables |
boolean |
isActive()
Returns <i>true</i> if the entity is in state
ACTIVE . |
boolean |
isCompleted()
Returns <i>true</i> if the entity is in state
COMPLETED . |
boolean |
isInterrupted()
Returns <i>true</i> if the entity is in state
INTERRUPTED . |
String |
toString() |
getCreationTime, getExternalId, getGlobalId, getId, getModificationCreatorId, getModificationUpdaterId, getModificationVersion, getName, getProviderId, getTenantId, getType, getUpdateTime
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
getId
public static AnyWorkObject.Builder builder()
Creates a builder for a new concrete work object instance.
public static AnyWorkObject.Builder builder(AnyWorkObject template)
Creates a builder for a new concrete work object instance and applies the given template.
template
- the work object templatepublic String getOwnerId()
Returns the owner of the entity.
public String getAssigneeId()
Returns the current assignee of the entity.
public String getInitialAssigneeId()
Returns the initial assignee of the entity.
public String getPreviousAssigneeId()
Returns the previous assignee of the entity.
public String getAssignedGroupId()
Returns the current assigned group of the entity.
public String getInitialAssignedGroupId()
Returns the initial assigned group of the entity.
public String getPreviousAssignedGroupId()
Returns the previous assigned group of the entity.
public Set<String> getCandidateUserIds()
Returns the candidate users of the entity.
public Set<String> getCandidateGroupIds()
Returns the candidate groups of the entity.
public Integer getPriority()
Returns the priority of the entity.
public Instant getResubmissionTime()
Returns the time the entity needs to be resubmitted.
public Instant getDueTime()
Returns the time that the entity is due.
public Instant getAssigneeIdUpdateTime()
Returns the time the entity’s assignee was last updated.
public Instant getAssignedGroupIdUpdateTime()
Returns the time the entity’s assigned group was last updated.
public List<String> getPath()
HierarchicalEntity
Returns the path of the hierarchy to which the entity belongs. The path starts with the root and ends with the entity itself, when iterating through the list from beginning to end.
getPath
in interface HierarchicalEntity
public String getRootId()
Implements backward compatibility for data with case as a workobject root.
getRootId
in interface HierarchicalEntity
public boolean hasParent()
HierarchicalEntity
Returns <i>true</i> if the entity has a parent.
hasParent
in interface HierarchicalEntity
public String getParentId()
HierarchicalEntity
Returns the id of the parent entity.
getParentId
in interface HierarchicalEntity
public boolean isActive()
Returns <i>true</i> if the entity is in state ACTIVE
.
getState()
,
WorkObjectState.STATE_ACTIVE
public boolean isCompleted()
Returns <i>true</i> if the entity is in state COMPLETED
.
getState()
,
WorkObjectState.STATE_COMPLETED
public boolean isInterrupted()
Returns <i>true</i> if the entity is in state INTERRUPTED
.
getState()
,
WorkObjectState.STATE_INTERRUPTED
public String getDefinitionId()
Returns the definition id of the entity. The definition serves as the template to create the actual entity instance.
public String getState()
Returns the current state of the entity.
public String getSubState()
Returns the current sub state of the entity.
@Deprecated public final List<Variable> getVariables()
getLocalVariables()
method instead and recheck where you store the variablesReturns the variables of the entity.
@Deprecated public final List<Variable> getVariables(com.google.common.base.Predicate<Variable> predicate)
getLocalVariables(Predicate)
method instead and recheck where you store the variablesReturns the variables of the entity, filtered by the given predicate.
predicate
- the predicate to filter by@Deprecated public final Map<String,Object> getVariablesMap()
getLocalVariablesMap()
method instead and recheck where you store the variablesReturns the variables of the entity as name/value pairs. In case of name clashes, variables closer to this entity have precedence.
@Deprecated public final Map<String,Object> getVariablesMap(com.google.common.base.Predicate<Variable> predicate)
getLocalVariablesMap(Predicate)
method instead and recheck where you store the variablesReturns the variables of the entity as name/value pairs, filtered by the given predicate.
predicate
- the predicate to filter by@Deprecated public Variable getVariable(String name)
getLocalVariable(String)
method instead and recheck where you store the variablesReturns the variable with the given name. In case of name clashes, variables closer to this entity have precedence.
name
- the name of the variable to return@Deprecated public final Object getVariableValue(String name)
getLocalVariableValue(String)
method instead and recheck where you store the variablesReturns the value of the variable with the given name. In case of name clashes, variables closer to this entity have precedence.
name
- the name of the variable whose value to return@Deprecated public final <T> T getVariableValue(String name, Class<T> expectedType)
getLocalVariableValue(String, Class)
method instead and recheck where you store the variablesReturns the value of the variable with the given name, cast to the expected type.
T
- the type of the id/externalIdname
- the name of the variable whose value to returnexpectedType
- the expected type of the variable value@Deprecated public final <T> T getVariableValue(String name, com.google.common.reflect.TypeToken<T> expectedType)
getLocalVariableValue(String, Class)
method instead and recheck where you store the variablesReturns the value of the variable with the given name, cast to the expected type.
<p>
Note: using this TypeToken
based API is useful when working with parameterized values.
T
- the type of the id/externalIdname
- the name of the variable whose value to returnexpectedType
- the expected type of the variable value@Deprecated public final <V,W> V getVariableValue(ValueAccessor<V> variableAccessor)
getLocalVariableValue(ValueAccessor)
method instead and recheck where you store the variablesReturns the value of the variable with the name defined by the variable accessor, deserialized and cast to the type expected by the variable accessor.
V
- the expected transient type of the named valueW
- the expected persisted type of the named valuevariableAccessor
- the accessor from which to derive the name, deserialize the value, and cast to the expected type@Deprecated public boolean hasVariable(String name)
hasLocalVariable(String)
method instead and recheck where you store the variablesReturns <i>true</i> if the entity has a variable with the given name.
name
- the name of the variable@Deprecated public boolean hasVariable(ValueAccessor<?> variableAccessor)
hasLocalVariable(ValueAccessor)
method instead and recheck where you store the variablesReturns <i>true</i> if the entity has a variable with the name of the given variable accessor.
variableAccessor
- the accessor from which to derive the name, deserialize the value, and cast to the expected typepublic final List<Variable> getLocalVariables()
Returns the local variables of the entity.
public final List<Variable> getLocalVariables(com.google.common.base.Predicate<Variable> predicate)
Returns the local variables of the entity, filtered by the given predicate.
predicate
- the predicate to filter bypublic final Map<String,Object> getLocalVariablesMap()
Returns the local variables of the entity as name/value pairs.
public final Map<String,Object> getLocalVariablesMap(com.google.common.base.Predicate<Variable> predicate)
Returns the local variables of the entity as name/value pairs, filtered by the given predicate.
predicate
- the predicate to filter bypublic Variable getLocalVariable(String name)
Returns the local variable with the given name.
name
- the name of the local variable to returnpublic final Object getLocalVariableValue(String name)
Returns the value of the local variable with the given name.
name
- the name of the local variable whose value to returnpublic final <T> T getLocalVariableValue(String name, Class<T> expectedType)
Returns the value of the local variable with the given name, cast to the expected type.
T
- the type of the id/externalIdname
- the name of the local variable whose value to returnexpectedType
- the expected type of the variable valuepublic final <T> T getLocalVariableValue(String name, com.google.common.reflect.TypeToken<T> expectedType)
Returns the value of the local variable with the given name, cast to the expected type.
<p>
Note: using this TypeToken
based API is useful when working with parameterized values.
T
- the type of the id/externalIdname
- the name of the local variable whose value to returnexpectedType
- the expected type of the variable valuepublic final <V,W> V getLocalVariableValue(ValueAccessor<V> variableAccessor)
Returns the value of the local variable with the name defined by the variable accessor, deserialized and cast to the type expected by the variable accessor.
V
- the expected transient type of the named valueW
- the expected persisted type of the named valuevariableAccessor
- the accessor from which to derive the name, deserialize the value, and cast to the expected typepublic boolean hasLocalVariable(String name)
Returns <i>true</i> if the entity has a local variable with the given name.
name
- the name of the variablepublic boolean hasLocalVariable(ValueAccessor<?> variableAccessor)
Returns <i>true</i> if the entity has a local variable with the name of the given variable accessor.
variableAccessor
- the accessor from which to derive the name, deserialize the value, and cast to the expected typepublic Instant getStateUpdateTime()
Returns the time the entity state was last updated.
public Instant getSubStateUpdateTime()
Returns the time the entity sub state was last updated.
Copyright © 2010 - 2019 edorasware ag. All Rights Reserved.