org.apache.maven.report.projectinfo
Class ProjectInfoReportUtils

java.lang.Object
  extended by org.apache.maven.report.projectinfo.ProjectInfoReportUtils

public class ProjectInfoReportUtils
extends Object

Utilities methods.

Since:
2.1
Version:
$Id: ProjectInfoReportUtils.java 817018 2009-09-20 12:30:57Z olamy $
Author:
Vincent Siveton

Constructor Summary
ProjectInfoReportUtils()
           
 
Method Summary
static String getArtifactIdCell(String artifactId, String link)
           
static String getArtifactUrl(org.apache.maven.artifact.factory.ArtifactFactory factory, org.apache.maven.artifact.Artifact artifact, org.apache.maven.project.MavenProjectBuilder mavenProjectBuilder, List remoteRepositories, org.apache.maven.artifact.repository.ArtifactRepository localRepository)
           
static String getInputStream(URL url, org.apache.maven.settings.Settings settings)
          Get the input stream using ISO-8859-1 as charset from an URL.
static String getInputStream(URL url, org.apache.maven.settings.Settings settings, String encoding)
          Get the input stream from an URL.
static boolean isArtifactUrlValid(String url)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProjectInfoReportUtils

public ProjectInfoReportUtils()
Method Detail

getInputStream

public static String getInputStream(URL url,
                                    org.apache.maven.settings.Settings settings)
                             throws IOException
Get the input stream using ISO-8859-1 as charset from an URL.

Parameters:
url - not null
settings - not null to handle proxy settings
Returns:
the ISO-8859-1 inputstream found.
Throws:
IOException - if any
See Also:
getInputStream(URL, Settings, String)

getInputStream

public static String getInputStream(URL url,
                                    org.apache.maven.settings.Settings settings,
                                    String encoding)
                             throws IOException
Get the input stream from an URL.

Parameters:
url - not null
settings - not null to handle proxy settings
encoding - the wanted encoding for the inputstream. If null, encoding will be "ISO-8859-1".
Returns:
the inputstream found depending the wanted encoding.
Throws:
IOException - if any

getArtifactUrl

public static String getArtifactUrl(org.apache.maven.artifact.factory.ArtifactFactory factory,
                                    org.apache.maven.artifact.Artifact artifact,
                                    org.apache.maven.project.MavenProjectBuilder mavenProjectBuilder,
                                    List remoteRepositories,
                                    org.apache.maven.artifact.repository.ArtifactRepository localRepository)
Parameters:
factory - not null
artifact - not null
mavenProjectBuilder - not null
remoteRepositories - not null
localRepository - not null
Returns:
the artifact url or null if an error occurred.

getArtifactIdCell

public static String getArtifactIdCell(String artifactId,
                                       String link)
Parameters:
artifactId - not null
link - could be null
Returns:
the artifactId cell with or without a link pattern
See Also:
AbstractMavenReportRenderer#linkPatternedText(String)

isArtifactUrlValid

public static boolean isArtifactUrlValid(String url)
Parameters:
url - not null
Returns:
true if the url is valid, false otherwise.


Copyright © 2005-2010 The Apache Software Foundation. All Rights Reserved.