Class QueryRegularExpressionTrigger
- java.lang.Object
-
- com.funnelback.publicui.search.model.curator.trigger.QueryRegularExpressionTrigger
-
- All Implemented Interfaces:
Trigger,HasNoBeans
public final class QueryRegularExpressionTrigger extends java.lang.Object implements Trigger, HasNoBeans
A trigger which activates when the current query matches the given regular expression.
-
-
Field Summary
Fields Modifier and Type Field Description private static org.apache.logging.log4j.Loggerlogprivate java.lang.StringtriggerPatternThe regular expression to run against the current query
-
Constructor Summary
Constructors Constructor Description QueryRegularExpressionTrigger()QueryRegularExpressionTrigger(java.lang.String triggerPattern)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanactivatesOn(SearchTransaction searchTransaction)Return true if the query within the searchTransaction matches the triggerPatter, otherwise return falsevoidconfigure(Configurer configurer)Configure this trigger (expected to autowire in any dependencies)booleanequals(java.lang.Object o)java.lang.StringgetTriggerPattern()The regular expression to run against the current queryinthashCode()voidsetTriggerPattern(java.lang.String triggerPattern)The regular expression to run against the current queryjava.lang.StringtoString()
-
-
-
Method Detail
-
activatesOn
public boolean activatesOn(SearchTransaction searchTransaction)
Return true if the query within the searchTransaction matches the triggerPatter, 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
-
getTriggerPattern
public java.lang.String getTriggerPattern()
The regular expression to run against the current query
-
setTriggerPattern
public void setTriggerPattern(java.lang.String triggerPattern)
The regular expression to run against the current query
-
-