Class FacetSelectionTrigger
- java.lang.Object
-
- com.funnelback.publicui.search.model.curator.trigger.FacetSelectionTrigger
-
- All Implemented Interfaces:
Trigger,HasNoBeans
public final class FacetSelectionTrigger extends java.lang.Object implements Trigger, HasNoBeans
A trigger which activates when a particular facet category is selected.
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.StringcategoryValueThe category value to be checked within the facet.private java.lang.StringfacetNameThe name of the facet to check.private StringMatchTypematchTypeThe type of matching to be performed between each selected category in the facetName facet (haystack) and the given categoryValue (needle).
-
Constructor Summary
Constructors Constructor Description FacetSelectionTrigger()FacetSelectionTrigger(java.lang.String facetName, java.lang.String categoryValue, StringMatchType matchType)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanactivatesOn(SearchTransaction searchTransaction)Check whether the given searchTransaction contains a selected category in the facetName facet which matches (as defined by matchType) the categoryValue parameter.voidconfigure(Configurer configurer)Configure this trigger (expected to autowire in any dependencies)booleanequals(java.lang.Object o)java.lang.StringgetCategoryValue()The category value to be checked within the facet.java.lang.StringgetFacetName()The name of the facet to check.StringMatchTypegetMatchType()The type of matching to be performed between each selected category in the facetName facet (haystack) and the given categoryValue (needle).inthashCode()voidsetCategoryValue(java.lang.String categoryValue)The category value to be checked within the facet.voidsetFacetName(java.lang.String facetName)The name of the facet to check.voidsetMatchType(StringMatchType matchType)The type of matching to be performed between each selected category in the facetName facet (haystack) and the given categoryValue (needle).java.lang.StringtoString()
-
-
-
Field Detail
-
facetName
private java.lang.String facetName
The name of the facet to check.
-
categoryValue
private java.lang.String categoryValue
The category value to be checked within the facet.
-
matchType
private StringMatchType matchType
The type of matching to be performed between each selected category in the facetName facet (haystack) and the given categoryValue (needle).
-
-
Constructor Detail
-
FacetSelectionTrigger
public FacetSelectionTrigger(java.lang.String facetName, java.lang.String categoryValue, StringMatchType matchType)
-
FacetSelectionTrigger
public FacetSelectionTrigger()
-
-
Method Detail
-
activatesOn
public boolean activatesOn(SearchTransaction searchTransaction)
Check whether the given searchTransaction contains a selected category in the facetName facet which matches (as defined by matchType) the categoryValue parameter.- Specified by:
activatesOnin interfaceTrigger- Parameters:
searchTransaction- Current search transaction- Returns:
- true if this trigger should activate on the given searchTransaction, and false otherwise.
-
configure
public void configure(Configurer configurer)
Configure this trigger (expected to autowire in any dependencies)
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
getFacetName
public java.lang.String getFacetName()
The name of the facet to check.
-
setFacetName
public void setFacetName(java.lang.String facetName)
The name of the facet to check.
-
getCategoryValue
public java.lang.String getCategoryValue()
The category value to be checked within the facet.
-
setCategoryValue
public void setCategoryValue(java.lang.String categoryValue)
The category value to be checked within the facet.
-
getMatchType
public StringMatchType getMatchType()
The type of matching to be performed between each selected category in the facetName facet (haystack) and the given categoryValue (needle).
-
setMatchType
public void setMatchType(StringMatchType matchType)
The type of matching to be performed between each selected category in the facetName facet (haystack) and the given categoryValue (needle).
-
-