📄 intramartmessagepropertyhandler.java
字号:
/*
* IntramartMessagePropertyHandler.java
*
* Created on 2002/02/28, 11:34
*/
package jp.co.intra_mart.framework.system.message;
import jp.co.intra_mart.foundation.security.exception.AccessSecurityException;
import jp.co.intra_mart.foundation.security.message.MessageManager;
import jp.co.intra_mart.framework.system.property.PropertyHandlerException;
import jp.co.intra_mart.framework.system.property.PropertyParam;
/**
* 僀儞僩儔儅乕僩偱愝掕偝傟偨儊僢僙乕僕偵傾僋僙僗偡傞儊僢僙乕僕僾儘僷僥傿僴儞僪儔偱偡丅
*
* @author INTRAMART
* @version 1.0
*/
public class IntramartMessagePropertyHandler implements MessagePropertyHandler {
// 儊僢僙乕僕儅僱乕僕儍
private MessageManager manager;
/**
* IntramartMessagePropertyHandler傪怴婯偵惗惉偟傑偡丅
*/
public IntramartMessagePropertyHandler() {
}
/**
* 僾儘僷僥傿僴儞僪儔傪弶婜壔偟傑偡丅
*
* @param params 弶婜僷儔儊乕僞
* @throws PropertyHandlerException 僾儘僷僥傿僴儞僪儔偺弶婜壔帪偵椺奜偑敪惗
*/
public void init(PropertyParam[] params) throws PropertyHandlerException {
// 儊僢僙乕僕儅僱乕僕儍傪弶婜壔
manager = MessageManager.getInstance();
}
/**
* 僉乕偵奩摉偡傞儊僢僙乕僕傪庢摼偟傑偡丅
* 奩摉偡傞僉乕偑懚嵼偟側偄応崌丄嬻暥帤楍傪曉偟傑偡丅
*
* @param key 儊僢僙乕僕偺僉乕
* @param loginGroup 儘僌僀儞僌儖乕僾
* @return 儊僢僙乕僕
* @deprecated intra-mart v5.0偐傜偺儊僢僙乕僕儅僗僞偵偼儘僌僀儞僌儖乕僾偺奣擮偑偁傝傑偣傫丅<BR>
* 僷儔儊乕僞loginGroup偼幚嵺偵偼巊梡偟傑偣傫丅{@link #getMessage(String)}傪巊梡偟偰偔偩偝偄丅
*/
public String getMessage(String key, String loginGroup) {
String message = null;
try {
message = manager.getMessage(key);
} catch (AccessSecurityException e) {
message = "";
}
return message;
}
/**
* 僉乕偵奩摉偡傞儊僢僙乕僕傪庢摼偟傑偡丅
* 奩摉偡傞僉乕偑懚嵼偟側偄応崌丄嬻暥帤楍傪曉偟傑偡丅
*
* @param key 儊僢僙乕僕偺僉乕
* @return 儊僢僙乕僕
* @since 5.0
*/
public String getMessage(String key) {
String message = null;
try {
message = manager.getMessage(key);
} catch (AccessSecurityException e) {
message = "";
}
return message;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -