Class AddQueryTerm

  • All Implemented Interfaces:
    Action, HasNoBeans

    public final class AddQueryTerm
    extends java.lang.Object
    implements Action, HasNoBeans

    Action to add a specified term to the users query before running it.

    The term will be added to the 's' parameter, not the 'query' one, meaning that the original user's query will be logged without the additional term.

    • Nested Class Summary

      • Nested classes/interfaces inherited from interface com.funnelback.publicui.search.model.curator.config.Action

        Action.Phase
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.lang.String queryTerm
      The term to add to the user's query.
    • Constructor Summary

      Constructors 
      Constructor Description
      AddQueryTerm()  
      AddQueryTerm​(java.lang.String queryTerm)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void configure​(Configurer configurer)
      Configure this action (expected to autowire in any dependencies)
      boolean equals​(java.lang.Object o)  
      java.lang.String getQueryTerm()
      The term to add to the user's query.
      int hashCode()  
      void performAction​(SearchTransaction searchTransaction, Action.Phase phase)
      Add the specified query term to the user's query via the 's' parameter.
      boolean runsInPhase​(Action.Phase phase)
      Query term addition occurs in the INPUT phase since it must modify the query before it is run by padre.
      void setQueryTerm​(java.lang.String queryTerm)
      The term to add to the user's query.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Field Detail

      • queryTerm

        private java.lang.String queryTerm
        The term to add to the user's query.
    • Constructor Detail

      • AddQueryTerm

        public AddQueryTerm​(java.lang.String queryTerm)
      • AddQueryTerm

        public AddQueryTerm()
    • Method Detail

      • performAction

        public void performAction​(SearchTransaction searchTransaction,
                                  Action.Phase phase)
        Add the specified query term to the user's query via the 's' parameter.
        Specified by:
        performAction in interface Action
        Parameters:
        searchTransaction - Current search transaction
        phase - The phase being processed (Some actions may wish to behave differently depending on the current phase of processing).
      • runsInPhase

        public boolean runsInPhase​(Action.Phase phase)
        Query term addition occurs in the INPUT phase since it must modify the query before it is run by padre.
        Specified by:
        runsInPhase in interface Action
        Parameters:
        phase - The phase being processed (Some actions may wish to behave differently depending on the current phase of processing).
        Returns:
        true if this action should be run in the given phase, otherwise return false.
      • configure

        public void configure​(Configurer configurer)
        Configure this action (expected to autowire in any dependencies)
        Specified by:
        configure in interface Action
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • getQueryTerm

        public java.lang.String getQueryTerm()
        The term to add to the user's query.
      • setQueryTerm

        public void setQueryTerm​(java.lang.String queryTerm)
        The term to add to the user's query.