|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.opencms.file.collectors.A_CmsResourceCollector
org.opencms.file.collectors.CmsCategoryResourceCollector
public class CmsCategoryResourceCollector
A collector to fetch XML contents in a folder or the current site filtered by one or more given category types.
The return list will also be filtered by given key value pairs which are given as a collector parameter.
Usage:
<cms:contentload collector="allKeyValuePairFiltered" param="resource=[filename]|resourceType=[resource type]|categoryTypes=[category1,category2,...]|subTree=[boolean]|sortBy=[category|date]|sortAsc=[boolean]">
Field Summary | |
---|---|
static java.util.Comparator |
COMPARE_DATE_RELEASED_DESC
Compares the release date of resources in descending order. |
protected static org.apache.commons.logging.Log |
LOG
The log object for this class. |
Fields inherited from class org.opencms.file.collectors.A_CmsResourceCollector |
---|
m_order, SEPARATOR_TEMPLATEFILE |
Constructor Summary | |
---|---|
CmsCategoryResourceCollector()
|
Method Summary | |
---|---|
protected java.util.List |
allKeyValuePairFiltered(CmsObject cms,
java.lang.String param)
Collects all resources for the given categories filtered and sorted by the given collector parameter. |
java.util.List |
getCollectorNames()
Returns a list of all collector names (Strings) this collector implementation supports. |
java.lang.String |
getCreateLink(CmsObject cms,
java.lang.String collectorName,
java.lang.String param)
Returns the link that must be executed when a user clicks on the direct edit "new" button on a list created by the named collector. |
java.lang.String |
getCreateParam(CmsObject cms,
java.lang.String collectorName,
java.lang.String param)
Returns the parameter that must be passed to the I_CmsResourceCollector.getCreateLink(CmsObject, String, String) method. |
java.util.List |
getResults(CmsObject cms,
java.lang.String collectorName,
java.lang.String param)
Returns a list of CmsResource Objects that are
gathered in the VFS using the named collector. |
Methods inherited from class org.opencms.file.collectors.A_CmsResourceCollector |
---|
checkParams, compareTo, equals, getCreateInFolder, getCreateInFolder, getCreateLink, getCreateParam, getDefaultCollectorName, getDefaultCollectorParam, getOrder, getResults, hashCode, setDefaultCollectorName, setDefaultCollectorParam, setOrder, shrinkToFit |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.util.Comparator COMPARE_DATE_RELEASED_DESC
protected static final org.apache.commons.logging.Log LOG
Constructor Detail |
---|
public CmsCategoryResourceCollector()
Method Detail |
---|
public java.util.List getCollectorNames()
I_CmsResourceCollector
I_CmsResourceCollector.getCollectorNames()
public java.lang.String getCreateLink(CmsObject cms, java.lang.String collectorName, java.lang.String param) throws CmsException, CmsDataAccessException
I_CmsResourceCollector
If this method returns null
,
it indicated that the selected collector implementation does not support a "create link",
and so no "new" button will should shown on lists generated with this collector.
cms
- the current CmsObjectcollectorName
- the name of the collector to useparam
- an optional collector parameter
CmsException
- if something goes wrong
CmsDataAccessException
- if the parameter attribute of the corresponding collector tag is invalidI_CmsResourceCollector.getCreateLink(org.opencms.file.CmsObject, java.lang.String, java.lang.String)
public java.lang.String getCreateParam(CmsObject cms, java.lang.String collectorName, java.lang.String param) throws CmsDataAccessException
I_CmsResourceCollector
I_CmsResourceCollector.getCreateLink(CmsObject, String, String)
method.
If this method returns null
,
it indicates that the selected collector implementation does not support a "create link",
and so no "new" button will should shown on lists generated with this collector.
cms
- the current CmsObjectcollectorName
- the name of the collector to useparam
- an optional collector parameter from the current page context
I_CmsResourceCollector.getCreateLink(CmsObject, String, String)
method, or null
CmsDataAccessException
- if the parameter attribute of the corresponding collector tag is invalidI_CmsResourceCollector.getCreateParam(org.opencms.file.CmsObject, java.lang.String, java.lang.String)
public java.util.List getResults(CmsObject cms, java.lang.String collectorName, java.lang.String param) throws CmsDataAccessException, CmsException
I_CmsResourceCollector
CmsResource
Objects that are
gathered in the VFS using the named collector.
cms
- the current CmsObjectcollectorName
- the name of the collector to useparam
- an optional collector parameter
CmsDataAccessException
- if the parameter attribute of the corresponding collector tag is invalid
CmsException
- if something goes wrongI_CmsResourceCollector.getResults(org.opencms.file.CmsObject, java.lang.String, java.lang.String)
protected java.util.List allKeyValuePairFiltered(CmsObject cms, java.lang.String param) throws CmsException
cms
- the current OpenCms user contextparam
- value parameter to filter the resources
CmsException
- if something goes wrong
|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |