OracleAS PDK for Java 9.0.4.0.2

oracle.portal.provider.v2.render.http
Class StrutsRenderer

java.lang.Object
  |
  +--oracle.portal.provider.v2.render.ManagedRenderer
        |
        +--oracle.portal.provider.v2.render.http.BaseManagedRenderer
              |
              +--oracle.portal.provider.v2.render.http.AbstractResourceRenderer
                    |
                    +--oracle.portal.provider.v2.render.http.StrutsRenderer
All Implemented Interfaces:
InitializableXMLObject, Validateable

public class StrutsRenderer
extends AbstractResourceRenderer

This class is used as an adapter to a Struts servlet application.

Requests to this renderer contain the Struts action to be called as a parameter. The only time that this is not the case is the first time the portlet is called. In this case the action set using setDefaultAction is used instead.


Field Summary
static java.lang.String STRUTS_ACTION
          The Struts action parameter name
 
Constructor Summary
StrutsRenderer()
          This constructor is called by a RenderManager object.
 
Method Summary
 java.lang.String getDefaultAction()
          Returns the default Struts servlet action.
 java.lang.String getRequestResourcePath(PortletRenderRequest prr)
          Gets a path pointing to the resource to be rendered, in this case it is a Struts action.
 void setDefaultAction(java.lang.String action)
          Sets the default Struts servlet action to be used if none is present in the portlet request.
 void validate(java.lang.String context, ValidationError errors)
          Called by the framework when the provider definition is loaded or refreshed in response to a Portal message or when the test page is called.
 
Methods inherited from class oracle.portal.provider.v2.render.http.AbstractResourceRenderer
getCharSet, getContext, prepareResponse, renderBody, setCharSet
 
Methods inherited from class oracle.portal.provider.v2.render.http.BaseManagedRenderer
addParameter, getContentType, getGeneratesESI, postInitialize, preInitialize, setContentType, setGeneratesESI, setGeneratesESI, setPageExpires, setPageExpires, setUseInvalidationCaching, setUseInvalidationCaching
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

STRUTS_ACTION

public static final java.lang.String STRUTS_ACTION
The Struts action parameter name

See Also:
Constant Field Values
Constructor Detail

StrutsRenderer

public StrutsRenderer()
This constructor is called by a RenderManager object. Pre- initialisation checks are carried out by the framework in BaseManagedRenderer.preInitialize(java.lang.Object).

Method Detail

validate

public void validate(java.lang.String context,
                     ValidationError errors)
Called by the framework when the provider definition is loaded or refreshed in response to a Portal message or when the test page is called.

Specified by:
validate in interface Validateable
Overrides:
validate in class BaseManagedRenderer
Parameters:
context - The context of the calling instance.
errors - The current list of errors.

setDefaultAction

public void setDefaultAction(java.lang.String action)
Sets the default Struts servlet action to be used if none is present in the portlet request.

Most likely to be called when the provider definition is loaded.

Parameters:
action - the default action name. The code uses an action name starting with the '/' character but will add one if none is present.

getDefaultAction

public java.lang.String getDefaultAction()
Returns the default Struts servlet action.

Returns:
the default action

getRequestResourcePath

public java.lang.String getRequestResourcePath(PortletRenderRequest prr)
                                        throws PortletException
Gets a path pointing to the resource to be rendered, in this case it is a Struts action.

The first time the renderer is called the default action will be returned. Subsequent calls should contain the Struts action as a parameter.

Specified by:
getRequestResourcePath in class AbstractResourceRenderer
Parameters:
prr - the portlet request
PortletException

OracleAS PDK for Java 9.0.4.0.2

Copyright (c) 2002,2003 Oracle Corporation. All Rights Reserved.