1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * This library is free software; you can redistribute it and/or modify it under
5    * the terms of the GNU Lesser General Public License as published by the Free
6    * Software Foundation; either version 2.1 of the License, or (at your option)
7    * any later version.
8    *
9    * This library is distributed in the hope that it will be useful, but WITHOUT
10   * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11   * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
12   * details.
13   */
14  
15  package com.liferay.portal.kernel.workflow;
16  
17  import java.io.Serializable;
18  
19  import java.util.Date;
20  import java.util.Map;
21  
22  /**
23   * <a href="DefaultWorkflowTask.java.html"><b><i>View Source</i></b></a>
24   *
25   * @author Michael C. Han
26   * @author Brian Wing Shun Chan
27   * @author Marcellus Tavares
28   */
29  public class DefaultWorkflowTask implements Serializable, WorkflowTask {
30  
31      public String getAssigneeEmailAddress() {
32          return _assigneeEmailAddress;
33      }
34  
35      public long getAssigneeRoleId() {
36          return _assigneeRoleId;
37      }
38  
39      public long getAssigneeUserId() {
40          return _assigneeUserId;
41      }
42  
43      public Date getCompletionDate() {
44          return _completionDate;
45      }
46  
47      public Date getCreateDate() {
48          return _createDate;
49      }
50  
51      public String getDescription() {
52          return _description;
53      }
54  
55      public Date getDueDate() {
56          return _dueDate;
57      }
58  
59      public String getName() {
60          return _name;
61      }
62  
63      public Map<String, Serializable> getOptionalAttributes() {
64          return _optionalAttributes;
65      }
66  
67      public long getWorkflowDefinitionId() {
68          return _workflowDefinitionId;
69      }
70  
71      public String getWorkflowDefinitionName() {
72          return _workflowDefinitionName;
73      }
74  
75      public int getWorkflowDefinitionVersion() {
76          return _workflowDefinitionVersion;
77      }
78  
79      public long getWorkflowInstanceId() {
80          return _workflowInstanceId;
81      }
82  
83      public long getWorkflowTaskId() {
84          return _workflowTaskId;
85      }
86  
87      public boolean isAsynchronous() {
88          return _asynchronous;
89      }
90  
91      public boolean isCompleted() {
92          if (_completionDate != null) {
93              return true;
94          }
95          else {
96              return false;
97          }
98      }
99  
100     public void setAssigneeEmailAddress(String assigneeEmailAddress) {
101         _assigneeEmailAddress = assigneeEmailAddress;
102     }
103 
104     public void setAssigneeRoleId(long assigneeRoleId) {
105         _assigneeRoleId = assigneeRoleId;
106     }
107 
108     public void setAssigneeUserId(long assigneeUserId) {
109         _assigneeUserId = assigneeUserId;
110     }
111 
112     public void setAsynchronous(boolean asynchronous) {
113         _asynchronous = asynchronous;
114     }
115 
116     public void setCompletionDate(Date completionDate) {
117         _completionDate = completionDate;
118     }
119 
120     public void setCreateDate(Date createDate) {
121         _createDate = createDate;
122     }
123 
124     public void setDescription(String description) {
125         _description = description;
126     }
127 
128     public void setDueDate(Date dueDate) {
129         _dueDate = dueDate;
130     }
131 
132     public void setName(String name) {
133         _name = name;
134     }
135 
136     public void setOptionalAttributes(
137         Map<String, Serializable> optionalAttributes) {
138 
139         _optionalAttributes = optionalAttributes;
140     }
141 
142     public void setWorkflowDefinitionId(long workflowDefinitionId) {
143         _workflowDefinitionId = workflowDefinitionId;
144     }
145 
146     public void setWorkflowDefinitionName(String workflowDefinitionName) {
147         _workflowDefinitionName = workflowDefinitionName;
148     }
149 
150     public void setWorkflowDefinitionVersion(int workflowDefinitionVersion) {
151         _workflowDefinitionVersion = workflowDefinitionVersion;
152     }
153 
154     public void setWorkflowInstanceId(long workflowInstanceId) {
155         _workflowInstanceId = workflowInstanceId;
156     }
157 
158     public void setWorkflowTaskId(long workflowTaskId) {
159         _workflowTaskId = workflowTaskId;
160     }
161 
162     private String _assigneeEmailAddress;
163     private long _assigneeRoleId;
164     private long _assigneeUserId;
165     private boolean _asynchronous;
166     private Date _completionDate;
167     private Date _createDate;
168     private String _description;
169     private Date _dueDate;
170     private String _name;
171     private Map<String, Serializable> _optionalAttributes;
172     private long _workflowDefinitionId;
173     private String _workflowDefinitionName;
174     private int _workflowDefinitionVersion;
175     private long _workflowInstanceId;
176     private long _workflowTaskId;
177 
178 }