com.raritantechnologies.xml.dataCollection.rss
Class RSSPageImportRenderer
java.lang.Object
com.raritantechnologies.searchApp.taglibrary.PageImportRenderer
com.raritantechnologies.xml.dataCollection.rss.RSSPageImportRenderer
- All Implemented Interfaces:
- IConfigurable, IPageContextRenderer
- public class RSSPageImportRenderer
- extends PageImportRenderer
Renders a page fragment from one or more RSS Feeds.
RSSDataSource - returns XML Documents, These are transformed with XMLResultProcessor to
an XMLResult.
Selected with ResultFieldMatcher / StringContainsComparator ( parameters determined by search source...)
Rendered with IResultRenderer.
XML Configuration Template:
<SystemObject type="PageImportRenderer" name="[The SysObject Name]"
configurableClass="com.raritantechnologies.xml.dataCollection.rss.RSSPageImportRenderer" >
<!-- ================================================================ -->
<!-- The XMLResultProcessor that will convert an RSS Document into a -->
<!-- Raritan IResult object. -->
<!-- ================================================================ -->
<XMLResultProcessor>
<!-- see documentation of com.raritantechnologies.xml.XMLResultProcessor for configuration details -->
</XMLResultProcessor>
<!-- ================================================================ -->
<!-- An IResultRenderer to be used to format the RSS contents. -->
<!-- ================================================================ -->
<ResultRenderer class="[ class of com.raritantechnologies.searchApp.taglibrary.IResultRenderer ]" >
</ResultRenderer>
<!-- ================================================================= -->
<!-- One or more RSS sources: either static or dynamic (search source) -->
<!-- ================================================================= -->
<!-- Static RSS Source uses configured RSS URL -->
<StaticRSSSource rssURL="[ static url ]"
tokenDelimiter="[token used to split select Strings for partial matching ]" >
<SelectString rssFields="name of rss field(s)" select=" select string " />
</StaticRSSSource>
<!-- Dynamic RSSSource uses an RTI Search source to get the RSS URLs to use and -->
<!-- to get the contains string for the ResultFieldMatcher -->
<!-- Configure StringContainsComparator as tokenized or exact match. -->
<DynamicRSSSource searchSource="[ searchSource ]"
rssURLField="[ result field with RSS URL ]"
tokenDelimiter="[token used to split select Strings for partial matching ]" >
<!-- Search fields used to create the query for the RSS URL Search Source -->
<SearchFields>
<Field ID="[search field ]" requestField="[ field in HTTP request ]" />
<Field ID="[search field ]" userField="[ field in UserInfo ]" />
<Field ID="[ search field ]" value="[ fixed value ]" />
</SearchFields>
<SelectString resultField="[ field from search result - used to obtain a select string ]"
rssFields="[ field name(s) in RSS result to apply select filter to ]" />
<!-- Not implemented yet... -->
<SelectSource searchSource="[ alternate search source for select string ]" >
<SearchFields>
etc...
</SearchFields>
<SelectString resultField=" " rssFields=" " tokenize="true|false" />
</SelectSource>
</DynamicRSSSource>
</SystemObject>
Developed by
Raritan Technologies .
- Author:
- Ted Sullivan
|
Method Summary |
java.lang.String |
getPage(RaritanPageContext pContext)
returns an HTML page or page fragment given a set of request parameters. |
void |
initialize(org.w3c.dom.Element elem)
Initializes the object from an XML tag or element. |
| Methods inherited from class com.raritantechnologies.searchApp.taglibrary.PageImportRenderer |
addPageElement, getAddPersistent, getConfigurationXML, getFragmentFile, getPageHeader, getPageName, getPageTrailer, render, setAddPersistent, setPageHeader, setPageName, setPageTrailer, setStringFilter |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RSSPageImportRenderer
public RSSPageImportRenderer()
getPage
public java.lang.String getPage(RaritanPageContext pContext)
- Description copied from class:
PageImportRenderer
- returns an HTML page or page fragment given a set of request parameters.
- Overrides:
getPage in class PageImportRenderer
- Parameters:
pContext - contains request and session parameters needed to execute the page
retrieval.
- Returns:
- A string containing the page data.
initialize
public void initialize(org.w3c.dom.Element elem)
- Description copied from interface:
IConfigurable
- Initializes the object from an XML tag or element.
This method is called by the Framework as part of the application initializtion.
see ConfigurationManager, XMLConfigurationManager, XMLSearchFieldMapFactory, XMLSearchSourceFactory.
Configurable objects that are owned or contained by other configurable objects will be initialized
in by the parent object.
- Specified by:
initialize in interface IConfigurable- Overrides:
initialize in class PageImportRenderer