|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.portlet.GenericPortlet
org.jboss.portal.core.samples.basic.FSContentDrivenPortlet
public class FSContentDrivenPortlet
An example of content driven portlet that display the files located in the war file. The portlet does not implement any code to improve performance like caching in order to keep the code easier to understand. It should not be used in production for a large scale portal.
Content URI is defined as the canonical path of the file relative to the war file context root.
Field Summary | |
---|---|
static PortletMode |
EDIT_CONTENT_MODE
The edit_content mode. |
Constructor Summary | |
---|---|
FSContentDrivenPortlet()
|
Method Summary | |
---|---|
protected void |
doDispatch(RenderRequest req,
RenderResponse resp)
Additional dispatch that will call the doEditContent(RenderRequest,RenderResponse) method. |
protected void |
doEditContent(RenderRequest req,
RenderResponse resp)
Implements the edit content functionnality. |
protected void |
doView(RenderRequest req,
RenderResponse resp)
Helper method to serve up the mandatory view mode. |
protected java.lang.String |
getContentURI(java.io.File file)
Return the content uri of the file or null if it cannot be determined. |
protected java.io.File |
getFile(java.lang.String contentURI)
Return a file from the specified path or null if the file cannot be determined. |
void |
processAction(ActionRequest req,
ActionResponse resp)
Called by the portlet container to allow the portlet to process an action request. |
Methods inherited from class javax.portlet.GenericPortlet |
---|
destroy, doEdit, doHelp, getInitParameter, getInitParameterNames, getPortletConfig, getPortletContext, getPortletName, getResourceBundle, getTitle, init, init, render |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final PortletMode EDIT_CONTENT_MODE
Constructor Detail |
---|
public FSContentDrivenPortlet()
Method Detail |
---|
protected void doDispatch(RenderRequest req, RenderResponse resp) throws PortletException, PortletSecurityException, java.io.IOException
doEditContent(RenderRequest,RenderResponse)
method.
doDispatch
in class GenericPortlet
req
- the render requestresp
- the render response
PortletException
- if the portlet cannot fulfilling the request
UnavailableException
- if the portlet is unavailable to perform render at this time
PortletSecurityException
- if the portlet cannot fullfill this request because of security reasons
java.io.IOException
- if the streaming causes an I/O problemGenericPortlet.doView(RenderRequest,RenderResponse)
,
GenericPortlet.doEdit(RenderRequest,RenderResponse)
,
GenericPortlet.doHelp(RenderRequest,RenderResponse)
protected void doEditContent(RenderRequest req, RenderResponse resp) throws PortletException, PortletSecurityException, java.io.IOException
PortletException
PortletSecurityException
java.io.IOException
protected void doView(RenderRequest req, RenderResponse resp) throws PortletException, PortletSecurityException, java.io.IOException
GenericPortlet
view
mode.
The default implementation throws an exception.
doView
in class GenericPortlet
req
- the portlet requestresp
- the render response
PortletException
- if the portlet cannot fulfilling the request
UnavailableException
- if the portlet is unavailable to perform render at this time
PortletSecurityException
- if the portlet cannot fullfill this request because of security reasons
java.io.IOException
- if the streaming causes an I/O problempublic void processAction(ActionRequest req, ActionResponse resp) throws PortletException, PortletSecurityException, java.io.IOException
GenericPortlet
RenderResponse.createActionURL()
method.
The default implementation throws an exception.
processAction
in interface Portlet
processAction
in class GenericPortlet
req
- the action requestresp
- the action response
PortletException
- if the portlet cannot fulfilling the request
UnavailableException
- if the portlet is unavailable to process the action at this time
PortletSecurityException
- if the portlet cannot fullfill this request because of security reasons
java.io.IOException
- if the streaming causes an I/O problemprotected java.io.File getFile(java.lang.String contentURI) throws java.io.IOException
contentURI
- the file path
java.io.IOException
protected java.lang.String getContentURI(java.io.File file) throws java.io.IOException
file
- the file to get the URI from
java.io.IOException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |