Class PromoteUrls
- java.lang.Object
-
- com.funnelback.publicui.search.model.curator.action.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()
-
-
-
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 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)
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 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
-
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).
-
-