Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jboss.portal.core.samples.basic
Class FSContentDrivenPortlet

    java.lang.Object
      javax.portlet.GenericPortlet
          org.jboss.portal.core.samples.basic.FSContentDrivenPortlet

All Implemented Interfaces:
  javax.portlet.EventPortlet, javax.portlet.Portlet, javax.portlet.PortletConfig, javax.portlet.ResourceServingPortlet

    public class FSContentDrivenPortlet

extends javax.portlet.GenericPortlet

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.

Version:
  $Revision: 1.1 $
Author:
  Julien Viet, Thomas Heute

Field Summary
`static javax.portlet.PortletMode` | `EDIT_CONTENT_MODE` The edit_content mode.

Constructor Summary
`FSContentDrivenPortlet()`

Method Summary
`protected void` | `doDispatch(javax.portlet.RenderRequest req, javax.portlet.RenderResponse resp)` Additional dispatch that will call the `doEditContent(RenderRequest,RenderResponse)` method.
`protected void` | `doEditContent(javax.portlet.RenderRequest req, javax.portlet.RenderResponse resp)` Implements the edit content functionnality.
`protected void` | `doView(javax.portlet.RenderRequest req, javax.portlet.RenderResponse resp)`
`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(javax.portlet.ActionRequest req, javax.portlet.ActionResponse resp)`

Methods inherited from class javax.portlet.GenericPortlet
`destroy, doEdit, doHeaders, doHelp, getContainerRuntimeOptions, getDefaultNamespace, getInitParameter, getInitParameterNames, getNextPossiblePortletModes, getPortletConfig, getPortletContext, getPortletName, getProcessingEventQNames, getPublicRenderParameterNames, getPublishingEventQNames, getResourceBundle, getSupportedLocales, getTitle, init, init, processEvent, render, serveResource`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### EDIT_CONTENT_MODE

    public static final javax.portlet.PortletMode EDIT_CONTENT_MODE

  The edit_content mode.

Constructor Detail

### FSContentDrivenPortlet

    public FSContentDrivenPortlet()

Method Detail

### doDispatch

    protected void doDispatch(javax.portlet.RenderRequest req,
                              javax.portlet.RenderResponse resp)
                       throws javax.portlet.PortletException,
                              javax.portlet.PortletSecurityException,
                              java.io.IOException

  Additional dispatch that will call the `doEditContent(RenderRequest,RenderResponse)` method.

  Overrides:
    `doDispatch` in class `javax.portlet.GenericPortlet`
  Throws:
    `javax.portlet.PortletException`
    `javax.portlet.PortletSecurityException`
    `java.io.IOException`

### doEditContent

    protected void doEditContent(javax.portlet.RenderRequest req,
                                 javax.portlet.RenderResponse resp)
                          throws javax.portlet.PortletException,
                                 javax.portlet.PortletSecurityException,
                                 java.io.IOException

  Implements the edit content functionnality.

  Throws:
    `javax.portlet.PortletException`
    `javax.portlet.PortletSecurityException`
    `java.io.IOException`

### doView

    protected void doView(javax.portlet.RenderRequest req,
                          javax.portlet.RenderResponse resp)
                   throws javax.portlet.PortletException,
                          javax.portlet.PortletSecurityException,
                          java.io.IOException

  Overrides:
    `doView` in class `javax.portlet.GenericPortlet`
  Throws:
    `javax.portlet.PortletException`
    `javax.portlet.PortletSecurityException`
    `java.io.IOException`

### processAction

    public void processAction(javax.portlet.ActionRequest req,
                              javax.portlet.ActionResponse resp)
                       throws javax.portlet.PortletException,
                              javax.portlet.PortletSecurityException,
                              java.io.IOException

  Specified by:
    `processAction` in interface `javax.portlet.Portlet`
  Overrides:
    `processAction` in class `javax.portlet.GenericPortlet`
  Throws:
    `javax.portlet.PortletException`
    `javax.portlet.PortletSecurityException`
    `java.io.IOException`

### getFile

    protected java.io.File getFile(java.lang.String contentURI)
                            throws java.io.IOException

  Return a file from the specified path or null if the file cannot be determined.

  Parameters:
    `contentURI` - the file path
  Returns:
    the file or null
  Throws:
    `java.io.IOException`

### getContentURI

    protected java.lang.String getContentURI(java.io.File file)
                                      throws java.io.IOException

  Return the content uri of the file or null if it cannot be determined.

  Parameters:
    `file` - the file to get the URI from
  Returns:
    the URI or null
  Throws:
    `java.io.IOException`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD