1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
|
public class BasePropertyMessageResources extends PropertyMessageResources {
public BasePropertyMessageResources(MessageResourcesFactory factory,String
config) {
super(factory, config);
log.info("Initializing, config='" + config + "'");
}
public BasePropertyMessageResources(MessageResourcesFactory factory,String
config, boolean returnNull) {
super(factory, config, returnNull);
log.info("Initializing, config='" + config +"', returnNull=" +
returnNull);
}
public void reset(){
try{
messages.clear();
locales.clear();
formats.clear();
}catch(Exception e){
DefaultExceptionHandler.handleException(getClass(), e);
}
}
protected HashMap locales = new HashMap();
protected static final Log log=LogFactory.getLog(BasePropertyMessageResources.class);
public String getMessage(String pLogin, String pPassword, Locale pLocale, String pKey){
return (String)PmsResourceService.getInstance().getResource(pLogin, pPassword, pLocale.getLanguage(), pKey);
}
public String getMessage(Locale pLocale, String pKey){
return (String)PmsResourceService.getInstance().getResource(Application.getDbUser() , Application.getDbPasswd(), pLocale.getLanguage(), pKey);
}
} |
Partager