Class AllQueryWordsTrigger
- java.lang.Object
-
- com.funnelback.publicui.search.model.curator.trigger.AllQueryWordsTrigger
-
- All Implemented Interfaces:
Trigger,HasNoBeans
public final class AllQueryWordsTrigger extends java.lang.Object implements Trigger, HasNoBeans
A trigger which activates only when the current query contains all the words given as triggers.
The query may contain other words without affecting the trigger, and the order of the words within the query is not considered important.
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.List<java.lang.String>triggerWordsThe list of words required to be found within the query for this trigger to activate.
-
Constructor Summary
Constructors Constructor Description AllQueryWordsTrigger()AllQueryWordsTrigger(java.util.List<java.lang.String> triggerWords)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanactivatesOn(SearchTransaction searchTransaction)Check the given searchTransaction to see if the query contains all the required words for this trigger.voidconfigure(Configurer configurer)Configure this trigger (expected to autowire in any dependencies)booleanequals(java.lang.Object o)java.util.List<java.lang.String>getTriggerWords()inthashCode()voidsetTriggerWords(java.util.List<java.lang.String> triggerWords)The list of words required to be found within the query for this trigger to activate.java.lang.StringtoString()
-
-
-
Method Detail
-
getTriggerWords
public java.util.List<java.lang.String> getTriggerWords()
-
activatesOn
public boolean activatesOn(SearchTransaction searchTransaction)
Check the given searchTransaction to see if the query contains all the required words for this trigger. If it does, return true, otherwise false.- 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
-
setTriggerWords
public void setTriggerWords(java.util.List<java.lang.String> triggerWords)
The list of words required to be found within the query for this trigger to activate.
-
-