nablarch.common.handler.threadcontext
クラス LanguageAttribute

java.lang.Object
  上位を拡張 nablarch.common.handler.threadcontext.LanguageAttribute
すべての実装されたインタフェース:
ThreadContextAttribute<nablarch.fw.Request<?>>

public class LanguageAttribute
extends java.lang.Object
implements ThreadContextAttribute<nablarch.fw.Request<?>>

スレッドコンテキストに保持する言語属性。


コンストラクタの概要
LanguageAttribute()
           
 
メソッドの概要
 java.lang.String getKey()
          スレッドコンテキストに格納する際に使用するプロパティのキー名を返す。
 java.lang.Object getValue(nablarch.fw.Request<?> req, nablarch.fw.ExecutionContext ctx)
          スレッドコンテキストに格納するプロパティの値を返す。
 void setDefaultLanguage(java.lang.String defaultLanguage)
          スレッドコンテキストに格納されるデフォルトの言語を設定する。
 
クラス java.lang.Object から継承されたメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

コンストラクタの詳細

LanguageAttribute

public LanguageAttribute()
メソッドの詳細

getKey

public java.lang.String getKey()
スレッドコンテキストに格納する際に使用するプロパティのキー名を返す。
 ThreadContext.LANG_KEY を使用する。
 

定義:
インタフェース ThreadContextAttribute<nablarch.fw.Request<?>> 内の getKey
戻り値:
プロパティのキー名

setDefaultLanguage

public void setDefaultLanguage(java.lang.String defaultLanguage)
スレッドコンテキストに格納されるデフォルトの言語を設定する。
 明示的に指定しなかった場合、システムデフォルトロケールが使用される。
 

パラメータ:
defaultLanguage - デフォルトロケールを表す文字列
関連項目:
Locale.getDefault()

getValue

public java.lang.Object getValue(nablarch.fw.Request<?> req,
                                 nablarch.fw.ExecutionContext ctx)
スレッドコンテキストに格納するプロパティの値を返す。
 現行の実装では初期設定されたデフォルトロケールを返す。
 

定義:
インタフェース ThreadContextAttribute<nablarch.fw.Request<?>> 内の getValue
パラメータ:
req - ハンドラの入力データ
ctx - 実行コンテキスト情報
戻り値:
プロパティの値