Class AbstractVersionsReportRenderer<T>
java.lang.Object
org.apache.maven.reporting.AbstractMavenReportRenderer
org.codehaus.mojo.versions.reporting.VersionsReportRendererBase
org.codehaus.mojo.versions.reporting.AbstractVersionsReportRenderer<T>
- Type Parameters:
T- modelled report object
- All Implemented Interfaces:
org.apache.maven.reporting.MavenReportRenderer,ReportRenderer
- Direct Known Subclasses:
DependencyUpdatesReportRenderer,PluginUpdatesReportRenderer,PropertyUpdatesReportRenderer
public abstract class AbstractVersionsReportRenderer<T>
extends VersionsReportRendererBase
implements ReportRenderer
Base class for report renderers.
- Since:
- 1.0-beta-1
- Author:
- Stephen Connolly
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final ArtifactVersionsCacheprotected final org.apache.maven.doxia.sink.SinkEventAttributesprotected TModel of the object being renderedprotected final ArtifactVersionsCacheFields inherited from class org.codehaus.mojo.versions.reporting.VersionsReportRendererBase
bundleName, i18n, localeFields inherited from class org.apache.maven.reporting.AbstractMavenReportRenderer
sink -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractVersionsReportRenderer(org.codehaus.plexus.i18n.I18N i18n, org.apache.maven.doxia.sink.Sink sink, Locale locale, String bundleName, T model, boolean allowSnapshots) -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract <Q extends OverviewStats>
QComputes the OverviewStats object needed to render the summary table rowprotected StringgetLabel(org.apache.maven.artifact.versioning.ArtifactVersion version, AbstractVersionDetails details) Returns a text label to describe if the given version is a major, minor, incremental or subincremental update.protected voidprotected voidrenderDependencyDetailTable(org.apache.maven.model.Dependency artifact, ArtifactVersions details, boolean includeScope) protected abstract voidRenders the details tableprotected voidrenderIcon(boolean success) Renders the success or warning icon.protected abstract voidRenders the "management" (dependencyManagement, pluginManagement, etc.) summary tableprotected voidRenders the newest versions for the given artifact.protected voidRenders the "Overview" tableprotected <Q extends OverviewStats>
voidrenderOverviewTableRow(Q stats) Renders the singular summary table rowprotected voidrenderStatRow(String textKey, int statCount, boolean forceSuccessIcon) Renders one table row for the given statistics.protected voidrenderStatus(AbstractVersionDetails details) Renders the status of the given artifact.protected abstract voidRenders the regular ("dependencies", "plugins", etc.) summary tableprotected voidrenderSummaryTable(Map<org.apache.maven.model.Dependency, ArtifactVersions> contents, boolean hasScope) protected voidrenderSummaryTableHeader(boolean hasScope, boolean hasType) protected voidrenderSummaryTableRow(org.apache.maven.model.Dependency artifact, ArtifactVersions details, boolean includeScope) protected voidrenderTwoCellsRow(String textKey, Runnable runnable) Renders a row of two cells, the first cell being an header and the second cell being a non-header cell.protected voidrenderTwoCellsRow(String textKey, String textValue) Renders a row of two cells, the first cell being an header and the second cell being a non-header cell.protected voidrenderVersions(org.apache.maven.artifact.versioning.ArtifactVersion[] allUpdates, AbstractVersionDetails details) Renders the list of versions that are available for the given artifact or property.Methods inherited from class org.codehaus.mojo.versions.reporting.VersionsReportRendererBase
equals, getText, getTitle, isAllowSnapshots, renderBoldCell, renderBoldCell, renderBoldText, renderCell, renderCells, renderSuccessIcon, renderTableHeaderCells, renderWarningIconMethods inherited from class org.apache.maven.reporting.AbstractMavenReportRenderer
createLinkPatternedText, endSection, endTable, javaScript, link, linkPatternedText, paragraph, propertiesToString, render, startSection, startSection, startTable, startTable, tableCaption, tableCell, tableCell, tableHeader, tableHeaderCell, tableRow, text, verbatimLink, verbatimSource, verbatimTextMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.maven.reporting.MavenReportRenderer
getTitle, renderMethods inherited from interface org.codehaus.mojo.versions.reporting.util.ReportRenderer
isAllowSnapshots
-
Field Details
-
model
Model of the object being rendered- Since:
- 2.13.0
-
newestUpdateCache
-
allUpdatesCache
-
headerAttributes
protected final org.apache.maven.doxia.sink.SinkEventAttributes headerAttributes
-
-
Constructor Details
-
AbstractVersionsReportRenderer
-
-
Method Details
-
renderBody
protected void renderBody()- Specified by:
renderBodyin classorg.apache.maven.reporting.AbstractMavenReportRenderer
-
renderOverview
protected void renderOverview()Renders the "Overview" table -
renderManagementSummaryTable
protected abstract void renderManagementSummaryTable()Renders the "management" (dependencyManagement, pluginManagement, etc.) summary table -
renderSummaryTable
protected abstract void renderSummaryTable()Renders the regular ("dependencies", "plugins", etc.) summary table -
renderOverviewTableRow
Renders the singular summary table row- Type Parameters:
Q- concrete OverviewStats class- Parameters:
stats- summary statistics object to render
-
renderStatRow
Renders one table row for the given statistics.- Parameters:
textKey- the key of the text to be rendered.statCount- the number of artifacts with the given stat.forceSuccessIcon- if true, the success icon will be rendered regardless.
-
renderIcon
protected void renderIcon(boolean success) Renders the success or warning icon.- Parameters:
success- if true, the success icon will be rendered, otherwise the warning icon will be rendered.
-
computeOverviewStats
Computes the OverviewStats object needed to render the summary table row- Type Parameters:
Q- concrete OverviewStats class- Returns:
- stats object
-
renderDetails
protected abstract void renderDetails()Renders the details table -
renderSummaryTable
protected void renderSummaryTable(Map<org.apache.maven.model.Dependency, ArtifactVersions> contents, boolean hasScope) -
renderSummaryTableHeader
protected void renderSummaryTableHeader(boolean hasScope, boolean hasType) -
renderSummaryTableRow
protected void renderSummaryTableRow(org.apache.maven.model.Dependency artifact, ArtifactVersions details, boolean includeScope) -
renderNewestVersions
Renders the newest versions for the given artifact.- Parameters:
details- the artifact for which to render the newest versions.
-
renderDependencyDetailTable
protected void renderDependencyDetailTable(org.apache.maven.model.Dependency artifact, ArtifactVersions details, boolean includeScope) -
renderTwoCellsRow
Renders a row of two cells, the first cell being an header and the second cell being a non-header cell.- Parameters:
textKey- the key of the text to be rendered.textValue- the value of the text to be rendered.
-
renderTwoCellsRow
Renders a row of two cells, the first cell being an header and the second cell being a non-header cell.- Parameters:
textKey- the key of the text to be rendered.runnable- the runnable to be executed to render the second cell content.
-
renderStatus
Renders the status of the given artifact.- Parameters:
details- the artifact for which to render the status.
-
renderVersions
protected void renderVersions(org.apache.maven.artifact.versioning.ArtifactVersion[] allUpdates, AbstractVersionDetails details) Renders the list of versions that are available for the given artifact or property.- Parameters:
allUpdates- the list of all updates available.details- the versions details for the given artifact or property.
-
getLabel
protected String getLabel(org.apache.maven.artifact.versioning.ArtifactVersion version, AbstractVersionDetails details) Returns a text label to describe if the given version is a major, minor, incremental or subincremental update.- Parameters:
version- the version to describe.details- the artifact for which to render the versions.- Returns:
- a text label to describe if the given version is a major, minor, incremental or subincremental update.
-