com.atlassian.bamboo.clover.build.coverage
Class CloverReportLinker

java.lang.Object
  extended by com.atlassian.bamboo.clover.build.coverage.CloverReportLinker
All Implemented Interfaces:
ReportProvider

public class CloverReportLinker
extends Object
implements ReportProvider


Field Summary
 com.google.common.base.Predicate<Artifact> isCloverReportPredicate
           
static String REPORT_DATE_FORMAT
           
protected  com.google.common.base.Function<ArtifactLink,Artifact> toArtifact
           
 
Constructor Summary
CloverReportLinker(ResultsSummary summary, ArtifactLinkManager artifactLinkManager, String baseUrl)
           
 
Method Summary
 ImmutableResultsSummary getBuildResultsSummary()
          Returns build results
 Collection<Artifact> getCloverArtifacts()
          Returns a list of artifacts (shared and local) containing Clover HTML report.
 String getCloverReportUrl()
          Deprecated. since 5.7
 String getCloverReportUrl(Artifact artifact)
          Returns URL of the given report artifact.
 String getTimestamp()
          Deprecated. since 5.7
 String getTimestamp(Artifact artifact)
          Returns timestamp of the given report artifact.
 boolean isCloverAdgReport(Artifact artifact)
          Returns true if given artifact contains Clover's HTML report in ADG style (introduced in Clover 4)
 boolean isCloverReport(Artifact artifact)
          Returns true if given artifact contains Clover's HTML report.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

REPORT_DATE_FORMAT

public static final String REPORT_DATE_FORMAT
See Also:
Constant Field Values

toArtifact

protected final com.google.common.base.Function<ArtifactLink,Artifact> toArtifact

isCloverReportPredicate

public final com.google.common.base.Predicate<Artifact> isCloverReportPredicate
Constructor Detail

CloverReportLinker

public CloverReportLinker(@NotNull
                          ResultsSummary summary,
                          @NotNull
                          ArtifactLinkManager artifactLinkManager,
                          @NotNull
                          String baseUrl)
Method Detail

getCloverReportUrl

@Deprecated
@Nullable
public String getCloverReportUrl()
Deprecated. since 5.7

Description copied from interface: ReportProvider
Return URL of the Clover's HTML report artifact from a build. In case when build contains many Clover reports, a first found will be returned.

Specified by:
getCloverReportUrl in interface ReportProvider
Returns:
String URL to Clover report or null if not exists

getCloverReportUrl

@Nullable
public String getCloverReportUrl(@NotNull
                                          Artifact artifact)
Description copied from interface: ReportProvider
Returns URL of the given report artifact.

Specified by:
getCloverReportUrl in interface ReportProvider
Returns:
String artifact URL or null if not exists

getBuildResultsSummary

@NotNull
public ImmutableResultsSummary getBuildResultsSummary()
Description copied from interface: ReportProvider
Returns build results

Specified by:
getBuildResultsSummary in interface ReportProvider
Returns:
ImmutableResultsSummary

getTimestamp

@Deprecated
@NotNull
public String getTimestamp()
Deprecated. since 5.7

Description copied from interface: ReportProvider
Returns timestamp of the Clover's HTML report artifact from a build. In case when build contains many Clover reports, a first found will be returned. If there are no Clover reports in build it returns empty string.

Specified by:
getTimestamp in interface ReportProvider
Returns:
String timestamp of Clover report or "" if not found

getTimestamp

@NotNull
public String getTimestamp(@NotNull
                                   Artifact artifact)
Description copied from interface: ReportProvider
Returns timestamp of the given report artifact.

Specified by:
getTimestamp in interface ReportProvider
Returns:
String timestamp of Clover report or "" if not found

isCloverReport

public boolean isCloverReport(@NotNull
                              Artifact artifact)
Description copied from interface: ReportProvider
Returns true if given artifact contains Clover's HTML report.

Specified by:
isCloverReport in interface ReportProvider
Parameters:
artifact - artifact to check
Returns:
boolean

isCloverAdgReport

public boolean isCloverAdgReport(@NotNull
                                 Artifact artifact)
Description copied from interface: ReportProvider
Returns true if given artifact contains Clover's HTML report in ADG style (introduced in Clover 4)

Specified by:
isCloverAdgReport in interface ReportProvider
Parameters:
artifact - artifact to check
Returns:
boolean

getCloverArtifacts

@NotNull
public Collection<Artifact> getCloverArtifacts()
Description copied from interface: ReportProvider
Returns a list of artifacts (shared and local) containing Clover HTML report.

Specified by:
getCloverArtifacts in interface ReportProvider
Returns:
Collection<Artifact> list of reports or empty list


Copyright © 2015 Atlassian Software Systems Pty Ltd. All rights reserved.