org.pentaho.reporting.libraries.base.versioning

Class ProjectInformation

public abstract class ProjectInformation extends DependencyInformation

The project information structure contains information about the current project. This is an extended version of the dependency information enriched with information about the boot-process and a list of dependencies.

This class needs to be subclassed by each project that wants to participate in the global boot process.

Author: Thomas Morgner

Constructor Summary
protected ProjectInformation(String name)
Creates a new project information object with the given name.
protected ProjectInformation(String internalName, String publicName)
Creates a new project information object with the given name.
Method Summary
voidaddLibrary(DependencyInformation library)
Adds a library.
protected voidaddOptionalLibrary(String libraryClass)
Adds an optional library.
protected voidaddOptionalLibrary(DependencyInformation library)
Adds an optional library.
StringgetBootClass()
Returns the boot class.
StringgetCopyright()
Returns the copyright string for thie project.
StringgetInternalName()
Returns the internal name of the project.
DependencyInformation[]getLibraries()
Returns a list of libraries used by the project.
DependencyInformation[]getOptionalLibraries()
Returns a list of optional libraries used by the project.
StringgetProductId()
Returns the product ID from the Manifest.
StringgetReleaseBuildNumber()
Returns the release build number from the Manifest.
StringgetReleaseCandidateToken()
Returns the release candidate token from the Manifest.
StringgetReleaseMajor()
Returns the release major version number from the Manifest.
StringgetReleaseMilestone()
Returns the release milestone number from the Manifest.
StringgetReleaseMinor()
Returns the release minor version number from the Manifest.
StringgetReleaseNumber()
Returns the release number from the Manifest.
StringgetVersion()
Returns the version number from the Manifest.
protected voidsetBootClass(String bootClass)
Redefines the boot class.
protected voidsetCopyright(String copyright)
Updates the copyright string for thie project.

Constructor Detail

ProjectInformation

protected ProjectInformation(String name)
Creates a new project information object with the given name.

Parameters: name the name of the project, when internal and public names are equal.

ProjectInformation

protected ProjectInformation(String internalName, String publicName)
Creates a new project information object with the given name. The internal name is used to lookup the version information in the manifest file, while the public name is presented to the humans.

Parameters: internalName the internal name of the project. publicName the public name of the project.

Method Detail

addLibrary

public void addLibrary(DependencyInformation library)
Adds a library.

Parameters: library the library.

addOptionalLibrary

protected void addOptionalLibrary(String libraryClass)
Adds an optional library. These libraries will be booted, if they define a boot class. A missing class is considered non-fatal and it is assumed that the programm knows how to handle that.

Parameters: libraryClass the library.

addOptionalLibrary

protected void addOptionalLibrary(DependencyInformation library)
Adds an optional library. These libraries will be booted, if they define a boot class. A missing class is considered non-fatal and it is assumed that the programm knows how to handle that.

Parameters: library the library.

getBootClass

public String getBootClass()
Returns the boot class.

Returns: the bootclass (might be null).

getCopyright

public String getCopyright()
Returns the copyright string for thie project.

Returns: the copyright string (might be null).

getInternalName

public String getInternalName()
Returns the internal name of the project.

Returns: the internal name, never null.

getLibraries

public DependencyInformation[] getLibraries()
Returns a list of libraries used by the project.

Returns: the list of libraries.

getOptionalLibraries

public DependencyInformation[] getOptionalLibraries()
Returns a list of optional libraries used by the project.

Returns: the list of libraries.

getProductId

public String getProductId()
Returns the product ID from the Manifest.

Returns: the product ID, or null if none is specified in the manifest.

getReleaseBuildNumber

public String getReleaseBuildNumber()
Returns the release build number from the Manifest.

Returns: the release build number, or null if none is specified in the manifest.

getReleaseCandidateToken

public String getReleaseCandidateToken()
Returns the release candidate token from the Manifest.

Returns: the release candidate token, or null if none is specified in the manifest.

getReleaseMajor

public String getReleaseMajor()
Returns the release major version number from the Manifest.

Returns: the release major version number, or null if none is specified in the manifest.

getReleaseMilestone

public String getReleaseMilestone()
Returns the release milestone number from the Manifest.

Returns: the release milestone number, or null if none is specified in the manifest.

getReleaseMinor

public String getReleaseMinor()
Returns the release minor version number from the Manifest.

Returns: the release minor version number, or null if none is specified in the manifest.

getReleaseNumber

public String getReleaseNumber()
Returns the release number from the Manifest.

Returns: the release number, or null if none is specified in the manifest.

getVersion

public String getVersion()
Returns the version number from the Manifest.

Returns: the version, or null if no version information is known.

setBootClass

protected void setBootClass(String bootClass)
Redefines the boot class.

Parameters: bootClass the bootclass (might be null).

setCopyright

protected void setCopyright(String copyright)
Updates the copyright string for thie project.

Parameters: copyright the copyright string.