Class SetQuery

  • All Implemented Interfaces:
    Action, HasNoBeans

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

    Action to set the query to the given value, replacing any previously specified by the user.

    Optionally, may also clear any metadata or special query parameters (e.g. query_and) as well.

    • 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.Boolean clearAllQueryParameters
      Whether to remove all other query parameters (such as meta_x and query_or), in addition to the simple query one.
      private java.lang.String query
      The new query to be used.
    • Constructor Summary

      Constructors 
      Constructor Description
      SetQuery()  
      SetQuery​(java.lang.String query, java.lang.Boolean clearAllQueryParameters)  
    • 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.Boolean getClearAllQueryParameters()
      Whether to remove all other query parameters (such as meta_x and query_or), in addition to the simple query one.
      java.lang.String getQuery()
      The new query to be used.
      int hashCode()  
      void performAction​(SearchTransaction searchTransaction, Action.Phase phase)
      Replace occurrences of target with replacement within the question's query and metaParameters.
      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 setClearAllQueryParameters​(java.lang.Boolean clearAllQueryParameters)
      Whether to remove all other query parameters (such as meta_x and query_or), in addition to the simple query one.
      void setQuery​(java.lang.String query)
      The new query to be used.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

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

      • query

        private java.lang.String query
        The new query to be used.
      • clearAllQueryParameters

        private java.lang.Boolean clearAllQueryParameters
        Whether to remove all other query parameters (such as meta_x and query_or), in addition to the simple query one.
    • Constructor Detail

      • SetQuery

        public SetQuery​(java.lang.String query,
                        java.lang.Boolean clearAllQueryParameters)
      • SetQuery

        public SetQuery()
    • Method Detail

      • performAction

        public void performAction​(SearchTransaction searchTransaction,
                                  Action.Phase phase)
        Replace occurrences of target with replacement within the question's query and metaParameters.
        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
      • getQuery

        public java.lang.String getQuery()
        The new query to be used.
      • setQuery

        public void setQuery​(java.lang.String query)
        The new query to be used.
      • getClearAllQueryParameters

        public java.lang.Boolean getClearAllQueryParameters()
        Whether to remove all other query parameters (such as meta_x and query_or), in addition to the simple query one.
      • setClearAllQueryParameters

        public void setClearAllQueryParameters​(java.lang.Boolean clearAllQueryParameters)
        Whether to remove all other query parameters (such as meta_x and query_or), in addition to the simple query one.