Class DisplayUrlAdvert

  • All Implemented Interfaces:
    Action, HasNoBeans

    public final class DisplayUrlAdvert
    extends java.lang.Object
    implements Action, HasNoBeans
    Action to display the specified URL advert within the search results.
    • 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 UrlAdvert advert
      The URL advert object to be displayed.
      private boolean removeCollectionUrl
      Whether to remove the displayURL of the UrlAdvert if it also exists within the organic results.
    • 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)  
      UrlAdvert getAdvert()
      The URL advert object to be displayed.
      int hashCode()  
      boolean isRemoveCollectionUrl()
      Whether to remove the displayURL of the UrlAdvert if it also exists within the organic results.
      void performAction​(SearchTransaction searchTransaction, Action.Phase phase)
      Adds the action's URL advert object to the curator model's exhibits and removes any result with the same URL from the main search results.
      boolean runsInPhase​(Action.Phase phase)
      Display URL Advert runs in both the input phase (to remove any duplicate results) and the output phase (to add the advert data).
      void setAdvert​(UrlAdvert advert)
      The URL advert object to be displayed.
      void setRemoveCollectionUrl​(boolean removeCollectionUrl)
      Whether to remove the displayURL of the UrlAdvert if it also exists within the organic results.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

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

      • advert

        private UrlAdvert advert
        The URL advert object to be displayed.
      • removeCollectionUrl

        private boolean removeCollectionUrl

        Whether to remove the displayURL of the UrlAdvert if it also exists within the organic results.

        Defaults to true.

    • Constructor Detail

      • DisplayUrlAdvert

        public DisplayUrlAdvert()
    • Method Detail

      • performAction

        public void performAction​(SearchTransaction searchTransaction,
                                  Action.Phase phase)
        Adds the action's URL advert object to the curator model's exhibits and removes any result with the same URL from the main search results.
        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)
        Display URL Advert runs in both the input phase (to remove any duplicate results) and the output phase (to add the advert data).
        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
      • getAdvert

        public UrlAdvert getAdvert()
        The URL advert object to be displayed.
      • setAdvert

        public void setAdvert​(UrlAdvert advert)
        The URL advert object to be displayed.
      • isRemoveCollectionUrl

        public boolean isRemoveCollectionUrl()

        Whether to remove the displayURL of the UrlAdvert if it also exists within the organic results.

        Defaults to true.

      • setRemoveCollectionUrl

        public void setRemoveCollectionUrl​(boolean removeCollectionUrl)

        Whether to remove the displayURL of the UrlAdvert if it also exists within the organic results.

        Defaults to true.