001/* [{
002Copyright 2010 Nicolas Carranza <nicarran at gmail.com>
003
004This file is part of jpen.
005
006jpen is free software: you can redistribute it and/or modify
007it under the terms of the GNU Lesser General Public License as published by
008the Free Software Foundation, either version 3 of the License,
009or (at your option) any later version.
010
011jpen is distributed in the hope that it will be useful,
012but WITHOUT ANY WARRANTY; without even the implied warranty of
013MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
014GNU Lesser General Public License for more details.
015
016You should have received a copy of the GNU Lesser General Public License
017along with jpen.  If not, see <http://www.gnu.org/licenses/>.
018}] */
019package jpen.internal;
020
021import java.util.ResourceBundle;
022
023public final class BuildInfo{
024
025        private static ResourceBundle buildProperties;
026
027        private BuildInfo(){}
028
029        public static ResourceBundle getProperties() {
030                if(buildProperties==null) {
031                        buildProperties=ResourceBundle.getBundle("jpen.build");
032                }
033                return buildProperties;
034        }
035
036        public static String getModuleId(){
037                return getProperties().getString("module.id");
038        }
039
040        public static String getFullVersion(){
041                return getVersion()+"-"+getDistVersion();
042        }
043
044        public static String getVersion(){
045                return getProperties().getString("module.version");
046        }
047
048        public static String getDistVersion(){
049                return getProperties().getString("module.distVersion");
050        }
051}