org.apache.maven.report.projectinfo
Class ProjectInfoReportUtils

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

public class ProjectInfoReportUtils
extends java.lang.Object

Utilities methods.

Since:
2.1
Version:
$Id: ProjectInfoReportUtils.java 679796 2008-07-25 13:14:34Z vsiveton $
Author:
Vincent Siveton

Constructor Summary
ProjectInfoReportUtils()
           
 
Method Summary
static java.lang.String getArtifactIdCell(java.lang.String artifactId, java.lang.String link)
           
static java.lang.String getArtifactUrl(org.apache.maven.artifact.factory.ArtifactFactory factory, org.apache.maven.artifact.Artifact artifact, org.apache.maven.project.MavenProjectBuilder mavenProjectBuilder, java.util.List remoteRepositories, org.apache.maven.artifact.repository.ArtifactRepository localRepository)
           
static java.lang.String getInputStream(java.net.URL url, org.apache.maven.settings.Settings settings)
          Get the input stream using ISO-8859-1 as charset from an URL.
static java.lang.String getInputStream(java.net.URL url, org.apache.maven.settings.Settings settings, java.lang.String encoding)
          Get the input stream from an URL.
static boolean isArtifactUrlValid(java.lang.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 java.lang.String getInputStream(java.net.URL url,
                                              org.apache.maven.settings.Settings settings)
                                       throws java.io.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:
java.io.IOException - if any
See Also:
getInputStream(URL, Settings, String)

getInputStream

public static java.lang.String getInputStream(java.net.URL url,
                                              org.apache.maven.settings.Settings settings,
                                              java.lang.String encoding)
                                       throws java.io.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:
java.io.IOException - if any

getArtifactUrl

public static java.lang.String getArtifactUrl(org.apache.maven.artifact.factory.ArtifactFactory factory,
                                              org.apache.maven.artifact.Artifact artifact,
                                              org.apache.maven.project.MavenProjectBuilder mavenProjectBuilder,
                                              java.util.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 java.lang.String getArtifactIdCell(java.lang.String artifactId,
                                                 java.lang.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(java.lang.String url)
Parameters:
url - not null
Returns:
true if the url is valid, false otherwise.


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