public class ExcerptHelper extends Object
| Constructor and Description |
|---|
ExcerptHelper() |
| Modifier and Type | Method and Description |
|---|---|
String |
getExcerpt(ContentEntityObject contentEntityObject)
Returns the body of an excerpt macro (including any xhtml tags).
|
String |
getExcerptSummary(ContentEntityObject contentEntityObject)
Returns the first line of an excerpt macro as plain text (all xhtml tags will be stripped)
|
MacroDefinition |
getMacroDefinition(ContentEntityObject contentEntityObject,
String macroName)
Gets the first
MacroDefinition in the supplied (@code contentEntityObject}. |
String |
getText(String content)
Deprecated.
since 7.20 Use
ContentExcerptUtils.extractTextFromXhtmlContent(String) |
String |
getTextSummary(String content,
int minLength,
int maxLength)
Deprecated.
|
void |
setContentTransformerFactory(ContentTransformerFactory contentTransformerFactory) |
void |
setHtmlParagraphStripper(HTMLParagraphStripper htmlParagraphStripper) |
public String getExcerpt(ContentEntityObject contentEntityObject)
contentEntityObject - that contains the excerpt macro."" if there was no excerpt macro.public String getExcerptSummary(ContentEntityObject contentEntityObject)
contentEntityObject - that contains the excerpt macro."" if there was no excerpt macro.public MacroDefinition getMacroDefinition(ContentEntityObject contentEntityObject, String macroName)
MacroDefinition in the supplied (@code contentEntityObject}.contentEntityObject - (normally a Page) in which to find the macro.macroName - the name of the macro to find.@Deprecated public String getText(String content)
ContentExcerptUtils.extractTextFromXhtmlContent(String)content - the XHTML content.@Deprecated public String getTextSummary(String content, int minLength, int maxLength)
ContentExcerptUtils.extractTextSummaryFromXhtmlContent(String, int, int)content - the XHTML content.minLength - the minimum length (normally 1) character (if available).maxLength - the maximum length (normally 100) characters.public void setContentTransformerFactory(ContentTransformerFactory contentTransformerFactory)
public void setHtmlParagraphStripper(HTMLParagraphStripper htmlParagraphStripper)
Copyright © 2003–2022 Atlassian. All rights reserved.