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 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.
-
Constructor Summary
Constructors Constructor Description DisplayUrlAdvert()
-
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()
-
-
-
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:
performAction
in 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:
runsInPhase
in 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:
toString
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in 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.
-
-