Class CmsSearchControllerFacetField
java.lang.Object
org.opencms.jsp.search.controller.CmsSearchControllerFacetField
- All Implemented Interfaces:
I_CmsSearchController,I_CmsSearchControllerFacetField
public class CmsSearchControllerFacetField
extends Object
implements I_CmsSearchControllerFacetField
Search controller for the field facet options.
-
Field Summary
Fields inherited from interface org.opencms.jsp.search.controller.I_CmsSearchController
SET_VARIABLES -
Constructor Summary
ConstructorsConstructorDescriptionConstructor taking the managed configuration. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddFacetOptions(StringBuffer query, boolean useLimit) Adds the query parts for the facet options, except the filter parts.protected voidaddFacetPart(CmsSolrQuery query) Generate query part for the facet, without filters.protected voidaddFilterQueryParts(CmsSolrQuery query) Adds filter parts to the query.voidaddParametersForCurrentState(Map<String, String[]> parameters) Add the request parameters that reflect the controllers current state (useful for link generation outside of a form).voidaddQueryParts(CmsSolrQuery query, CmsObject cms) Generate the Solr query part specific for the controller, e.g., the part for a field facet.protected voidappendFacetOption(StringBuffer query, String name, String value) Appends the query part for the facet to the query string.Returns the configuration.getState()Returns the state.voidUpdate the controllers state in case the term that is search for (the query as given by the user) has changed.voidupdateFromRequestParameters(Map<String, 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, waitMethods inherited from interface org.opencms.jsp.search.controller.I_CmsSearchController
addQueryParts
-
Constructor Details
-
CmsSearchControllerFacetField
Constructor taking the managed configuration.- Parameters:
config- The configuration to manage by the controller.
-
-
Method Details
-
addParametersForCurrentState
Description copied from interface:I_CmsSearchControllerAdd the request parameters that reflect the controllers current state (useful for link generation outside of a form).- Specified by:
addParametersForCurrentStatein interfaceI_CmsSearchController- Parameters:
parameters- The request parameters reflecting the controllers currents state.- See Also:
-
addQueryParts
Description copied from interface:I_CmsSearchControllerGenerate the Solr query part specific for the controller, e.g., the part for a field facet.- Specified by:
addQueryPartsin interfaceI_CmsSearchController- Parameters:
query- A, possibly empty, query, where further query parts are addedcms- the current context to resolve context-specific macros.- See Also:
-
getConfig
Description copied from interface:I_CmsSearchControllerFacetFieldReturns the configuration.- Specified by:
getConfigin interfaceI_CmsSearchControllerFacetField- Returns:
- The configuration.
- See Also:
-
getState
Description copied from interface:I_CmsSearchControllerFacetFieldReturns the state.- Specified by:
getStatein interfaceI_CmsSearchControllerFacetField- Returns:
- The state.
- See Also:
-
updateForQueryChange
Description copied from interface:I_CmsSearchControllerUpdate the controllers state in case the term that is search for (the query as given by the user) has changed.- Specified by:
updateForQueryChangein interfaceI_CmsSearchController- See Also:
-
updateFromRequestParameters
Description copied from interface:I_CmsSearchControllerUpdate the controllers state from the given request parameters.- Specified by:
updateFromRequestParametersin 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:
-
addFacetOptions
Adds the query parts for the facet options, except the filter parts.- Parameters:
query- The query part that is extended with the facet options.useLimit- Flag, if the limit option should be set.
-
addFacetPart
Generate query part for the facet, without filters.- Parameters:
query- The query, where the facet part should be added
-
addFilterQueryParts
Adds filter parts to the query.- Parameters:
query- The query.
-
appendFacetOption
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.
-