001 /*
002 * Copyright 2011 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.kfs.sys.document.web;
017
018 import java.util.List;
019
020 import javax.servlet.jsp.JspException;
021 import javax.servlet.jsp.PageContext;
022 import javax.servlet.jsp.tagext.JspFragment;
023 import javax.servlet.jsp.tagext.Tag;
024
025 import org.kuali.kfs.sys.document.web.renderers.GroupErrorsRenderer;
026
027
028 public interface AccountingLineGroup {
029
030 /**
031 * Renders the whole of this accounting line group
032 *
033 * @param pageContext the page context to render to
034 * @param parentTag the AccountingLinesTag that is requesting this rendering
035 */
036 public abstract void renderEverything(PageContext pageContext, Tag parentTag) throws JspException;
037
038 /**
039 * Finds the maximum number of cells in the accounting line table row
040 *
041 * @param rows the rows which are being rendered
042 * @return the maximum number of cells to render
043 */
044 public abstract int getWidthInCells();
045
046 /**
047 * Sets the cellCount attribute value.
048 *
049 * @param cellCount The cellCount to set.
050 */
051 public abstract void setCellCount(int cellCount);
052
053 /**
054 * Sets the importLineOverride attribute value.
055 *
056 * @param importLineOverride The importLineOverride to set.
057 */
058 public abstract void setImportLineOverride(JspFragment importLineOverride);
059
060 /**
061 * Sets the form's arbitrarily high tab index
062 *
063 * @param arbitrarilyHighIndex the index to set
064 */
065 public abstract void setArbitrarilyHighIndex(int arbitrarilyHighIndex);
066
067 /**
068 * Gets the errors attribute.
069 *
070 * @return Returns the errors.
071 */
072 public abstract List getErrorKeys();
073
074 /**
075 * Sets the errors attribute value.
076 *
077 * @param errors The errors to set.
078 */
079 public abstract void setErrorKeys(List errors);
080
081 /**
082 * Determines if there is more than one editable line in this group; if so, then it allows deleting
083 */
084 public abstract void updateDeletabilityOfAllLines();
085
086 /**
087 * Gets the collectionItemPropertyName attribute.
088 * @return Returns the collectionItemPropertyName.
089 */
090 public abstract String getCollectionItemPropertyName();
091
092 }