Class RssSearchComponent
- java.lang.Object
-
- org.ametys.web.frontoffice.search.requesttime.impl.RssSearchComponent
-
- All Implemented Interfaces:
SearchComponent
,Serviceable
public class RssSearchComponent extends Object implements SearchComponent, Serviceable
SearchComponent
for saxing results for RSS feed
-
-
Field Summary
Fields Modifier and Type Field 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
-
Fields inherited from interface org.ametys.web.frontoffice.search.requesttime.SearchComponent
DISABLE_DEFAULT_SAX_PARAMETER_NAME, MAX_PRIORITY, MIN_PRIORITY, SEARCH_PRIORITY
-
-
Constructor Summary
Constructors Constructor Description RssSearchComponent()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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, org.slf4j.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)
Returnstrue
if the component must beexecuted
.
-
-
-
Field Detail
-
__ENABLE_RSS_PARAMETER_NAME
private static final String __ENABLE_RSS_PARAMETER_NAME
- See Also:
- Constant Field Values
-
__RSS_VIEW_PARAMETER_NAME
private static final String __RSS_VIEW_PARAMETER_NAME
- See Also:
- Constant Field Values
-
__RSS_VIEW_PARAMETER_DEFAULT_VALUE
private static final String __RSS_VIEW_PARAMETER_DEFAULT_VALUE
- See Also:
- Constant Field Values
-
_resolver
private SourceResolver _resolver
-
_renderingContextHandler
private RenderingContextHandler _renderingContextHandler
-
-
Constructor Detail
-
RssSearchComponent
public RssSearchComponent()
-
-
Method Detail
-
service
public void service(ServiceManager manager) throws ServiceException
- Specified by:
service
in interfaceServiceable
- Throws:
ServiceException
-
priority
public int priority()
Description copied from interface:SearchComponent
Get the priority of the component. The lowest one will be executed first, and so on.- Specified by:
priority
in interfaceSearchComponent
- Returns:
- the priority of the component
-
supports
public boolean supports(SearchComponentArguments args)
Description copied from interface:SearchComponent
Returnstrue
if the component must beexecuted
.- Specified by:
supports
in interfaceSearchComponent
- Parameters:
args
- the arguments- Returns:
true
if the component must beexecuted
.
-
execute
public void execute(SearchComponentArguments args) throws Exception
Description copied from interface:SearchComponent
Executes the component.- Specified by:
execute
in interfaceSearchComponent
- Parameters:
args
- the arguments- Throws:
Exception
- if an exception occurs. Other search components will be attempted to be executed
-
_getRssViewParameterDefaultValue
private String _getRssViewParameterDefaultValue(SearchComponentArguments args)
-
_setRssHeader
private void _setRssHeader(SearchServiceInstance serviceInstance, Response response)
-
_setSiteAttribute
private void _setSiteAttribute(Request request, Site currentSite)
-
_saxRssFeed
private void _saxRssFeed(ContentHandler contentHandler, String title, SearchResults<AmetysObject> results, String view, Site site, org.slf4j.Logger logger) throws Exception
- Throws:
Exception
-
_saxContentItem
private void _saxContentItem(ContentHandler contentHandler, Content content, String view, String siteName) throws SAXException, IOException
- Throws:
SAXException
IOException
-
-