|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Summariser
Summarise storage format XHTML making it suitable for display where a short summary of the content is required. For example, the PageNotFoundAction provides a short summary of possible alternative pages and will make use of an implementation of the Summariser.
It must be remembered that the Summariser will not automatically ensure the returned String is encoded for safe use. Encoding for display is a function of the client of the Summariser component.
Method Summary | |
---|---|
String |
summarise(String xhtml)
The default summary process will shorten the String to a maximum of 255 characters and end it with ellipses (well actually '...') if it required truncation. |
String |
summarise(String xhtml,
int maxLength,
boolean ellipses)
Like summarise(String) but provides more control over the summary process. |
Method Detail |
---|
String summarise(String xhtml)
xhtml
- the content to be summarised.
String summarise(String xhtml, int maxLength, boolean ellipses)
summarise(String)
but provides more control over the summary process.
xhtml
- the content to be summarised.maxLength
- the maximum length of String to returnellipses
- if true then truncated text will be ended with '...'.
IllegalArgumentException
- if the maxLength is less than 4 and ellipses was true.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |