View Javadoc

1   /**
2    * Copyright 2004-2013 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.approval.web;
17  
18  import java.util.ArrayList;
19  import java.util.List;
20  
21  import org.kuali.hr.time.base.web.ApprovalForm;
22  
23  public class TimeApprovalActionForm extends ApprovalForm {
24  
25  	private static final long serialVersionUID = 339670908525224389L;
26  	
27  	private List<String> payCalendarLabels = new ArrayList<String>();
28  	private List<ApprovalTimeSummaryRow> approvalRows;
29  	
30  	public List<String> getPayCalendarLabels() {
31  		return payCalendarLabels;
32  	}
33  	public void setPayCalendarLabels(List<String> payCalendarLabels) {
34  		this.payCalendarLabels = payCalendarLabels;
35  	}
36  	public List<ApprovalTimeSummaryRow> getApprovalRows() {
37  		return approvalRows;
38  	}
39  	public void setApprovalRows(List<ApprovalTimeSummaryRow> approvalRows) {
40  		this.approvalRows = approvalRows;
41  	}
42  	
43  	public boolean isAnyApprovalRowApprovable() {
44  		boolean isAnyApprovalRowApprovable = false;
45  		
46  		if (approvalRows != null) {
47  			for (ApprovalTimeSummaryRow approvalRow : approvalRows) {
48  				if (approvalRow.isApprovable()) {
49  					isAnyApprovalRowApprovable = true;
50  					break;
51  				}
52  			}
53  		}
54  		
55  		return isAnyApprovalRowApprovable;
56  	}
57  	
58  
59  }