/** * 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); }
private ReportId provideLinkConstructor( // NOPMD final boolean addReport, final String reportArtifactId, final String reportType, final File location, final boolean linkToMember, final String labelKey) throws MavenReportException { final LinkConstructorStrategy strategy = createStrategy(reportArtifactId, location, linkToMember, labelKey); final ReportId reportId = new ReportId(reportArtifactId, reportType); if (reports.registerReport(addReport, reportId, strategy)) { return reportId; } return null; }
private ReportId provideLinkConstructor( // NOPMD final boolean addReport, final String reportArtifactId, final String reportType, final File location, final boolean linkToMember, final String labelKey) throws MavenReportException { final LinkConstructorStrategy strategy = createStrategy(reportArtifactId, location, linkToMember, labelKey); final ReportId reportId = new ReportId(reportArtifactId, reportType); if (reports.registerReport(addReport, reportId, strategy)) { return reportId; } return null; }