Class LanguageAttributeInHttpSession
java.lang.Object
nablarch.common.handler.threadcontext.LanguageAttribute
nablarch.common.web.handler.threadcontext.HttpLanguageAttribute
nablarch.common.web.handler.threadcontext.LanguageAttributeInHttpSupport
nablarch.common.web.handler.threadcontext.LanguageAttributeInHttpSession
- All Implemented Interfaces:
ThreadContextAttribute<Request<?>>
@Published(tag="architect")
public class LanguageAttributeInHttpSession
extends LanguageAttributeInHttpSupport
HTTPセッションを使用して言語の保持を行うクラス。
- Author:
- Kiyohito Itoh
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected String保持している言語を取得する。protected String言語が格納されるセッション上のキー名を取得する。protected voidkeepLanguage(HttpRequest req, ServletExecutionContext ctx, String language) ユーザが選択した言語を保持する。voidsetSessionKey(String sessionKey) 言語が格納されるセッション上のキー名を設定する。Methods inherited from class nablarch.common.web.handler.threadcontext.LanguageAttributeInHttpSupport
getLocaleMethods inherited from class nablarch.common.web.handler.threadcontext.HttpLanguageAttribute
getAcceptLanguage, getValue, isSupportedLanguage, setSupportedLanguagesMethods inherited from class nablarch.common.handler.threadcontext.LanguageAttribute
getKey, setDefaultLanguage
-
Constructor Details
-
LanguageAttributeInHttpSession
public LanguageAttributeInHttpSession()
-
-
Method Details
-
setSessionKey
言語が格納されるセッション上のキー名を設定する。- Parameters:
sessionKey- 言語が格納されるセッション上のキー名
-
keepLanguage
Description copied from class:LanguageAttributeInHttpSupportユーザが選択した言語を保持する。- Specified by:
keepLanguagein classLanguageAttributeInHttpSupport- Parameters:
req- リクエストctx- 実行コンテキストlanguage- ユーザが選択した言語
-
getKeepingLanguage
Description copied from class:LanguageAttributeInHttpSupport保持している言語を取得する。- Specified by:
getKeepingLanguagein classLanguageAttributeInHttpSupport- Parameters:
req- リクエストctx- 実行コンテキスト- Returns:
- 言語。保持していない場合はnull
-
getSessionKey
言語が格納されるセッション上のキー名を取得する。sessionKeyプロパティが設定されていない場合は、 nablarch.common.handler.threadcontext.LanguageAttribute#getKey()の値を使用する。- Returns:
- 言語が格納されるセッション上のキー名
-