keycloak-service
公開メンバ関数 | 非公開変数類 | 全メンバ一覧
org.keycloak.theme.beans.AdvancedMessageFormatterMethod クラス
org.keycloak.theme.beans.AdvancedMessageFormatterMethod の継承関係図
Inheritance graph
org.keycloak.theme.beans.AdvancedMessageFormatterMethod 連携図
Collaboration graph

公開メンバ関数

 AdvancedMessageFormatterMethod (Locale locale, Properties messages)
 
Object exec (List list) throws TemplateModelException
 

非公開変数類

final Properties messages
 
final Locale locale
 

詳解

著者
Michael Gerber

構築子と解体子

◆ AdvancedMessageFormatterMethod()

org.keycloak.theme.beans.AdvancedMessageFormatterMethod.AdvancedMessageFormatterMethod ( Locale  locale,
Properties  messages 
)
inline
35  {
36  this.locale = locale;
37  this.messages = messages;
38  }
final Locale locale
Definition: AdvancedMessageFormatterMethod.java:33
final Properties messages
Definition: AdvancedMessageFormatterMethod.java:32

関数詳解

◆ exec()

Object org.keycloak.theme.beans.AdvancedMessageFormatterMethod.exec ( List  list) throws TemplateModelException
inline
41  {
42  if (list.size() >= 1) {
43  String key = list.get(0).toString();
44  if (key.startsWith("${") && key.endsWith("}")) {
45  key = key.substring(2, key.length() - 1);
46  return new MessageFormat(messages.getProperty(key, key), locale).format(list.subList(1, list.size()).toArray());
47  } else {
48  return key;
49  }
50  }
51  return null;
52  }
final Locale locale
Definition: AdvancedMessageFormatterMethod.java:33
final Properties messages
Definition: AdvancedMessageFormatterMethod.java:32

メンバ詳解

◆ locale

final Locale org.keycloak.theme.beans.AdvancedMessageFormatterMethod.locale
private

◆ messages

final Properties org.keycloak.theme.beans.AdvancedMessageFormatterMethod.messages
private

このクラス詳解は次のファイルから抽出されました: