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

## org.jbpm.services.task.impl.model
Class TaskDataImpl

    java.lang.Object
      org.jbpm.services.task.impl.model.TaskDataImpl

All Implemented Interfaces:
  Externalizable, Serializable, TaskData, org.kie.internal.task.api.model.InternalTaskData

    @Embeddable
    public class TaskDataImpl

extends Object
implements org.kie.internal.task.api.model.InternalTaskData

See Also:
  Serialized Form

Constructor Summary
`TaskDataImpl()`

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()`
`List<Comment>` | `getComments()`
`User` | `getCreatedBy()`
`Date` | `getCreatedOn()`
`String` | `getDeploymentId()`
`org.kie.internal.task.api.model.AccessType` | `getDocumentAccessType()`
`long` | `getDocumentContentId()`
`String` | `getDocumentType()`
`Date` | `getExpirationTime()`
`org.kie.internal.task.api.model.AccessType` | `getFaultAccessType()`
`long` | `getFaultContentId()`
`String` | `getFaultName()`
`String` | `getFaultType()`
`org.kie.internal.task.api.model.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` | `setComments(List<Comment> comments)`
`void` | `setCreatedBy(User createdBy)`
`void` | `setCreatedOn(Date createdOn)`
`void` | `setDeploymentId(String deploymentId)`
`void` | `setDocument(long documentID, org.kie.internal.task.api.model.ContentData documentConentData)` Sets the document content data for this task data.
`void` | `setDocumentAccessType(org.kie.internal.task.api.model.AccessType accessType)`
`void` | `setDocumentContentId(long documentContentId)`
`void` | `setDocumentType(String documentType)`
`void` | `setExpirationTime(Date expirationTime)`
`void` | `setFault(long faultContentId, org.kie.internal.task.api.model.FaultData faultData)` Sets the fault data for this task data.
`void` | `setFaultAccessType(org.kie.internal.task.api.model.AccessType faultAccessType)`
`void` | `setFaultContentId(long faultContentId)`
`void` | `setFaultName(String faultName)`
`void` | `setFaultType(String faultType)`
`void` | `setOutput(long outputContentId, org.kie.internal.task.api.model.ContentData outputContentData)` Sets the content data for this task data.
`void` | `setOutputAccessType(org.kie.internal.task.api.model.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)`
`void` | `writeExternal(ObjectOutput out)`

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

Constructor Detail

### TaskDataImpl

    public TaskDataImpl()

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`.

  Specified by:
    `initialize` in interface `org.kie.internal.task.api.model.InternalTaskData`
  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

  Specified by:
    `assignOwnerAndStatus` in interface `org.kie.internal.task.api.model.InternalTaskData`
  Parameters:
    `potentialOwners` - - list of potential owners
  Returns:
    current status of task data

### getStatus

    public Status getStatus()

  Specified by:
    `getStatus` in interface `TaskData`

### setStatus

    public void setStatus(Status status)

  Specified by:
    `setStatus` in interface `org.kie.internal.task.api.model.InternalTaskData`

### getPreviousStatus

    public Status getPreviousStatus()

  Specified by:
    `getPreviousStatus` in interface `TaskData`

### setPreviousStatus

    public void setPreviousStatus(Status previousStatus)

  Specified by:
    `setPreviousStatus` in interface `org.kie.internal.task.api.model.InternalTaskData`

### getActualOwner

    public User getActualOwner()

  Specified by:
    `getActualOwner` in interface `TaskData`

### setActualOwner

    public void setActualOwner(User actualOwner)

  Specified by:
    `setActualOwner` in interface `org.kie.internal.task.api.model.InternalTaskData`

### getCreatedBy

    public User getCreatedBy()

  Specified by:
    `getCreatedBy` in interface `TaskData`

### setCreatedBy

    public void setCreatedBy(User createdBy)

  Specified by:
    `setCreatedBy` in interface `org.kie.internal.task.api.model.InternalTaskData`

### getCreatedOn

    public Date getCreatedOn()

  Specified by:
    `getCreatedOn` in interface `TaskData`

### setCreatedOn

    public void setCreatedOn(Date createdOn)

  Specified by:
    `setCreatedOn` in interface `org.kie.internal.task.api.model.InternalTaskData`

