Subversion Repositories SmartDukaan

Rev

Rev 22998 | Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
21543 ashik.ali 1
package com.spice.profitmandi.common;
2
 
3
import java.io.InputStream;
4
import java.util.Properties;
5
 
6
import org.slf4j.Logger;
7
import org.slf4j.LoggerFactory;
8
 
9
public class ResponseCodeHolder {
10
 
11
	private static final Logger log = LoggerFactory.getLogger(ResponseCodeHolder.class);
12
	private static final Properties properties = new Properties();
13
	static {
14
		final InputStream in = ResponseCodeHolder.class.getClassLoader().getResourceAsStream("response-codes.properties");
15
		try {
16
			properties.load(in);
17
		} catch (Throwable e) {
18
			log.error("Exception Code Properties could not be loaded", e);
19
		}
20
	}
21
	public static final String getMessage(String code) {
22
		String message = properties.getProperty(code) == null ? "" : properties.getProperty(code);
23
		return message;
24
	}
25
}