/** * Returns the ordered list of report IDs to render. * * @return the ordered list of report IDs to render. */ public List<ExternalReport> getReports() { return getReports(getReportIds()); }
/** * Returns the label for the given <code>key</code>. * * @param key the key to the requested label. * @return the label to the <code>key</code> or the <code>key</code>, if no * label is found for that <code>key</code>. */ public String getLabel(final String key) { return getLabel(key, key); }
private static String getPathFragment(final String relativePathBase) { return isNotCurrentDir(relativePathBase) ? relativePathBase + '/' : ""; }
protected void renderBodyStart() { sink.section1(); sink.sectionTitle1(); sink.text(messages.getLabel(messages.getReportTitleId())); sink.sectionTitle1_(); sink.paragraph(); sink.text(messages.getLabel(messages.getReportDescriptionId())); sink.paragraph_(); }
protected void renderPageStart() { sink.head(); sink.title(); sink.text(messages.getLabel(messages.getReportTitleId())); sink.title_(); sink.head_(); sink.body(); }
/** * Returns the label for the given <code>key</code>. * * @param key the key to the requested label. * @param defaultLabel the label to return if no label is found by the * <code>key</code>. * @return the label to the <code>key</code> or the <code>defaultLabel</code>, * if no label is found for that <code>key</code>. */ public String getLabel(final String key, final String defaultLabel) { String label = getStringFromMessages(key); if (label == null) { label = getStringFromDefaultMessages(key, defaultLabel); } return label; }
/** * Registers a report with the given identifier and strategy. * <p> * Note that no report will be registered, if the factory of this instance is * not set. * </p> * * @param reportId the identifier of the report to register. * @param strategy the link constructor strategy to use. * @return <code>true</code> if the report has been created and registered, * <code>false</code> otherwise. */ public boolean registerReport(final ReportId reportId, final LinkConstructorStrategy strategy) { return registerReport(true, reportId, strategy); }
/** * Default constructor. * * @param reportTitleId the localized report title. * @param reportDescriptionId the localized report description. * @param messages the primary message bundle to use. * @param defaultMessages the default messages that are used if the * {@link #messages} contain no value for a given key. * @throws NullPointerException if <code>defaultMessages</code> is * <code>null</code>. */ public MessageHelper(final String reportTitleId, final String reportDescriptionId, final ResourceBundle messages, final ResourceBundle defaultMessages) throws NullPointerException { checkArguments(defaultMessages); this.reportTitleId = reportTitleId; this.reportDescriptionId = reportDescriptionId; this.messages = messages; this.defaultMessages = defaultMessages; }
void renderInPageLink(final String id) { final String label = messages.getLabel(id); renderInPageLink(label, id); }
protected void renderBodyStart() { sink.section1(); sink.sectionTitle1(); sink.text(messages.getLabel(messages.getReportTitleId())); sink.sectionTitle1_(); sink.paragraph(); sink.text(messages.getLabel(messages.getReportDescriptionId())); sink.paragraph_(); }
protected void renderPageStart() { sink.head(); sink.title(); sink.text(messages.getLabel(messages.getReportTitleId())); sink.title_(); sink.head_(); sink.body(); }
void renderInPageLink(final String id) { final String label = messages.getLabel(id); renderInPageLink(label, id); }
/** * {@inheritDoc} * * @see org.apache.maven.reporting.MavenReport#getName(java.util.Locale) */ public String getName(final Locale locale) { initMessages(locale); return StringUtils.isNotBlank(name) ? name : messages .getLabel("report.name." + outputName); }
/** * Renders the footer text. */ protected void renderFooter() { final String footerText = messages.getLabel("report.footer"); if (StringUtils.isNotBlank(footerText)) { sink.rawText(footerText); } }
/** * Renders the footer text. */ protected void renderFooter() { final String footerText = messages.getLabel("report.footer"); if (StringUtils.isNotBlank(footerText)) { sink.rawText(footerText); } }
private void renderScenarioHeader() { sink.tableHeaderCell(); final String scenarioLabel = messages.getLabel("report.table.header.scenario"); sink.text(scenarioLabel); sink.tableHeaderCell_(); }
private void renderScenarioHeader() { sink.tableHeaderCell(); final String scenarioLabel = messages.getLabel("report.table.header.scenario"); sink.text(scenarioLabel); sink.tableHeaderCell_(); }
void renderIndexTableStart() { sink.table(); sink.tableRow(); sink.tableHeaderCell(messages.getLabel("report.table.header.counter.width")); final String topicLabel = messages.getLabel("report.table.header.counter"); sink.text(topicLabel); sink.tableHeaderCell_(); sink.tableHeaderCell(); final String valueLabel = messages.getLabel("report.table.header.index"); sink.text(valueLabel); sink.tableHeaderCell_(); sink.tableRow_(); }
void renderIndexTableStart() { sink.table(); sink.tableRow(); sink.tableHeaderCell(messages.getLabel("report.table.header.counter.width")); final String topicLabel = messages.getLabel("report.table.header.counter"); sink.text(topicLabel); sink.tableHeaderCell_(); sink.tableHeaderCell(); final String valueLabel = messages.getLabel("report.table.header.index"); sink.text(valueLabel); sink.tableHeaderCell_(); sink.tableRow_(); }