com.atlassian.confluence.content.render.xhtml.storage
Class DefaultSummariser

java.lang.Object
  extended by com.atlassian.confluence.content.render.xhtml.storage.DefaultSummariser
All Implemented Interfaces:
Summariser

public class DefaultSummariser
extends java.lang.Object
implements Summariser

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


Constructor Summary
DefaultSummariser()
           
 
Method Summary
 java.lang.String summarise(java.lang.String xhtml)
          Make use of various existing Confluence utilities to summarise the supplied XHTML.
 java.lang.String summarise(java.lang.String xhtml, int maxLength, boolean ellipses)
          Like Summariser.summarise(String) but provides more control over the summary process.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultSummariser

public DefaultSummariser()
Method Detail

summarise

public java.lang.String summarise(java.lang.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.

Specified by:
summarise in interface Summariser
Parameters:
xhtml - the content to be summarised.
Returns:
a summary of the supplied XHTML content which is no longer than 255 characters.

summarise

public java.lang.String summarise(java.lang.String xhtml,
                                  int maxLength,
                                  boolean ellipses)
Description copied from interface: Summariser
Like Summariser.summarise(String) but provides more control over the summary process.

Specified by:
summarise in interface Summariser
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


Copyright © 2003-2014 Atlassian. All Rights Reserved.