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.approval.web; 017 018 import java.util.ArrayList; 019 import java.util.List; 020 021 import org.kuali.hr.time.base.web.ApprovalForm; 022 023 public class TimeApprovalActionForm extends ApprovalForm { 024 025 private static final long serialVersionUID = 339670908525224389L; 026 027 private List<String> payCalendarLabels = new ArrayList<String>(); 028 private List<ApprovalTimeSummaryRow> approvalRows; 029 030 public List<String> getPayCalendarLabels() { 031 return payCalendarLabels; 032 } 033 public void setPayCalendarLabels(List<String> payCalendarLabels) { 034 this.payCalendarLabels = payCalendarLabels; 035 } 036 public List<ApprovalTimeSummaryRow> getApprovalRows() { 037 return approvalRows; 038 } 039 public void setApprovalRows(List<ApprovalTimeSummaryRow> approvalRows) { 040 this.approvalRows = approvalRows; 041 } 042 043 public boolean isAnyApprovalRowApprovable() { 044 boolean isAnyApprovalRowApprovable = false; 045 046 if (approvalRows != null) { 047 for (ApprovalTimeSummaryRow approvalRow : approvalRows) { 048 if (approvalRow.isApprovable()) { 049 isAnyApprovalRowApprovable = true; 050 break; 051 } 052 } 053 } 054 055 return isAnyApprovalRowApprovable; 056 } 057 058 059 }