org.deegree.commons.modules
Class ModuleInfo

java.lang.Object
  extended by org.deegree.commons.modules.ModuleInfo
All Implemented Interfaces:
Comparable<ModuleInfo>

public final class ModuleInfo
extends Object
implements Comparable<ModuleInfo>

Provides access to deegree module metadata (e.g. Maven artifact identifier and build information).

The information is extracted from the following resources on the classpath:

Version:
$Revision: 31012 $, $Date: 2011-06-07 17:10:14 +0200 (Tue, 07 Jun 2011) $
Author:
Rutger Bezema, Markus Schneider, last edited by: $Author: aschmitz $

Method Summary
 int compareTo(ModuleInfo that)
           
 boolean equals(Object o)
           
static ModuleInfo extractModuleInfo(URL classpathURL)
          Returns the ModuleInfo for the deegree module on the given classpath.
static Collection<ModuleInfo> extractModulesInfo(Set<URL> classpathURLs)
          Returns the ModuleInfos for the deegree modules on the given classpathes.
 String getArtifactId()
           
 String getBuildBy()
          Returns the name of the builder.
 String getBuildDate()
          Returns the date string when the current build was created.
 URL getClasspath()
          Returns the URL of the module's classpath.
 String getGroupId()
           
static Collection<ModuleInfo> getModulesInfo()
          Returns the ModuleInfos for the deegree modules accessible by the default classloader.
 String getSvnRevision()
           
 String getVersion()
          Returns the module's version.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

getClasspath

public URL getClasspath()
Returns the URL of the module's classpath.

Returns:
url, never null

getGroupId

public String getGroupId()

getArtifactId

public String getArtifactId()

getVersion

public String getVersion()
Returns the module's version.

Returns:
the version number

getBuildDate

public String getBuildDate()
Returns the date string when the current build was created.

Returns:
the date as String

getBuildBy

public String getBuildBy()
Returns the name of the builder.

Returns:
the name of the builder

getSvnRevision

public String getSvnRevision()
Returns:
the svn revision number

getModulesInfo

public static Collection<ModuleInfo> getModulesInfo()
Returns the ModuleInfos for the deegree modules accessible by the default classloader.

Returns:
module infos, never null, but can be empty

extractModulesInfo

public static Collection<ModuleInfo> extractModulesInfo(Set<URL> classpathURLs)
                                                 throws IOException
Returns the ModuleInfos for the deegree modules on the given classpathes.

Parameters:
classpathURLs - classpath urls, must not be null
Returns:
module infos, never null, but can be empty (if no deegree module information is present on the given classpathes)
Throws:
IOException - if accessing META-INF/deegree/buildinfo.properties or META-INF/maven/[..]/pom.properties fails

extractModuleInfo

public static ModuleInfo extractModuleInfo(URL classpathURL)
                                    throws IOException
Returns the ModuleInfo for the deegree module on the given classpath.

Parameters:
classpathURL - classpath url, must not be null
Returns:
module info or null (if the module does not have file META-INF/deegree/buildinfo.properties)
Throws:
IOException - if accessing META-INF/deegree/buildinfo.properties or META-INF/maven/[..]/pom.properties fails

compareTo

public int compareTo(ModuleInfo that)
Specified by:
compareTo in interface Comparable<ModuleInfo>

equals

public boolean equals(Object o)
Overrides:
equals in class Object

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2011. All Rights Reserved.