T
- WireFeed
型 public abstract class AbstractFeedView<T extends com.rometools.rome.feed.WireFeed> extends AbstractView
> 注: Spring 4.1 以降、これは ROME の com.rometools
バリアント、バージョン 1.5 に基づいています。ビルドの依存関係をアップグレードしてください。
アプリケーション固有のビュークラスは、通常、このクラスからではなく、AbstractRssFeedView
または AbstractAtomFeedView
から拡張されます。
Jettro Coenradie と Sergio Bossa の元のフィードビュープロトタイプに感謝します。
AbstractRssFeedView
, AbstractAtomFeedView
DEFAULT_CONTENT_TYPE
logger
PATH_VARIABLES, RESPONSE_STATUS_ATTRIBUTE, SELECTED_CONTENT_TYPE
コンストラクターと説明 |
---|
AbstractFeedView() |
修飾子と型 | メソッドと説明 |
---|---|
protected abstract void | buildFeedEntries(MapSE<StringSE, ObjectSE> model, T feed, HttpServletRequestEE request, HttpServletResponseEE response) モデルが与えられた場合、サブクラスはこのメソッドを実装してフィードエントリを構築する必要があります。 |
protected void | buildFeedMetadata(MapSE<StringSE, ObjectSE> model, T feed, HttpServletRequestEE request) フィードのメタデータ(タイトル、リンク、説明など)を入力します。 |
protected abstract T | newFeed() エントリを保持する新しいフィードを作成します。 |
protected void | renderMergedOutputModel(MapSE<StringSE, ObjectSE> model, HttpServletRequestEE request, HttpServletResponseEE response) ビューを実際にレンダリングするには、サブクラスでこのメソッドを実装する必要があります。 |
addStaticAttribute, createMergedOutputModel, createRequestContext, createTemporaryOutputStream, exposeModelAsRequestAttributes, formatViewName, generatesDownloadContent, getAttributesMap, getBeanName, getContentType, getRequestContextAttribute, getRequestToExpose, getStaticAttributes, isExposePathVariables, prepareResponse, render, setAttributes, setAttributesCSV, setAttributesMap, setBeanName, setContentType, setExposeContextBeansAsAttributes, setExposedContextBeanNames, setExposePathVariables, setRequestContextAttribute, setResponseContentType, toString, writeToResponse
getServletContext, getTempDir, getWebApplicationContext, initApplicationContext, initServletContext, isContextRequired, setServletContext
getApplicationContext, getMessageSourceAccessor, initApplicationContext, obtainApplicationContext, requiredContextClass, setApplicationContext
cloneSE, equalsSE, finalizeSE, getClassSE, hashCodeSE, notifySE, notifyAllSE, waitSE, waitSE, waitSE
protected final void renderMergedOutputModel(MapSE<StringSE,ObjectSE> model, HttpServletRequestEE request, HttpServletResponseEE response) throws ExceptionSE
AbstractView
最初のステップは、リクエストの準備です。JSP の場合、これはモデルオブジェクトをリクエスト属性として設定することを意味します。2 番目のステップは、たとえば RequestDispatcher を介した JSP を含む、実際のビューのレンダリングです。
AbstractView
の renderMergedOutputModel
model
- 静的な属性よりも動的な値が優先される、結合された出力マップ(非 null
)request
- 現在の HTTP リクエスト response
- 現在の HTTP レスポンス ExceptionSE
- レンダリングに失敗した場合 protected abstract T newFeed()
protected void buildFeedMetadata(MapSE<StringSE,ObjectSE> model, T feed, HttpServletRequestEE request)
デフォルトは空の実装です。サブクラスはこのメソッドをオーバーライドして、タイトル、リンクの説明などのメタフィールドを追加できます。
model
- メタ情報を入力する必要がある場合のモデル feed
- 投入されるフィード request
- ロケールなどが必要な場合に備えて。属性を見てはいけません。protected abstract void buildFeedEntries(MapSE<StringSE,ObjectSE> model, T feed, HttpServletRequestEE request, HttpServletResponseEE response) throws ExceptionSE
渡された HTTP レスポンスは、Cookie またはその他の HTTP ヘッダーを設定するために使用されることに注意してください。ビルドされたフィード自体は、このメソッドが戻った後、自動的にレスポンスに書き込まれます。
model
- モデルマップ feed
- エントリを追加するフィード request
- ロケールなどが必要な場合に備えて。属性を見てはいけません。response
- クッキーを設定する必要がある場合に備えて。書いてはいけません。ExceptionSE
- ビルド中に発生した例外