### getActivationTime

    public Date getActivationTime()

  Specified by:
    `getActivationTime` in interface `TaskData`

### setActivationTime

    public void setActivationTime(Date activationTime)

  Specified by:
    `setActivationTime` in interface `org.kie.internal.task.api.model.InternalTaskData`

### getExpirationTime

    public Date getExpirationTime()

  Specified by:
    `getExpirationTime` in interface `TaskData`

### setExpirationTime

    public void setExpirationTime(Date expirationTime)

  Specified by:
    `setExpirationTime` in interface `org.kie.internal.task.api.model.InternalTaskData`

### isSkipable

    public boolean isSkipable()

  Specified by:
    `isSkipable` in interface `TaskData`

### setSkipable

    public void setSkipable(boolean isSkipable)

  Specified by:
    `setSkipable` in interface `org.kie.internal.task.api.model.InternalTaskData`

### setWorkItemId

    public void setWorkItemId(long workItemId)

  Specified by:
    `setWorkItemId` in interface `org.kie.internal.task.api.model.InternalTaskData`

### getWorkItemId

    public long getWorkItemId()

  Specified by:
    `getWorkItemId` in interface `TaskData`

### setProcessInstanceId

    public void setProcessInstanceId(long processInstanceId)

  Specified by:
    `setProcessInstanceId` in interface `org.kie.internal.task.api.model.InternalTaskData`

### getProcessInstanceId

    public long getProcessInstanceId()

  Specified by:
    `getProcessInstanceId` in interface `TaskData`

### getProcessId

    public String getProcessId()

  Specified by:
    `getProcessId` in interface `TaskData`

### setProcessId

    public void setProcessId(String processId)

  Specified by:
    `setProcessId` in interface `org.kie.internal.task.api.model.InternalTaskData`

### getProcessSessionId

    public int getProcessSessionId()

  Specified by:
    `getProcessSessionId` in interface `TaskData`

### setProcessSessionId

    public void setProcessSessionId(int processSessionId)

  Specified by:
    `setProcessSessionId` in interface `org.kie.internal.task.api.model.InternalTaskData`

