View Javadoc

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 and end date
66  	 * @param payBeginDate
67  	 * @param payEndDate
68  	 * @return
69  	 */
70  	public List<TimesheetDocumentHeader> getDocumentHeaders(Date payBeginDate, Date payEndDate);
71  
72      public void deleteTimesheetHeader(String documentId);
73      
74      /**
75       * Fetch list of Document Headers by given principal id
76       * @param principalId
77       * @return List<TimesheetDocumentHeader>
78       */
79      public List<TimesheetDocumentHeader> getDocumentHeadersForPrincipalId(String principalId);
80      
81      /**
82       * Fetch list of Document Headers by given principal id and year
83       * @param principalId
84       * @param year
85       * @return List<TimesheetDocumentHeader>
86       */
87      public List<TimesheetDocumentHeader> getDocumentHeadersForYear(String principalId, String year);
88      /*
89       * Fetch the Timesheet document header that contains asOfDate
90       * @param principalId
91       * @param asOfDate
92       * @return TimesheetDocumentHeader
93       */
94      public TimesheetDocumentHeader getDocumentHeaderForDate(String principalId, Date asOfDate);
95      
96  }