Package org.opencms.jsp.search.config
Class CmsSearchConfigurationFacet
- java.lang.Object
-
- org.opencms.jsp.search.config.CmsSearchConfigurationFacet
-
- All Implemented Interfaces:
I_CmsSearchConfigurationFacet
- Direct Known Subclasses:
CmsSearchConfigurationFacetField
,CmsSearchConfigurationFacetQuery
,CmsSearchConfigurationFacetRange
public class CmsSearchConfigurationFacet extends java.lang.Object implements I_CmsSearchConfigurationFacet
Configuration that is common for all facets. Used as base class for special facet configurations, e.g. for the field facet configuration.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.opencms.jsp.search.config.I_CmsSearchConfigurationFacet
I_CmsSearchConfigurationFacet.SortOrder
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.Set<java.lang.String>
m_explicitExcludeTags
Tags of filter-queries that should not be applied to the facet, explicitly configured.protected boolean
m_ignoreFacetFilters
A flag, indicating if checked entries from other facets should influence the facet or not.protected java.util.Set<java.lang.String>
m_ignoreTags
Tags of filter-queries that should not be applied to the facet.protected boolean
m_isAndFacet
A flag, indicating if facet filter queries should be concatenated by AND.protected java.lang.String
m_label
A label that can be displayed in the form, e.g., at top of the facet.protected java.lang.Integer
m_minCount
The minimal number of hits required to add an entry to a facet.protected java.lang.String
m_name
A name used to identify the facet when showing it in the search form.protected java.util.List<java.lang.String>
m_preselection
The sorting of facet entries.
-
Constructor Summary
Constructors Constructor Description CmsSearchConfigurationFacet(java.lang.Integer minCount, java.lang.String label, java.lang.String name, java.lang.Boolean isAndFacet, java.util.List<java.lang.String> preselection, java.lang.Boolean ignoreFiltersFromFacets, java.util.Collection<java.lang.String> excludeTags)
The constructor setting all configuration options.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
getIgnoreAllFacetFilters()
Returns true if the filters of all facets are not applied when calculating the facet items.java.lang.String
getIgnoreMaxParamKey()
Returns the facet specific request parameter used to send the information if the maximum number of facet entries should be ignored.java.lang.String
getIgnoreTags()
Returns the tags of other facets, for which the filters from this facet should be ignored.boolean
getIsAndFacet()
Returns true if the facet filters, such that only documents with all checked facet entries appear, otherwise false.java.lang.String
getLabel()
Returns the label that is intended to be displayed over the facet's entries.java.lang.Integer
getMinCount()
Returns the minimal number of hits necessary to show a facet entry.java.lang.String
getName()
Returns the name used to identify the facet.java.lang.String
getParamKey()
Returns the facet specific request parameter used to send the checked facet entries.java.util.List<java.lang.String>
getPreSelection()
A list of facet-entries that should be preselected, if the search form is rendered the first time.void
propagateAllFacetNames(java.util.Collection<java.lang.String> names)
Propagate the names of the other facets that are configured.
-
-
-
Field Detail
-
m_minCount
protected java.lang.Integer m_minCount
The minimal number of hits required to add an entry to a facet.
-
m_name
protected java.lang.String m_name
A name used to identify the facet when showing it in the search form.
-
m_label
protected java.lang.String m_label
A label that can be displayed in the form, e.g., at top of the facet.
-
m_preselection
protected java.util.List<java.lang.String> m_preselection
The sorting of facet entries.
-
m_isAndFacet
protected boolean m_isAndFacet
A flag, indicating if facet filter queries should be concatenated by AND.
-
m_ignoreFacetFilters
protected boolean m_ignoreFacetFilters
A flag, indicating if checked entries from other facets should influence the facet or not.
-
m_ignoreTags
protected java.util.Set<java.lang.String> m_ignoreTags
Tags of filter-queries that should not be applied to the facet.
-
m_explicitExcludeTags
protected java.util.Set<java.lang.String> m_explicitExcludeTags
Tags of filter-queries that should not be applied to the facet, explicitly configured.
-
-
Constructor Detail
-
CmsSearchConfigurationFacet
public CmsSearchConfigurationFacet(java.lang.Integer minCount, java.lang.String label, java.lang.String name, java.lang.Boolean isAndFacet, java.util.List<java.lang.String> preselection, java.lang.Boolean ignoreFiltersFromFacets, java.util.Collection<java.lang.String> excludeTags)
The constructor setting all configuration options.- Parameters:
minCount
- The minimal number of hits required to add an entry to a facet.label
- A label that can be displayed in the form, e.g., at top of the facet.name
- An optional name for the facetisAndFacet
- If set to true, the facets filters for results containing all checked entries. Otherwise it filters for results containing at least one checked entry.preselection
- A list with entries that should be preselected in the facet, when the search page is called the first time.ignoreFiltersFromFacets
- A flag, indicating if filters from other facets should be ignored or not.excludeTags
- The tags (keys) of (filter) queries to be not taken into account for the facet. If "ignoreFiltersFromFacets" is true, the according tags for facets and queries will be added.
-
-
Method Detail
-
getIgnoreAllFacetFilters
public boolean getIgnoreAllFacetFilters()
Description copied from interface:I_CmsSearchConfigurationFacet
Returns true if the filters of all facets are not applied when calculating the facet items. Otherwise returns false.- Specified by:
getIgnoreAllFacetFilters
in interfaceI_CmsSearchConfigurationFacet
- Returns:
- A flag, indicating if the filters of facet's should be ignored or not.
- See Also:
I_CmsSearchConfigurationFacet.getIgnoreAllFacetFilters()
-
getIgnoreMaxParamKey
public java.lang.String getIgnoreMaxParamKey()
Description copied from interface:I_CmsSearchConfigurationFacet
Returns the facet specific request parameter used to send the information if the maximum number of facet entries should be ignored.- Specified by:
getIgnoreMaxParamKey
in interfaceI_CmsSearchConfigurationFacet
- Returns:
- The facet specific request parameter used to send the information if the maximum number of facet entries should be ignored.
- See Also:
I_CmsSearchConfigurationFacet.getIgnoreMaxParamKey()
-
getIgnoreTags
public java.lang.String getIgnoreTags()
Description copied from interface:I_CmsSearchConfigurationFacet
Returns the tags of other facets, for which the filters from this facet should be ignored.- Specified by:
getIgnoreTags
in interfaceI_CmsSearchConfigurationFacet
- Returns:
- the tags of other facets, for which the filters from this facet should be ignored.
- See Also:
I_CmsSearchConfigurationFacet.getIgnoreTags()
-
getIsAndFacet
public boolean getIsAndFacet()
Description copied from interface:I_CmsSearchConfigurationFacet
Returns true if the facet filters, such that only documents with all checked facet entries appear, otherwise false.- Specified by:
getIsAndFacet
in interfaceI_CmsSearchConfigurationFacet
- Returns:
- A flag, indicating if the facet's filters are concatenated by AND (or OR).
- See Also:
I_CmsSearchConfigurationFacet.getIsAndFacet()
-
getLabel
public java.lang.String getLabel()
Description copied from interface:I_CmsSearchConfigurationFacet
Returns the label that is intended to be displayed over the facet's entries.- Specified by:
getLabel
in interfaceI_CmsSearchConfigurationFacet
- Returns:
- The label that is intended to be displayed over the facet's entries.
- See Also:
I_CmsSearchConfigurationFacet.getLabel()
-
getMinCount
public java.lang.Integer getMinCount()
Description copied from interface:I_CmsSearchConfigurationFacet
Returns the minimal number of hits necessary to show a facet entry.- Specified by:
getMinCount
in interfaceI_CmsSearchConfigurationFacet
- Returns:
- The minimal number of hits necessary to show a facet entry. (Solr: facet.mincount)
- See Also:
I_CmsSearchConfigurationFacet.getMinCount()
-
getName
public java.lang.String getName()
Description copied from interface:I_CmsSearchConfigurationFacet
Returns the name used to identify the facet.- Specified by:
getName
in interfaceI_CmsSearchConfigurationFacet
- Returns:
- The name used to identify the facet.
- See Also:
I_CmsSearchConfigurationFacet.getName()
-
getParamKey
public java.lang.String getParamKey()
Description copied from interface:I_CmsSearchConfigurationFacet
Returns the facet specific request parameter used to send the checked facet entries.- Specified by:
getParamKey
in interfaceI_CmsSearchConfigurationFacet
- Returns:
- The facet specific request parameter used to send the checked facet entries.
- See Also:
I_CmsSearchConfigurationFacet.getParamKey()
-
getPreSelection
public java.util.List<java.lang.String> getPreSelection()
Description copied from interface:I_CmsSearchConfigurationFacet
A list of facet-entries that should be preselected, if the search form is rendered the first time.- Specified by:
getPreSelection
in interfaceI_CmsSearchConfigurationFacet
- Returns:
- The list of facet-entries that should be preselected, if the search form is rendered the first time.
- See Also:
I_CmsSearchConfigurationFacet.getPreSelection()
-
propagateAllFacetNames
public void propagateAllFacetNames(java.util.Collection<java.lang.String> names)
Description copied from interface:I_CmsSearchConfigurationFacet
Propagate the names of the other facets that are configured.- Specified by:
propagateAllFacetNames
in interfaceI_CmsSearchConfigurationFacet
- Parameters:
names
- the names of the other facets- See Also:
I_CmsSearchConfigurationFacet.propagateAllFacetNames(java.util.Collection)
-
-