⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 actionresource.java

📁 webwork study w ebwork study
💻 JAVA
字号:
package jaction.workspace;

import jaction.utility.MessageResources;
import jaction.utility.SysLogger;
import jaction.utility.FileUtil;
import jaction.utility.StringUtil;

import java.io.UnsupportedEncodingException;

/**
 * action 配置资源类
 * @author yanger
 * @version 1.4  $2003-5-4 10:15:32
 */
public class ActionResource {

	/**
     *  action资源绑定对象.
     */
    private static  MessageResources resource = MessageResources.getMessageResources("jaction.workspace.LocalStrings");
	
	//-------------------------------------------------------------------------------------->构造函数
	/**
	 * 构造函数
	 */
	public ActionResource(){
		FileUtil.log("Loading ActionResource <jaction.workspace.LocalStrings...>");
	}
	
	//-------------------------------------------------------------------------------------->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 value1 替换变量
	 * @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 value1 替换变量
	 * @param value2 替换变量
	 * @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 + -