1   /**
2    * Copyright (c) 2000-2010 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   *
12   *
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 Enterprise Edition";
29  
30      static String version = "5.2.9";
31  
32      static String versionDisplayName = "5.2 EE SP5";
33  
34      static String codeName = "Augustine";
35  
36      static String build = "5209";
37  
38      static String date = "October 20, 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_5_2_4_BUILD_NUMBER = 5204;
93  
94      public static int RELEASE_5_2_5_BUILD_NUMBER = 5205;
95  
96      public static int RELEASE_5_2_6_BUILD_NUMBER = 5206;
97  
98      public static int RELEASE_5_2_7_BUILD_NUMBER = 5207;
99  
100     public static int RELEASE_5_2_8_BUILD_NUMBER = 5208;
101 
102     public static int RELEASE_5_2_9_BUILD_NUMBER = 5209;
103 
104     public static final String getVersion() {
105         return version;
106     }
107 
108     public static final String getCodeName() {
109         return codeName;
110     }
111 
112     public static final int getBuildNumber() {
113         return Integer.parseInt(build);
114     }
115 
116     public static final Date getBuildDate() {
117         DateFormat df = DateFormat.getDateInstance(DateFormat.LONG);
118 
119         return GetterUtil.getDate(date, df);
120     }
121 
122     public static final String getReleaseInfo() {
123         return releaseInfo;
124     }
125 
126     public static final String getServerInfo() {
127         return serverInfo;
128     }
129 
130 }