Class SearchSettings
java.lang.Object
com.broadleafcommerce.search.api.domain.SearchSettings
- All Implemented Interfaces:
com.broadleafcommerce.data.tracking.core.ContextStateAware
,Serializable
public class SearchSettings
extends Object
implements Serializable, com.broadleafcommerce.data.tracking.core.ContextStateAware
Represents a group of search settings for an application or tenant to allow sharing
Facets
and SortOptions
between different environments. Settings are
discriminated by both the settingsContext
and the SearchGroup type
Catalog
they belong to. Search Group Catalogs are used to allow inheritance and overrides by
Applications of a Tenant-level default. The context indicates whether the settings are for the
admin or storefront (or some arbitrary type of context).
IMPORTANT: There should only be one Search Settings per context per Application.
- Since:
- 2.1.0-GA
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
boolean
Miscellaneous attributes for this search settings.com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState
A subset ofTracking
information to expose the context state for this object.The facet groups managed on this search settings.getId()
The context ID of the search settings.The scoped context of this SearchSettings.The sort groups managed on this search settings.int
hashCode()
boolean
Whether advanced search is enabled.void
setAttributes
(Map<String, Object> attributes) Miscellaneous attributes for this search settings.void
setContextState
(com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState contextState) A subset ofTracking
information to expose the context state for this object.void
setFacetGroups
(Set<FacetGroup> facetGroups) The facet groups managed on this search settings.void
The context ID of the search settings.void
setSearchEnabled
(boolean searchEnabled) Whether advanced search is enabled.void
setSettingsContext
(String settingsContext) The scoped context of this SearchSettings.void
setSortGroups
(Set<SortGroup> sortGroups) The sort groups managed on this search settings.toString()
-
Constructor Details
-
SearchSettings
public SearchSettings()
-
-
Method Details
-
getId
The context ID of the search settings.- Returns:
- the context ID of the search settings
-
getSettingsContext
The scoped context of this SearchSettings.- See Also:
-
isSearchEnabled
public boolean isSearchEnabled()Whether advanced search is enabled. Note: This is only implemented for search settings scoped toDefaultSettingsContextType.ADMIN
-
getFacetGroups
The facet groups managed on this search settings. -
getSortGroups
The sort groups managed on this search settings. -
getAttributes
Miscellaneous attributes for this search settings.- Returns:
- Miscellaneous attributes for this search settings.
-
getContextState
public com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState getContextState()A subset ofTracking
information to expose the context state for this object.- Specified by:
getContextState
in interfacecom.broadleafcommerce.data.tracking.core.ContextStateAware
- Returns:
- a subset of
Tracking
information to expose the context state for this object
-
setId
The context ID of the search settings.- Parameters:
id
- the context ID of the search settings
-
setSettingsContext
The scoped context of this SearchSettings.- See Also:
-
setSearchEnabled
public void setSearchEnabled(boolean searchEnabled) Whether advanced search is enabled. Note: This is only implemented for search settings scoped toDefaultSettingsContextType.ADMIN
-
setFacetGroups
The facet groups managed on this search settings. -
setSortGroups
The sort groups managed on this search settings. -
setAttributes
Miscellaneous attributes for this search settings.- Parameters:
attributes
- Miscellaneous attributes for this search settings.
-
setContextState
public void setContextState(com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState contextState) A subset ofTracking
information to expose the context state for this object.- Specified by:
setContextState
in interfacecom.broadleafcommerce.data.tracking.core.ContextStateAware
- Parameters:
contextState
- a subset ofTracking
information to expose the context state for this object
-
toString
-
equals
-
canEqual
-
hashCode
public int hashCode()
-