1   /**
2    * Copyright (c) 2000-2009 Liferay, Inc. All rights reserved.
3    *
4    * The contents of this file are subject to the terms of the Liferay Enterprise
5    * Subscription License ("License"). You may not use this file except in
6    * compliance with the License. You can obtain a copy of the License by
7    * contacting Liferay, Inc. See the License for the specific language governing
8    * permissions and limitations under the License, including but not limited to
9    * distribution rights of the Software.
10   *
11   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
12   * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
13   * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
14   * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
15   * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
16   * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
17   * SOFTWARE.
18   */
19  
20  package com.liferay.portal.kernel.util;
21  
22  import java.text.DateFormat;
23  
24  import java.util.Date;
25  
26  /**
27   * <a href="ReleaseInfo.java.html"><b><i>View Source</i></b></a>
28   *
29   * @author Brian Wing Shun Chan
30   *
31   */
32  public class ReleaseInfo {
33  
34      static String name = "Liferay Portal Enterprise Edition";
35  
36      static String version = "5.2.4";
37  
38      static String codeName = "Augustine";
39  
40      static String build = "5204";
41  
42      static String date = "May 29, 2009";
43  
44      static String releaseInfoPrefix = System.getProperty(
45          "liferay.release.info.prefix" , StringPool.BLANK);
46  
47      static String releaseInfoSuffix = System.getProperty(
48          "liferay.release.info.suffix" , StringPool.BLANK);
49  
50      static String releaseInfo =
51          releaseInfoPrefix + name + " " + version + " (" + codeName +
52              " / Build " + build + " / " + date + ")" + releaseInfoSuffix;
53  
54      static String serverInfo = name + " / " + version;
55  
56      public static int RELEASE_4_2_0_BUILD_NUMBER = 3500;
57  
58      public static int RELEASE_4_2_1_BUILD_NUMBER = 3501;
59  
60      public static int RELEASE_4_2_2_BUILD_NUMBER = 3502;
61  
62      public static int RELEASE_4_3_0_BUILD_NUMBER = 4300;
63  
64      public static int RELEASE_4_3_1_BUILD_NUMBER = 4301;
65  
66      public static int RELEASE_4_3_2_BUILD_NUMBER = 4302;
67  
68      public static int RELEASE_4_3_3_BUILD_NUMBER = 4303;
69  
70      public static int RELEASE_4_3_4_BUILD_NUMBER = 4304;
71  
72      public static int RELEASE_4_3_5_BUILD_NUMBER = 4305;
73  
74      public static int RELEASE_4_3_6_BUILD_NUMBER = 4306;
75  
76      public static int RELEASE_4_4_0_BUILD_NUMBER = 4400;
77  
78      public static int RELEASE_5_0_0_BUILD_NUMBER = 5000;
79  
80      public static int RELEASE_5_0_1_BUILD_NUMBER = 5001;
81  
82      public static int RELEASE_5_1_0_BUILD_NUMBER = 5100;
83  
84      public static int RELEASE_5_1_1_BUILD_NUMBER = 5101;
85  
86      public static int RELEASE_5_1_2_BUILD_NUMBER = 5102;
87  
88      public static int RELEASE_5_2_0_BUILD_NUMBER = 5200;
89  
90      public static int RELEASE_5_2_1_BUILD_NUMBER = 5201;
91  
92      public static int RELEASE_5_2_2_BUILD_NUMBER = 5202;
93  
94      public static int RELEASE_5_2_3_BUILD_NUMBER = 5203;
95  
96      public static int RELEASE_5_2_4_BUILD_NUMBER = 5204;
97  
98      public static final String getVersion() {
99          return version;
100     }
101 
102     public static final String getCodeName() {
103         return codeName;
104     }
105 
106     public static final int getBuildNumber() {
107         return Integer.parseInt(build);
108     }
109 
110     public static final Date getBuildDate() {
111         DateFormat df = DateFormat.getDateInstance(DateFormat.LONG);
112 
113         return GetterUtil.getDate(date, df);
114     }
115 
116     public static final String getReleaseInfo() {
117         return releaseInfo;
118     }
119 
120     public static final String getServerInfo() {
121         return serverInfo;
122     }
123 
124 }