com.day.cq.commons.servlets
Class FeedRendererServlet
java.lang.Object
javax.servlet.GenericServlet
org.apache.sling.api.servlets.SlingSafeMethodsServlet
com.day.cq.commons.servlets.FeedRendererServlet
- All Implemented Interfaces:
- Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig
public class FeedRendererServlet
- extends org.apache.sling.api.servlets.SlingSafeMethodsServlet
The FeedRendererServlet renders the current resource as
an Atom or RSS feed, depending on the value of the second selector.
If no second selector is passed, it defaults to Atom.
- See Also:
- Serialized Form
|
Field Summary |
static String |
ATTR_NO_INCLUDE
Request attribute to use if whole feed should be rendered
regardless of any other request attribute. |
|
Method Summary |
protected void |
doGet(org.apache.sling.api.SlingHttpServletRequest req,
org.apache.sling.api.SlingHttpServletResponse resp)
|
protected Feed |
getFeed(org.apache.sling.api.SlingHttpServletRequest req,
org.apache.sling.api.SlingHttpServletResponse resp)
Returns an Atom or RSS feed, depending on the value of the second
selector. |
| Methods inherited from class org.apache.sling.api.servlets.SlingSafeMethodsServlet |
doGeneric, doHead, doOptions, doTrace, getAllowedRequestMethods, getServletInfo, handleMethodNotImplemented, mayService, service, service |
| Methods inherited from class javax.servlet.GenericServlet |
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletName, init, init, log, log |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ATTR_NO_INCLUDE
public static final String ATTR_NO_INCLUDE
- Request attribute to use if whole feed should be rendered
regardless of any other request attribute.
- See Also:
- Constant Field Values
FeedRendererServlet
public FeedRendererServlet()
doGet
protected void doGet(org.apache.sling.api.SlingHttpServletRequest req,
org.apache.sling.api.SlingHttpServletResponse resp)
throws javax.servlet.ServletException,
IOException
-
- Overrides:
doGet in class org.apache.sling.api.servlets.SlingSafeMethodsServlet
- Throws:
javax.servlet.ServletException
IOException
getFeed
protected Feed getFeed(org.apache.sling.api.SlingHttpServletRequest req,
org.apache.sling.api.SlingHttpServletResponse resp)
throws RepositoryException
- Returns an Atom or RSS feed, depending on the value of the second
selector. If no second selector is passed, it defaults to Atom.
- Parameters:
req - The servlet requestresp - The servlet response
- Returns:
- The feed
- Throws:
RepositoryException - If no node can be found
Copyright © 2009 Day Management AG. All Rights Reserved.