Package org.opencms.workplace.search
Class CmsSearchResourcesCollector
java.lang.Object
org.opencms.workplace.list.A_CmsListResourceCollector
org.opencms.workplace.search.CmsSearchResourcesCollector
- All Implemented Interfaces:
Comparable<org.opencms.file.collectors.I_CmsResourceCollector>
,org.opencms.file.collectors.I_CmsCollectorPublishListProvider
,org.opencms.file.collectors.I_CmsResourceCollector
,I_CmsListResourceCollector
Collector for receiving CmsResources from a search result set.
- Since:
- 6.1.0
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
Parameter of the default collector name.Resource cache.static final String
Meta Parameter name constant.static final String
Meta Parameter index name constant.static final String
Maximum creation date parameter name constant.static final String
Maximum last modification date parameter name constant.static final String
Minimum creation date parameter name constant.static final String
Minimum last modification date parameter name constant.static final String
Query Parameter name constant.static final String
Sort Parameter name constant.Fields inherited from class org.opencms.workplace.list.A_CmsListResourceCollector
m_collectorParameter, m_liCache, m_resCache, m_resources, VFS_PATH_NONE
Fields inherited from interface org.opencms.workplace.list.I_CmsListResourceCollector
PARAM_FILTER, PARAM_ORDER, PARAM_PAGE, PARAM_RESOURCES, PARAM_SORTBY, SEP_KEYVAL, SEP_PARAM
Fields inherited from interface org.opencms.file.collectors.I_CmsResourceCollector
DEFAULT_LIMIT
-
Constructor Summary
ConstructorDescriptionCmsSearchResourcesCollector
(A_CmsListExplorerDialog wp, String query, String sort, String fields, List<String> searchRoots, String minCreationDate, String maxCreationDate, String minLastModificationDate, String maxLastModificationDate, String indexName) Constructor, creates a new instance. -
Method Summary
Modifier and TypeMethodDescriptionprotected List<org.opencms.file.CmsResource>
getInternalResources
(org.opencms.file.CmsObject cms, Map<String, String> params) Wrapper method for caching the result ofA_CmsListResourceCollector.getResources(CmsObject, Map)
.List<org.opencms.file.CmsResource>
getResources
(org.opencms.file.CmsObject cms, Map<String, String> params) Returns all, unsorted and unfiltered, resources.org.opencms.search.CmsSearchResult
getSearchResult
(String structureId) Returns the search result object for the given structure id.protected void
setAdditionalColumns
(CmsListItem item, org.opencms.workplace.explorer.CmsResourceUtil resUtil) Set additional column entries for a resource.void
setPage
(int page) Sets the current display page.Methods inherited from class org.opencms.workplace.list.A_CmsListResourceCollector
compareTo, createResourceListItem, getCreateLink, getCreateLink, getCreateParam, getCreateParam, getCreateTypeId, getDefaultCollectorName, getDefaultCollectorParam, getDummyListItem, getListItems, getOrder, getPublishResources, getResource, getResourceNamesFromParam, getResults, getResults, getResults, getState, getWp, setDefaultCollectorName, setDefaultCollectorParam, setOrder, setResourcesParam
-
Field Details
-
COLLECTOR_NAME
Parameter of the default collector name.- See Also:
-
PARAM_FIELDS
Meta Parameter name constant.- See Also:
-
PARAM_INDEXNAME
Meta Parameter index name constant.- See Also:
-
PARAM_MAXCREATIONDATE
Maximum creation date parameter name constant.- See Also:
-
PARAM_MAXLASTMODIFICATIONDATE
Maximum last modification date parameter name constant.- See Also:
-
PARAM_MINCREATIONDATE
Minimum creation date parameter name constant.- See Also:
-
PARAM_MINLASTMODIFICATIONDATE
Minimum last modification date parameter name constant.- See Also:
-
PARAM_QUERY
Query Parameter name constant.- See Also:
-
PARAM_SORT
Sort Parameter name constant.- See Also:
-
m_srCache
Resource cache.
-
-
Constructor Details
-
CmsSearchResourcesCollector
public CmsSearchResourcesCollector(A_CmsListExplorerDialog wp, String query, String sort, String fields, List<String> searchRoots, String minCreationDate, String maxCreationDate, String minLastModificationDate, String maxLastModificationDate, String indexName) Constructor, creates a new instance.- Parameters:
wp
- the workplace objectquery
- the search querysort
- the sort by parameterfields
- the comma separated list of fields to searchsearchRoots
- a list of search rootsminCreationDate
- the minimum creation date of the resources to be searchedmaxCreationDate
- the maximum creation date of the resources to be searchedminLastModificationDate
- the minimum creation date of the resources to be searchedmaxLastModificationDate
- the maximum creation date of the resources to be searchedindexName
- the index name to search in
-
-
Method Details
-
getCollectorNames
- See Also:
-
I_CmsResourceCollector.getCollectorNames()
-
getResources
public List<org.opencms.file.CmsResource> getResources(org.opencms.file.CmsObject cms, Map<String, String> params) Description copied from class:A_CmsListResourceCollector
Returns all, unsorted and unfiltered, resources.Be sure to cache the resources.
- Specified by:
getResources
in interfaceI_CmsListResourceCollector
- Specified by:
getResources
in classA_CmsListResourceCollector
- Parameters:
cms
- the cms objectparams
- the parameter map- Returns:
- a list of
CmsResource
objects - See Also:
-
getSearchResult
Returns the search result object for the given structure id.- Parameters:
structureId
- the structure id- Returns:
- the resource
-
setPage
Description copied from class:A_CmsListResourceCollector
Sets the current display page.- Specified by:
setPage
in interfaceI_CmsListResourceCollector
- Overrides:
setPage
in classA_CmsListResourceCollector
- Parameters:
page
- the new display page- See Also:
-
getInternalResources
protected List<org.opencms.file.CmsResource> getInternalResources(org.opencms.file.CmsObject cms, Map<String, String> params) Description copied from class:A_CmsListResourceCollector
Wrapper method for caching the result ofA_CmsListResourceCollector.getResources(CmsObject, Map)
.- Overrides:
getInternalResources
in classA_CmsListResourceCollector
- Parameters:
cms
- the cms objectparams
- the parameter map- Returns:
- the result of
A_CmsListResourceCollector.getResources(CmsObject, Map)
- See Also:
-
setAdditionalColumns
protected void setAdditionalColumns(CmsListItem item, org.opencms.workplace.explorer.CmsResourceUtil resUtil) Description copied from class:A_CmsListResourceCollector
Set additional column entries for a resource.Overwrite this method to set additional column entries.
- Specified by:
setAdditionalColumns
in classA_CmsListResourceCollector
- Parameters:
item
- the current list itemresUtil
- the resource util object for getting the info from- See Also:
-