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.time.approval.web;
17  
18  import java.util.ArrayList;
19  import java.util.List;
20  
21  import org.kuali.kpme.tklm.common.CalendarApprovalForm;
22  import org.kuali.kpme.tklm.time.approval.summaryrow.ApprovalTimeSummaryRow;
23  
24  public class TimeApprovalActionForm extends CalendarApprovalForm {
25  
26  	private static final long serialVersionUID = 339670908525224389L;
27  	
28  	private List<String> payCalendarLabels = new ArrayList<String>();
29  	private List<ApprovalTimeSummaryRow> approvalRows = new ArrayList<ApprovalTimeSummaryRow>();
30  	private List<String> errorMessageList;
31  	
32  	public List<String> getPayCalendarLabels() {
33  		return payCalendarLabels;
34  	}
35  	public void setPayCalendarLabels(List<String> payCalendarLabels) {
36  		this.payCalendarLabels = payCalendarLabels;
37  	}
38  	public List<ApprovalTimeSummaryRow> getApprovalRows() {
39  		return approvalRows;
40  	}
41  	public void setApprovalRows(List<ApprovalTimeSummaryRow> approvalRows) {
42  		this.approvalRows = approvalRows;
43  	}
44  	
45  	public boolean isAnyApprovalRowApprovable() {
46  		boolean isAnyApprovalRowApprovable = false;
47  		
48  		if (approvalRows != null) {
49  			for (ApprovalTimeSummaryRow approvalRow : approvalRows) {
50  				if (approvalRow.isApprovable()) {
51  					isAnyApprovalRowApprovable = true;
52  					break;
53  				}
54  			}
55  		}
56  		
57  		return isAnyApprovalRowApprovable;
58  	}
59  	
60  	public List<String> getErrorMessageList() {
61  		return errorMessageList;
62  	}
63  	
64  	public void setErrorMessageList(List<String> errorMessageList) {
65  		this.errorMessageList = errorMessageList;
66  	}
67  
68  	
69  }