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.String
categoryValue
The category value to be checked within the facet.private java.lang.String
facetName
The name of the facet to check.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 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 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.void
configure(Configurer configurer)
Configure this trigger (expected to autowire in any dependencies)boolean
equals(java.lang.Object o)
java.lang.String
getCategoryValue()
The category value to be checked within the facet.java.lang.String
getFacetName()
The name of the facet to check.StringMatchType
getMatchType()
The type of matching to be performed between each selected category in the facetName facet (haystack) and the given categoryValue (needle).int
hashCode()
void
setCategoryValue(java.lang.String categoryValue)
The category value to be checked within the facet.void
setFacetName(java.lang.String facetName)
The name of the facet to check.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).java.lang.String
toString()
-
-
-
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:
activatesOn
in 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:
toString
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in 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).
-
-