### setDocument

    public void setDocument(long documentID,
                            org.kie.internal.task.api.model.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.

  Specified by:
    `setDocument` in interface `org.kie.internal.task.api.model.InternalTaskData`
  Parameters:
    `documentID` - id of document content
    `documentConentData` - ContentData

### getDocumentAccessType

    public org.kie.internal.task.api.model.AccessType getDocumentAccessType()

  Specified by:
    `getDocumentAccessType` in interface `org.kie.internal.task.api.model.InternalTaskData`

### setDocumentAccessType

    public void setDocumentAccessType(org.kie.internal.task.api.model.AccessType accessType)

  Specified by:
    `setDocumentAccessType` in interface `org.kie.internal.task.api.model.InternalTaskData`

### getDocumentType

    public String getDocumentType()

  Specified by:
    `getDocumentType` in interface `TaskData`

### getDocumentContentId

    public long getDocumentContentId()

  Specified by:
    `getDocumentContentId` in interface `TaskData`

### setDocumentContentId

    public void setDocumentContentId(long documentContentId)

  Specified by:
    `setDocumentContentId` in interface `org.kie.internal.task.api.model.InternalTaskData`

### setDocumentType

    public void setDocumentType(String documentType)

  Specified by:
    `setDocumentType` in interface `org.kie.internal.task.api.model.InternalTaskData`

### setOutput

    public void setOutput(long outputContentId,
                          org.kie.internal.task.api.model.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.

  Specified by:
    `setOutput` in interface `org.kie.internal.task.api.model.InternalTaskData`
  Parameters:
    `outputContentId` - id of output content
    `outputContentData` - contentData

### getOutputAccessType

    public org.kie.internal.task.api.model.AccessType getOutputAccessType()

  Specified by:
    `getOutputAccessType` in interface `org.kie.internal.task.api.model.InternalTaskData`

### setOutputAccessType

    public void setOutputAccessType(org.kie.internal.task.api.model.AccessType outputAccessType)

  Specified by:
    `setOutputAccessType` in interface `org.kie.internal.task.api.model.InternalTaskData`

### getOutputType

    public String getOutputType()

  Specified by:
    `getOutputType` in interface `TaskData`

### setOutputType

    public void setOutputType(String outputType)

  Specified by:
    `setOutputType` in interface `org.kie.internal.task.api.model.InternalTaskData`

### getOutputContentId

    public long getOutputContentId()

  Specified by:
    `getOutputContentId` in interface `TaskData`

### setOutputContentId

    public void setOutputContentId(long outputContentId)

  Specified by:
    `setOutputContentId` in interface `org.kie.internal.task.api.model.InternalTaskData`

### setFault

    public void setFault(long faultContentId,
                         org.kie.internal.task.api.model.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.

  Specified by:
    `setFault` in interface `org.kie.internal.task.api.model.InternalTaskData`
  Parameters:
    `faultContentId` - id of fault content
    `faultData` - FaultData

### getFaultName

    public String getFaultName()

  Specified by:
    `getFaultName` in interface `TaskData`

### setFaultName

    public void setFaultName(String faultName)

  Specified by:
    `setFaultName` in interface `org.kie.internal.task.api.model.InternalTaskData`

### getFaultAccessType

    public org.kie.internal.task.api.model.AccessType getFaultAccessType()

  Specified by:
    `getFaultAccessType` in interface `org.kie.internal.task.api.model.InternalTaskData`

### setFaultAccessType

    public void setFaultAccessType(org.kie.internal.task.api.model.AccessType faultAccessType)

  Specified by:
    `setFaultAccessType` in interface `org.kie.internal.task.api.model.InternalTaskData`

### getFaultType

    public String getFaultType()

  Specified by:
    `getFaultType` in interface `TaskData`

### setFaultType

    public void setFaultType(String faultType)

  Specified by:
    `setFaultType` in interface `org.kie.internal.task.api.model.InternalTaskData`

### getFaultContentId

    public long getFaultContentId()

  Specified by:
    `getFaultContentId` in interface `TaskData`

### setFaultContentId

    public void setFaultContentId(long faultContentId)

  Specified by:
    `setFaultContentId` in interface `org.kie.internal.task.api.model.InternalTaskData`

### getComments

    public List<Comment> getComments()

  Specified by:
    `getComments` in interface `TaskData`

### addComment

    public void addComment(Comment comment)

  Adds the specified comment to our list of comments.

  Specified by:
    `addComment` in interface `org.kie.internal.task.api.model.InternalTaskData`
  Parameters:
    `comment` - comment to add

### removeComment

    public Comment removeComment(long commentId)

  Removes the Comment specified by the commentId.

  Specified by:
    `removeComment` in interface `org.kie.internal.task.api.model.InternalTaskData`
  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)

  Specified by:
    `setComments` in interface `org.kie.internal.task.api.model.InternalTaskData`

### getAttachments

    public List<Attachment> getAttachments()

  Specified by:
    `getAttachments` in interface `TaskData`

### addAttachment

    public void addAttachment(Attachment attachment)

  Adds the specified attachment to our list of Attachments.

  Specified by:
    `addAttachment` in interface `org.kie.internal.task.api.model.InternalTaskData`
  Parameters:
    `attachment` - attachment to add

### removeAttachment

    public Attachment removeAttachment(long attachmentId)

  Removes the Attachment specified by the attachmentId.

  Specified by:
    `removeAttachment` in interface `org.kie.internal.task.api.model.InternalTaskData`
  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)

  Specified by:
    `setAttachments` in interface `org.kie.internal.task.api.model.InternalTaskData`

### getParentId

    public long getParentId()

  Specified by:
    `getParentId` in interface `TaskData`
  Specified by:
    `getParentId` in interface `org.kie.internal.task.api.model.InternalTaskData`

### setParentId

    public void setParentId(long parentId)

  Specified by:
    `setParentId` in interface `org.kie.internal.task.api.model.InternalTaskData`

### hashCode

    public int hashCode()

  Overrides:
    `hashCode` in class `Object`

### equals

    public boolean equals(Object obj)

  Overrides:
    `equals` in class `Object`

### getDeploymentId

    public String getDeploymentId()

  Specified by:
    `getDeploymentId` in interface `TaskData`

### setDeploymentId

    public void setDeploymentId(String deploymentId)

  Specified by:
    `setDeploymentId` in interface `org.kie.internal.task.api.model.InternalTaskData`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| jBPM distribution 6.0.0.CR2
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.