org.apache.jetspeed.portlet
Class WebContentPortlet

java.lang.Object
  extended by javax.portlet.GenericPortlet
      extended by org.apache.portals.bridges.common.GenericServletPortlet
          extended by org.apache.portals.bridges.velocity.GenericVelocityPortlet
              extended by org.apache.jetspeed.portlet.WebContentPortlet
All Implemented Interfaces:
javax.portlet.Portlet, javax.portlet.PortletConfig
Direct Known Subclasses:
SSOWebContentPortlet

public class WebContentPortlet
extends org.apache.portals.bridges.velocity.GenericVelocityPortlet

WebContentPortlet TODO: Preferences, cache stream instead of URL *

Version:
$Id: WebContentPortlet.java 605431 2007-12-19 05:11:40Z taylor $
Author:
Roger Ruttimann

Field Summary
static java.lang.String BROWSER_ACTION_NEXT_PAGE
           
static java.lang.String BROWSER_ACTION_PARAM
           
static java.lang.String BROWSER_ACTION_PREVIOUS_PAGE
           
static java.lang.String BROWSER_ACTION_REFRESH_PAGE
           
static java.lang.String defaultEncoding
           
static java.lang.String EDIT_SOURCE_PARAM
           
static java.lang.String FORM_GET_METHOD
           
static java.lang.String FORM_MULTIPART_METHOD
           
static java.lang.String FORM_POST_METHOD
           
static java.lang.String HISTORY
          Action Parameter
static java.lang.String HTTP_STATE
           
protected static org.apache.commons.logging.Log log
           
static java.lang.String VIEW_SOURCE_PARAM
          Configuration constants.
 
Fields inherited from class org.apache.portals.bridges.velocity.GenericVelocityPortlet
PORTLET_BRIDGE_CONTEXT
 
Fields inherited from class org.apache.portals.bridges.common.GenericServletPortlet
PARAM_ACTION_PAGE, PARAM_ALLOW_PREFERENCES, PARAM_CUSTOM_PAGE, PARAM_EDIT_PAGE, PARAM_HELP_PAGE, PARAM_MAX_PAGE, PARAM_VIEW_PAGE
 
Constructor Summary
WebContentPortlet()
           
 
Method Summary
 void doEdit(javax.portlet.RenderRequest request, javax.portlet.RenderResponse response)
           
protected  byte[] doHttpWebContent(org.apache.commons.httpclient.HttpClient httpClient, org.apache.commons.httpclient.HttpMethod httpMethod, int retryCount, javax.portlet.RenderRequest request, javax.portlet.RenderResponse response)
           
protected  byte[] doPreemptiveAuthentication(org.apache.commons.httpclient.HttpClient clent, org.apache.commons.httpclient.HttpMethod method, javax.portlet.RenderRequest request, javax.portlet.RenderResponse response)
           
protected  boolean doRequestedAuthentication(org.apache.commons.httpclient.HttpClient clent, org.apache.commons.httpclient.HttpMethod method, javax.portlet.RenderRequest request, javax.portlet.RenderResponse response)
           
 void doView(javax.portlet.RenderRequest request, javax.portlet.RenderResponse response)
          doView Renders the URL in the following order 1) SESSION_PARAMETER 2)cached version 3) defined for preference SRC
protected  byte[] doWebContent(java.lang.String sourceAttr, java.util.Map sourceParams, boolean isPost, javax.portlet.RenderRequest request, javax.portlet.RenderResponse response)
           
protected  org.apache.commons.httpclient.HttpClient getHttpClient(javax.portlet.RenderRequest request)
           
protected  org.apache.commons.httpclient.HttpMethodBase getHttpMethod(org.apache.commons.httpclient.HttpClient client, java.lang.String uri, java.util.Map params, java.lang.String formMethod, javax.portlet.RenderRequest request)
           
protected  java.lang.String getURLSource(java.lang.String source, java.util.Map params, javax.portlet.RenderRequest request, javax.portlet.RenderResponse response)
           
 void init(javax.portlet.PortletConfig config)
          Initialize portlet configuration.
 void processAction(javax.portlet.ActionRequest actionRequest, javax.portlet.ActionResponse actionResponse)
          processAction() Checks action initiated by the WebContent portlet which means that a user has clicked on an URL
 
Methods inherited from class org.apache.portals.bridges.velocity.GenericVelocityPortlet
doCustom, doHelp, doPreferencesEdit, getContext, getContext, render, setupPreferencesEdit
 
Methods inherited from class org.apache.portals.bridges.common.GenericServletPortlet
getDefaultActionPage, getDefaultCustomPage, getDefaultEditPage, getDefaultHelpPage, getDefaultViewPage, processPreferencesAction, setDefaultActionPage, setDefaultCustomPage, setDefaultEditPage, setDefaultHelpPage, setDefaultViewPage
 
Methods inherited from class javax.portlet.GenericPortlet
destroy, doDispatch, getInitParameter, getInitParameterNames, getPortletConfig, getPortletContext, getPortletName, getResourceBundle, getTitle, init
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

VIEW_SOURCE_PARAM

public static final java.lang.String VIEW_SOURCE_PARAM
Configuration constants.

See Also:
Constant Field Values

EDIT_SOURCE_PARAM

public static final java.lang.String EDIT_SOURCE_PARAM
See Also:
Constant Field Values

BROWSER_ACTION_PARAM

public static final java.lang.String BROWSER_ACTION_PARAM
See Also:
Constant Field Values

BROWSER_ACTION_PREVIOUS_PAGE

public static final java.lang.String BROWSER_ACTION_PREVIOUS_PAGE
See Also:
Constant Field Values

BROWSER_ACTION_REFRESH_PAGE

public static final java.lang.String BROWSER_ACTION_REFRESH_PAGE
See Also:
Constant Field Values

BROWSER_ACTION_NEXT_PAGE

public static final java.lang.String BROWSER_ACTION_NEXT_PAGE
See Also:
Constant Field Values

HISTORY

public static final java.lang.String HISTORY
Action Parameter

See Also:
Constant Field Values

HTTP_STATE

public static final java.lang.String HTTP_STATE
See Also:
Constant Field Values

log

protected static final org.apache.commons.logging.Log log

defaultEncoding

public static final java.lang.String defaultEncoding
See Also:
Constant Field Values

FORM_POST_METHOD

public static final java.lang.String FORM_POST_METHOD
See Also:
Constant Field Values

FORM_GET_METHOD

public static final java.lang.String FORM_GET_METHOD
See Also:
Constant Field Values

FORM_MULTIPART_METHOD

public static final java.lang.String FORM_MULTIPART_METHOD
See Also:
Constant Field Values
Constructor Detail

WebContentPortlet

public WebContentPortlet()
Method Detail

init

public void init(javax.portlet.PortletConfig config)
          throws javax.portlet.PortletException
Initialize portlet configuration.

Specified by:
init in interface javax.portlet.Portlet
Overrides:
init in class org.apache.portals.bridges.velocity.GenericVelocityPortlet
Throws:
javax.portlet.PortletException

processAction

public void processAction(javax.portlet.ActionRequest actionRequest,
                          javax.portlet.ActionResponse actionResponse)
                   throws javax.portlet.PortletException,
                          java.io.IOException
processAction() Checks action initiated by the WebContent portlet which means that a user has clicked on an URL

Specified by:
processAction in interface javax.portlet.Portlet
Overrides:
processAction in class org.apache.portals.bridges.velocity.GenericVelocityPortlet
Parameters:
actionRequest -
actionResponse -
Throws:
javax.portlet.PortletException
java.io.IOException

doView

public void doView(javax.portlet.RenderRequest request,
                   javax.portlet.RenderResponse response)
            throws javax.portlet.PortletException,
                   java.io.IOException
doView Renders the URL in the following order 1) SESSION_PARAMETER 2)cached version 3) defined for preference SRC

Overrides:
doView in class org.apache.portals.bridges.velocity.GenericVelocityPortlet
Throws:
javax.portlet.PortletException
java.io.IOException

doEdit

public void doEdit(javax.portlet.RenderRequest request,
                   javax.portlet.RenderResponse response)
            throws javax.portlet.PortletException,
                   java.io.IOException
Overrides:
doEdit in class org.apache.portals.bridges.velocity.GenericVelocityPortlet
Throws:
javax.portlet.PortletException
java.io.IOException

doWebContent

protected byte[] doWebContent(java.lang.String sourceAttr,
                              java.util.Map sourceParams,
                              boolean isPost,
                              javax.portlet.RenderRequest request,
                              javax.portlet.RenderResponse response)
                       throws javax.portlet.PortletException
Throws:
javax.portlet.PortletException

doHttpWebContent

protected byte[] doHttpWebContent(org.apache.commons.httpclient.HttpClient httpClient,
                                  org.apache.commons.httpclient.HttpMethod httpMethod,
                                  int retryCount,
                                  javax.portlet.RenderRequest request,
                                  javax.portlet.RenderResponse response)
                           throws javax.portlet.PortletException
Throws:
javax.portlet.PortletException

getURLSource

protected java.lang.String getURLSource(java.lang.String source,
                                        java.util.Map params,
                                        javax.portlet.RenderRequest request,
                                        javax.portlet.RenderResponse response)

doPreemptiveAuthentication

protected byte[] doPreemptiveAuthentication(org.apache.commons.httpclient.HttpClient clent,
                                            org.apache.commons.httpclient.HttpMethod method,
                                            javax.portlet.RenderRequest request,
                                            javax.portlet.RenderResponse response)

doRequestedAuthentication

protected boolean doRequestedAuthentication(org.apache.commons.httpclient.HttpClient clent,
                                            org.apache.commons.httpclient.HttpMethod method,
                                            javax.portlet.RenderRequest request,
                                            javax.portlet.RenderResponse response)

getHttpClient

protected org.apache.commons.httpclient.HttpClient getHttpClient(javax.portlet.RenderRequest request)
                                                          throws java.io.IOException
Throws:
java.io.IOException

getHttpMethod

protected org.apache.commons.httpclient.HttpMethodBase getHttpMethod(org.apache.commons.httpclient.HttpClient client,
                                                                     java.lang.String uri,
                                                                     java.util.Map params,
                                                                     java.lang.String formMethod,
                                                                     javax.portlet.RenderRequest request)
                                                              throws java.io.IOException
Throws:
java.io.IOException


Copyright © 1999-2009 Apache Software Foundation. All Rights Reserved.