001: /*
002: * File : $Source: /usr/local/cvs/opencms/src/org/opencms/workplace/list/I_CmsListResourceCollector.java,v $
003: * Date : $Date: 2008-02-27 12:05:28 $
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.list;
033:
034: import org.opencms.file.CmsObject;
035: import org.opencms.file.CmsResource;
036: import org.opencms.file.collectors.I_CmsResourceCollector;
037: import org.opencms.main.CmsException;
038:
039: import java.util.List;
040: import java.util.Map;
041:
042: /**
043: * Collector to provide {@link CmsResource} objects for a explorer List.<p>
044: *
045: * @author Michael Moossen
046: *
047: * @version $Revision: 1.4 $
048: *
049: * @since 6.1.0
050: */
051: public interface I_CmsListResourceCollector extends
052: I_CmsResourceCollector {
053:
054: /** Parameter name constant. */
055: String PARAM_FILTER = "filter";
056:
057: /** Parameter name constant. */
058: String PARAM_ORDER = "order";
059:
060: /** Parameter name constant. */
061: String PARAM_PAGE = "page";
062:
063: /** Resources parameter name constant. */
064: String PARAM_RESOURCES = "resources";
065:
066: /** Parameter name constant. */
067: String PARAM_SORTBY = "sortby";
068:
069: /** Key-Value delimiter constant. */
070: String SEP_KEYVAL = ":";
071:
072: /** Parameter delimiter constant. */
073: String SEP_PARAM = "|";
074:
075: /**
076: * Returns a list of list items from a list of resources.<p>
077: *
078: * @param parameter the collector parameter or <code>null</code> for default.<p>
079: *
080: * @return a list of {@link CmsListItem} objects
081: *
082: * @throws CmsException if something goes wrong
083: */
084: List getListItems(String parameter) throws CmsException;
085:
086: /**
087: * Returns the resource for the given item.<p>
088: *
089: * @param cms the cms object
090: * @param item the item
091: *
092: * @return the resource
093: */
094: CmsResource getResource(CmsObject cms, CmsListItem item);
095:
096: /**
097: * Returns all, unsorted and unfiltered, resources.<p>
098: *
099: * Be sure to cache the resources.<p>
100: *
101: * @param cms the cms object
102: * @param params the parameter map
103: *
104: * @return a list of {@link CmsResource} objects
105: *
106: * @throws CmsException if something goes wrong
107: */
108: List getResources(CmsObject cms, Map params) throws CmsException;
109:
110: /**
111: * Returns the workplace object.<p>
112: *
113: * @return the workplace object
114: */
115: A_CmsListExplorerDialog getWp();
116:
117: /**
118: * Sets the current display page.<p>
119: *
120: * @param page the new display page
121: */
122: void setPage(int page);
123: }
|