Task.java 2.5 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
/* Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 *      http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.activiti5.engine.task;

import java.util.Date;

17 18
import org.activiti.engine.task.DelegationState;

19 20 21


/** Represents one task for a human user.
22 23 24 25 26 27
 * 
 * @author Joram Barrez
 * @author Tijs Rademakers
 */
public interface Task extends TaskInfo {

28 29 30 31
  /**
   * Default value used for priority when a new {@link Task} is created.
   */
  int DEFAULT_PRIORITY = 50;
32
  
33 34

  /** Name or title of the task. */
35 36
	void setName(String name);
	
37
  /** Change the description of the task */
38 39 40 41 42 43
	void setDescription(String description);
	
	/** Sets the indication of how important/urgent this task is */
	void setPriority(int priority);
	
  /** The {@link User.getId() userId} of the person that is responsible for this task. */
44
  void setOwner(String owner);
45 46 47 48 49
  
	/** The {@link User.getId() userId} of the person to which this task is delegated. */
	void setAssignee(String assignee);
	
	/** The current {@link DelegationState} for this task. */ 
50
  DelegationState getDelegationState();
51 52
  
  /** The current {@link DelegationState} for this task. */ 
53
  void setDelegationState(DelegationState delegationState);
54 55 56 57 58 59 60 61 62
	
	/** Change due date of the task. */
	void setDueDate(Date dueDate);
	
	/** Change the category of the task. This is an optional field and allows to 'tag' tasks as belonging to a certain category. */
	void setCategory(String category);

	/** delegates this task to the given user and sets the {@link #getDelegationState() delegationState} to {@link DelegationState#PENDING}.
	 * If no owner is set on the task, the owner is set to the current assignee of the task. */
63
  void delegate(String userId);
64
  
65 66
  /** the parent task for which this task is a subtask */
  void setParentTaskId(String parentTaskId);
67
  
68 69 70 71 72
  /** Change the tenantId of the task */
  void setTenantId(String tenantId);

  /** Change the form key of the task */
  void setFormKey(String formKey);
73
  
74
  /** Indicates whether this task is suspended or not. */
75 76 77
	boolean isSuspended();
  
 
78
}