org.opencms.workflow
Class CmsTask

java.lang.Object
  extended byorg.opencms.workflow.CmsTask

public class CmsTask
extends java.lang.Object

Describes an OpenCms task.

Since:
6.0.0
Version:
$Revision: 1.15 $
Author:
Alexander Kandzior

Field Summary
static java.lang.String NAME_CONSTRAINTS
          The name constraints when generating new tasks.
 
Constructor Summary
CmsTask()
          Creates a new CmsTask object with default values for all members.
CmsTask(int id, java.lang.String name, int state, int taskType, int root, int parent, CmsUUID initiatorUserId, CmsUUID roleId, CmsUUID agentUserId, CmsUUID originalUserId, java.sql.Timestamp startTime, java.sql.Timestamp wakeupTime, java.sql.Timestamp timeOut, java.sql.Timestamp endTime, int percentage, java.lang.String permission, int priority, int escalationType, java.lang.String htmlLink, int milestone, int autofinish)
          Creates a new CmsTask object.
 
Method Summary
static void checkTaskName(java.lang.String name)
          Checks if the provided task name is a valid task name, that is contains only valid characters.
 boolean equals(java.lang.Object obj)
           
 CmsUUID getAgentUser()
          Returns the agent user id of this task.
 int getAutoFinish()
          Returns the autofinish flag of this task.
 java.sql.Timestamp getEndTime()
          Returns the endtime of this task.
 int getEscalationType()
          Returns the escalation type of this task.
 java.lang.String getHtmlLink()
          Returns the html link of this task.
 int getId()
          Returns the id of this task.
 CmsUUID getInitiatorUser()
          Returns the initiator user id of this task.
 int getMilestone()
          Returns the milestone value of this task.
 java.lang.String getName()
          Returns the name of this task.
 CmsUUID getOriginalUser()
          Returns the original agent user id of this task.
 int getParent()
          Returns the parent id of this task.
 int getPercentage()
          Returns the percentage of this task.
 java.lang.String getPermission()
          Returns the permission of this task.
 int getPriority()
          Returns the priority of this task.
 CmsUUID getRole()
          Returns the role group id of this task.
 int getRoot()
          Returns the root id of this task.
 java.sql.Timestamp getStartTime()
          Returns the starttime of this task.
 int getState()
          Returns the state of this task.
 java.lang.String getStateString()
          Returns the state of this task as String.
 int getTaskType()
          Returns the type of this task.
 java.sql.Timestamp getTimeOut()
          Returns the timeout date of this task.
 java.sql.Timestamp getWakeupTime()
          Returns the wakeup time of this task.
 int hashCode()
           
 void setAgentUser(CmsUUID agentUserId)
          Sets the agent user id for this task.
 void setInitiatorUser(CmsUUID initiatorUserId)
          Sets the initiator user id for this task.
 void setMilestone(int milestone)
          Sets the milestone value of this task.
 void setName(java.lang.String taskname)
          Sets the name of this task.
 void setOriginalUser(CmsUUID originalUserId)
          Sets the original user id of this task.
 void setParent(int parent)
          Sets the parent id of this task.
 void setPercentage(int percentage)
          Sets the percentage for this task.
 void setPriority(int priority)
          Sets the priority for this task.
 void setRole(CmsUUID roleId)
          Sets the role id for this task.
 void setRoot(int root)
          Sets the root value for this task.
 void setStartTime(java.sql.Timestamp starttime)
          Sets the start time of this task.
 void setState(int state)
          Sets the state of this task.
 void setTaskType(int tasktype)
          Sets the type of this task.
 void setTimeOut(java.sql.Timestamp timeout)
          Sets the timeout value for this task.
 void setWakeupTime(java.sql.Timestamp wakeuptime)
          Sets the wakeup time for this task.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

NAME_CONSTRAINTS

public static final java.lang.String NAME_CONSTRAINTS
The name constraints when generating new tasks.

See Also:
Constant Field Values
Constructor Detail

CmsTask

public CmsTask()
Creates a new CmsTask object with default values for all members.


CmsTask

public CmsTask(int id,
               java.lang.String name,
               int state,
               int taskType,
               int root,
               int parent,
               CmsUUID initiatorUserId,
               CmsUUID roleId,
               CmsUUID agentUserId,
               CmsUUID originalUserId,
               java.sql.Timestamp startTime,
               java.sql.Timestamp wakeupTime,
               java.sql.Timestamp timeOut,
               java.sql.Timestamp endTime,
               int percentage,
               java.lang.String permission,
               int priority,
               int escalationType,
               java.lang.String htmlLink,
               int milestone,
               int autofinish)
Creates a new CmsTask object.

Parameters:
id - the id of this task
name - the name of this task
state - state of this task
taskType - type of this task
root - the id of the task which is the root task of this task
parent - the id of the task which is the parent of this task
initiatorUserId - the id of the user who initiated this task
roleId - the id of the role which is set for this task
agentUserId - the id of the user who is the agent of this task
originalUserId - the id of the user who was the original agent
startTime - timestamp when this task has been started
wakeupTime - timestamp when this task has to be activated
timeOut - timestamp when this task has to be completed
endTime - timestamp when the task has been ended
percentage - percentage value of this task
permission - permission flag of this task
priority - priority of this task
escalationType - escalation type of this task
htmlLink - link to the html page which handles this task
milestone - the id of the milstone to which this task belongs
autofinish - the auto finish value of this task
Method Detail

