1 /* 2 * The Kuali Financial System, a comprehensive financial management system for higher education. 3 * 4 * Copyright 2005-2014 The Kuali Foundation 5 * 6 * This program is free software: you can redistribute it and/or modify 7 * it under the terms of the GNU Affero General Public License as 8 * published by the Free Software Foundation, either version 3 of the 9 * License, or (at your option) any later version. 10 * 11 * This program is distributed in the hope that it will be useful, 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 * GNU Affero General Public License for more details. 15 * 16 * You should have received a copy of the GNU Affero General Public License 17 * along with this program. If not, see <http://www.gnu.org/licenses/>. 18 */ 19 package org.kuali.kfs.sys.document.web; 20 21 import java.util.List; 22 import java.util.Map; 23 import java.util.Set; 24 25 import org.kuali.kfs.sys.businessobject.AccountingLine; 26 import org.kuali.kfs.sys.document.service.AccountingLineFieldRenderingTransformation; 27 28 /** 29 * An interface which specifies the behaviors needed from layout elements to join tables 30 */ 31 public interface TableJoining extends ElementNamable{ 32 33 /** 34 * Requests that this layout element property join a number of rows which will make up a table 35 * @param rows the rows to join 36 * @param headerRowCount the number of header rows 37 */ 38 public abstract void joinTable(List<AccountingLineTableRow> rows); 39 40 /** 41 * Requests that this element join a table row 42 * @param headerLabelRow the header row which can be joined 43 * @param row the row which can be joined 44 */ 45 public abstract void joinRow(AccountingLineTableRow headerLabelRow, AccountingLineTableRow row); 46 47 /** 48 * The minimum number of rows this element needs if it is going to join a table 49 * @return the minimum number of rows 50 */ 51 public abstract int getRequestedRowCount(); 52 53 /** 54 * Removes any action blocks from the given element 55 */ 56 public abstract void removeAllActionBlocks(); 57 58 /** 59 * Removes any unviewable blocks within this this table joining element 60 * @param unviewableBlocks a Set of the names of blocks that should not be rendered 61 */ 62 public abstract void removeUnviewableBlocks(Set<String> unviewableBlocks); 63 64 /** 65 * Instructs the element to make any child readOnlyizable blocks named within the given Set to read only 66 * @param readOnlyBlocks the names of blocks to make read only 67 */ 68 public abstract void readOnlyizeReadOnlyBlocks(Set<String> readOnlyBlocks); 69 70 /** 71 * Instructs the element to make any child readOnlyizable blocks named within the given Set to read only 72 * @param readOnlyBlocks the names of blocks to make read only 73 */ 74 public abstract void setEditableBlocks(Set<String> editableBlocks); 75 76 /** 77 * Performs a transformations on any fields this TableJoining layout element knows about 78 * @param accountingDocument the document the field of the accounting line is associated with 79 * @param fieldTransformation a List of field transformations to perform on this element 80 * @param accountingLine the accounting line which is being rendering during the transformation 81 * @param unconvertedValues any unconverted values from the form 82 */ 83 public abstract void performFieldTransformations(List<AccountingLineFieldRenderingTransformation> fieldTransformations, AccountingLine accountingLine, Map unconvertedValues); 84 }