public class RssSearchComponent extends Object implements SearchComponent, Serviceable
SearchComponent
for saxing results for RSS feedModifier and Type | Field and Description |
---|---|
private static String |
__ENABLE_RSS_PARAMETER_NAME |
private static String |
__RSS_VIEW_PARAMETER_DEFAULT_VALUE |
private static String |
__RSS_VIEW_PARAMETER_NAME |
private RenderingContextHandler |
_renderingContextHandler |
private SourceResolver |
_resolver |
DISABLE_DEFAULT_SAX_PARAMETER_NAME, MAX_PRIORITY, MIN_PRIORITY, SEARCH_PRIORITY
Constructor and Description |
---|
RssSearchComponent() |
Modifier and Type | Method and Description |
---|---|
private String |
_getRssViewParameterDefaultValue(SearchComponentArguments args) |
private void |
_saxContentItem(ContentHandler contentHandler,
Content content,
String view,
String siteName) |
private void |
_saxRssFeed(ContentHandler contentHandler,
String title,
SearchResults<AmetysObject> results,
String view,
Site site,
Logger logger) |
private void |
_setRssHeader(SearchServiceInstance serviceInstance,
Response response) |
private void |
_setSiteAttribute(Request request,
Site currentSite) |
void |
execute(SearchComponentArguments args)
Executes the component.
|
int |
priority()
Get the priority of the component.
|
void |
service(ServiceManager manager) |
boolean |
supports(SearchComponentArguments args)
Returns
true if the component must be executed . |
private static final String __ENABLE_RSS_PARAMETER_NAME
private static final String __RSS_VIEW_PARAMETER_NAME
private static final String __RSS_VIEW_PARAMETER_DEFAULT_VALUE
private SourceResolver _resolver
private RenderingContextHandler _renderingContextHandler
public RssSearchComponent()
public void service(ServiceManager manager) throws ServiceException
service
in interface Serviceable
ServiceException
public int priority()
SearchComponent
priority
in interface SearchComponent
public boolean supports(SearchComponentArguments args)
SearchComponent
true
if the component must be executed
.supports
in interface SearchComponent
args
- the argumentstrue
if the component must be executed
.public void execute(SearchComponentArguments args) throws Exception
SearchComponent
execute
in interface SearchComponent
args
- the argumentsException
- if an exception occurs. Other search components will be attempted to be executedprivate String _getRssViewParameterDefaultValue(SearchComponentArguments args)
private void _setRssHeader(SearchServiceInstance serviceInstance, Response response)
private void _setSiteAttribute(Request request, Site currentSite)
private void _saxRssFeed(ContentHandler contentHandler, String title, SearchResults<AmetysObject> results, String view, Site site, Logger logger) throws Exception
Exception
private void _saxContentItem(ContentHandler contentHandler, Content content, String view, String siteName) throws SAXException, IOException
SAXException
IOException