Class DefaultEstimatedReadTimeService

java.lang.Object
com.atlassian.confluence.impl.pages.readtime.DefaultEstimatedReadTimeService
All Implemented Interfaces:
EstimatedReadTimeService

public class DefaultEstimatedReadTimeService extends Object implements EstimatedReadTimeService
Implementation of EstimatedReadTimeService for calculating the read time for a given page/blog
  • Field Details

  • Constructor Details

    • DefaultEstimatedReadTimeService

      public DefaultEstimatedReadTimeService()
  • Method Details

    • getReadTime

      public int getReadTime(String xhtmlContent)
      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 interface EstimatedReadTimeService
      Parameters:
      xhtmlContent - the page content string stored in db
      Returns:
      estimated time in minutes to read the given content