ENDRPrint/.svn/pristine/88/8884c978307571c16e2c68774992e3394de7fd88.svn-base

52 lines
1.2 KiB
Plaintext
Raw Permalink Normal View History

2024-08-14 10:33:27 +07:00
package th.co.muangthai.endrprint.util;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.Properties;
public class MessageUtil{
private static Properties prop;
static {
prop = new Properties();
try {
prop.load(MessageUtil.class.getResourceAsStream("/message.properties"));
} catch (FileNotFoundException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
}
public static String getSaveSuccess() {
return prop.getProperty("msg.save.success");
}
public static String getDeleteSuccess() {
return prop.getProperty("msg.delete.success");
}
public static String getDeleteNonSelected() {
return prop.getProperty("msg.delete.nonselected");
}
public static String getError() {
return prop.getProperty("msg.error");
}
public static String getMessage(String key) {
return prop.getProperty(key);
}
public static String getTitle() {
return prop.getProperty("title.template");
}
public static String getDailyTitle() {
return prop.getProperty("daily.title.template");
}
}