Class CmsSearchControllerFacetRange
- java.lang.Object
-
- org.opencms.jsp.search.controller.CmsSearchControllerFacetRange
-
- All Implemented Interfaces:
I_CmsSearchController
,I_CmsSearchControllerFacetRange
public class CmsSearchControllerFacetRange extends java.lang.Object implements I_CmsSearchControllerFacetRange
Search controller for the field facet options.
-
-
Field Summary
-
Fields inherited from interface org.opencms.jsp.search.controller.I_CmsSearchController
SET_VARIABLES
-
-
Constructor Summary
Constructors Constructor Description CmsSearchControllerFacetRange(I_CmsSearchConfigurationFacetRange config)
Constructor taking the managed configuration.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
addFacetOptions(java.lang.StringBuffer query)
Adds the query parts for the facet options, except the filter parts.protected void
addFacetPart(CmsSolrQuery query)
Generate query part for the facet, without filters.protected void
addFilterQueryParts(CmsSolrQuery query)
Adds filter parts to the query.void
addParametersForCurrentState(java.util.Map<java.lang.String,java.lang.String[]> parameters)
Add the request parameters that reflect the controllers current state (useful for link generation outside of a form).void
addQueryParts(CmsSolrQuery query, CmsObject cms)
Generate the Solr query part specific for the controller, e.g., the part for a field facet.protected void
appendFacetOption(java.lang.StringBuffer query, java.lang.String name, java.lang.String value)
Appends the query part for the facet to the query string.I_CmsSearchConfigurationFacetRange
getConfig()
Returns the configuration.I_CmsSearchStateFacet
getState()
Returns the state.void
updateForQueryChange()
Update the controllers state in case the term that is search for (the query as given by the user) has changed.void
updateFromRequestParameters(java.util.Map<java.lang.String,java.lang.String[]> parameters, boolean isReloaded)
Update the controllers state from the given request parameters.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.opencms.jsp.search.controller.I_CmsSearchController
addQueryParts
-
-
-
-
Constructor Detail
-
CmsSearchControllerFacetRange
public CmsSearchControllerFacetRange(I_CmsSearchConfigurationFacetRange config)
Constructor taking the managed configuration.- Parameters:
config
- The configuration to manage by the controller.
-
-
Method Detail
-
addParametersForCurrentState
public void addParametersForCurrentState(java.util.Map<java.lang.String,java.lang.String[]> parameters)
Description copied from interface:I_CmsSearchController
Add the request parameters that reflect the controllers current state (useful for link generation outside of a form).- Specified by:
addParametersForCurrentState
in interfaceI_CmsSearchController
- Parameters:
parameters
- The request parameters reflecting the controllers currents state.- See Also:
I_CmsSearchController.addParametersForCurrentState(java.util.Map)
-
addQueryParts
public void addQueryParts(CmsSolrQuery query, CmsObject cms)
Description copied from interface:I_CmsSearchController
Generate the Solr query part specific for the controller, e.g., the part for a field facet.- Specified by:
addQueryParts
in interfaceI_CmsSearchController
- Parameters:
query
- A, possibly empty, query, where further query parts are addedcms
- the current context to resolve context-specific macros.- See Also:
I_CmsSearchController.addQueryParts(CmsSolrQuery, CmsObject)
-
getConfig
public I_CmsSearchConfigurationFacetRange getConfig()
Description copied from interface:I_CmsSearchControllerFacetRange
Returns the configuration.- Specified by:
getConfig
in interfaceI_CmsSearchControllerFacetRange
- Returns:
- The configuration.
- See Also:
I_CmsSearchControllerFacetRange.getConfig()
-
getState
public I_CmsSearchStateFacet getState()
Description copied from interface:I_CmsSearchControllerFacetRange
Returns the state.- Specified by:
getState
in interfaceI_CmsSearchControllerFacetRange
- Returns:
- The state.
- See Also:
I_CmsSearchControllerFacetRange.getState()
-
updateForQueryChange
public void updateForQueryChange()
Description copied from interface:I_CmsSearchController
Update the controllers state in case the term that is search for (the query as given by the user) has changed.- Specified by:
updateForQueryChange
in interfaceI_CmsSearchController
- See Also:
I_CmsSearchController.updateForQueryChange()
-
updateFromRequestParameters
public void updateFromRequestParameters(java.util.Map<java.lang.String,java.lang.String[]> parameters, boolean isReloaded)
Description copied from interface:I_CmsSearchController
Update the controllers state from the given request parameters.- Specified by:
updateFromRequestParameters
in interfaceI_CmsSearchController
- Parameters:
parameters
- The request parameters.isReloaded
- a flag, indicating, if the search is performed repeatedly, opposed to entering the search page for the first time.- See Also:
I_CmsSearchController.updateFromRequestParameters(java.util.Map, boolean)
-
addFacetOptions
protected void addFacetOptions(java.lang.StringBuffer query)
Adds the query parts for the facet options, except the filter parts.- Parameters:
query
- The query part that is extended with the facet options.
-
addFacetPart
protected void addFacetPart(CmsSolrQuery query)
Generate query part for the facet, without filters.- Parameters:
query
- The query, where the facet part should be added
-
addFilterQueryParts
protected void addFilterQueryParts(CmsSolrQuery query)
Adds filter parts to the query.- Parameters:
query
- The query.
-
appendFacetOption
protected void appendFacetOption(java.lang.StringBuffer query, java.lang.String name, java.lang.String value)
Appends the query part for the facet to the query string.- Parameters:
query
- The current query string.name
- The name of the facet parameter, e.g. "limit", "order", ....value
- The value to set for the parameter specified by name.
-
-