📄 actionerrorresource.java
字号:
package jaction.workspace;
import jaction.utility.MessageResources;
import jaction.utility.SysLogger;
import jaction.utility.FileUtil;
import jaction.utility.StringUtil;
import java.io.UnsupportedEncodingException;
/**
* 错误资源类
* @author yanger
* @version 1.4 2003-5-1 3:01:02
*/
public class ActionErrorResource {
/**
* 错误资源绑定对象.
* <b>在CLASSPATH中package:jaction下寻找Errors.properties</b><br>
* Errors.properties格式:key=message(key :错误标志,message:错误信息)
*/
private static MessageResources resource = MessageResources.getMessageResources("jaction.Errors");
//-------------------------------------------------------------------------------------->构造函数
/**
* 构造函数
*/
public ActionErrorResource(){
FileUtil.log("Loading ActionErrorResource <jaction.Errors...>");
}
//-------------------------------------------------------------------------------------->static methods
/**
* 得到错误消息
* @param key 错误标志
* @return String 错误消息
*/
public static String getMessage(String key){
String msg = resource.getMessage(key);
msg = StringUtil.CharSetConvert(msg,StringUtil.ISO_8859_1,StringUtil.GBK);
return msg;
}
/**
* 得到错误消息
* @param key 错误标志
* @param String 替换参数1
* @return String 错误消息
*/
public static String getMessage(String key,String value1){
String msg = resource.getMessage(key,value1);
msg = StringUtil.CharSetConvert(msg,StringUtil.ISO_8859_1,StringUtil.GBK);
return msg;
}
/**
* 得到错误消息
* @param key 错误标志
* @param String 替换参数1
* @param String 替换参数2
* @return String 错误消息
*/
public static String getMessage(String key,String value1,String value2){
String msg = resource.getMessage(key,value1,value2);
msg = StringUtil.CharSetConvert(msg,StringUtil.ISO_8859_1,StringUtil.GBK);
return msg;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -