KIE Internal 6.0.0.Beta1

org.kie.internal.task.api.model
Interface TaskData

All Superinterfaces:
Externalizable, Serializable

public interface TaskData
extends Externalizable


Method Summary
 void addAttachment(Attachment attachment)
          Adds the specified attachment to our list of Attachments.
 void addComment(Comment comment)
          Adds the specified comment to our list of comments.
 Status assignOwnerAndStatus(List<OrganizationalEntity> potentialOwners)
          This method will potentially assign the actual owner of this TaskData and set the status of the data.
 Date getActivationTime()
           
 User getActualOwner()
           
 List<Attachment> getAttachments()
           
 List<Comment> getComments()
           
 User getCreatedBy()
           
 Date getCreatedOn()
           
 AccessType getDocumentAccessType()
           
 long getDocumentContentId()
           
 String getDocumentType()
           
 Date getExpirationTime()
           
 AccessType getFaultAccessType()
           
 long getFaultContentId()
           
 String getFaultName()
           
 String getFaultType()
           
 AccessType getOutputAccessType()
           
 long getOutputContentId()
           
 String getOutputType()
           
 long getParentId()
           
 Status getPreviousStatus()
           
 String getProcessId()
           
 long getProcessInstanceId()
           
 int getProcessSessionId()
           
 Status getStatus()
           
 long getWorkItemId()
           
 Status initialize()
          Initializes the state of the TaskData, i.e. sets the createdOn, activationTime and sets the state to Status.Created.
 boolean isSkipable()
           
 Attachment removeAttachment(long attachmentId)
          Removes the Attachment specified by the attachmentId.
 Comment removeComment(long commentId)
          Removes the Comment specified by the commentId.
 void setActivationTime(Date activationTime)
           
 void setActualOwner(User actualOwner)
           
 void setAttachments(List<Attachment> attachments)
           
 void setComments(List<Comment> comments)
           
 void setCreatedBy(User createdBy)
           
 void setCreatedOn(Date createdOn)
           
 void setDocument(long documentID, ContentData documentConentData)
          Sets the document content data for this task data.
 void setDocumentAccessType(AccessType accessType)
           
 void setDocumentContentId(long documentContentId)
           
 void setDocumentType(String documentType)
           
 void setExpirationTime(Date expirationTime)
           
 void setFault(long faultContentId, FaultData faultData)
          Sets the fault data for this task data.
 void setFaultAccessType(AccessType faultAccessType)
           
 void setFaultContentId(long faultContentId)
           
 void setFaultName(String faultName)
           
 void setFaultType(String faultType)
           
 void setOutput(long outputContentId, ContentData outputContentData)
          Sets the content data for this task data.
 void setOutputAccessType(AccessType outputAccessType)
           
 void setOutputContentId(long outputContentId)
           
 void setOutputType(String outputType)
           
 void setParentId(long parentId)
           
 void setPreviousStatus(Status previousStatus)
           
 void setProcessId(String processId)
           
 void setProcessInstanceId(long processInstanceId)
           
 void setProcessSessionId(int processSessionId)
           
 void setSkipable(boolean isSkipable)
           
 void setStatus(Status status)
           
 void setWorkItemId(long workItemId)
           
 
Methods inherited from interface java.io.Externalizable
readExternal, writeExternal
 

Method Detail

initialize

Status initialize()
Initializes the state of the TaskData, i.e. sets the createdOn, activationTime and sets the state to Status.Created.

Returns:
returns the current state of the TaskData

assignOwnerAndStatus