checkTaskName

public static void checkTaskName(java.lang.String name)
                          throws CmsIllegalArgumentException
Checks if the provided task name is a valid task name, that is contains only valid characters.

A task name can only be composed of digits, standard ASCII letters and the symbols defined in NAME_CONSTRAINTS.

Parameters:
name - the task name to check
Throws:
CmsIllegalArgumentException - if the given task name is not valid

equals

public boolean equals(java.lang.Object obj)
See Also:
Object.equals(java.lang.Object)

getAgentUser

public CmsUUID getAgentUser()
Returns the agent user id of this task.

Returns:
the agent user id of this task

getAutoFinish

public int getAutoFinish()
Returns the autofinish flag of this task.

Returns:
the autofinish flag of this task

getEndTime

public java.sql.Timestamp getEndTime()
Returns the endtime of this task.

Returns:
the endtime of this task

getEscalationType

public int getEscalationType()
Returns the escalation type of this task.

Returns:
the escalation type of this task

getHtmlLink

public java.lang.String getHtmlLink()
Returns the html link of this task.

Returns:
the htmllink of this task

getId

public int getId()
Returns the id of this task.

Returns:
the id of this task

getInitiatorUser

public CmsUUID getInitiatorUser()
Returns the initiator user id of this task.

Returns:
the initiator user id of this task

getMilestone

public int getMilestone()
Returns the milestone value of this task.

Returns:
the milestone value of this task

getName

public java.lang.String getName()
Returns the name of this task.

Returns:
the name of this task

getOriginalUser

public CmsUUID getOriginalUser()
Returns the original agent user id of this task.

Returns:
the original agent user id of this task

getParent

public int getParent()
Returns the parent id of this task.

Returns:
the parent id of this task

getPercentage

public int getPercentage()
Returns the percentage of this task.

Returns:
the percentage of this task

getPermission

public java.lang.String getPermission()
Returns the permission of this task.

Returns:
the permission of this task

getPriority

public int getPriority()
Returns the priority of this task.

Returns:
the priority of this task

getRole

public CmsUUID getRole()
Returns the role group id of this task.

Returns:
the role group id of this task

getRoot

public int getRoot()
Returns the root id of this task.

Returns:
the root id of this task

getStartTime

public java.sql.Timestamp getStartTime()
Returns the starttime of this task.

Returns:
the starttime of this task

getState

public int getState()
Returns the state of this task.

Returns:
the state of this task

getStateString

public java.lang.String getStateString()
Returns the state of this task as String.

Returns:
the state of this task as String

getTaskType

public int getTaskType()
Returns the type of this task.

Returns:
the type of this task

getTimeOut

public java.sql.Timestamp getTimeOut()
Returns the timeout date of this task.

Returns:
the timeout date of this task

getWakeupTime

public java.sql.Timestamp getWakeupTime()
Returns the wakeup time of this task.

Returns:
the wakeup time of this task

hashCode

public int hashCode()
See Also:
Object.hashCode()

setAgentUser

public void setAgentUser(CmsUUID agentUserId)
Sets the agent user id for this task.

Parameters:
agentUserId - the agent user id for this task

setInitiatorUser

public void setInitiatorUser(CmsUUID initiatorUserId)
Sets the initiator user id for this task.

Parameters:
initiatorUserId - the initiator user id for this task

setMilestone

public void setMilestone(int milestone)
Sets the milestone value of this task.

Parameters:
milestone - the milestone value of this task

setName

public void setName(java.lang.String taskname)
Sets the name of this task.

Parameters:
taskname - the name of this task

setOriginalUser

public void setOriginalUser(CmsUUID originalUserId)
Sets the original user id of this task.

Parameters:
originalUserId - the original user id of this task

setParent

public void setParent(int parent)
Sets the parent id of this task.

Parameters:
parent - the parent id of this task

setPercentage

public void setPercentage(int percentage)
Sets the percentage for this task.

Parameters:
percentage - the percentage for this task

setPriority

public void setPriority(int priority)
Sets the priority for this task.

Parameters:
priority - the priority for this task

setRole

public void setRole(CmsUUID roleId)
Sets the role id for this task.

Parameters:
roleId - the role id for this task

setRoot

public void setRoot(int root)
Sets the root value for this task.

Parameters:
root - the root value for this task

setStartTime

public void setStartTime(java.sql.Timestamp starttime)
Sets the start time of this task.

Parameters:
starttime - the start time of this task

setState

public void setState(int state)
Sets the state of this task.

Parameters:
state - the state of this task

setTaskType

public void setTaskType(int tasktype)
Sets the type of this task.

Parameters:
tasktype - the type of this task

setTimeOut

public void setTimeOut(java.sql.Timestamp timeout)
Sets the timeout value for this task.

Parameters:
timeout - the timeout value for this task

setWakeupTime

public void setWakeupTime(java.sql.Timestamp wakeuptime)
Sets the wakeup time for this task.

Parameters:
wakeuptime - the wakeup time for this task

toString

public java.lang.String toString()
See Also:
Object.toString()