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