ehsbe CommonsTM
Version 1.1.0rc3

com.ehsbe.commons.util
Class Version

java.lang.Object
  extended by com.ehsbe.commons.util.Version
All Implemented Interfaces:
VersionInfo

public class Version
extends Object
implements VersionInfo

Get the version of the package.

Version:
1.0
Author:
Jens Elkner

Constructor Summary
Version()
           
 
Method Summary
 boolean allRightsReserved()
          Indicate, whether the copyright owner aka vendor has reserved all rights on the software.
 String getBuildNumber()
          Get the build ID
 String getEndYear()
          Get the year of development cycle, where this package was last time maintained.
 String getFromYear()
          Get the year of start of the development cycle of this package.
 String getLicensePath()
          Get the resource path for the plain text license file.
 ImageIcon getLogo()
          Get the Vendor logo.
 String getProductName()
          Get the name of the product.
 String getProductVersion()
          Get the version of the product.
 String getShortLicenseName()
          Get the short name of the license for the software.
 String getThirdPartyInfoPath()
          Get the path to for third party license infos.
 String getVendorName()
          Get the human readable name of the vendor.
 String getVendorURL()
          Get the URL of the vendor for this package.
 boolean isSubjectToLicenseTerms()
          Check, whether a note should be printed, whether the software is subject to special license terms.
static void main(String[] args)
          Print the version/copyright/vendor information for this package.
 void printVersionInfo()
          Print the version/copyright/vendor information for this package.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Version

public Version()
Method Detail

getProductName

public String getProductName()
Get the name of the product.

Specified by:
getProductName in interface VersionInfo
Returns:
always the same value and NOT null.

getProductVersion

public String getProductVersion()
Get the version of the product.

Specified by:
getProductVersion in interface VersionInfo
Returns:
always the same value and NOT null.

getBuildNumber

public String getBuildNumber()
Get the build ID

Specified by:
getBuildNumber in interface VersionInfo
Returns:
always the same value. Might be null.

getFromYear

public String getFromYear()
Get the year of start of the development cycle of this package.

Specified by:
getFromYear in interface VersionInfo
Returns:
always the same value. Might be null.

getEndYear

public String getEndYear()
Get the year of development cycle, where this package was last time maintained.

Specified by:
getEndYear in interface VersionInfo
Returns:
always the same value. Might be null.

getVendorName

public String getVendorName()
Get the human readable name of the vendor. Should be a short as possible.

Specified by:
getVendorName in interface VersionInfo
Returns:
always the same value. Should not be null but can be.

getVendorURL

public String getVendorURL()
Get the URL of the vendor for this package.

Specified by:
getVendorURL in interface VersionInfo
Returns:
always the same value. Might be null.

printVersionInfo

public void printVersionInfo()
Print the version/copyright/vendor information for this package.

Specified by:
printVersionInfo in interface VersionInfo

getLicensePath

public String getLicensePath()
Get the resource path for the plain text license file.

Specified by:
getLicensePath in interface VersionInfo
Returns:
a resource path to the plain text formatted license file for this software. Should not be null but can be.

getThirdPartyInfoPath

public String getThirdPartyInfoPath()
Get the path to for third party license infos. It must have the following format:
<info>
        <software>
                <name>Product or Software name</name>
                <version>Product/Software Version</version>
                <copyright>Copyright string</copyright>
                <type>License type</type>
                <url>URL to the product or vendor</url>
        </software>
        <software>
                ...
        </software>
</info>

E.g.:
<info>
        <software>
                <name>Swing Extensions</name>
                <version>1.0</version>
                <copyright>Copyright 2004 Sun Microsystems, Inc. All rights reserved.</copyright>
                <type>GNU Lesser General Public License (LGPL)</type>
                <url>https://swingx.dev.java.net/</url>
        </software>
</info>

Specified by:
getThirdPartyInfoPath in interface VersionInfo
Returns:
a resource path or null if no thirdparty software is used or no infos about it should be shown.

getLogo

public ImageIcon getLogo()
Get the Vendor logo.

Specified by:
getLogo in interface VersionInfo
Returns:
the logo or null if not available.

main

public static void main(String[] args)
Print the version/copyright/vendor information for this package.

Parameters:
args - none

allRightsReserved

public boolean allRightsReserved()
Indicate, whether the copyright owner aka vendor has reserved all rights on the software.

Specified by:
allRightsReserved in interface VersionInfo
Returns:
true if the vendor/copyright owner reserved all rights.

getShortLicenseName

public String getShortLicenseName()
Get the short name of the license for the software. Usually something like {code LGPL (GNU Lesser General Public License)} or null if there is no special name.

Specified by:
getShortLicenseName in interface VersionInfo
Returns:
null if not applicable, the short name of the license otherwise.

isSubjectToLicenseTerms

public boolean isSubjectToLicenseTerms()
Check, whether a note should be printed, whether the software is subject to special license terms.

Specified by:
isSubjectToLicenseTerms in interface VersionInfo
Returns:
true if a note should be displayed.

ehsbe CommonsTM
Version 1.1.0rc3

Copyright ©2005-2009 EHSBE, Walther-Rathenau-Str. 58, 39104 Magdeburg, Sachsen-Anhalt, Germany. All Rights Reserved.