import java.util.HashMap;
import java.util.Map;
import java.util.ResourceBundle;
/**
* @ClassName: ResourceUtils
* @Description: 项目参数工具类
* @author Bert
* @date 2011-10-6 上午10:19:17
*
*/
public class ResourceUtils {
private static final ResourceBundle bundle = java.util.ResourceBundle.getBundle("resource");
public static final Map<String, String> map = new HashMap<String, String>();
static {
map.put("01", "大型汽车");
map.put("02", "小型汽车");
map.put("03", "使馆汽车");
map.put("04", "领馆汽车");
map.put("05", "境外汽车");
map.put("06", "外籍汽车");
map.put("07", "普通摩托车");
map.put("08", "轻便摩托车");
map.put("09", "使馆摩托车");
map.put("10", "领馆摩托车");
map.put("11", "境外摩托车");
map.put("12", "外籍摩托车");
map.put("13", "低速车");
map.put("14", "拖拉机");
map.put("15", "挂车");
map.put("16", "教练汽车");
map.put("17", "教练摩托车");
map.put("18", "试验汽车");
map.put("19", "试验摩托车");
map.put("20", "临时入境汽车");
map.put("21", "临时入境摩托车");
map.put("22", "临时行驶车");
map.put("23", "警用汽车");
map.put("24", "警用摩托");
map.put("25", "原农机号牌");
map.put("26", "香港入出境车");
map.put("27", "澳门入出境车");
map.put("31", "武警号牌");
map.put("32", "军队号牌");
map.put("41", "无号牌");
map.put("42", "假号牌");
map.put("43", "挪用号牌");
map.put("99", "其他号牌");
}
private ResourceUtils() {
}
/**
* 获得sessionInfo名字
*
* @return
*/
public static final String getSessionInfoName() {
return bundle.getString("sessionInfoName");
}
/**
* 获得sessionInfo名字
*
* @return
*/
public static final String getIpAddr() {
return bundle.getString("ipaddr");
}
/**
* 获取资讯新闻地址
* @return
*/
public static final String getListTask() {
return bundle.getString("listTask");
}
/**
* 获得上传表单域的名称
*
* @return
*/
public static final String getUploadFieldName() {
return bundle.getString("uploadFieldName");
}
/**
* 获得上传logo路径
*
* @return
*/
public static final String getuploadlogoName(){
return bundle.getString("uploadlogoName");
}
/**
* 获得上传滚动图片路径
*
* @return
*/
public static final String getuploadScrollPicName(){
return bundle.getString("uploadScrollPicName");
}
/**
* 获得上传productType路径
*
* @return
*/
public static final String getuploadProductTypeName(){
return bundle.getString("uploadProductTypeName");
}
/**
* 获得上传prize路径
*
* @return
*/
public static final String getuploadPrizeName(){
return bundle.getString("uploadPrizeName");
}
/**
* 获得上传prize路径
*
* @return
*/
public static final String getUpload3DName(){
return bundle.getString("upload3D");
}
/**
* 获得上传productType路径
*
* @return
*/
public static final String getuploadProductName(){
return bundle.getString("uploadProductName");
}
/**
* 获得上传文件的最大大小限制
*
* @return
*/
public static final long getUploadFileMaxSize() {
return Long.valueOf(bundle.getString("uploadFileMaxSize"));
}
/**
* 获得允许上传文件的扩展名
*
* @return
*/
public static final String getUploadFileExts() {
return bundle.getString("uploadFileExts");
}
/**
* 文件上传文件的扩展名
*
* @return
*/
public static final String getUploadFile() {
return bundle.getString("uploadFile");
}
/**
* 图片上传文件的扩展名
*
* @return
*/
public static final String getUploalFilePhoto() {
return bundle.getString("uploalFilePhoto");
}
/**
* 获得上传文件要放到那个目录
*
* @return
*/
public static final String getUploadDirectory() {
return bundle.getString("uploadDirectory");
}
/**
* 获得服务者公司名
*
* @return
*/
public static final String getCompany() {
return bundle.getString("company");
}
/**
* 获得号牌种类名
*
* @return
*/
public static final String getHpzl(String hpzl) {
return bundle.getString(hpzl);
}
/**
* 获取AppId
* @return
*/
public static final String getAppId() {
return bundle.getString("postal_appId");
}
/**
* 获取AppSecret
* @return
*/
public static final String getAppSecret() {
return bundle.getString("postal_appSecret");
}
}
import java.util.Map;
import java.util.ResourceBundle;
/**
* @ClassName: ResourceUtils
* @Description: 项目参数工具类
* @author Bert
* @date 2011-10-6 上午10:19:17
*
*/
public class ResourceUtils {
private static final ResourceBundle bundle = java.util.ResourceBundle.getBundle("resource");
public static final Map<String, String> map = new HashMap<String, String>();
static {
map.put("01", "大型汽车");
map.put("02", "小型汽车");
map.put("03", "使馆汽车");
map.put("04", "领馆汽车");
map.put("05", "境外汽车");
map.put("06", "外籍汽车");
map.put("07", "普通摩托车");
map.put("08", "轻便摩托车");
map.put("09", "使馆摩托车");
map.put("10", "领馆摩托车");
map.put("11", "境外摩托车");
map.put("12", "外籍摩托车");
map.put("13", "低速车");
map.put("14", "拖拉机");
map.put("15", "挂车");
map.put("16", "教练汽车");
map.put("17", "教练摩托车");
map.put("18", "试验汽车");
map.put("19", "试验摩托车");
map.put("20", "临时入境汽车");
map.put("21", "临时入境摩托车");
map.put("22", "临时行驶车");
map.put("23", "警用汽车");
map.put("24", "警用摩托");
map.put("25", "原农机号牌");
map.put("26", "香港入出境车");
map.put("27", "澳门入出境车");
map.put("31", "武警号牌");
map.put("32", "军队号牌");
map.put("41", "无号牌");
map.put("42", "假号牌");
map.put("43", "挪用号牌");
map.put("99", "其他号牌");
}
private ResourceUtils() {
}
/**
* 获得sessionInfo名字
*
* @return
*/
public static final String getSessionInfoName() {
return bundle.getString("sessionInfoName");
}
/**
* 获得sessionInfo名字
*
* @return
*/
public static final String getIpAddr() {
return bundle.getString("ipaddr");
}
/**
* 获取资讯新闻地址
* @return
*/
public static final String getListTask() {
return bundle.getString("listTask");
}
/**
* 获得上传表单域的名称
*
* @return
*/
public static final String getUploadFieldName() {
return bundle.getString("uploadFieldName");
}
/**
* 获得上传logo路径
*
* @return
*/
public static final String getuploadlogoName(){
return bundle.getString("uploadlogoName");
}
/**
* 获得上传滚动图片路径
*
* @return
*/
public static final String getuploadScrollPicName(){
return bundle.getString("uploadScrollPicName");
}
/**
* 获得上传productType路径
*
* @return
*/
public static final String getuploadProductTypeName(){
return bundle.getString("uploadProductTypeName");
}
/**
* 获得上传prize路径
*
* @return
*/
public static final String getuploadPrizeName(){
return bundle.getString("uploadPrizeName");
}
/**
* 获得上传prize路径
*
* @return
*/
public static final String getUpload3DName(){
return bundle.getString("upload3D");
}
/**
* 获得上传productType路径
*
* @return
*/
public static final String getuploadProductName(){
return bundle.getString("uploadProductName");
}
/**
* 获得上传文件的最大大小限制
*
* @return
*/
public static final long getUploadFileMaxSize() {
return Long.valueOf(bundle.getString("uploadFileMaxSize"));
}
/**
* 获得允许上传文件的扩展名
*
* @return
*/
public static final String getUploadFileExts() {
return bundle.getString("uploadFileExts");
}
/**
* 文件上传文件的扩展名
*
* @return
*/
public static final String getUploadFile() {
return bundle.getString("uploadFile");
}
/**
* 图片上传文件的扩展名
*
* @return
*/
public static final String getUploalFilePhoto() {
return bundle.getString("uploalFilePhoto");
}
/**
* 获得上传文件要放到那个目录
*
* @return
*/
public static final String getUploadDirectory() {
return bundle.getString("uploadDirectory");
}
/**
* 获得服务者公司名
*
* @return
*/
public static final String getCompany() {
return bundle.getString("company");
}
/**
* 获得号牌种类名
*
* @return
*/
public static final String getHpzl(String hpzl) {
return bundle.getString(hpzl);
}
/**
* 获取AppId
* @return
*/
public static final String getAppId() {
return bundle.getString("postal_appId");
}
/**
* 获取AppSecret
* @return
*/
public static final String getAppSecret() {
return bundle.getString("postal_appSecret");
}
}