Class DefaultEstimatedReadTimeService
java.lang.Object
com.atlassian.confluence.impl.pages.readtime.DefaultEstimatedReadTimeService
- All Implemented Interfaces:
EstimatedReadTimeService
Implementation of EstimatedReadTimeService for calculating the read time for a given page/blog
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
getReadTime
(String xhtmlContent) Calculate the read time in minutes for the given content
-
Field Details
-
WORDS_PER_MINUTE
protected static final int WORDS_PER_MINUTE- See Also:
-
-
Constructor Details
-
DefaultEstimatedReadTimeService
public DefaultEstimatedReadTimeService()
-
-
Method Details
-
getReadTime
Calculate the read time in minutes for the given content Read time calculated based on: 1) Average reading speed of 265 WPM 2) Image Count (12 sec for 1st image, 11 sec for 2nd, ... 3 sec for 10th and following images)- Specified by:
getReadTime
in interfaceEstimatedReadTimeService
- Parameters:
xhtmlContent
- the page content string stored in db- Returns:
- estimated time in minutes to read the given content
-