org.broadleafcommerce.core.search.domain
Interface SearchFacet

All Known Implementing Classes:
SearchFacetImpl

public interface SearchFacet

A SearchFacet is an object that represents a particular facet that can be used to guide faceted searching on a results page.

Author:
Andre Azzolini (apazzolini)

Method Summary
 Boolean getCanMultiselect()
          Gets whether or not you can multiselect values for this Facet
 Field getField()
          Returns the field associated with this facet.
 Long getId()
          Returns the internal id
 String getLabel()
          Gets the label of this SearchFacet.
 List<RequiredFacet> getRequiredFacets()
           
 Boolean getRequiresAllDependentFacets()
          This boolean controls whether or not this particular facet requires one of the dependent facets to be active, or if it requires all of the dependent facets to be active.
 Integer getSearchDisplayPriority()
          Gets the display priority of this SearchFacet on search result pages
 List<SearchFacetRange> getSearchFacetRanges()
          Gets the applicable ranges for this search facet, if any are specified.
 Boolean getShowOnSearch()
          Gets a boolean that specifies whether or not this SearchFacet should be displayed on search result pages in addition to category pages
 void setCanMultiselect(Boolean canMultiselect)
          Sets whether or not you can multiselect values for this Facet.
 void setField(Field field)
          Sets the field associated with this facet.
 void setId(Long id)
          Sets the internal id
 void setLabel(String label)
          Sets the label
 void setRequiredFacets(List<RequiredFacet> requiredFacets)
          Sets the list of facets which this facet depends on.
 void setRequiresAllDependentFacets(Boolean requiresAllDependentFacets)
          Sets whether or not all dependent facets must be active, or if only one is necessary
 void setSearchDisplayPriority(Integer searchDisplayPriority)
          Sets the display priority on search result pages
 void setSearchFacetRanges(List<SearchFacetRange> searchFacetRanges)
          Sets the SearchFacetRanges Note: This method will set ALL search facet ranges
 void setShowOnSearch(Boolean showOnSearch)
          Sets showOnSearch
 

Method Detail

getId

Long getId()
Returns the internal id

Returns:
the internal id

setId

void setId(Long id)
Sets the internal id

Parameters:
id -

getField

Field getField()
Returns the field associated with this facet.

Returns:
the fieldName

setField

void setField(Field field)
Sets the field associated with this facet.

Parameters:
fieldName -
See Also:
#getFieldName()

getLabel

String getLabel()
Gets the label of this SearchFacet. This is the label that will be used for the user-friendly display name of this facet

Returns:
the label

setLabel

void setLabel(String label)
Sets the label

Parameters:
label -
See Also:
getLabel()

getShowOnSearch

Boolean getShowOnSearch()
Gets a boolean that specifies whether or not this SearchFacet should be displayed on search result pages in addition to category pages

Returns:
whether or not to display on search result pages

setShowOnSearch

void setShowOnSearch(Boolean showOnSearch)
Sets showOnSearch

Parameters:
showOnSearch -
See Also:
getShowOnSearch()

getSearchDisplayPriority

Integer getSearchDisplayPriority()
Gets the display priority of this SearchFacet on search result pages

Returns:
the priority

setSearchDisplayPriority

void setSearchDisplayPriority(Integer searchDisplayPriority)
Sets the display priority on search result pages

Parameters:
searchDisplayPriority -

setCanMultiselect

void setCanMultiselect(Boolean canMultiselect)
Sets whether or not you can multiselect values for this Facet.

Parameters:
canMultiselect -

getCanMultiselect

Boolean getCanMultiselect()
Gets whether or not you can multiselect values for this Facet

Returns:
the multiselect flag

getSearchFacetRanges

List<SearchFacetRange> getSearchFacetRanges()
Gets the applicable ranges for this search facet, if any are specified. For example, the SearchFacet that interacts with "Manufacturers" might not have any ranges defined (as it would depend on the manufacturers that are in the result list), but a facet on "Price" might have predefined ranges (such as 0-5, 5-10, 10-20).

Returns:
the associated search facet ranges, if any

setSearchFacetRanges

void setSearchFacetRanges(List<SearchFacetRange> searchFacetRanges)
Sets the SearchFacetRanges Note: This method will set ALL search facet ranges

Parameters:
searchFacetRanges -
See Also:
getSearchFacetRanges()

getRequiredFacets

List<RequiredFacet> getRequiredFacets()
Returns:
a list of SearchFacets that must have an active value set for this SearchFacet to be applicable.
See Also:
getRequiresAllDependentFacets()

setRequiredFacets

void setRequiredFacets(List<RequiredFacet> requiredFacets)
Sets the list of facets which this facet depends on.

Parameters:
dependentFacets -

getRequiresAllDependentFacets

Boolean getRequiresAllDependentFacets()
This boolean controls whether or not this particular facet requires one of the dependent facets to be active, or if it requires all of the dependent facets to be active.

Returns:
whether the dependent facet list should be AND'ed together
See Also:
getRequiredFacets()

setRequiresAllDependentFacets

void setRequiresAllDependentFacets(Boolean requiresAllDependentFacets)
Sets whether or not all dependent facets must be active, or if only one is necessary

Parameters:
requiresAllDependentFacets -


Copyright © 2013. All Rights Reserved.