Status assignOwnerAndStatus(List<OrganizationalEntity> potentialOwners)
This method will potentially assign the actual owner of this TaskData and set the status of the data.
  • If there is only 1 potential owner, and it is a User, that will become the actual owner of the TaskData and the status will be set to Status.Reserved.
  • f there is only 1 potential owner, and it is a Group, no owner will be assigned and the status will be set to Status.Ready.
  • If there are more than 1 potential owners, the status will be set to Status.Ready.
  • otherwise, the task data will be unchanged
  • Parameters:
    potentialOwners - - list of potential owners
    Returns:
    current status of task data

    getStatus

    Status getStatus()

    setStatus

    void setStatus(Status status)

    getPreviousStatus

    Status getPreviousStatus()

    setPreviousStatus

    void setPreviousStatus(Status previousStatus)

    getActualOwner

    User getActualOwner()

    setActualOwner

    void setActualOwner(User actualOwner)

    getCreatedBy

    User getCreatedBy()

    setCreatedBy

    void setCreatedBy(User createdBy)

    getCreatedOn

    Date getCreatedOn()

    setCreatedOn

    void setCreatedOn(Date createdOn)

    getActivationTime

    Date getActivationTime()

    setActivationTime

    void setActivationTime(Date activationTime)

    getExpirationTime

    Date getExpirationTime()

    setExpirationTime

    void setExpirationTime(Date expirationTime)

    isSkipable

    boolean isSkipable()

    setSkipable

    void setSkipable(boolean isSkipable)

    setWorkItemId

    void setWorkItemId(long workItemId)

    getWorkItemId

    long getWorkItemId()

    setProcessInstanceId

    void setProcessInstanceId(long processInstanceId)

    getProcessInstanceId

    long getProcessInstanceId()

    getProcessId

    String getProcessId()

    setProcessId

    void setProcessId(String processId)

    getProcessSessionId

    int getProcessSessionId()

    setProcessSessionId

    void setProcessSessionId(int processSessionId)

    setDocument

    void setDocument(long documentID,
                     ContentData documentConentData)
    Sets the document content data for this task data. It will set the documentContentId from the specified documentID, documentAccessType, documentType from the specified documentConentData.

    Parameters:
    documentID - id of document content
    documentConentData - ContentData

    getDocumentAccessType

    AccessType getDocumentAccessType()

    setDocumentAccessType

    void setDocumentAccessType(AccessType accessType)

    getDocumentType

    String getDocumentType()

    getDocumentContentId

    long getDocumentContentId()

    setDocumentContentId

    void setDocumentContentId(long documentContentId)

    setDocumentType

    void setDocumentType(String documentType)

    setOutput

    void setOutput(long outputContentId,
                   ContentData outputContentData)
    Sets the content data for this task data. It will set the outputContentId from the specified outputContentId, outputAccessType, outputType from the specified outputContentData.

    Parameters:
    outputContentId - id of output content
    outputContentData - contentData

    getOutputAccessType

    AccessType getOutputAccessType()

    setOutputAccessType

    void setOutputAccessType(AccessType outputAccessType)

    getOutputType

    String getOutputType()

    setOutputType

    void setOutputType(String outputType)

    getOutputContentId

    long getOutputContentId()

    setOutputContentId

    void setOutputContentId(long outputContentId)

    setFault

    void setFault(long faultContentId,
                  FaultData faultData)
    Sets the fault data for this task data. It will set the faultContentId from the specified faultContentId, faultAccessType, faultType, faultName from the specified faultData.

    Parameters:
    faultContentId - id of fault content
    faultData - FaultData

    getFaultName

    String getFaultName()

    setFaultName

    void setFaultName(String faultName)

    getFaultAccessType

    AccessType getFaultAccessType()

    setFaultAccessType

    void setFaultAccessType(AccessType faultAccessType)

    getFaultType

    String getFaultType()

    setFaultType

    void setFaultType(String faultType)

    getFaultContentId

    long getFaultContentId()

    setFaultContentId

    void setFaultContentId(long faultContentId)

    getComments

    List<Comment> getComments()

    addComment

    void addComment(Comment comment)
    Adds the specified comment to our list of comments.

    Parameters:
    comment - comment to add

    removeComment

    Comment removeComment(long commentId)
    Removes the Comment specified by the commentId.

    Parameters:
    commentId - id of Comment to remove
    Returns:
    removed Comment or null if one was not found with the id

    setComments

    void setComments(List<Comment> comments)

    getAttachments

    List<Attachment> getAttachments()

    addAttachment

    void addAttachment(Attachment attachment)
    Adds the specified attachment to our list of Attachments.

    Parameters:
    attachment - attachment to add

    removeAttachment

    Attachment removeAttachment(long attachmentId)
    Removes the Attachment specified by the attachmentId.

    Parameters:
    attachmentId - id of attachment to remove
    Returns:
    removed Attachment or null if one was not found with the id

    setAttachments

    void setAttachments(List<Attachment> attachments)

    getParentId

    long getParentId()

    setParentId

    void setParentId(long parentId)

    KIE Internal 6.0.0.Beta1

    Copyright © 2001-2013 JBoss by Red Hat. All Rights Reserved.