/* * Copyright 2004-2007 IDCA. All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the * following conditions are met: * * 1. Redistributions of source code must retain the above copyright notice, this list of conditions and * the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions * and the following disclaimer in the documentation and/or other materials provided with the * distribution. * * THIS SOFTWARE IS PROVIDED BY IDCA AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL IDCA OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * * The views and conclusions contained in the software and documentation are those of the authors and * should not be interpreted as representing official policies, either expressed or implied, of IDCA. */ package com.idcanet.vasc.core; import java.util.ArrayList; import java.util.List; import com.idcanet.vasc.core.actions.ColumnVascAction; import com.idcanet.vasc.core.actions.GlobalVascAction; import com.idcanet.vasc.core.actions.RowVascAction; import com.idcanet.vasc.core.column.VascTableColumn; import com.idcanet.xtes.xpql.query.Query; /** * * @author Willem Cazander * @version 1.0 Mar 21, 2007 */ public class VascTable { private String name = null; private String headerName = null; private String description = null; private String toolTip = null; private List tableColumns = null; private List rowActions = null; private List columnActions = null; private List globalActions = null; private VascDataSource vascDataSource = null; private Query query = null; private List tableData = null; private Object selectedObject = null; private VascRecordCreator vascRecordCreator = null; private VascViewRenderer vascViewRenderer = null; private VascTextValue vascTextValue = null; private List userOptions = null; private String helpId = null; private VascTableController vascTableController = null; public VascTable() { tableColumns = new ArrayList(6); rowActions = new ArrayList(6); columnActions = new ArrayList(6); globalActions = new ArrayList(6); tableData = new ArrayList(6); userOptions = new ArrayList(6); } /** * @return the columnActions */ public List getColumnActions() { return columnActions; } /** * @param columnActions the columnActions to set */ public void addColumnActions(ColumnVascAction columnAction) { columnActions.add(columnAction); } /** * @return the description */ public String getDescription() { return description; } /** * @param description the description to set */ public void setDescription(String description) { this.description = description; } /** * @return the globalActions */ public List getGlobalActions() { return globalActions; } /** * @param globalActions the globalActions to set */ public void addGlobalActions(GlobalVascAction globalAction) { globalActions.add(globalAction); } /** * @return the headerName */ public String getHeaderName() { return headerName; } /** * @param headerName the headerName to set */ public void setHeaderName(String headerName) { this.headerName = headerName; } /** * @return the name */ public String getName() { return name; } /** * @param name the name to set */ public void setName(String name) { this.name = name; } /** * @return the query */ public Query getQuery() { return query; } /** * @param query the query to set */ public void setQuery(Query query) { this.query = query; } /** * @return the rowActions */ public List getRowActions() { return rowActions; } /** * @param rowActions the rowActions to set */ public void addRowActions(RowVascAction rowAction) { rowActions.add(rowAction); } /** * @return the selectedObject */ public Object getSelectedObject() { return selectedObject; } /** * @param selectedObject the selectedObject to set */ public void setSelectedObject(Object selectedObject) { this.selectedObject = selectedObject; } /** * @return the tableColumns */ public List getTableColumns() { return tableColumns; } /** * @param tableColumns the tableColumns to set */ public void addTableColumns(VascTableColumn tableColumn) { if (tableColumn.getVascTable()!=null) { if (tableColumn.getVascTable().equals(this) == false) { throw new IllegalStateException("VascTableColumn already bound to an other VascTable instance."); } } tableColumn.setVascTable(this); tableColumns.add(tableColumn); } /** * @return the tableData */ public List getTableData() { return tableData; } /** * @param tableData the tableData to set */ public void setTableData(List tableData) { this.tableData = tableData; } /** * @return the toolTip */ public String getToolTip() { return toolTip; } /** * @param toolTip the toolTip to set */ public void setToolTip(String toolTip) { this.toolTip = toolTip; } /** * @return the userOptions */ public List getUserOptions() { return userOptions; } /** * @param userOptions the userOptions to set */ public void addUserOptions(VascUserOption userOption) { userOptions.add(userOption); } /** * @return the vascDataSource */ public VascDataSource getVascDataSource() { return vascDataSource; } /** * @param vascDataSource the vascDataSource to set */ public void setVascDataSource(VascDataSource vascDataSource) { this.vascDataSource = vascDataSource; } /** * @return the vascRecordCreator */ public VascRecordCreator getVascRecordCreator() { return vascRecordCreator; } /** * @param vascRecordCreator the vascRecordCreator to set */ public void setVascRecordCreator(VascRecordCreator vascRecordCreator) { this.vascRecordCreator = vascRecordCreator; } /** * @return the vascTextValue */ public VascTextValue getVascTextValue() { return vascTextValue; } /** * @param vascTextValue the vascTextValue to set */ public void setVascTextValue(VascTextValue vascTextValue) { this.vascTextValue = vascTextValue; } /** * @return the vascViewRenderer */ public VascViewRenderer getVascViewRenderer() { return vascViewRenderer; } /** * @param vascViewRenderer the vascViewRenderer to set */ public void setVascViewRenderer(VascViewRenderer vascViewRenderer) { this.vascViewRenderer = vascViewRenderer; } /** * @return the helpId */ public String getHelpId() { return helpId; } /** * @param helpId the helpId to set */ public void setHelpId(String helpId) { this.helpId = helpId; } /** * @return the vascTableController */ public VascTableController getVascTableController() { return vascTableController; } /** * @param vascTableController the vascTableController to set */ public void setVascTableController(VascTableController vascTableController) { this.vascTableController = vascTableController; } }