Package pro.taskana.task.internal.models
Class TaskImpl
- java.lang.Object
-
- pro.taskana.task.internal.models.TaskSummaryImpl
-
- pro.taskana.task.internal.models.TaskImpl
-
- All Implemented Interfaces:
Task,TaskSummary
public class TaskImpl extends TaskSummaryImpl implements Task
-
-
Field Summary
-
Fields inherited from class pro.taskana.task.internal.models.TaskSummaryImpl
attachmentSummaries, businessProcessId, claimed, classificationSummary, completed, created, creator, custom1, custom10, custom11, custom12, custom13, custom14, custom15, custom16, custom2, custom3, custom4, custom5, custom6, custom7, custom8, custom9, description, due, externalId, id, isRead, isTransferred, manualPriority, modified, name, note, owner, ownerLongName, parentBusinessProcessId, planned, primaryObjRef, priority, received, secondaryObjectReferences, state, workbasketSummary
-
Fields inherited from interface pro.taskana.task.api.models.Task
CALLBACK_STATE
-
Fields inherited from interface pro.taskana.task.api.models.TaskSummary
DEFAULT_MANUAL_PRIORITY
-
-
Constructor Summary
Constructors Constructor Description TaskImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidaddAttachment(Attachment attachmentToAdd)Add an Attachment.
NULL will be ignored and an Attachment with the same id will be replaced by the newer one.TaskSummaryasSummary()Returns a summary of the current Task.protected booleancanEqual(Object other)TaskImplcopy()Duplicates this TaskSummary without the internal and external id.booleanequals(Object obj)List<Attachment>getAttachments()Return the attachment for the Task.Map<String,String>getCallbackInfo()Returns the callbackInfo.CallbackStategetCallbackState()StringgetClassificationCategory()Returns the category of the current Classification.StringgetClassificationId()StringgetClassificationKey()Map<String,String>getCustomAttributeMap()Returns a Map of customAttributes.Map<String,String>getCustomAttributes()StringgetWorkbasketKey()Returns the key of the Workbasket where the Task is stored in.inthashCode()AttachmentremoveAttachment(String attachmentId)Removes an attachment of the current Task locally, when the ID is represented and does return the removed attachment or null if there was no match.
The changed Task need to be updated calling the TaskService.updateTask(Task).voidsetAttachments(List<Attachment> attachments)voidsetCallbackInfo(Map<String,String> callbackInfo)Sets the callbackInfo.voidsetCallbackState(CallbackState callbackState)voidsetClassificationCategory(String classificationCategory)voidsetClassificationKey(String classificationKey)Sets the key of the Classification that - together with the domain from the Workbasket of the Task - selects the appropriate Classification for this Task.voidsetCustomAttribute(TaskCustomField customField, String value)Deprecated.voidsetCustomAttributeMap(Map<String,String> customAttributes)Sets a Map of custom attributes.voidsetCustomAttributes(Map<String,String> customAttributes)voidsetCustomField(TaskCustomField customField, String value)Sets the value for the specified customField.voidsetWorkbasketKey(String workbasketKey)StringtoString()-
Methods inherited from class pro.taskana.task.internal.models.TaskSummaryImpl
addAttachmentSummary, addSecondaryObjectReference, addSecondaryObjectReference, getAttachmentSummaries, getBusinessProcessId, getClaimed, getClassificationSummary, getClassificationSummaryImpl, getCompleted, getCreated, getCreator, getCustom1, getCustom10, getCustom11, getCustom12, getCustom13, getCustom14, getCustom15, getCustom16, getCustom2, getCustom3, getCustom4, getCustom5, getCustom6, getCustom7, getCustom8, getCustom9, getCustomAttribute, getCustomField, getDescription, getDomain, getDue, getExternalId, getId, getManualPriority, getModified, getName, getNote, getOwner, getOwnerLongName, getParentBusinessProcessId, getPlanned, getPrimaryObjRef, getPrimaryObjRefImpl, getPriority, getReceived, getSecondaryObjectReferences, getState, getWorkbasketSummary, getWorkbasketSummaryImpl, isManualPriorityActive, isRead, isTransferred, removeSecondaryObjectReference, setAttachmentSummaries, setBusinessProcessId, setClaimed, setClassificationSummary, setClassificationSummaryImpl, setCompleted, setCreated, setCreator, setCustom1, setCustom10, setCustom11, setCustom12, setCustom13, setCustom14, setCustom15, setCustom16, setCustom2, setCustom3, setCustom4, setCustom5, setCustom6, setCustom7, setCustom8, setCustom9, setDescription, setDomain, setDue, setExternalId, setId, setManualPriority, setModified, setName, setNote, setOwner, setOwnerLongName, setParentBusinessProcessId, setPlanned, setPrimaryObjRef, setPrimaryObjRef, setPrimaryObjRefImpl, setPriority, setRead, setReceived, setSecondaryObjectReferences, setState, setTransferred, setWorkbasketSummary, setWorkbasketSummaryImpl
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface pro.taskana.task.api.models.Task
setBusinessProcessId, setDescription, setDue, setExternalId, setManualPriority, setName, setNote, setOwner, setParentBusinessProcessId, setPlanned, setPrimaryObjRef, setPrimaryObjRef, setReceived
-
Methods inherited from interface pro.taskana.task.api.models.TaskSummary
addSecondaryObjectReference, addSecondaryObjectReference, getAttachmentSummaries, getBusinessProcessId, getClaimed, getClassificationSummary, getCompleted, getCreated, getCreator, getCustomAttribute, getCustomField, getDescription, getDomain, getDue, getExternalId, getId, getManualPriority, getModified, getName, getNote, getOwner, getOwnerLongName, getParentBusinessProcessId, getPlanned, getPrimaryObjRef, getPriority, getReceived, getSecondaryObjectReferences, getState, getWorkbasketSummary, isManualPriorityActive, isRead, isTransferred, removeSecondaryObjectReference
-
-
-
-
Method Detail
-
getClassificationId
public String getClassificationId()
-
copy
public TaskImpl copy()
Description copied from interface:TaskSummaryDuplicates this TaskSummary without the internal and external id.- Specified by:
copyin interfaceTask- Specified by:
copyin interfaceTaskSummary- Overrides:
copyin classTaskSummaryImpl- Returns:
- a copy of this TaskSummary
-
getClassificationKey
public String getClassificationKey()
-
setClassificationKey
public void setClassificationKey(String classificationKey)
Description copied from interface:TaskSets the key of the Classification that - together with the domain from the Workbasket of the Task - selects the appropriate Classification for this Task.- Specified by:
setClassificationKeyin interfaceTask- Parameters:
classificationKey- the key of the Classification for the Task
-
getWorkbasketKey
public String getWorkbasketKey()
Description copied from interface:TaskReturns the key of the Workbasket where the Task is stored in.- Specified by:
getWorkbasketKeyin interfaceTask- Returns:
- workbasketKey
-
setWorkbasketKey
public void setWorkbasketKey(String workbasketKey)
-
getCustomAttributeMap
public Map<String,String> getCustomAttributeMap()
Description copied from interface:TaskReturns a Map of customAttributes.- Specified by:
getCustomAttributeMapin interfaceTask- Returns:
- customAttributes as Map
-
setCustomAttributeMap
public void setCustomAttributeMap(Map<String,String> customAttributes)
Description copied from interface:TaskSets a Map of custom attributes.- Specified by:
setCustomAttributeMapin interfaceTask- Parameters:
customAttributes- a Map that contains the custom attributes
-
getCallbackState
public CallbackState getCallbackState()
-
setCallbackState
public void setCallbackState(CallbackState callbackState)
-
getCallbackInfo
public Map<String,String> getCallbackInfo()
Description copied from interface:TaskReturns the callbackInfo.- Specified by:
getCallbackInfoin interfaceTask- Returns:
- callbackInfo as Map
-
setCallbackInfo
public void setCallbackInfo(Map<String,String> callbackInfo)
Description copied from interface:TaskSets the callbackInfo.- Specified by:
setCallbackInfoin interfaceTask- Parameters:
callbackInfo- a Map that contains the callback information
-
setCustomAttribute
@Deprecated public void setCustomAttribute(TaskCustomField customField, String value)
Deprecated.Description copied from interface:TaskSets the value for the specified customField.- Specified by:
setCustomAttributein interfaceTask- Parameters:
customField- identifies which customField is to be setvalue- the value of the customField to be set
-
setCustomField
public void setCustomField(TaskCustomField customField, String value)
Description copied from interface:TaskSets the value for the specified customField.- Specified by:
setCustomFieldin interfaceTask- Parameters:
customField- identifies which customField is to be set.value- the value of the customField to be set
-
addAttachment
public void addAttachment(Attachment attachmentToAdd)
Description copied from interface:TaskAdd an Attachment.
NULL will be ignored and an Attachment with the same id will be replaced by the newer one.- Specified by:
addAttachmentin interfaceTask- Parameters:
attachmentToAdd- the attachment to be added to the Task
-
getAttachments
public List<Attachment> getAttachments()
Description copied from interface:TaskReturn the attachment for the Task.
Do not use List.add()/addAll() for adding elements, because it can cause redundant data. Use addAttachment(). Clear() and remove() can be used, because it's a controllable change.- Specified by:
getAttachmentsin interfaceTask- Returns:
- the List of attachments for this Task
-
setAttachments
public void setAttachments(List<Attachment> attachments)
-
asSummary
public TaskSummary asSummary()
Description copied from interface:TaskReturns a summary of the current Task.- Specified by:
asSummaryin interfaceTask- Returns:
- the TaskSummary object for the current Task
-
removeAttachment
public Attachment removeAttachment(String attachmentId)
Description copied from interface:TaskRemoves an attachment of the current Task locally, when the ID is represented and does return the removed attachment or null if there was no match.
The changed Task need to be updated calling the TaskService.updateTask(Task).- Specified by:
removeAttachmentin interfaceTask- Parameters:
attachmentId- ID of the attachment which should be removed.- Returns:
- attachment which will be removed after updating OR null if there was no match.
-
getClassificationCategory
public String getClassificationCategory()
Description copied from interface:TaskReturns the category of the current Classification.- Specified by:
getClassificationCategoryin interfaceTask- Returns:
- classificationCategory
-
setClassificationCategory
public void setClassificationCategory(String classificationCategory)
-
canEqual
protected boolean canEqual(Object other)
- Overrides:
canEqualin classTaskSummaryImpl
-
hashCode
public int hashCode()
- Overrides:
hashCodein classTaskSummaryImpl
-
equals
public boolean equals(Object obj)
- Overrides:
equalsin classTaskSummaryImpl
-
toString
public String toString()
- Overrides:
toStringin classTaskSummaryImpl
-
-