Class DisplayUrlAdvert
- java.lang.Object
-
- com.funnelback.publicui.search.model.curator.action.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 UrlAdvertadvertThe URL advert object to be displayed.private booleanremoveCollectionUrlWhether to remove the displayURL of the UrlAdvert if it also exists within the organic results.
-
Constructor Summary
Constructors Constructor Description DisplayUrlAdvert()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidconfigure(Configurer configurer)Configure this action (expected to autowire in any dependencies)booleanequals(java.lang.Object o)UrlAdvertgetAdvert()The URL advert object to be displayed.inthashCode()booleanisRemoveCollectionUrl()Whether to remove the displayURL of the UrlAdvert if it also exists within the organic results.voidperformAction(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.booleanrunsInPhase(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).voidsetAdvert(UrlAdvert advert)The URL advert object to be displayed.voidsetRemoveCollectionUrl(boolean removeCollectionUrl)Whether to remove the displayURL of the UrlAdvert if it also exists within the organic results.java.lang.StringtoString()
-
-
-
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.
-
-
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:
performActionin interfaceAction- Parameters:
searchTransaction- Current search transactionphase- 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:
runsInPhasein interfaceAction- 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)
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.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.
-
-