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>
triggerWords
The 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 boolean
activatesOn(SearchTransaction searchTransaction)
Check the given searchTransaction to see if the query contains all the required words for this trigger.void
configure(Configurer configurer)
Configure this trigger (expected to autowire in any dependencies)boolean
equals(java.lang.Object o)
java.util.List<java.lang.String>
getTriggerWords()
int
hashCode()
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.java.lang.String
toString()
-
-
-
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:
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
-
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.
-
-