Rev 22998 | View as "text/plain" | Blame | Compare with Previous | Last modification | View Log | RSS feed
package com.spice.profitmandi.common;import java.io.InputStream;import java.util.Properties;import org.apache.logging.log4j.Logger;import org.apache.logging.log4j.LogManager;public class ResponseCodeHolder {private static final Logger log = LogManager.getLogger(ResponseCodeHolder.class);private static final Properties properties = new Properties();static {final InputStream in = ResponseCodeHolder.class.getClassLoader().getResourceAsStream("response-codes.properties");try {properties.load(in);} catch (Throwable e) {log.error("Exception Code Properties could not be loaded", e);}}public static final String getMessage(String code) {String message = properties.getProperty(code) == null ? code : properties.getProperty(code);return message;}}