public interface Excerpter
Modifier and Type | Method and Description |
---|---|
String |
createExcerpt(Content content)
Creates an excerpt block from the provided content object without any tags excluded, using an implementation
specific number of blocks.
|
String |
createExcerpt(ContentEntityObject contentEntityObject,
String outputType)
Creates an excerpt of the contentEntityObject without any tags excluded including an implementation specific
number of blocking
|
String |
createExcerpt(ContentEntityObject contentEntity,
String outputType,
ExcerptConfig config)
Creates an excerpt of the contentEntityObject excluding any html tags that are in the exclude set.
|
List<DataSource> |
extractImageSrc(ContentEntityObject ceo,
int numImages) |
List<DataSource> |
extractImageSrc(ContentEntityObject ceo,
int numImages,
boolean useThumbnails) |
List<String> |
extractImageSrc(String contentHtml,
int numImages) |
List<URI> |
extractImageThumbnailUris(ContentEntityObject contentEntity,
int maxUris)
Returns the URIs of thumbnails for each of the images attached to the specified content entity.
|
String createExcerpt(Content content) throws Exception
content
- - the content entity object to create an excerpt ofException
- - if an excerpt cannot be created for this content objectString createExcerpt(ContentEntityObject contentEntityObject, String outputType) throws Exception
contentEntityObject
- - contentEntityObject to create an excerpt ofoutputType
- - the output type in which to render the content, @see RenderContextOutputTypeException
- - if an excerpt could not be created for this ContentEntityObjectString createExcerpt(ContentEntityObject contentEntity, String outputType, ExcerptConfig config) throws XMLStreamException, com.atlassian.plugin.web.renderer.RendererException
The number of blocks with content to be included in the excerpt is specified with the maxBlocksForExcerpt parameter. A block with content is any element with a
contentEntity
- - contentEntityObject to create an excerpt ofoutputType
- - the output type in which to render the content, @see RenderContextOutputTypeconfig
- - a parameter object that allows the content of the excerpt to be customized. @see ExcerptConfigException
- - if an excerpt could not be created for this ContentEntityObjectXMLStreamException
com.atlassian.plugin.web.renderer.RendererException
List<String> extractImageSrc(String contentHtml, int numImages) throws XMLStreamException
XMLStreamException
List<URI> extractImageThumbnailUris(ContentEntityObject contentEntity, int maxUris) throws XhtmlException
URIs are returned in order that the images appear in the document. Obviously only URIs for thumbnailable images will be returned.
contentEntity
- the content entitymaxUris
- the maximum URI's to returnXhtmlException
- if there is an error parsing the contents for image references.List<DataSource> extractImageSrc(ContentEntityObject ceo, int numImages) throws XMLStreamException, XhtmlException
XMLStreamException
XhtmlException
List<DataSource> extractImageSrc(ContentEntityObject ceo, int numImages, boolean useThumbnails) throws XMLStreamException, XhtmlException
XMLStreamException
XhtmlException
Copyright © 2003–2016 Atlassian. All rights reserved.