Class LanguageAttribute
java.lang.Object
nablarch.common.handler.threadcontext.LanguageAttribute
- All Implemented Interfaces:
ThreadContextAttribute<Request<?>>
- Direct Known Subclasses:
HttpLanguageAttribute
スレッドコンテキストに保持する言語属性。
- Author:
- Iwauo Tajima
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetKey()スレッドコンテキストに格納する際に使用するプロパティのキー名を返す。getValue(Request<?> req, ExecutionContext ctx) スレッドコンテキストに格納するプロパティの値を返す。voidsetDefaultLanguage(String defaultLanguage) スレッドコンテキストに格納されるデフォルトの言語を設定する。
-
Constructor Details
-
LanguageAttribute
public LanguageAttribute()
-
-
Method Details
-
getKey
スレッドコンテキストに格納する際に使用するプロパティのキー名を返す。ThreadContext.LANG_KEYを使用する。- Specified by:
getKeyin interfaceThreadContextAttribute<Request<?>>- Returns:
- プロパティのキー名
-
setDefaultLanguage
スレッドコンテキストに格納されるデフォルトの言語を設定する。明示的に指定しなかった場合、システムデフォルトロケールが使用される。
- Parameters:
defaultLanguage- デフォルトロケールを表す文字列- See Also:
-
getValue
スレッドコンテキストに格納するプロパティの値を返す。現行の実装では初期設定されたデフォルトロケールを返す。
- Specified by:
getValuein interfaceThreadContextAttribute<Request<?>>- Parameters:
req- ハンドラの入力データctx- 実行コンテキスト情報- Returns:
- プロパティの値
-