View Javadoc
1   /**
2    * Copyright 2004-2015 The Kuali Foundation
3    *
4    * Licensed under the Educational Community License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    *
8    * http://www.opensource.org/licenses/ecl2.php
9    *
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   */
16  package org.kuali.kpme.tklm.api.time.clocklog;
17  
18  import java.sql.Timestamp;
19  import java.util.Date;
20  
21  import org.joda.time.DateTime;
22  import org.kuali.kpme.core.api.job.JobContract;
23  import org.kuali.kpme.core.api.task.TaskContract;
24  import org.kuali.kpme.core.api.workarea.WorkAreaContract;
25  import org.kuali.rice.kim.api.identity.Person;
26  import org.kuali.rice.krad.bo.PersistableBusinessObject;
27  
28  
29  /**
30   * <p>ClockLogContract interface</p>
31   *
32   */
33  public interface ClockLogContract extends PersistableBusinessObject {
34  	
35  	/**
36  	 * The primary key of a ClockLog entry saved in a database
37  	 * 
38  	 * <p>
39  	 * tkClockLogId of a ClockLog
40  	 * <p>
41  	 * 
42  	 * @return tkClockLogId for ClockLog
43  	 */
44  	public String getTkClockLogId();
45  
46  	/**
47  	 * The documentId associated with the ClockLog
48  	 * 
49  	 * <p>
50  	 * documentId of a ClockLog
51  	 * <p>
52  	 * 
53  	 * @return documentId for ClockLog
54  	 */
55  	public String getDocumentId();
56  
57  	/**
58  	 * The principalId associated with the ClockLog
59  	 * 
60  	 * <p>
61  	 * principalId of a ClockLog
62  	 * <p>
63  	 * 
64  	 * @return principalId for ClockLog
65  	 */
66  	public String getPrincipalId();
67     
68  	/**
69  	 * The jobNumber associated with the ClockLog
70  	 * 
71  	 * <p>
72  	 * jobNumber of a ClockLog
73  	 * <p>
74  	 * 
75  	 * @return jobNumber for ClockLog
76  	 */
77      public Long getJobNumber();
78  
79      /**
80  	 * The clockTimestamp associated with the ClockLog
81  	 * 
82  	 * <p>
83  	 * clockTimestamp of a ClockLog
84  	 * <p>
85  	 * 
86  	 * @return clockTimestamp for ClockLog
87  	 */
88      public Timestamp getClockTimestamp();
89     
90      /**
91  	 * The clockTimestamp associated with the ClockLog
92  	 * 
93  	 * <p>
94  	 * clockTimestamp of a ClockLog
95  	 * <p>
96  	 * 
97  	 * @return new DateTime(clockTimestamp) for ClockLog
98  	 */
99      public DateTime getClockDateTime();
100     
101     /**
102 	 * The clockAction associated with the ClockLog
103 	 * 
104 	 * <p>
105 	 * clockAction of a ClockLog
106 	 * <p>
107 	 * 
108 	 * @return clockAction for ClockLog
109 	 */
110     public String getClockAction();
111    
112     /**
113 	 * The ipAddress associated with the ClockLog
114 	 * 
115 	 * <p>
116 	 * ipAddress of a ClockLog
117 	 * <p>
118 	 * 
119 	 * @return ipAddress for ClockLog
120 	 */
121     public String getIpAddress();
122    
123     /**
124      * TODO: Is this field needed??
125 	 * The userPrincipalId associated with the ClockLog
126 	 * 
127 	 * <p>
128 	 * userPrincipalId of a ClockLog
129 	 * <p>
130 	 * 
131 	 * @return userPrincipalId for ClockLog
132 	 */
133     public String getUserPrincipalId();
134    
135     /**
136 	 * The timestamp associated with the ClockLog
137 	 * 
138 	 * <p>
139 	 * timestamp of a ClockLog
140 	 * <p>
141 	 * 
142 	 * @return timestamp for ClockLog
143 	 */
144     public Timestamp getTimestamp();
145 
146     /**
147 	 * The clockTimestampTimezone associated with the ClockLog
148 	 * 
149 	 * <p>
150 	 * clockTimestampTimezone of a ClockLog
151 	 * <p>
152 	 * 
153 	 * @return clockTimestampTimezone for ClockLog
154 	 */
155     public String getClockTimestampTimezone();
156     
157     /**
158 	 * The next valid clock action associated with the ClockLog
159 	 * 
160 	 * <p>
161 	 * If clockAction is CI (clock in), the next action is CO (clock out).
162 	 * If clockAction is CO, the next action is CI.
163 	 * If clockAction is LI (lunch in), the next action is LO (lunch out).
164 	 * If clockAction is LO, the next action is LI.
165 	 * <p>
166 	 * 
167 	 * @return next valid clock action for ClockLog
168 	 */
169     public String getNextValidClockAction();
170 	
171     /**
172 	 * The Job object associated with the ClockLog
173 	 * 
174 	 * <p>
175 	 * job of a ClockLog
176 	 * <p>
177 	 * 
178 	 * @return job for ClockLog
179 	 */
180 	public JobContract getJob();
181 
182 	/**
183 	 * The WorkArea object associated with the ClockLog
184 	 * 
185 	 * <p>
186 	 * workAreaObj of a ClockLog
187 	 * <p>
188 	 * 
189 	 * @return workAreaObj for ClockLog
190 	 */
191 	public WorkAreaContract getWorkAreaObj();
192 	
193 	/**
194 	 * The Task object associated with the ClockLog
195 	 * 
196 	 * <p>
197 	 * taskObj of a ClockLog
198 	 * <p>
199 	 * 
200 	 * @return taskObj for ClockLog
201 	 */
202 	public TaskContract getTaskObj();
203 
204 	/**
205 	 * The workArea associated with the ClockLog
206 	 * 
207 	 * <p>
208 	 * workArea of a ClockLog
209 	 * <p>
210 	 * 
211 	 * @return workArea for ClockLog
212 	 */
213 	public Long getWorkArea() ;
214 	
215 	/**
216 	 * The task associated with the ClockLog
217 	 * 
218 	 * <p>
219 	 * task of a ClockLog
220 	 * <p>
221 	 * 
222 	 * @return task for ClockLog
223 	 */
224 	public Long getTask();
225 
226 	/**
227 	 * The Person object associated with the ClockLog
228 	 * 
229 	 * <p>
230 	 * principal of a ClockLog
231 	 * <p>
232 	 * 
233 	 * @return principal for ClockLog
234 	 */
235 	public Person getPrincipal();
236 
237 	/**
238 	 * The clockedByMissedPunch flag of the MissedPunch
239 	 * 
240 	 * <p>
241 	 * clockedByMissedPunch flag of a MissedPunch
242 	 * <p>
243 	 * 
244 	 * @return Y if clocked by missed punch, N if not
245 	 */
246 	public boolean isClockedByMissedPunch();
247 
248 	/**
249 	 * The unapprovedIP flag of the MissedPunch
250 	 * 
251 	 * <p>
252 	 * unapprovedIP flag of a MissedPunch
253 	 * <p>
254 	 * 
255 	 * @return Y if it's an approved ip, N if not
256 	 */
257 	public boolean isUnapprovedIP();
258 
259 }