001/* 002 * This library is part of OpenCms - 003 * the Open Source Content Management System 004 * 005 * Copyright (c) Alkacon Software GmbH & Co. KG (http://www.alkacon.com) 006 * 007 * This library is free software; you can redistribute it and/or 008 * modify it under the terms of the GNU Lesser General Public 009 * License as published by the Free Software Foundation; either 010 * version 2.1 of the License, or (at your option) any later version. 011 * 012 * This library is distributed in the hope that it will be useful, 013 * but WITHOUT ANY WARRANTY; without even the implied warranty of 014 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 015 * Lesser General Public License for more details. 016 * 017 * For further information about Alkacon Software, please see the 018 * company website: http://www.alkacon.com 019 * 020 * For further information about OpenCms, please see the 021 * project website: http://www.opencms.org 022 * 023 * You should have received a copy of the GNU Lesser General Public 024 * License along with this library; if not, write to the Free Software 025 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 026 */ 027 028package org.opencms.widgets.dataview; 029 030/** 031 * Interface describing a data item retrieved by an implementation of I_CmsDataView.<p> 032 * 033 * This interface provides both the data to display the data item in the widget used to select data items, 034 * as well as the data which should be stored by OpenCms when the data item is selected by the user (its ID, title, 035 * description and an additional data string for other information) 036 */ 037public interface I_CmsDataViewItem { 038 039 /** 040 * Gets the data for the column with the given name.<p> 041 * 042 * The returned object should be of a type compatible with the type of the column returned by I_CmsDataView.getColumns() with the same name.<p> 043 * 044 * @param colName the column name 045 * @return the value of the column 046 */ 047 Object getColumnData(String colName); 048 049 /** 050 * Returns the additional data which should be stored by OpenCms. 051 * 052 * @return the additional data to be stored 053 */ 054 String getData(); 055 056 /** 057 * Returns the description to be stored by OpenCms.<p> 058 * 059 * @return the description 060 */ 061 String getDescription(); 062 063 /** 064 * Gets the ID of the data item.<p> 065 * 066 * The ID should be unique for the given I_CmsDataView implementation which returned this data item.<p> 067 * 068 * @return the ID of the data item 069 */ 070 String getId(); 071 072 /** 073 * Gets the URL of the image to be displayed for this data item.<p> 074 * 075 * @return an URL pointing to an image 076 */ 077 String getImage(); 078 079 /** 080 * Gets the title to be stored by OpenCms.<p> 081 * 082 * @return the title 083 */ 084 String getTitle(); 085 086}