Modifier and Type | Field and Description |
---|---|
static Set<String> |
DEFAULT_EXCLUDE_SET |
static int |
DEFAULT_MAX_BLOCKS_FOR_EXCERPT |
Constructor and Description |
---|
DefaultExcerpter(XMLOutputFactory xmlFragmentOutputFactory,
XmlEventReaderFactory xmlEventReaderFactory,
HtmlToXmlConverter htmlToXmlConverter,
SettingsManager settingsManager,
Renderer viewRenderer,
Unmarshaller<EmbeddedImage> embeddedImageUnmarshaller,
FragmentTransformer fragmentTransformer,
AttachmentResourceIdentifierResolver attachmentResolver,
DataSourceFactory datasourceFactory,
ThumbnailManager thumbnailManager,
XhtmlContent xhtmlContent) |
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 contentEntity,
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.
|
String |
createExcerpt(ContentEntityObject contentEntity,
String outputType,
Set<String> excludeSet,
int maxBlocksForExcerpt) |
String |
createExcerpt(String contentHtml,
ExcerptConfig config) |
List<DataSource> |
extractImageSrc(ContentEntityObject ceo,
int maxImages) |
List<DataSource> |
extractImageSrc(ContentEntityObject ceo,
int maxImages,
boolean alwaysUseThumbnails) |
List<String> |
extractImageSrc(String contentHtml,
int maxImages) |
List<URI> |
extractImageThumbnailUris(ContentEntityObject contentEntity,
int maxUris)
Returns the URIs of thumbnails for each of the images attached to the specified content entity.
|
protected List<XMLEvent> |
filterEmptyAndExcludedEvents(XMLEventReader reader,
Set<String> excludeSet) |
String |
renderContent(ContentEntityObject contentEntity,
String outputType)
Deprecated.
|
public static final int DEFAULT_MAX_BLOCKS_FOR_EXCERPT
public DefaultExcerpter(XMLOutputFactory xmlFragmentOutputFactory, XmlEventReaderFactory xmlEventReaderFactory, HtmlToXmlConverter htmlToXmlConverter, SettingsManager settingsManager, Renderer viewRenderer, Unmarshaller<EmbeddedImage> embeddedImageUnmarshaller, FragmentTransformer fragmentTransformer, AttachmentResourceIdentifierResolver attachmentResolver, DataSourceFactory datasourceFactory, ThumbnailManager thumbnailManager, XhtmlContent xhtmlContent)
public String createExcerpt(Content content) throws Exception
Excerpter
createExcerpt
in interface Excerpter
content
- - the content entity object to create an excerpt ofException
- - if an excerpt cannot be created for this content objectpublic String createExcerpt(ContentEntityObject contentEntity, String outputType) throws Exception
Excerpter
createExcerpt
in interface Excerpter
contentEntity
- - 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 ContentEntityObjectpublic String createExcerpt(ContentEntityObject contentEntity, String outputType, Set<String> excludeSet, int maxBlocksForExcerpt) throws Exception
Exception
public String createExcerpt(ContentEntityObject contentEntity, String outputType, ExcerptConfig config) throws XMLStreamException
Excerpter
createExcerpt
in interface Excerpter
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 ExcerptConfigXMLStreamException
@Deprecated public String renderContent(ContentEntityObject contentEntity, String outputType)
public String createExcerpt(String contentHtml, ExcerptConfig config) throws XMLStreamException
XMLStreamException
public List<DataSource> extractImageSrc(ContentEntityObject ceo, int maxImages) throws XMLStreamException, XhtmlException
extractImageSrc
in interface Excerpter
XMLStreamException
XhtmlException
public List<DataSource> extractImageSrc(ContentEntityObject ceo, int maxImages, boolean alwaysUseThumbnails) throws XMLStreamException, XhtmlException
extractImageSrc
in interface Excerpter
XMLStreamException
XhtmlException
public List<String> extractImageSrc(String contentHtml, int maxImages) throws XMLStreamException
extractImageSrc
in interface Excerpter
XMLStreamException
protected List<XMLEvent> filterEmptyAndExcludedEvents(XMLEventReader reader, Set<String> excludeSet)
public List<URI> extractImageThumbnailUris(ContentEntityObject contentEntity, int maxUris) throws XhtmlException
Excerpter
extractImageThumbnailUris
in interface Excerpter
contentEntity
- the content entitymaxUris
- the maximum URI's to returnXhtmlException
- if there is an error parsing the contents for image references.Copyright © 2003–2015 Atlassian. All rights reserved.