public class

DefaultSummariser

extends Object
implements Summariser
java.lang.Object
   ↳ com.atlassian.confluence.content.render.xhtml.storage.DefaultSummariser

Class Overview

This default implementation is a front for various existing util classes in Confluence.

Summary

Public Constructors
DefaultSummariser()
Public Methods
String summarise(String xhtml, int maxLength, boolean ellipses)
Like but provides more control over the summary process.
String summarise(String xhtml)
Make use of various existing Confluence utilities to summarise the supplied XHTML.
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.atlassian.confluence.content.render.xhtml.storage.Summariser

Public Constructors

public DefaultSummariser ()

Public Methods

public String summarise (String xhtml, int maxLength, boolean ellipses)

Like but provides more control over the summary process.

Parameters
xhtml the content to be summarised.
maxLength the maximum length of String to return
ellipses if true then truncated text will be ended with '...'.
Returns
  • the summarised version of the xhtml parameter

public String summarise (String xhtml)

Make use of various existing Confluence utilities to summarise the supplied XHTML. If the process fails then the supplied parameter will be returned unchanged.

Parameters
xhtml the content to be summarised.
Returns
  • a summary of the supplied XHTML content which is no longer than 255 characters.