public class DummyDocumentPopularityProvider extends Object implements IDocumentPopularityProvider
IDocumentPopularityProvider
that does not change any popularity of any content.IDocumentPopularityProvider.DocumentPopularityKey
Constructor and Description |
---|
DummyDocumentPopularityProvider() |
Modifier and Type | Method and Description |
---|---|
Map<IDocumentPopularityProvider.DocumentPopularityKey,Double> |
calculateDocumentPopularities()
Returns a list of documents popularities.
|
double |
calculateDocumentPopularity(StandardDocument document)
Returns the popularity for the given document.
|
public Map<IDocumentPopularityProvider.DocumentPopularityKey,Double> calculateDocumentPopularities() throws PortalException, TransactionRequiredException
IDocumentPopularityProvider
standard document's item identifier
, used as the entry's key; and a double
value, used as the document's popularity.
finite
number.0
and 1
decrease the score the document would have during a search.
A popularity of 1
does not alter the score the document would have during search. A popularity greater than 1
increase the score the document would have during search.calculateDocumentPopularities
in interface IDocumentPopularityProvider
PortalException
- if some error occur during calculation.TransactionRequiredException
- if there's no active transaction.public double calculateDocumentPopularity(StandardDocument document) throws PortalException, TransactionRequiredException, IllegalArgumentException
IDocumentPopularityProvider
finite
number.
A popularity between 0
and 1
decrease the score the document would have during a search.
A popularity of 1
does not alter the score the document would have during search. A popularity greater than 1
increase the score the document would have during search.calculateDocumentPopularity
in interface IDocumentPopularityProvider
document
- the document.PortalException
- if some error occur during calculation.TransactionRequiredException
- if there's no active transaction.IllegalArgumentException
- if the given document is null
.LumisXP 12.4.0.200625 - Copyright © 2006–2020 Lumis EIP Tecnologia da Informação LTDA. All Rights Reserved.