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   */
28  public class DefaultWorkflowTask implements Serializable, WorkflowTask {
29  
30      public long getAssigneeRoleId() {
31          return _assigneeRoleId;
32      }
33  
34      public long getAssigneeUserId() {
35          return _assigneeUserId;
36      }
37  
38      public Date getCompletionDate() {
39          return _completionDate;
40      }
41  
42      public Date getCreateDate() {
43          return _createDate;
44      }
45  
46      public String getDescription() {
47          return _description;
48      }
49  
50      public Date getDueDate() {
51          return _dueDate;
52      }
53  
54      public String getName() {
55          return _name;
56      }
57  
58      public Map<String, Object> getOptionalAttributes() {
59          return _optionalAttributes;
60      }
61  
62      public long getWorkflowDefinitionId() {
63          return _workflowDefinitionId;
64      }
65  
66      public String getWorkflowDefinitionName() {
67          return _workflowDefinitionName;
68      }
69  
70      public int getWorkflowDefinitionVersion() {
71          return _workflowDefinitionVersion;
72      }
73  
74      public long getWorkflowInstanceId() {
75          return _workflowInstanceId;
76      }
77  
78      public long getWorkflowTaskId() {
79          return _workflowTaskId;
80      }
81  
82      public boolean isAsynchronous() {
83          return _asynchronous;
84      }
85  
86      public boolean isCompleted() {
87          if (_completionDate != null) {
88              return true;
89          }
90          else {
91              return false;
92          }
93      }
94  
95      public void setAssigneeRoleId(long assigneeRoleId) {
96          _assigneeRoleId = assigneeRoleId;
97      }
98  
99      public void setAssigneeUserId(long assigneeUserId) {
100         _assigneeUserId = assigneeUserId;
101     }
102 
103     public void setAsynchronous(boolean asynchronous) {
104         _asynchronous = asynchronous;
105     }
106 
107     public void setCompletionDate(Date completionDate) {
108         _completionDate = completionDate;
109     }
110 
111     public void setCreateDate(Date createDate) {
112         _createDate = createDate;
113     }
114 
115     public void setDescription(String description) {
116         _description = description;
117     }
118 
119     public void setDueDate(Date dueDate) {
120         _dueDate = dueDate;
121     }
122 
123     public void setName(String name) {
124         _name = name;
125     }
126 
127     public void setOptionalAttributes(Map<String, Object> optionalAttributes) {
128         _optionalAttributes = optionalAttributes;
129     }
130 
131     public void setWorkflowDefinitionId(long workflowDefinitionId) {
132         _workflowDefinitionId = workflowDefinitionId;
133     }
134 
135     public void setWorkflowDefinitionName(String workflowDefinitionName) {
136         _workflowDefinitionName = workflowDefinitionName;
137     }
138 
139     public void setWorkflowDefinitionVersion(int workflowDefinitionVersion) {
140         _workflowDefinitionVersion = workflowDefinitionVersion;
141     }
142 
143     public void setWorkflowInstanceId(long workflowInstanceId) {
144         _workflowInstanceId = workflowInstanceId;
145     }
146 
147     public void setWorkflowTaskId(long workflowTaskId) {
148         _workflowTaskId = workflowTaskId;
149     }
150 
151     private long _assigneeRoleId;
152     private long _assigneeUserId;
153     private boolean _asynchronous;
154     private Date _completionDate;
155     private Date _createDate;
156     private String _description;
157     private Date _dueDate;
158     private String _name;
159     private Map<String, Object> _optionalAttributes;
160     private long _workflowDefinitionId;
161     private String _workflowDefinitionName;
162     private int _workflowDefinitionVersion;
163     private long _workflowInstanceId;
164     private long _workflowTaskId;
165 
166 }