001    /**
002     * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portal.kernel.util;
016    
017    import java.text.DateFormat;
018    
019    import java.util.Date;
020    
021    /**
022     * @author Brian Wing Shun Chan
023     */
024    public class ReleaseInfo {
025    
026            static String name = "Liferay Portal Community Edition";
027    
028            static String version = "6.0.5";
029    
030            static String versionDisplayName = "6.0.5 CE";
031    
032            static String codeName = "Bunyan";
033    
034            static String build = "6005";
035    
036            static String date = "August 16, 2010";
037    
038            static String releaseInfoPrefix = System.getProperty(
039                    "liferay.release.info.prefix" , StringPool.BLANK);
040    
041            static String releaseInfoSuffix = System.getProperty(
042                    "liferay.release.info.suffix" , StringPool.BLANK);
043    
044            static String releaseInfo =
045                    releaseInfoPrefix + name + " " + versionDisplayName + " (" + codeName +
046                            " / Build " + build + " / " + date + ")" + releaseInfoSuffix;
047    
048            static String serverInfo = name + " / " + version;
049    
050            public static int RELEASE_4_2_0_BUILD_NUMBER = 3500;
051    
052            public static int RELEASE_4_2_1_BUILD_NUMBER = 3501;
053    
054            public static int RELEASE_4_2_2_BUILD_NUMBER = 3502;
055    
056            public static int RELEASE_4_3_0_BUILD_NUMBER = 4300;
057    
058            public static int RELEASE_4_3_1_BUILD_NUMBER = 4301;
059    
060            public static int RELEASE_4_3_2_BUILD_NUMBER = 4302;
061    
062            public static int RELEASE_4_3_3_BUILD_NUMBER = 4303;
063    
064            public static int RELEASE_4_3_4_BUILD_NUMBER = 4304;
065    
066            public static int RELEASE_4_3_5_BUILD_NUMBER = 4305;
067    
068            public static int RELEASE_4_3_6_BUILD_NUMBER = 4306;
069    
070            public static int RELEASE_4_4_0_BUILD_NUMBER = 4400;
071    
072            public static int RELEASE_5_0_0_BUILD_NUMBER = 5000;
073    
074            public static int RELEASE_5_0_1_BUILD_NUMBER = 5001;
075    
076            public static int RELEASE_5_1_0_BUILD_NUMBER = 5100;
077    
078            public static int RELEASE_5_1_1_BUILD_NUMBER = 5101;
079    
080            public static int RELEASE_5_1_2_BUILD_NUMBER = 5102;
081    
082            public static int RELEASE_5_2_0_BUILD_NUMBER = 5200;
083    
084            public static int RELEASE_5_2_1_BUILD_NUMBER = 5201;
085    
086            public static int RELEASE_5_2_2_BUILD_NUMBER = 5202;
087    
088            public static int RELEASE_5_2_3_BUILD_NUMBER = 5203;
089    
090            public static int RELEASE_6_0_0_BUILD_NUMBER = 6000;
091    
092            public static int RELEASE_6_0_1_BUILD_NUMBER = 6001;
093    
094            public static int RELEASE_6_0_2_BUILD_NUMBER = 6002;
095    
096            public static int RELEASE_6_0_3_BUILD_NUMBER = 6003;
097    
098            public static int RELEASE_6_0_4_BUILD_NUMBER = 6004;
099    
100            public static int RELEASE_6_0_5_BUILD_NUMBER = 6005;
101    
102            public static final String getVersion() {
103                    return version;
104            }
105    
106            public static final String getCodeName() {
107                    return codeName;
108            }
109    
110            public static final int getBuildNumber() {
111                    return Integer.parseInt(build);
112            }
113    
114            public static final Date getBuildDate() {
115                    DateFormat df = DateFormat.getDateInstance(DateFormat.LONG);
116    
117                    return GetterUtil.getDate(date, df);
118            }
119    
120            public static final String getReleaseInfo() {
121                    return releaseInfo;
122            }
123    
124            public static final String getServerInfo() {
125                    return serverInfo;
126            }
127    
128    }