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
  • Constructor Details

    • TaskImpl

      public TaskImpl()
  • Method Details

    • getCustomAttributes

      public Map<String,String> getCustomAttributes()
    • setCustomAttributes

      public void setCustomAttributes(Map<String,String> customAttributes)
    • getClassificationId

      public String getClassificationId()
    • copy

      public TaskImpl copy()
      Description copied from interface: TaskSummary
      Duplicates this TaskSummary without the internal and external id.
      Specified by:
      copy in interface Task
      Specified by:
      copy in interface TaskSummary
      Overrides:
      copy in class TaskSummaryImpl
      Returns:
      a copy of this TaskSummary
    • getClassificationKey

      public String getClassificationKey()
    • setClassificationKey

      public void setClassificationKey(String classificationKey)
      Description copied from interface: Task
      Sets 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:
      setClassificationKey in interface Task
      Parameters:
      classificationKey - the key of the Classification for the Task
    • getWorkbasketKey

      public String getWorkbasketKey()
      Description copied from interface: Task
      Returns the key of the Workbasket where the Task is stored in.
      Specified by:
      getWorkbasketKey in interface Task
      Returns:
      workbasketKey
    • setWorkbasketKey

      public void setWorkbasketKey(String workbasketKey)
    • getCustomAttributeMap

      public Map<String,String> getCustomAttributeMap()
      Description copied from interface: Task
      Returns a Map of customAttributes.
      Specified by:
      getCustomAttributeMap in interface Task
      Returns:
      customAttributes as Map
    • setCustomAttributeMap

      public void setCustomAttributeMap(Map<String,String> customAttributes)
      Description copied from interface: Task
      Sets a Map of custom attributes.
      Specified by:
      setCustomAttributeMap in interface Task
      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: Task
      Returns the callbackInfo.
      Specified by:
      getCallbackInfo in interface Task
      Returns:
      callbackInfo as Map
    • setCallbackInfo

      public void setCallbackInfo(Map<String,String> callbackInfo)
      Description copied from interface: Task
      Sets the callbackInfo.
      Specified by:
      setCallbackInfo in interface Task
      Parameters:
      callbackInfo - a Map that contains the callback information
    • setCustomAttribute

      @Deprecated public void setCustomAttribute(TaskCustomField customField, String value)
      Deprecated.
      Description copied from interface: Task
      Sets the value for the specified customField.
      Specified by:
      setCustomAttribute in interface Task
      Parameters:
      customField - identifies which customField is to be set
      value - the value of the customField to be set
    • setCustomField

      public void setCustomField(TaskCustomField customField, String value)
      Description copied from interface: Task
      Sets the value for the specified customField.
      Specified by:
      setCustomField in interface Task
      Parameters:
      customField - identifies which customField is to be set.
      value - the value of the customField to be set
    • setCustomIntField

      public void setCustomIntField(TaskCustomIntField customIntField, Integer value)
      Description copied from interface: Task
      Sets the value for the specified custoIntField.
      Specified by:
      setCustomIntField in interface Task
      Parameters:
      customIntField - identifies which customIntField is to be set
      value - the value of the customIntField to be set
    • addAttachment

      public void addAttachment(Attachment attachmentToAdd)
      Description copied from interface: Task
      Add an Attachment.
      NULL will be ignored and an Attachment with the same id will be replaced by the newer one.
      Specified by:
      addAttachment in interface Task
      Parameters:
      attachmentToAdd - the attachment to be added to the Task
    • getAttachments

      public List<Attachment> getAttachments()
      Description copied from interface: Task
      Return 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:
      getAttachments in interface Task
      Returns:
      the List of attachments for this Task
    • setAttachments

      public void setAttachments(List<Attachment> attachments)
    • asSummary

      public TaskSummary asSummary()
      Description copied from interface: Task
      Returns a summary of the current Task.
      Specified by:
      asSummary in interface Task
      Returns:
      the TaskSummary object for the current Task
    • removeAttachment

      public Attachment removeAttachment(String attachmentId)
      Description copied from interface: Task
      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).
      Specified by:
      removeAttachment in interface Task
      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: Task
      Returns the category of the current Classification.
      Specified by:
      getClassificationCategory in interface Task
      Returns:
      classificationCategory
    • setClassificationCategory

      public void setClassificationCategory(String classificationCategory)
    • canEqual

      protected boolean canEqual(Object other)
      Overrides:
      canEqual in class TaskSummaryImpl
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class TaskSummaryImpl
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class TaskSummaryImpl
    • toString

      public String toString()
      Overrides:
      toString in class TaskSummaryImpl