|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.confluence.content.render.xhtml.view.excerpt.DefaultExcerpter
public class DefaultExcerpter
Field Summary |
---|
Fields inherited from interface com.atlassian.confluence.content.render.xhtml.view.excerpt.Excerpter |
---|
BLOCK_ELEMENT_SET, CONTAINER_ELEMENT_SET |
Constructor Summary | |
---|---|
DefaultExcerpter(XMLOutputFactory xmlFragmentOutputFactory,
XmlEventReaderFactory xmlEventReaderFactory,
HtmlToXmlConverter htmlToXmlConverter,
SettingsManager settingsManager,
Renderer viewRenderer,
Unmarshaller<EmbeddedImage> embeddedImageUnmarshaller,
FragmentTransformer fragmentTransformer,
AttachmentResourceIdentifierResolver attachmentResolver,
DataSourceFactory datasourceFactory,
ThumbnailManager thumbnailManager,
XhtmlContent xhtmlContent)
|
Method Summary | |
---|---|
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 excludeSet)
|
String |
renderContent(ContentEntityObject contentEntity,
String outputType)
Deprecated. |
protected void |
skipCurrentNode(Iterator<XMLEvent> reader)
skips the current node |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
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)
Method Detail |
---|
public 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 RenderContextOutputType
Exception
- - 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
outputType
- - 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 ExcerptConfig
XMLStreamException
@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 excludeSet)
protected void skipCurrentNode(Iterator<XMLEvent> reader) throws XMLStreamException
reader
-
XMLStreamException
public List<URI> extractImageThumbnailUris(ContentEntityObject contentEntity, int maxUris) throws XhtmlException
Excerpter
extractImageThumbnailUris
in interface Excerpter
contentEntity
- the content entitymaxUris
- the maximum URI's to return
XhtmlException
- if there is an error parsing the contents for image references.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |