001: /*
002: * Copyright (C) 2004 NNL Technology AB
003: * Visit www.infonode.net for information about InfoNode(R)
004: * products and how to contact NNL Technology AB.
005: *
006: * This program is free software; you can redistribute it and/or
007: * modify it under the terms of the GNU General Public License
008: * as published by the Free Software Foundation; either version 2
009: * of the License, or (at your option) any later version.
010: *
011: * This program is distributed in the hope that it will be useful,
012: * but WITHOUT ANY WARRANTY; without even the implied warranty of
013: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
014: * GNU General Public License for more details.
015: *
016: * You should have received a copy of the GNU General Public License
017: * along with this program; if not, write to the Free Software
018: * Foundation, Inc., 59 Temple Place - Suite 330, Boston,
019: * MA 02111-1307, USA.
020: */
021:
022: //$Id: ReleaseInfo.java,v 1.9 2005/02/16 11:28:14 jesper Exp $
023: package net.infonode.util;
024:
025: import java.io.Serializable;
026: import java.net.MalformedURLException;
027: import java.net.URL;
028:
029: /**
030: * A class that represents release information for a product
031: *
032: * @author $Author: jesper $
033: * @version $Revision: 1.9 $
034: */
035: public class ReleaseInfo implements Serializable {
036: private static final long serialVersionUID = 1;
037:
038: private String productName;
039: private String productVendor;
040: private String license;
041: private long buildTime;
042: private ProductVersion productVersion;
043: private URL homepage;
044:
045: /**
046: * Constructs a release info object
047: *
048: * @param name product name
049: * @param vendor vendor name
050: * @param buildTime time of nuild in millis
051: * @param version product version
052: * @param license the product license
053: * @param homepage URL to the product homepage
054: */
055: public ReleaseInfo(String name, String vendor, long buildTime,
056: ProductVersion version, String license, String homepage) {
057: this .productName = name;
058: this .productVendor = vendor;
059: this .buildTime = buildTime;
060: this .productVersion = version;
061: this .license = license;
062:
063: try {
064: this .homepage = new URL(homepage);
065: } catch (MalformedURLException e) {
066: throw new RuntimeException(e);
067: }
068: }
069:
070: /**
071: * Gets the product name
072: *
073: * @return Product name
074: */
075: public String getProductName() {
076: return productName;
077: }
078:
079: /**
080: * Gets the product vendor
081: *
082: * @return Product vendor
083: */
084: public String getProductVendor() {
085: return productVendor;
086: }
087:
088: /**
089: * Gets the product license
090: *
091: * @return Product license
092: */
093: public String getLicense() {
094: return license;
095: }
096:
097: /**
098: * Gets the build time in millis
099: *
100: * @return Build time in millis
101: */
102: public long getBuildTime() {
103: return buildTime;
104: }
105:
106: /**
107: * Gets the product version
108: *
109: * @return Product version
110: */
111: public ProductVersion getProductVersion() {
112: return productVersion;
113: }
114:
115: /**
116: * Gets the URL for the product homepage.
117: *
118: * @return the URL for the product homepage
119: */
120: public URL getHomepage() {
121: return homepage;
122: }
123:
124: }
|