Class ExcerptConfig
java.lang.Object
com.atlassian.confluence.content.render.xhtml.view.excerpt.ExcerptConfig
Allows fine grained configuration over what and how much content is included in an excerpt produced
by an
Excerpter
.-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ExcerptConfig.Builder
builder()
Factory method for creating builders for this classa set of html tags that the excerpter will attempt to not finish on.A macro definition updater to be applied to the storage format before rendering the excerpt to view.int
The maximum number of blocks to include in this excerpt.int
The maximum character count to include in the excerpt.int
The minimum block count to include in the excerpt, the excerpter should continue accepting blocks whilst no other maximums are exceeded if the block count is below this number.int
The minimum character count to include in the excerpt, the excerpt should continue taking characters whilst no other maximums are exceeded if the character count is below this number.boolean
Determines if user defined excerpts (e.g.
-
Constructor Details
-
ExcerptConfig
-
-
Method Details
-
builder
Factory method for creating builders for this class- Returns:
-
getContainerElementSet
-
getBlockElementSet
-
getMaxBlocks
public int getMaxBlocks()The maximum number of blocks to include in this excerpt. The excerpter should not include content that would exceeded this maximum.- Returns:
-
getMinBlocks
public int getMinBlocks()The minimum block count to include in the excerpt, the excerpter should continue accepting blocks whilst no other maximums are exceeded if the block count is below this number.- Returns:
-
getMinCharCount
public int getMinCharCount()The minimum character count to include in the excerpt, the excerpt should continue taking characters whilst no other maximums are exceeded if the character count is below this number.- Returns:
-
getMaxCharCount
public int getMaxCharCount()The maximum character count to include in the excerpt. The excerpt should stop excerpting content if it would exceed this maximum.- Returns:
-
getExcludedHtmlElements
- Returns:
- A set of html tags that should not be included in the excerpt.
-
getExcludedLastHtmlElements
a set of html tags that the excerpter will attempt to not finish on. Excerpts look strange when they finish on elements such as headings.- Returns:
-
getMacroDefinitionUpdater
A macro definition updater to be applied to the storage format before rendering the excerpt to view.- Returns:
- a macroDefinitionReplacer to apply or null if none set.
-
ignoreUserDefinedExcerpt
public boolean ignoreUserDefinedExcerpt()Determines if user defined excerpts (e.g. excerpt macro) should be ignored to create the excerpt.Default is currently true to keep backwards compatibility, but callers that care should explicitly set this to true or false, as we will change the default in a future release.
- Returns:
-