View Javadoc
1   /**
2    * Copyright 2004-2014 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.timesheet;
17  
18  import java.util.List;
19  import java.util.Map;
20  
21  import org.joda.time.LocalDate;
22  import org.kuali.kpme.core.api.document.calendar.CalendarDocumentContract;
23  import org.kuali.kpme.core.api.job.JobContract;
24  import org.kuali.kpme.tklm.api.time.timeblock.TimeBlock;
25  import org.kuali.kpme.tklm.api.time.timeblock.TimeBlockContract;
26  import org.kuali.kpme.tklm.api.time.timesummary.TimeSummaryContract;
27  
28  
29  
30  /**
31   * <p>TimesheetDocumentContract interface</p>
32   *
33   */
34  public interface TimesheetDocumentContract extends CalendarDocumentContract {
35  
36  	/**
37  	 * The list of Job objects associated with the TimesheetDocument
38  	 * 
39  	 * <p>
40  	 * jobs of a TimesheetDocument
41  	 * <p>
42  	 * 
43  	 * @return jobs for TimesheetDocument
44  	 */
45  	public List<? extends JobContract> getJobs();
46  
47  	/**
48  	 * The list of TimeBlock objects associated with the TimesheetDocument
49  	 * 
50  	 * <p>
51  	 * timeBlocks of a TimesheetDocument
52  	 * <p>
53  	 * 
54  	 * @return timeBlocks for TimesheetDocument
55  	 */
56  	public List<TimeBlock> getTimeBlocks();
57  	
58  	/**
59  	 * The TimeSummary object associated with the TimesheetDocument
60  	 * 
61  	 * <p>
62  	 * timeSummary of a TimesheetDocument
63  	 * <p>
64  	 * 
65  	 * @return timeSummary for TimesheetDocument
66  	 */
67  	public TimeSummaryContract getTimeSummary();
68  
69  	/**
70  	 * The principal id of the document header associated with the TimesheetDocument
71  	 * 
72  	 * <p>
73  	 * getDocumentHeader().getPrincipalId() of a TimesheetDocument
74  	 * <p>
75  	 * 
76  	 * @return getDocumentHeader().getPrincipalId() for TimesheetDocument
77  	 */
78  	public String getPrincipalId();
79  
80  	/**
81  	 * The Job object associated with the jobNumber
82  	 * 
83  	 * <p>
84  	 * job associated with the jobNumber
85  	 * <p>
86  	 * 
87  	 * @param jobNumber number to retrieve Job object from jobNumberToJobMap
88  	 * @return Job object associated with the jobNumber
89  	 */
90  	public JobContract getJob(Long jobNumber);
91  
92  	/**
93  	 * The end period date of the calendar entry associated with the TimesheetDocument 
94  	 * 
95  	 * <p>
96  	 * getCalendarEntry().getEndPeriodFullDateTime().toLocalDate() of a TimesheetDocument
97  	 * <p>
98  	 * 
99  	 * @return getCalendarEntry().getEndPeriodFullDateTime().toLocalDate() for TimesheetDocument
100 	 */
101     public LocalDate getDocEndDate();
102 
103     /**
104 	 * The document id of the document header associated with the TimesheetDocument
105 	 * 
106 	 * <p>
107 	 * this.getDocumentHeader().getDocumentId() of a TimesheetDocument
108 	 * <p>
109 	 * 
110 	 * @return this.getDocumentHeader().getDocumentId() for TimesheetDocument
111 	 */
112 	public String getDocumentId();
113 
114 	/**
115 	 * TODO: Put a better comment
116 	 * The map of earn code name and a list of begin date of time blocks associated with the TimesheetDocument
117 	 * 
118 	 * <p>
119 	 * earnCodeMap of a TimesheetDocument
120 	 * <p>
121 	 * 
122 	 * @return earnCodeMap for TimesheetDocument
123 	 */
124     public Map<String, List<LocalDate>> getEarnCodeMap();
125 	
126     /**
127 	 * TODO: Put a comment
128 	 * The map of assignment descriptions associated with the TimesheetDocument
129 	 * 
130 	 * <p>
131 	 * <p>
132 	 * 
133 	 * @param clockOnlyAssignments
134 	 * @return assignmentDescriptions
135 	 */
136     public Map<String, String> getAssignmentDescriptions(boolean clockOnlyAssignments, LocalDate date);
137 
138 }