Package de.espirit.firstspirit.access
Interface Task
- All Superinterfaces:
Lockable
A
workflow
task.- Since:
- 4.0.120
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic enum
Task editor modestatic enum
Error code for task verify.static enum
Task context modestatic enum
Task prioritystatic class
This class holds the error code and a localized error message of verify errors. -
Field Summary
Modifier and TypeFieldDescriptionstatic final String
String for the error attribute of the activity ID.static final String
String for the error attribute of a comment.static final String
String for the error attribute of the throwable info.static final String
String for the error attribute of the throwable.static final String
String for the error attribute of the user login.static final String
String for the error attribute of the user name. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Close this taskdoTransition
(@NotNull WorkflowContext context, @NotNull Transition transition) Perform transition execution on this task.Get task creation dateGer task creatorGet task session attributes.
Keys, values and all referenced fields (recursively) must provide a no arg constructor to be valid for serialization.
AIllegalArgumentException
is thrown if a key or value with serialisation problems is added to the map.Deprecated.@Nullable FormData
Get this task's custom form data.Get task due dateGet task editor modeGet task allowed editors listReturn error info object or null if the error state has not been reached.Get task state historylong
getId()
Get task idgetMode()
Get task modeGet task priorityGet projectGet current task stateGet workflow model@Nullable Workflowable
ReturnWorkflowable
.void
gotoErrorState
(@NotNull WorkflowContext context, @Nullable Activity activity, @Nullable String comment, @Nullable Throwable throwable) Goto model error state.boolean
Is task finishedboolean
Was task timeout mail sendvoid
setCustomData
(Data customData) Deprecated.since 5.2.19, usesetCustomFormData(FormData)
.void
setCustomFormData
(@Nullable FormData customFormData) Set this task's custom form data.void
setDueDate
(Date dueDate) Set task due datevoid
setEditors
(List<Principal> editorUsers) Set allowed editorsvoid
setPriority
(Task.Priority priority) Set task priorityverify()
Verify state of this task object.
-
Field Details
-
ERROR_USER_LOGIN
String for the error attribute of the user login.- Since:
- 4.0.120
- See Also:
-
ERROR_USER_NAME
String for the error attribute of the user name.- Since:
- 4.0.120
- See Also:
-
ERROR_COMMENT
String for the error attribute of a comment.- Since:
- 4.0.120
- See Also:
-
ERROR_THROWABLE
String for the error attribute of the throwable.- Since:
- 4.0.120
- See Also:
-
ERROR_INFO
String for the error attribute of the throwable info.- Since:
- 4.1.2
- See Also:
-
ERROR_ACTIVITY_ID
String for the error attribute of the activity ID.- Since:
- 4.0.120
- See Also:
-
-
Method Details
-
getId
long getId()Get task id- Since:
- 4.0.120
-
getProject
Project getProject()Get project- Since:
- 4.0.120
-
getMode
Task.Mode getMode()Get task mode- Since:
- 4.0.120
-
getCreationDate
Date getCreationDate()Get task creation date- Since:
- 4.0.120
-
isFinished
boolean isFinished()Is task finished- Since:
- 4.0.120
-
getCreator
User getCreator()Ger task creator- Since:
- 4.0.120
-
getWorkflowable
ReturnWorkflowable
. The returnedWorkflowable
will be aStoreElement
inTask.Mode.STORE_ELEMENT
mode, aContentWorkflowable
inTask.Mode.ENTITY
mode or null inTask.Mode.NO_CONTEXT
mode.- Since:
- 4.0.120
-
getTaskState
TaskState getTaskState()Get current task state- Since:
- 4.0.120
-
doTransition
State doTransition(@NotNull @NotNull WorkflowContext context, @NotNull @NotNull Transition transition) throws LockException, ElementDeletedException Perform transition execution on this task. The task has to be locked. The task is changed during the transition, you have to save it afterwards.- Throws:
LockException
ElementDeletedException
- Since:
- 4.0.120
-
gotoErrorState
void gotoErrorState(@NotNull @NotNull WorkflowContext context, @Nullable @Nullable Activity activity, @Nullable @Nullable String comment, @Nullable @Nullable Throwable throwable) Goto model error state. The error information is saved as custom attributes.- Throws:
IllegalStateException
- thrown if no error state is defined in model- Since:
- 4.0.120
-
getErrorInfo
TaskErrorInfo getErrorInfo()Return error info object or null if the error state has not been reached.- Since:
- 4.0.120
-
getHistory
Get task state history- Since:
- 4.0.120
-
getWorkflow
Workflow getWorkflow()Get workflow model- Since:
- 4.0.120
-
getPriority
Task.Priority getPriority()Get task priority- Since:
- 4.0.120
-
setPriority
Set task priority- Since:
- 4.0.120
-
isTimeoutMailSend
boolean isTimeoutMailSend()Was task timeout mail send- Since:
- 4.0.120
-
getDueDate
Date getDueDate()Get task due date- Since:
- 4.0.120
-
setDueDate
Set task due date- Since:
- 4.0.120
-
getCustomData
Deprecated.since 5.2.19, usegetCustomFormData()
.Get task custom data xml- Since:
- 4.0.120
-
setCustomData
Deprecated.since 5.2.19, usesetCustomFormData(FormData)
.Set custom data xml- Since:
- 4.0.120
-
getCustomFormData
Get this task's custom form data.- Returns:
- The custom form data or
null
. - Since:
- 5.2.19
-
setCustomFormData
Set this task's custom form data.- Parameters:
customFormData
- The form data to set, may benull
.- Since:
- 5.2.19
-
getCustomAttributes
Get task session attributes.
Keys, values and all referenced fields (recursively) must provide a no arg constructor to be valid for serialization.
AIllegalArgumentException
is thrown if a key or value with serialisation problems is added to the map.- Since:
- 4.0.120
-
getEditors
Get task allowed editors list- Since:
- 4.0.120
-
setEditors
Set allowed editors- Since:
- 4.0.120
-
getEditorMode
Task.EditorMode getEditorMode()Get task editor mode- Since:
- 4.0.120
-
closeTask
void closeTask()Close this task- Since:
- 4.0.120
-
verify
List<Task.VerifyError> verify()Verify state of this task object. Check all references to other objects and back.- Since:
- 4.2.400
-
getCustomFormData()
.