1 /**
2 * Copyright 2004-2013 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.hr.time.workflow.service;
17
18 import org.kuali.hr.time.workflow.TimesheetDocumentHeader;
19
20 import java.util.Date;
21 import java.util.List;
22
23 public interface TimesheetDocumentHeaderService {
24 /**
25 * Save or Update the document header
26 * @param documentHeader
27 */
28 public void saveOrUpdate(TimesheetDocumentHeader documentHeader);
29 /**
30 * Fetch document header for a given document id
31 * @param documentId
32 * @return
33 */
34 public TimesheetDocumentHeader getDocumentHeader(String documentId);
35 /**
36 * Fetch document header for a given principal id and pay period begin date and end date
37 * @param principalId
38 * @param payBeginDate
39 * @param payEndDate
40 * @return
41 */
42 public TimesheetDocumentHeader getDocumentHeader(String principalId, Date payBeginDate, Date payEndDate);
43 /**
44 * Fetch previous document header
45 * @param principalId
46 * @param payBeginDate
47 * @return
48 */
49 public TimesheetDocumentHeader getPreviousDocumentHeader(String principalId, Date payBeginDate);
50 /**
51 * Fetch next document header
52 * @param principalId
53 * @param payBeginDate
54 * @return
55 */
56 public TimesheetDocumentHeader getNextDocumentHeader(String principalId, Date payEndDate);
57 /**
58 * Fetch previous or next Document Header -- uses the current Document from context.
59 * @param prevOrNext
60 * @param principalId
61 * @return
62 */
63 TimesheetDocumentHeader getPrevOrNextDocumentHeader(String prevOrNext, String principalId);
64 /**
65 * Fetch document headers for a given pay period begin date
66 * @param payBeginDate
67 * @return
68 */
69 public List<TimesheetDocumentHeader> getDocumentHeaders(Date payBeginDate);
70 /**
71 * Fetch document headers for a given pay period begin date and end date
72 * @param payBeginDate
73 * @param payEndDate
74 * @return
75 */
76 public List<TimesheetDocumentHeader> getDocumentHeaders(Date payBeginDate, Date payEndDate);
77
78 public void deleteTimesheetHeader(String documentId);
79
80 /**
81 * Fetch list of Document Headers by given principal id
82 * @param principalId
83 * @return List<TimesheetDocumentHeader>
84 */
85 public List<TimesheetDocumentHeader> getDocumentHeadersForPrincipalId(String principalId);
86
87 /**
88 * Fetch list of Document Headers by given principal id and year
89 * @param principalId
90 * @param year
91 * @return List<TimesheetDocumentHeader>
92 */
93 public List<TimesheetDocumentHeader> getDocumentHeadersForYear(String principalId, String year);
94 /*
95 * Fetch the Timesheet document header that contains asOfDate
96 * @param principalId
97 * @param asOfDate
98 * @return TimesheetDocumentHeader
99 */
100 public TimesheetDocumentHeader getDocumentHeaderForDate(String principalId, Date asOfDate);
101
102
103 }