/** * Default constructor. * * @param reportArtifactId the report artifact ID this strategy is constructed * for. * @param reportType the type of report generated by the * {@link #getReportArtifactId()} to reference. */ public ReportId(final String reportArtifactId, final String reportType) { checkArguments(reportArtifactId, reportType); this.reportArtifactId = reportArtifactId; this.reportType = reportType; }
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 String createRelativeReportLocationLink(final ReportId reportId, final LinkConstructorStrategy strategy) { final LinkConstructorStrategyConfig config = strategy.getConfig(); final File reportLocation = config.getReportLocation(); final String reportArtifactId = reportId.getReportArtifactId(); final String location; if (reportLocation.exists() || isReportPluginRegistered(reportArtifactId)) { location = calcRelativePath(reportLocation); } else { location = null; if (log != null && log.isWarnEnabled()) { log.warn("Cannot locate report of '" + reportArtifactId + "'. Disabling references to that report."); } } return location; }
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; }