org.jboss.portal.portlet.samples.google
Class GoogleClippingPortlet

java.lang.Object
  extended by javax.portlet.GenericPortlet
      extended by org.jboss.portal.portlet.samples.google.GoogleClippingPortlet
All Implemented Interfaces:
Portlet
Direct Known Subclasses:
GoogleWeatherClippingPortlet

public class GoogleClippingPortlet
extends GenericPortlet

A simple portlet using Google's search services to extract interesting information (weather, map, ...) from first result.

Version:
$Revision: 9912 $
Author:
Chris Laprun

Field Summary
protected static java.lang.String A
           
 
Constructor Summary
GoogleClippingPortlet()
           
 
Method Summary
protected  void doEdit(RenderRequest renderRequest, RenderResponse renderResponse)
          Helper method to serve up the edit mode.
protected  void doView(RenderRequest renderRequest, RenderResponse renderResponse)
          Helper method to serve up the mandatory view mode.
protected  java.lang.String getQueryString(RenderRequest renderRequest, java.lang.String zip)
           
protected  java.lang.String getZipCode(RenderRequest renderRequest)
           
protected  java.lang.String postProcessHTML(java.lang.String html)
           
 void processAction(ActionRequest actionRequest, ActionResponse actionResponse)
          Called by the portlet container to allow the portlet to process an action request.
 
Methods inherited from class javax.portlet.GenericPortlet
destroy, doDispatch, 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

A

protected static final java.lang.String A
See Also:
Constant Field Values
Constructor Detail

GoogleClippingPortlet

public GoogleClippingPortlet()
Method Detail

doView

protected void doView(RenderRequest renderRequest,
                      RenderResponse renderResponse)
               throws PortletException,
                      java.io.IOException
Description copied from class: GenericPortlet
Helper method to serve up the mandatory view mode.

The default implementation throws an exception.

Overrides:
doView in class GenericPortlet
Parameters:
renderRequest - the portlet request
renderResponse - the render response
Throws:
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 problem

getZipCode

protected java.lang.String getZipCode(RenderRequest renderRequest)

doEdit

protected void doEdit(RenderRequest renderRequest,
                      RenderResponse renderResponse)
               throws PortletException,
                      java.io.IOException
Description copied from class: GenericPortlet
Helper method to serve up the edit mode.

The default implementation throws an exception.

Overrides:
doEdit in class GenericPortlet
Parameters:
renderRequest - the portlet request
renderResponse - the render response
Throws:
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 problem

processAction

public void processAction(ActionRequest actionRequest,
                          ActionResponse actionResponse)
                   throws PortletException,
                          java.io.IOException
Description copied from class: GenericPortlet
Called by the portlet container to allow the portlet to process an action request. This method is called if the client request was originated by a URL created (by the portlet) with the RenderResponse.createActionURL() method.

The default implementation throws an exception.

Specified by:
processAction in interface Portlet
Overrides:
processAction in class GenericPortlet
Parameters:
actionRequest - the action request
actionResponse - the action response
Throws:
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 problem

postProcessHTML

protected java.lang.String postProcessHTML(java.lang.String html)

getQueryString

protected java.lang.String getQueryString(RenderRequest renderRequest,
                                          java.lang.String zip)


Copyright © 2008. All Rights Reserved.