001: /*
002: * File : $Source: /usr/local/cvs/opencms/src/org/opencms/workplace/CmsWorkplaceUserInfoBlock.java,v $
003: * Date : $Date: 2008-02-27 12:05:45 $
004: * Version: $Revision: 1.4 $
005: *
006: * This library is part of OpenCms -
007: * the Open Source Content Management System
008: *
009: * Copyright (c) 2002 - 2008 Alkacon Software GmbH (http://www.alkacon.com)
010: *
011: * This library is free software; you can redistribute it and/or
012: * modify it under the terms of the GNU Lesser General Public
013: * License as published by the Free Software Foundation; either
014: * version 2.1 of the License, or (at your option) any later version.
015: *
016: * This library is distributed in the hope that it will be useful,
017: * but WITHOUT ANY WARRANTY; without even the implied warranty of
018: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
019: * Lesser General Public License for more details.
020: *
021: * For further information about Alkacon Software GmbH, please see the
022: * company website: http://www.alkacon.com
023: *
024: * For further information about OpenCms, please see the
025: * project website: http://www.opencms.org
026: *
027: * You should have received a copy of the GNU Lesser General Public
028: * License along with this library; if not, write to the Free Software
029: * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
030: */
031:
032: package org.opencms.workplace;
033:
034: import java.util.ArrayList;
035: import java.util.List;
036:
037: /**
038: * Represents an user additional information block.<p>
039: *
040: * @author Michael Moossen
041: *
042: * @version $Revision: 1.4 $
043: *
044: * @since 6.5.6
045: */
046: public final class CmsWorkplaceUserInfoBlock {
047:
048: /** The list of defined entries in the block. */
049: private final List m_entries;
050:
051: /** The block's title. */
052: private String m_title;
053:
054: /**
055: * Default constructor.<p>
056: */
057: public CmsWorkplaceUserInfoBlock() {
058:
059: m_entries = new ArrayList();
060: }
061:
062: /**
063: * Creates a new entry.<p>
064: *
065: * @param key the additional information key
066: * @param type the class name of the stored data type
067: * @param widget the widget class name
068: * @param params the widget parameters
069: * @param optional if optional
070: */
071: public void addEntry(String key, String type, String widget,
072: String params, String optional) {
073:
074: m_entries.add(new CmsWorkplaceUserInfoEntry(key, type, widget,
075: params, optional));
076: }
077:
078: /**
079: * Returns a list of all configured additional information entries.<p>
080: *
081: * @return a list of {@link CmsWorkplaceUserInfoEntry} objects
082: */
083: public List getEntries() {
084:
085: return m_entries;
086: }
087:
088: /**
089: * Returns the title.<p>
090: *
091: * @return the title
092: */
093: public String getTitle() {
094:
095: return m_title;
096: }
097:
098: /**
099: * Sets the title.<p>
100: *
101: * @param title the title to set
102: */
103: public void setTitle(String title) {
104:
105: m_title = title;
106: }
107: }
|