View Javadoc

1   /**
2    * Copyright 2004-2012 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 previous or next Document Header -- uses the current Document from context.
52       * @param prevOrNext
53       * @param principalId
54       * @return
55       */
56      TimesheetDocumentHeader getPrevOrNextDocumentHeader(String prevOrNext, String principalId);
57  
58      public List<TimesheetDocumentHeader> getDocumentHeaders(Date payBeginDate);
59  
60      public void deleteTimesheetHeader(String documentId);
61      
62      /**
63       * Fetch list of Document Headers by given principal id
64       * @param principalId
65       * @return List<TimesheetDocumentHeader>
66       */
67      public List<TimesheetDocumentHeader> getDocumentHeadersForPrincipalId(String principalId);
68      
69      /**
70       * Fetch list of Document Headers by given principal id and year
71       * @param principalId
72       * @param year
73       * @return List<TimesheetDocumentHeader>
74       */
75      public List<TimesheetDocumentHeader> getDocumentHeadersForYear(String principalId, String year);
76      /*
77       * Fetch the Timesheet document header that contains asOfDate
78       * @param principalId
79       * @param asOfDate
80       * @return TimesheetDocumentHeader
81       */
82      public TimesheetDocumentHeader getDocumentHeaderForDate(String principalId, Date asOfDate);
83      
84  
85  }