001 /**
002 * Copyright 2004-2013 The Kuali Foundation
003 *
004 * Licensed under the Educational Community License, Version 2.0 (the "License");
005 * you may not use this file except in compliance with the License.
006 * You may obtain a copy of the License at
007 *
008 * http://www.opensource.org/licenses/ecl2.php
009 *
010 * Unless required by applicable law or agreed to in writing, software
011 * distributed under the License is distributed on an "AS IS" BASIS,
012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013 * See the License for the specific language governing permissions and
014 * limitations under the License.
015 */
016 package org.kuali.hr.time.workflow.service;
017
018 import org.kuali.hr.time.workflow.TimesheetDocumentHeader;
019
020 import java.util.Date;
021 import java.util.List;
022
023 public interface TimesheetDocumentHeaderService {
024 /**
025 * Save or Update the document header
026 * @param documentHeader
027 */
028 public void saveOrUpdate(TimesheetDocumentHeader documentHeader);
029 /**
030 * Fetch document header for a given document id
031 * @param documentId
032 * @return
033 */
034 public TimesheetDocumentHeader getDocumentHeader(String documentId);
035 /**
036 * Fetch document header for a given principal id and pay period begin date and end date
037 * @param principalId
038 * @param payBeginDate
039 * @param payEndDate
040 * @return
041 */
042 public TimesheetDocumentHeader getDocumentHeader(String principalId, Date payBeginDate, Date payEndDate);
043 /**
044 * Fetch previous document header
045 * @param principalId
046 * @param payBeginDate
047 * @return
048 */
049 public TimesheetDocumentHeader getPreviousDocumentHeader(String principalId, Date payBeginDate);
050 /**
051 * Fetch next document header
052 * @param principalId
053 * @param payBeginDate
054 * @return
055 */
056 public TimesheetDocumentHeader getNextDocumentHeader(String principalId, Date payEndDate);
057 /**
058 * Fetch previous or next Document Header -- uses the current Document from context.
059 * @param prevOrNext
060 * @param principalId
061 * @return
062 */
063 TimesheetDocumentHeader getPrevOrNextDocumentHeader(String prevOrNext, String principalId);
064 /**
065 * Fetch document headers for a given pay period begin date
066 * @param payBeginDate
067 * @return
068 */
069 public List<TimesheetDocumentHeader> getDocumentHeaders(Date payBeginDate);
070 /**
071 * Fetch document headers for a given pay period begin date and end date
072 * @param payBeginDate
073 * @param payEndDate
074 * @return
075 */
076 public List<TimesheetDocumentHeader> getDocumentHeaders(Date payBeginDate, Date payEndDate);
077
078 public void deleteTimesheetHeader(String documentId);
079
080 /**
081 * Fetch list of Document Headers by given principal id
082 * @param principalId
083 * @return List<TimesheetDocumentHeader>
084 */
085 public List<TimesheetDocumentHeader> getDocumentHeadersForPrincipalId(String principalId);
086
087 /**
088 * Fetch list of Document Headers by given principal id and year
089 * @param principalId
090 * @param year
091 * @return List<TimesheetDocumentHeader>
092 */
093 public List<TimesheetDocumentHeader> getDocumentHeadersForYear(String principalId, String year);
094 /*
095 * Fetch the Timesheet document header that contains asOfDate
096 * @param principalId
097 * @param asOfDate
098 * @return TimesheetDocumentHeader
099 */
100 public TimesheetDocumentHeader getDocumentHeaderForDate(String principalId, Date asOfDate);
101
102
103 }