|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.portlet.GenericPortlet org.jboss.samples.portlet.news.NewsPortlet
Adapted from JBoss Weather Portlet to deal with RSS News Feeds using RSS 1.0 or RSS 2.0 format.
Field Summary | |
private static java.lang.String |
E_UNPARSEABLE
|
private static java.lang.String |
E_UNREADABLE
|
private static java.lang.String |
E_XSL_UNREADABLE
|
private static java.lang.String |
JSP_EDIT
Edit page |
static org.apache.log4j.Logger |
log
Logger |
private java.lang.String |
RSS_URL
Base URL of News RSS |
private static java.lang.String |
RSS1_XSL
RSS 1.0 XSL page for output |
private static java.lang.String |
RSS2_XSL
RSS 2.0 XSL page for output |
private javax.xml.transform.Templates |
template_1_0
Compiled Template for output RSS 1.0 |
private javax.xml.transform.Templates |
template_2_0
Compiled Template for output RSS 2.0 |
Fields inherited from class javax.portlet.GenericPortlet |
|
Constructor Summary | |
NewsPortlet()
|
Method Summary | |
protected void |
doEdit(RenderRequest request,
RenderResponse response)
Allow edit of RSS Feed. |
protected void |
doView(RenderRequest request,
RenderResponse response)
Helper method to serve up the mandatory view mode. |
void |
init()
Compile the XSL File. |
void |
processAction(ActionRequest request,
ActionResponse response)
Process RSS Feed edit. |
Methods inherited from class javax.portlet.GenericPortlet |
destroy, doDispatch, doHelp, getInitParameter, getInitParameterNames, getPortletConfig, getPortletContext, getPortletName, getResourceBundle, getTitle, init, render |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static org.apache.log4j.Logger log
private static final java.lang.String JSP_EDIT
private static final java.lang.String RSS2_XSL
private static final java.lang.String RSS1_XSL
private javax.xml.transform.Templates template_2_0
private javax.xml.transform.Templates template_1_0
private java.lang.String RSS_URL
private static final java.lang.String E_XSL_UNREADABLE
private static final java.lang.String E_UNREADABLE
private static final java.lang.String E_UNPARSEABLE
Constructor Detail |
public NewsPortlet()
Method Detail |
public void init()
init
in class GenericPortlet
protected void doView(RenderRequest request, RenderResponse response) throws java.io.IOException, PortletException
GenericPortlet
view
mode.
The default implementation throws an exception.
doView
in class GenericPortlet
request
- the portlet requestresponse
- the render response
PortletException
- if the portlet cannot fulfilling the request
java.io.IOException
- if the streaming causes an I/O problemprotected void doEdit(RenderRequest request, RenderResponse response) throws java.io.IOException, PortletException
doEdit
in class GenericPortlet
request
- response
-
java.io.IOException
PortletException
public void processAction(ActionRequest request, ActionResponse response) throws PortletException
processAction
in interface Portlet
processAction
in class GenericPortlet
request
- response
-
PortletException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |