org.openscience.nmrshiftdb.portlets
Class WebPagePortletWithURLFromRequest

java.lang.Object
  extended by org.apache.jetspeed.portal.portlets.AbstractPortlet
      extended by org.openscience.nmrshiftdb.portlets.WebPagePortletWithURLFromRequest
All Implemented Interfaces:
java.io.Serializable, org.apache.jetspeed.portal.Portlet, org.apache.jetspeed.portal.PortletState, org.apache.jetspeed.services.portletcache.Cacheable, org.apache.turbine.services.cache.Refreshable

public class WebPagePortletWithURLFromRequest
extends org.apache.jetspeed.portal.portlets.AbstractPortlet

A class that loads a web page and filters it to have certain features deleted. This class was modified by Stefan Kuhn in order to accept a URL to diplay as Parameter (URL=) Certain URLs are also rewritten to display inside of NMRShiftDB.

Author:
Ingo Rammer, Santiago Gala, David Sean Taylor
See Also:
Serialized Form

Field Summary
(package private)  boolean pageCached
           
(package private)  org.apache.jetspeed.util.HTMLRewriter rewriter
           
 
Fields inherited from class org.apache.jetspeed.portal.portlets.AbstractPortlet
content
 
Fields inherited from interface org.apache.jetspeed.portal.Portlet
PORTLET_MAXIMIZED, PORTLET_MINIMIZED, PORTLET_NORMAL
 
Constructor Summary
WebPagePortletWithURLFromRequest()
           
 
Method Summary
 org.apache.ecs.ConcreteElement getContent(org.apache.turbine.util.RunData data)
          This methods outputs the content of the portlet for a given request.
private  java.io.Reader getReader(java.lang.String url)
          took this from FileServerPortlet as it was private
private  org.apache.ecs.ConcreteElement getWebPageContent(org.apache.turbine.util.RunData data, org.apache.jetspeed.portal.PortletConfig config)
           
 void init()
           
 
Methods inherited from class org.apache.jetspeed.portal.portlets.AbstractPortlet
allowClose, allowCustomize, allowInfo, allowMaximize, allowMinimize, allowPrintFriendly, allowView, clearContent, getAllowEdit, getAllowMaximize, getAllowView, getAttribute, getContent, getContent, getCreationTime, getDescription, getDescription, getExpirationMillis, getExpire, getHandle, getHandle, getID, getImage, getImage, getInstance, getName, getPortletConfig, getTitle, getTitle, isCacheable, isClosed, isMinimized, isShowTitleBar, providesCustomization, refresh, setAttribute, setCacheable, setCachedObject, setClosed, setContent, setContent, setContent, setCreationTime, setDescription, setExpirationMillis, setHandle, setID, setImage, setMinimized, setName, setPortletConfig, setTitle, setTitle, supportsType
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

rewriter

org.apache.jetspeed.util.HTMLRewriter rewriter

pageCached

boolean pageCached
Constructor Detail

WebPagePortletWithURLFromRequest

public WebPagePortletWithURLFromRequest()
Method Detail

init

public void init()
          throws org.apache.jetspeed.portal.PortletException
Specified by:
init in interface org.apache.jetspeed.portal.Portlet
Overrides:
init in class org.apache.jetspeed.portal.portlets.AbstractPortlet
Throws:
org.apache.jetspeed.portal.PortletException

getReader

private java.io.Reader getReader(java.lang.String url)
                          throws java.io.IOException
took this from FileServerPortlet as it was private

Throws:
java.io.IOException

getContent

public org.apache.ecs.ConcreteElement getContent(org.apache.turbine.util.RunData data)
This methods outputs the content of the portlet for a given request.

Specified by:
getContent in interface org.apache.jetspeed.portal.Portlet
Overrides:
getContent in class org.apache.jetspeed.portal.portlets.AbstractPortlet
Parameters:
data - the RunData object for the request
Returns:
the content to be displayed to the user-agent

getWebPageContent

private org.apache.ecs.ConcreteElement getWebPageContent(org.apache.turbine.util.RunData data,
                                                         org.apache.jetspeed.portal.PortletConfig config)