1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * This library is free software; you can redistribute it and/or modify it under
5    * the terms of the GNU Lesser General Public License as published by the Free
6    * Software Foundation; either version 2.1 of the License, or (at your option)
7    * any later version.
8    *
9    * This library is distributed in the hope that it will be useful, but WITHOUT
10   * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11   * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
12   * details.
13   */
14  
15  package com.liferay.portal.kernel.util;
16  
17  import java.text.DateFormat;
18  
19  import java.util.Date;
20  
21  /**
22   * <a href="ReleaseInfo.java.html"><b><i>View Source</i></b></a>
23   *
24   * @author Brian Wing Shun Chan
25   */
26  public class ReleaseInfo {
27  
28      static String name = "Liferay Portal Community Edition";
29  
30      static String version = "6.0.0";
31  
32      static String versionDisplayName = "6.0.0 CE";
33  
34      static String codeName = "Bunyan";
35  
36      static String build = "6000";
37  
38      static String date = "March 3, 2010";
39  
40      static String releaseInfoPrefix = System.getProperty(
41          "liferay.release.info.prefix" , StringPool.BLANK);
42  
43      static String releaseInfoSuffix = System.getProperty(
44          "liferay.release.info.suffix" , StringPool.BLANK);
45  
46      static String releaseInfo =
47          releaseInfoPrefix + name + " " + versionDisplayName + " (" + codeName +
48              " / Build " + build + " / " + date + ")" + releaseInfoSuffix;
49  
50      static String serverInfo = name + " / " + version;
51  
52      public static int RELEASE_4_2_0_BUILD_NUMBER = 3500;
53  
54      public static int RELEASE_4_2_1_BUILD_NUMBER = 3501;
55  
56      public static int RELEASE_4_2_2_BUILD_NUMBER = 3502;
57  
58      public static int RELEASE_4_3_0_BUILD_NUMBER = 4300;
59  
60      public static int RELEASE_4_3_1_BUILD_NUMBER = 4301;
61  
62      public static int RELEASE_4_3_2_BUILD_NUMBER = 4302;
63  
64      public static int RELEASE_4_3_3_BUILD_NUMBER = 4303;
65  
66      public static int RELEASE_4_3_4_BUILD_NUMBER = 4304;
67  
68      public static int RELEASE_4_3_5_BUILD_NUMBER = 4305;
69  
70      public static int RELEASE_4_3_6_BUILD_NUMBER = 4306;
71  
72      public static int RELEASE_4_4_0_BUILD_NUMBER = 4400;
73  
74      public static int RELEASE_5_0_0_BUILD_NUMBER = 5000;
75  
76      public static int RELEASE_5_0_1_BUILD_NUMBER = 5001;
77  
78      public static int RELEASE_5_1_0_BUILD_NUMBER = 5100;
79  
80      public static int RELEASE_5_1_1_BUILD_NUMBER = 5101;
81  
82      public static int RELEASE_5_1_2_BUILD_NUMBER = 5102;
83  
84      public static int RELEASE_5_2_0_BUILD_NUMBER = 5200;
85  
86      public static int RELEASE_5_2_1_BUILD_NUMBER = 5201;
87  
88      public static int RELEASE_5_2_2_BUILD_NUMBER = 5202;
89  
90      public static int RELEASE_5_2_3_BUILD_NUMBER = 5203;
91  
92      public static int RELEASE_6_0_0_BUILD_NUMBER = 6000;
93  
94      public static final String getVersion() {
95          return version;
96      }
97  
98      public static final String getCodeName() {
99          return codeName;
100     }
101 
102     public static final int getBuildNumber() {
103         return Integer.parseInt(build);
104     }
105 
106     public static final Date getBuildDate() {
107         DateFormat df = DateFormat.getDateInstance(DateFormat.LONG);
108 
109         return GetterUtil.getDate(date, df);
110     }
111 
112     public static final String getReleaseInfo() {
113         return releaseInfo;
114     }
115 
116     public static final String getServerInfo() {
117         return serverInfo;
118     }
119 
120 }