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.timeblock.web;
17  
18  import java.util.List;
19  
20  import org.kuali.kpme.tklm.api.time.timeblock.TimeBlockContract;
21  import org.kuali.kpme.tklm.api.time.timehourdetail.TimeHourDetailRendererContract;
22  
23  /**
24   * <p>TimeBlockRendererContract interface</p>
25   *
26   */
27  public interface TimeBlockRendererContract {
28  
29  	/**
30  	 * The list of TimeHourDetailRenderer objects associated with the TimeBlockRenderer
31  	 * 
32  	 * <p>
33  	 * detailRenderers for a TimeBlockRenderer
34  	 * <p>
35  	 * 
36  	 * @return detailRenderers for TimeBlockRenderer
37  	 */
38      public List<? extends TimeHourDetailRendererContract> getDetailRenderers();
39  
40      /**
41  	 * The TimeBlock object associated with the TimeBlockRenderer
42  	 * 
43  	 * <p>
44  	 * timeBlock for a TimeBlockRenderer
45  	 * <p>
46  	 * 
47  	 * @return timeBlock for TimeBlockRenderer
48  	 */
49      public TimeBlockContract getTimeBlock();
50  
51      /**
52  	 * The time range associated with the TimeBlockRenderer
53  	 * 
54  	 * <p>
55  	 * If timeBlock's earn code type is T, construct a string (begin time in hh:mm aa format - end time in hh:mm aa format)
56  	 * <p>
57  	 * 
58  	 * @return a string representation of time range for TimeBlockRenderer
59  	 */
60      public String getTimeRange();
61  
62      /**
63  	 * The title associated with the TimeBlockRenderer
64  	 * 
65  	 * <p>
66  	 * Constructs a title string based on work area description and task description
67  	 * <p>
68  	 * 
69  	 * @return work area description - task description if task is not the default one
70  	 */
71      public String getTitle();
72  
73      /**
74  	 * The amount of the TimeBlock object associated with the TimeBlockRenderer
75  	 * 
76  	 * <p>
77  	 * If timeBlock's earn code type is A
78  	 *   If timeBlock's amount is not null, "A: $x.xx"
79  	 *   else "A: $0.00"
80  	 * Else ""
81  	 * <p>
82  	 * 
83  	 * @return "A: $x.xx" if timeBlock's amount is not null, "A: $0.00" if null, "" if earn code type is not A
84  	 */
85      public String getAmount();
86  
87      /**
88  	 * The earn code type of the TimeBlock object associated with the TimeBlockRenderer
89  	 * 
90  	 * <p>
91  	 * timeBlock.getEarnCodeType() for a TimeBlockRenderer
92  	 * <p>
93  	 * 
94  	 * @return timeBlock.getEarnCodeType() for TimeBlockRenderer
95  	 */
96      public String getEarnCodeType();
97  
98      /**
99  	 * The assignmentClass associated with the TimeBlockRenderer
100 	 * 
101 	 * <p>
102 	 * assignmentClass for a TimeBlockRenderer
103 	 * <p>
104 	 * 
105 	 * @return assignmentClass for TimeBlockRenderer
106 	 */
107 	public String getAssignmentClass();
108 	
109 	/**
110 	 * TODO: Put a better comment
111 	 * The lunchLabel associated with the TimeBlockRenderer
112 	 * 
113 	 * <p>
114 	 * lunchLabel for a TimeBlockRenderer
115 	 * <p>
116 	 * 
117 	 * @return lunchLabel for TimeBlockRenderer
118 	 */
119 	public String getLunchLabel();
120 	
121 	/**
122 	 * TODO: Put a better comment
123 	 * The lunchLabelId associated with the TimeBlockRenderer
124 	 * 
125 	 * <p>
126 	 * lunchLabelId for a TimeBlockRenderer
127 	 * <p>
128 	 * 
129 	 * @return lunchLabelId for TimeBlockRenderer
130 	 */
131     public String getLunchLabelId();
132 
133 }