Class ExactQueryTrigger
- java.lang.Object
-
- com.funnelback.publicui.search.model.curator.trigger.ExactQueryTrigger
-
- All Implemented Interfaces:
Trigger
,HasNoBeans
public final class ExactQueryTrigger extends java.lang.Object implements Trigger, HasNoBeans
A trigger which activates only when the current query exactly matches the given trigger query.
Case between the queries may optionally be ignored.
The word order within the query is always considered significant.
-
-
Field Summary
Fields Modifier and Type Field Description private boolean
ignoreCase
Whether to consider case difference between the query and trigger as important (defaults to false).private java.lang.String
triggerQuery
The string the given query must match for this trigger to activate.
-
Constructor Summary
Constructors Constructor Description ExactQueryTrigger()
ExactQueryTrigger(java.lang.String triggerQuery, boolean ignoreCase)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
activatesOn(SearchTransaction searchTransaction)
Return true if the query within searchTransaction exactly matches the triggerQuery (subject to ignoreCase), otherwise return false.void
configure(Configurer configurer)
Configure this trigger (expected to autowire in any dependencies)boolean
equals(java.lang.Object o)
java.lang.String
getTriggerQuery()
The string the given query must match for this trigger to activate.int
hashCode()
boolean
isIgnoreCase()
Whether to consider case difference between the query and trigger as important (defaults to false).void
setIgnoreCase(boolean ignoreCase)
Whether to consider case difference between the query and trigger as important (defaults to false).void
setTriggerQuery(java.lang.String triggerQuery)
The string the given query must match for this trigger to activate.java.lang.String
toString()
-
-
-
Method Detail
-
activatesOn
public boolean activatesOn(SearchTransaction searchTransaction)
Return true if the query within searchTransaction exactly matches the triggerQuery (subject to ignoreCase), otherwise return 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
-
getTriggerQuery
public java.lang.String getTriggerQuery()
The string the given query must match for this trigger to activate.
-
setTriggerQuery
public void setTriggerQuery(java.lang.String triggerQuery)
The string the given query must match for this trigger to activate.
-
isIgnoreCase
public boolean isIgnoreCase()
Whether to consider case difference between the query and trigger as important (defaults to false).
-
setIgnoreCase
public void setIgnoreCase(boolean ignoreCase)
Whether to consider case difference between the query and trigger as important (defaults to false).
-
-