Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| jBPM distribution 6.0.0.Beta1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jbpm.task
Class TaskData

    java.lang.Object
      org.jbpm.task.TaskData

All Implemented Interfaces:
  Externalizable, Serializable

    @Embeddable
    public class TaskData

extends Object
implements Externalizable

See Also:
  Serialized Form

Constructor Summary
`TaskData()`

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.
`boolean` | `equals(Object obj)`
`Date` | `getActivationTime()`
`User` | `getActualOwner()`
`List<Attachment>` | `getAttachments()`
`Date` | `getClaimTime()`
`List<Comment>` | `getComments()`
`Date` | `getCompletedOn()`
`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()`
`int` | `hashCode()`
`Status` | `initialize()` Initializes the state of the TaskData, i.e. sets the createdOn, activationTime and sets the state to `Status.Created`.
`boolean` | `isSkipable()`
`void` | `readExternal(ObjectInput in)`
`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` | `setClaimTime(Date claimTime)`
`void` | `setComments(List<Comment> comments)`
`void` | `setCompletedOn(Date completedOn)`
`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` | `setOutput(long outputContentId, ContentData outputContentData)` Sets the content data for this task data.
`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)`
`void` | `writeExternal(ObjectOutput out)`

Methods inherited from class java.lang.Object
`clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### TaskData

    public TaskData()

Method Detail

### writeExternal

    public void writeExternal(ObjectOutput out)
                       throws IOException

  Specified by:
    `writeExternal` in interface `Externalizable`
  Throws:
    `IOException`

### readExternal

    public void readExternal(ObjectInput in)
                      throws IOException,
                             ClassNotFoundException

  Specified by:
    `readExternal` in interface `Externalizable`
  Throws:
    `IOException`
    `ClassNotFoundException`

### initialize

    public 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

    public 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

    public Status getStatus()

### setStatus

    public void setStatus(Status status)

### getPreviousStatus

    public Status getPreviousStatus()

### setPreviousStatus

    public void setPreviousStatus(Status previousStatus)

### getActualOwner

    public User getActualOwner()

### setActualOwner

    public void setActualOwner(User actualOwner)

### getCreatedBy

    public User getCreatedBy()

### setCreatedBy

    public void setCreatedBy(User createdBy)

### getCreatedOn

    public Date getCreatedOn()

### setCreatedOn

    public void setCreatedOn(Date createdOn)

### getCompletedOn

    public Date getCompletedOn()

### setCompletedOn

    public void setCompletedOn(Date completedOn)

### getActivationTime

    public Date getActivationTime()

### setActivationTime

    public void setActivationTime(Date activationTime)

### getExpirationTime

    public Date getExpirationTime()

### setExpirationTime

    public void setExpirationTime(Date expirationTime)

### getClaimTime

    public Date getClaimTime()

### setClaimTime

    public void setClaimTime(Date claimTime)

### isSkipable

    public boolean isSkipable()

### setSkipable

    public void setSkipable(boolean isSkipable)

### setWorkItemId

    public void setWorkItemId(long workItemId)

### getWorkItemId

    public long getWorkItemId()

### setProcessInstanceId

    public void setProcessInstanceId(long processInstanceId)

### getProcessInstanceId

    public long getProcessInstanceId()

### getProcessId

    public String getProcessId()

### setProcessId

    public void setProcessId(String processId)

### getProcessSessionId

    public int getProcessSessionId()

### setProcessSessionId

    public void setProcessSessionId(int processSessionId)

### setDocument

    public 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

    public AccessType getDocumentAccessType()

### setDocumentAccessType

    public void setDocumentAccessType(AccessType accessType)

### getDocumentType

    public String getDocumentType()

### getDocumentContentId

    public long getDocumentContentId()

### setDocumentContentId

    public void setDocumentContentId(long documentContentId)

### setDocumentType

    public void setDocumentType(String documentType)

### setOutput

    public 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

    public AccessType getOutputAccessType()

### getOutputType

    public String getOutputType()

### getOutputContentId

    public long getOutputContentId()

### setFault

    public 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

    public String getFaultName()

### getFaultAccessType

    public AccessType getFaultAccessType()

### getFaultType

    public String getFaultType()

### getFaultContentId

    public long getFaultContentId()

### getComments

    public List<Comment> getComments()

### addComment

    public void addComment(Comment comment)

  Adds the specified comment to our list of comments.

  Parameters:
    `comment` - comment to add

### removeComment

    public 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

    public void setComments(List<Comment> comments)

### getAttachments

    public List<Attachment> getAttachments()

### addAttachment

    public void addAttachment(Attachment attachment)

  Adds the specified attachment to our list of Attachments.

  Parameters:
    `attachment` - attachment to add

### removeAttachment

    public 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

    public void setAttachments(List<Attachment> attachments)

### getParentId

    public long getParentId()

### setParentId

    public void setParentId(long parentId)

### hashCode

    public int hashCode()

  Overrides:
    `hashCode` in class `Object`

### equals

    public boolean equals(Object obj)

  Overrides:
    `equals` in class `Object`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| jBPM distribution 6.0.0.Beta1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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