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 Details

    • SearchSettings

      public SearchSettings()
  • Method Details

    • getId

      public String getId()
      The context ID of the search settings.
      Returns:
      the context ID of the search settings
    • getSettingsContext

      public String 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 to DefaultSettingsContextType.ADMIN
    • getFacetGroups

      public Set<FacetGroup> getFacetGroups()
      The facet groups managed on this search settings.
    • getSortGroups

      public Set<SortGroup> getSortGroups()
      The sort groups managed on this search settings.
    • getAttributes

      public Map<String,Object> 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 of Tracking information to expose the context state for this object.
      Specified by:
      getContextState in interface com.broadleafcommerce.data.tracking.core.ContextStateAware
      Returns:
      a subset of Tracking information to expose the context state for this object
    • setId

      public void setId(String id)
      The context ID of the search settings.
      Parameters:
      id - the context ID of the search settings
    • setSettingsContext

      public void setSettingsContext(String settingsContext)
      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 to DefaultSettingsContextType.ADMIN
    • setFacetGroups

      public void setFacetGroups(Set<FacetGroup> facetGroups)
      The facet groups managed on this search settings.
    • setSortGroups

      public void setSortGroups(Set<SortGroup> sortGroups)
      The sort groups managed on this search settings.
    • setAttributes

      public void setAttributes(Map<String,Object> attributes)
      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 of Tracking information to expose the context state for this object.
      Specified by:
      setContextState in interface com.broadleafcommerce.data.tracking.core.ContextStateAware
      Parameters:
      contextState - a subset of Tracking information to expose the context state for this object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • canEqual

      protected boolean canEqual(Object other)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object