@Published(tag="architect")
public abstract class TimeZoneAttributeInHttpSupport
extends nablarch.common.handler.threadcontext.TimeZoneAttribute
| 修飾子とタイプ | メソッドと説明 |
|---|---|
protected abstract String |
getKeepingTimeZone(HttpRequest req,
ServletExecutionContext ctx)
保持しているタイムゾーンを取得する。
|
protected TimeZone |
getTimeZone(HttpRequest req,
ServletExecutionContext ctx)
スレッドコンテキストに保持するタイムゾーン属性を返す。
|
Object |
getValue(Request<?> req,
ExecutionContext ctx)
コンテキストスレッドに格納するこのプロパティの値を返す。
|
protected boolean |
isSupportedTimeZone(String timeZone)
サポート対象のタイムゾーンか否かを判定する。
|
protected abstract void |
keepTimeZone(HttpRequest req,
ServletExecutionContext ctx,
String timeZone)
ユーザが選択したタイムゾーンを保持する。
|
void |
setSupportedTimeZones(String... supportedTimeZones)
サポート対象のタイムゾーンを設定する。
|
getKeypublic void setSupportedTimeZones(String... supportedTimeZones)
supportedTimeZones - サポート対象のタイムゾーンprotected boolean isSupportedTimeZone(String timeZone)
timeZone - タイムゾーンpublic Object getValue(Request<?> req, ExecutionContext ctx)
TimeZoneAttributeInHttpSupport.getTimeZone(HttpRequest, ServletExecutionContext)に処理を委譲する。getValue インタフェース内 ThreadContextAttribute<Request<?>>getValue クラス内 nablarch.common.handler.threadcontext.TimeZoneAttributereq - リクエストctx - 実行コンテキストprotected TimeZone getTimeZone(HttpRequest req, ServletExecutionContext ctx)
このクラスの実装では、以下の処理を行う。
1. 保持しているタイムゾーンの取得を試みる。(TimeZoneAttributeInHttpSupport.getKeepingTimeZone(HttpRequest, ServletExecutionContext))
サポート対象のタイムゾーンが取得できた場合は、取得できたタイムゾーンを返す。
サポート対象のタイムゾーンが取得できない場合は2.に進む。
2.デフォルトのタイムゾーンを返す。(TimeZoneAttribute#getValue(Request, ExecutionContext))
req - リクエストctx - 実行コンテキストprotected abstract void keepTimeZone(HttpRequest req, ServletExecutionContext ctx, String timeZone)
req - リクエストctx - 実行コンテキストtimeZone - ユーザが選択したタイムゾーンprotected abstract String getKeepingTimeZone(HttpRequest req, ServletExecutionContext ctx)
req - リクエストctx - 実行コンテキスト