?? 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 + -