Class QuerySubstringTrigger
- java.lang.Object
-
- com.funnelback.publicui.search.model.curator.trigger.QuerySubstringTrigger
-
- All Implemented Interfaces:
Trigger,HasNoBeans
public final class QuerySubstringTrigger extends java.lang.Object implements Trigger, HasNoBeans
A trigger which activates when the given substring is contained within the current query.
Case is considered important in the matching (so a trigger with substring "Bob" will not match the query "bob and jane", but "bob" would).
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.StringtriggerSubstringThe substring to check for in the current query.
-
Constructor Summary
Constructors Constructor Description QuerySubstringTrigger()QuerySubstringTrigger(java.lang.String triggerSubstring)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanactivatesOn(SearchTransaction searchTransaction)Return true if the current query in searchTransaction contains the triggerSubstring, otherwise return false.voidconfigure(Configurer configurer)Configure this trigger (expected to autowire in any dependencies)booleanequals(java.lang.Object o)java.lang.StringgetTriggerSubstring()The substring to check for in the current query.inthashCode()voidsetTriggerSubstring(java.lang.String triggerSubstring)The substring to check for in the current query.java.lang.StringtoString()
-
-
-
Method Detail
-
activatesOn
public boolean activatesOn(SearchTransaction searchTransaction)
Return true if the current query in searchTransaction contains the triggerSubstring, otherwise return 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
-
getTriggerSubstring
public java.lang.String getTriggerSubstring()
The substring to check for in the current query.
-
setTriggerSubstring
public void setTriggerSubstring(java.lang.String triggerSubstring)
The substring to check for in the current query.
-
-