Class PromoteUrls

  • All Implemented Interfaces:
    Action, HasNoBeans

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

    Action to promote a set of URLs within the search results, causing them to be displayed at the top of the result set in the order given.

    If this action is performed multiple times the list of URLs to be promoted will be appended to, meaning that the earliest invocation will 'win' in terms of the final result ordering.

    Note - Result promoting has no effect if sorting modes other than relevance are used (e.g. date sorting is unaffected).

    • 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.util.List<java.lang.String> urlsToPromote
      The list of URLs to promote (the first given URL will be returned at rank one, the second and rank two and so on).
    • Constructor Summary

      Constructors 
      Constructor Description
      PromoteUrls()  
      PromoteUrls​(java.util.List<java.lang.String> urlsToPromote)  
    • 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.util.List<java.lang.String> getUrlsToPromote()
      The list of URLs to promote (the first given URL will be returned at rank one, the second and rank two and so on).
      int hashCode()  
      void performAction​(SearchTransaction searchTransaction, Action.Phase phase)
      Appends this instance's urlsToPromote to the list of URLs for promotion which will be given to padre.
      boolean runsInPhase​(Action.Phase phase)
      URL promotion occurs in the INPUT phase since the information about the URLs to promote is simply passed down to padre when the request is performed.
      void setUrlsToPromote​(java.util.List<java.lang.String> urlsToPromote)
      The list of URLs to promote (the first given URL will be returned at rank one, the second and rank two and so on).
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

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

      • urlsToPromote

        private java.util.List<java.lang.String> urlsToPromote
        The list of URLs to promote (the first given URL will be returned at rank one, the second and rank two and so on).
    • Constructor Detail

      • PromoteUrls

        public PromoteUrls​(java.util.List<java.lang.String> urlsToPromote)
      • PromoteUrls

        public PromoteUrls()
    • Method Detail

      • performAction

        public void performAction​(SearchTransaction searchTransaction,
                                  Action.Phase phase)
        Appends this instance's urlsToPromote to the list of URLs for promotion which will be given to padre.
        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)
        URL promotion occurs in the INPUT phase since the information about the URLs to promote is simply passed down to padre when the request is performed.
        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
      • getUrlsToPromote

        public java.util.List<java.lang.String> getUrlsToPromote()
        The list of URLs to promote (the first given URL will be returned at rank one, the second and rank two and so on).
      • setUrlsToPromote

        public void setUrlsToPromote​(java.util.List<java.lang.String> urlsToPromote)
        The list of URLs to promote (the first given URL will be returned at rank one, the second and rank two and so on).