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.renderers;
017    
018    import javax.servlet.jsp.JspException;
019    import javax.servlet.jsp.PageContext;
020    import javax.servlet.jsp.tagext.Tag;
021    
022    public abstract class TotalRendererBase implements Renderer, CellCountCurious, RepresentedCellCurious {
023        private int cellCount = 0;
024        private String representedCellPropertyName;
025        private int columnNumberOfRepresentedCell = 0; 
026    
027        public void clear() {
028            cellCount = 0;
029            columnNumberOfRepresentedCell = 0;
030            representedCellPropertyName = null;
031        }
032    
033        /**
034         * Gets the cellCount attribute. 
035         * @return Returns the cellCount.
036         */
037        public int getCellCount() {
038            return cellCount;
039        }
040    
041        /**
042         * Sets the cellCount attribute value.
043         * @param cellCount The cellCount to set.
044         */
045        public void setCellCount(int cellCount) {
046            this.cellCount = cellCount;
047        }
048    
049        /**
050         * Gets the representedCellPropertyName attribute. 
051         * @return Returns the representedCellPropertyName.
052         */
053        public String getRepresentedCellPropertyName() {
054            return representedCellPropertyName;
055        }
056    
057        /**
058         * Sets the representedCellPropertyName attribute value.
059         * @param representedCellPropertyName The representedCellPropertyName to set.
060         */
061        public void setRepresentedCellPropertyName(String representedCellPropertyName) {
062            this.representedCellPropertyName = representedCellPropertyName;
063        }
064    
065        /**
066         * Gets the columnNumberOfRepresentedCell attribute. 
067         * @return Returns the columnNumberOfRepresentedCell.
068         */
069        public int getColumnNumberOfRepresentedCell() {
070            return columnNumberOfRepresentedCell;
071        }
072    
073        /**
074         * Sets the columnNumberOfRepresentedCell attribute value.
075         * @param columnNumberOfRepresentedCell The columnNumberOfRepresentedCell to set.
076         */
077        public void setColumnNumberOfRepresentedCell(int columnNumberOfRepresentedCell) {
078            this.columnNumberOfRepresentedCell = columnNumberOfRepresentedCell;
079        }
080    
081    }