de.smartics.maven.util.report.link
Class ExternalReport

Package class diagram package ExternalReport
java.lang.Object
  extended by de.smartics.maven.util.report.link.ExternalReport

public class ExternalReport
     
     
extends Object

Helper to construct links from a given report instance to other Maven reports.


Field Summary
protected  ReportId reportId
          The report ID this strategy is constructed for.
 
Constructor Summary
ExternalReport(ReportId reportId, String basePath, LinkConstructorStrategy strategy)
          Default constructor.
 
Method Summary
 String constructLink(JavaElementRef ref)
          Constructs a link to the given Java Element.
 String constructLink(String packageName, String typeName, de.smartics.util.source.MethodInfo method)
          Constructs a link to the given Java element.
 String getBasePath()
          Returns the base path to the report to prefix the constructed link.
 String getLabelKey()
          Returns the key to the label to use as a label for the rendered link.
 ReportId getReportId()
          Returns the report ID this strategy is constructed for.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

reportId

protected final ReportId reportId
The report ID this strategy is constructed for.

Constructor Detail

ExternalReport

public ExternalReport(ReportId reportId,
                      String basePath,
                      LinkConstructorStrategy strategy)
               throws IllegalArgumentException
Default constructor.

Parameters:
reportId - the report ID this strategy is constructed for.
basePath - the base path to the report to prefix the constructed link.
strategy - the strategy to construct the link suffix to the base path.
Throws:
IllegalArgumentException - if helper or reportLocation is null or reportArtifactId is blank.
Method Detail

getReportId

public ReportId getReportId()
Returns the report ID this strategy is constructed for.

Returns:
the report ID this strategy is constructed for.

getBasePath

public String getBasePath()
Returns the base path to the report to prefix the constructed link.

Returns:
the base path to the report to prefix the constructed link.

constructLink

public String constructLink(String packageName,
                            String typeName,
                            de.smartics.util.source.MethodInfo method)
Constructs a link to the given Java element.

Parameters:
packageName - packageName the name of the package.
typeName - typeName the name of the Java type.
method - the test method to link to.
Returns:
the requested relative link.

constructLink

public String constructLink(JavaElementRef ref)
Constructs a link to the given Java Element.

Parameters:
ref - the element to link to.
Returns:
the requested relative link.

getLabelKey

public String getLabelKey()
Returns the key to the label to use as a label for the rendered link.

Returns:
the key to the label to use as a label for the rendered link.


Copyright © 2006-2012 Kronseder & Reiner GmbH - smartics. All Rights Reserved.