クラス XsltViewResolver
java.lang.ObjectSE
org.springframework.context.support.ApplicationObjectSupport
org.springframework.web.context.support.WebApplicationObjectSupport
org.springframework.web.servlet.view.AbstractCachingViewResolver
org.springframework.web.servlet.view.UrlBasedViewResolver
org.springframework.web.servlet.view.xslt.XsltViewResolver
- 実装されているすべてのインターフェース:
- Aware、- ApplicationContextAware、- Ordered、- ServletContextAware、- ViewResolver
 指定されたビュー名を XSLT スタイルシートの URL に変換することにより、
XsltView のインスタンスを解決する ViewResolver 実装。- 導入:
- 2.0
- 作成者:
- Rob Harrop, Juergen Hoeller
- ネストされたクラスの要約- クラス org.springframework.web.servlet.view.AbstractCachingViewResolver から継承されたネストクラス / インターフェース- AbstractCachingViewResolver.CacheFilter
- フィールドのサマリー- クラス org.springframework.web.servlet.view.UrlBasedViewResolver から継承されたフィールド- FORWARD_URL_PREFIX, REDIRECT_URL_PREFIX- クラス org.springframework.web.servlet.view.AbstractCachingViewResolver から継承されたフィールド- DEFAULT_CACHE_LIMIT- クラス org.springframework.context.support.ApplicationObjectSupport から継承されたフィールド- logger- インターフェース org.springframework.core.Ordered から継承されたフィールド- HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
- コンストラクターの概要コンストラクター
- メソッドのサマリー修飾子と型メソッド説明- protected AbstractUrlBasedView指定されたビュークラスの新しい View インスタンスを作成して構成します。- protected AbstractUrlBasedView指定されたビュークラスをインスタンス化します。- protected ClassSE<?>このリゾルバーに必要なビューの型を返します。- void- setCacheTemplates- (boolean cacheTemplates) XSLT テンプレートのキャッシュをオンまたはオフにします。- void- setErrorListener- (ErrorListenerSE errorListener) 変換エラーと警告のカスタム処理のために- ErrorListenerSE インターフェースの実装を設定します。- void- setIndent- (boolean indent) XSLT トランスフォーマーが結果ツリーを出力するときに空白を追加するかどうかを設定します。- void- setOutputProperties- (PropertiesSE outputProperties) スタイルシートに適用される任意のトランスフォーマー出力プロパティを設定します。- void- setSourceKey- (StringSE sourceKey) XSLT ソースを表すモデル属性の名前を設定します。- void- setUriResolver- (URIResolverSE uriResolver) 変換で使用される URIResolver を設定します。- クラス org.springframework.web.servlet.view.UrlBasedViewResolver から継承されたメソッド- applyLifecycleMethods, canHandle, createView, getAttributesMap, getCacheKey, getContentType, getExposeContextBeansAsAttributes, getExposedContextBeanNames, getExposePathVariables, getOrder, getPrefix, getRedirectHosts, getRequestContextAttribute, getSuffix, getViewClass, getViewNames, initApplicationContext, isRedirectContextRelative, isRedirectHttp10Compatible, loadView, setAttributes, setAttributesMap, setContentType, setExposeContextBeansAsAttributes, setExposedContextBeanNames, setExposePathVariables, setOrder, setPrefix, setRedirectContextRelative, setRedirectHosts, setRedirectHttp10Compatible, setRequestContextAttribute, setSuffix, setViewClass, setViewNames- クラス org.springframework.web.servlet.view.AbstractCachingViewResolver から継承されたメソッド- clearCache, getCacheFilter, getCacheLimit, isCache, isCacheUnresolved, removeFromCache, resolveViewName, setCache, setCacheFilter, setCacheLimit, setCacheUnresolved- クラス org.springframework.web.context.support.WebApplicationObjectSupport から継承されたメソッド- getServletContext, getTempDir, getWebApplicationContext, initApplicationContext, initServletContext, isContextRequired, setServletContext- クラス org.springframework.context.support.ApplicationObjectSupport から継承されたメソッド- getApplicationContext, getMessageSourceAccessor, obtainApplicationContext, requiredContextClass, setApplicationContext
- コンストラクターの詳細- XsltViewResolverpublic XsltViewResolver()このリゾルバーには- XsltViewが必要です。
 
- メソッドの詳細- setSourceKeyXSLT ソースを表すモデル属性の名前を設定します。指定しない場合、モデルマップで一致する値の型が検索されます。- 次のソース型がそのまま使用できます: - SourceSE、- DocumentSE、- NodeSE、- ReaderSE、- InputStreamSE、- Resource。
- setUriResolver変換で使用される URIResolver を設定します。- URIResolver は、XSLT - document()関数への呼び出しを処理します。
- setErrorListener変換エラーと警告のカスタム処理のために- ErrorListenerSE インターフェースの実装を設定します。- 設定しない場合、デフォルトの - SimpleTransformErrorListenerが使用され、ビュークラスのロガーインスタンスを使用して警告をログに記録し、エラーを再スローして XML 変換を中止します。
- setIndentpublic void setIndent- (boolean indent) XSLT トランスフォーマーが結果ツリーを出力するときに空白を追加するかどうかを設定します。- デフォルトは - true(オン)です。これを- false(オフ)に設定して、「インデント」キーを指定しないようにします。選択はスタイルシートに任せます。- 関連事項:
 
- setOutputPropertiesスタイルシートに適用される任意のトランスフォーマー出力プロパティを設定します。- ここで指定した値は、このビューがプログラムで設定するデフォルトを上書きします。 
- setCacheTemplatespublic void setCacheTemplates- (boolean cacheTemplates) XSLT テンプレートのキャッシュをオンまたはオフにします。- デフォルト値は "true" です。キャッシングがパフォーマンスに深刻な影響を与えない開発では、これを "false" にのみ設定してください。 
- requiredViewClassクラスからコピーされた説明:- UrlBasedViewResolverこのリゾルバーに必要なビューの型を返します。この実装は- AbstractUrlBasedViewを返します。
- instantiateViewクラスからコピーされた説明:- UrlBasedViewResolver指定されたビュークラスをインスタンス化します。- デフォルトの実装では、リフレクションを使用してクラスをインスタンス化します。 - オーバーライド:
-  クラス UrlBasedViewResolverのinstantiateView
- 戻り値:
- ビュークラスの新しいインスタンス
- 関連事項:
 
- buildViewクラスからコピーされた説明:- UrlBasedViewResolver指定されたビュークラスの新しい View インスタンスを作成して構成します。事前定義されたビューインスタンスのルックアップを実行しません。- Bean コンテナーで定義されている Spring ライフサイクルメソッドをここで呼び出す必要はありません。これらは、このメソッドが戻った後に - loadViewメソッドによって適用されます。- サブクラスは通常、 - super.buildView(viewName)を最初に呼び出してから、さらにプロパティを設定します。- loadViewは、このプロセスの最後に Spring ライフサイクルメソッドを適用します。- オーバーライド:
-  クラス UrlBasedViewResolverのbuildView
- パラメーター:
- viewName- 構築するビューの名前
- 戻り値:
- ビューインスタンス
- 例外:
- ExceptionSE- ビューを解決できなかった場合
- 関連事項: