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
-
-
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()Return 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 attachments for this Task.Map<String,String>getCallbackInfo()Returns a Map of Callback info.CallbackStategetCallbackState()StringgetClassificationCategory()Returns the category of the current classification.StringgetClassificationId()StringgetClassificationKey()Map<String,String>getCustomAttributeMap()Returns a Map of custom Attributes.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 theTaskService.updateTask(Task).voidsetAttachments(List<Attachment> attachments)voidsetCallbackInfo(Map<String,String> callbackInfo)Sets a Map of callback info.voidsetCallbackState(CallbackState callbackState)voidsetClassificationCategory(String classificationCategory)voidsetClassificationKey(String classificationKey)Sets the Classification key that - together with the Domain from this Task's work basket - selects the appropriateClassificationfor 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 custom field.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 Classification key that - together with the Domain from this Task's work basket - selects the appropriateClassificationfor this Task.- Specified by:
setClassificationKeyin interfaceTask- Parameters:
classificationKey- the classification key 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 custom Attributes.- 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- aMapthat 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 a Map of Callback info.- Specified by:
getCallbackInfoin interfaceTask- Returns:
- callbackInfo as
Map
-
setCallbackInfo
public void setCallbackInfo(Map<String,String> callbackInfo)
Description copied from interface:TaskSets a Map of callback info.- Specified by:
setCallbackInfoin interfaceTask- Parameters:
callbackInfo- aMapthat contains the callback info
-
setCustomAttribute
@Deprecated public void setCustomAttribute(TaskCustomField customField, String value)
Deprecated.Description copied from interface:TaskSets the value for custom Attribute.- Specified by:
setCustomAttributein interfaceTask- Parameters:
customField- identifies which custom attribute is to be set.value- the value of the custom attribute to be set
-
setCustomField
public void setCustomField(TaskCustomField customField, String value)
Description copied from interface:TaskSets the value for custom field.- Specified by:
setCustomFieldin interfaceTask- Parameters:
customField- identifies which custom field is to be set.value- the value of the custom field 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- theattachmentto be added to the Task
-
getAttachments
public List<Attachment> getAttachments()
Description copied from interface:TaskReturn the attachments for this 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
listofattachmentsfor this Task
-
setAttachments
public void setAttachments(List<Attachment> attachments)
-
asSummary
public TaskSummary asSummary()
Description copied from interface:TaskReturn a summary of 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 theTaskService.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 matching attachment
-
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
-
-