|
|||||||||||
| 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.CmsPriorityResourceCollector
A collector to fetch sorted XML contents in a folder or subtree based on their priority and date or title values.
The date or title information has to be stored as property for each resource.
| Field Summary | |
static int |
PRIORITY_STANDARD
The standard priority value if no value was set on resource. |
static String |
PROPERTY_PRIORITY
The name of the priority property to read. |
| Fields inherited from class org.opencms.file.collectors.A_CmsResourceCollector |
m_order |
| Constructor Summary | |
CmsPriorityResourceCollector()
|
|
| Method Summary | |
protected List |
allInFolderPriorityDate(CmsObject cms,
String param,
boolean tree,
boolean asc)
Returns a list of all resource in a specified folder sorted by priority, then date ascending or descending. |
protected List |
allInFolderPriorityTitle(CmsObject cms,
String param,
boolean tree)
Returns a list of all resource in a specified folder sorted by priority descending, then Title ascending. |
List |
getCollectorNames()
Returns a list of all collector names (Strings) this collector implementation supports. |
String |
getCreateLink(CmsObject cms,
String collectorName,
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. |
String |
getCreateParam(CmsObject cms,
String collectorName,
String param)
Returns the parameter that must be passed to the getCreateLink(CmsObject, String, String) method. |
List |
getResults(CmsObject cms,
String collectorName,
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 |
compareTo, equals, getCreateInFolder, getOrder, hashCode, setOrder, shrinkToFit |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final int PRIORITY_STANDARD
public static final String PROPERTY_PRIORITY
| Constructor Detail |
public CmsPriorityResourceCollector()
| Method Detail |
public List getCollectorNames()
I_CmsResourceCollector
I_CmsResourceCollector.getCollectorNames()
public String getCreateLink(CmsObject cms,
String collectorName,
String param)
throws CmsException
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 wrongI_CmsResourceCollector.getCreateLink(org.opencms.file.CmsObject, java.lang.String, java.lang.String)
public String getCreateParam(CmsObject cms,
String collectorName,
String param)
throws CmsDataAccessException
I_CmsResourceCollectorI_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 param attrib of the corresponding collector tag is invalidI_CmsResourceCollector.getCreateParam(org.opencms.file.CmsObject, java.lang.String, java.lang.String)
public List getResults(CmsObject cms,
String collectorName,
String param)
throws CmsException,
CmsDataAccessException
I_CmsResourceCollectorCmsResource 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 param attrib 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 List allInFolderPriorityDate(CmsObject cms,
String param,
boolean tree,
boolean asc)
throws CmsException
cms - the current OpenCms user contextparam - the folder name to usetree - if true, look in folder and all child folders, if false, look only in given folderasc - if true, the date sort order is ascending, otherwise descending
CmsException - if something goes wrong
protected List allInFolderPriorityTitle(CmsObject cms,
String param,
boolean tree)
throws CmsException
cms - the current OpenCms user contextparam - the folder name to usetree - if true, look in folder and all child folders, if false, look only in given folder
CmsException - if something goes wrong
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||