Overview | Package | Class | Tree | Deprecated | Index | Help
| The PDK Java API is part of the Portal Developer Kit on Portal Studio
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## oracle.portal.provider.v2.render.http
Class JavaRenderer

    java.lang.Object
      |
      +--oracle.portal.provider.v2.render.ManagedRenderer
            |
            +--oracle.portal.provider.v2.render.http.BaseManagedRenderer
                  |
                  +--oracle.portal.provider.v2.render.http.JavaRenderer

All Implemented Interfaces:
  InitializableXMLObject, Validateable

public class JavaRenderer
extends BaseManagedRenderer
implements InitializableXMLObject

JavaRenderer has responsibility for responding to a `PortletRenderRequest` by dynamically invoking an arbitrarily named method on an instance of an arbitrary class. The only restrictions are that the class must have a null constructor, and the named method must take a `PortletRenderRequest` as the only parameter.

The properties `contentType` and `pageExpires` may be set explicitly on a JavaRenderer, or inherited from defaults set at `RenderManager` level. However the class and method names must be set at JavaRenderer level via calls to ``setClassName(String)`` and ``setRenderMethod(String)``. Once these strings have been set, it is important that the `BaseManagedRenderer.postInitialize()` method is called to complete initialization. If the provider definition is a `DefaultProviderDefinition`, these calls may be initiated as a result of `<className>` and `<renderMethod>` declarations in the provider XML registry.

Constructor Summary
`JavaRenderer()` Null constructor.

Method Summary
`java.lang.String` | `getClassName()` Gets the fully-qualified class name of the object used to render this request.
`java.lang.String` | `getRenderMethod()` Gets the name of the method called on an instance of the preset class to render a request.
`void` | `renderBody(PortletRenderRequest pr)` Renders the request using dynamic invocation of the preset method on an instance of the preset class.
`void` | `setClassName(java.lang.String className)` Sets the fully-qualified class name of the object used to render this request.
`void` | `setRenderMethod(java.lang.String methodName)` Sets the name of the method to be called on an instance of the preset class to render a request.
`void` | `validate(java.lang.String context, ValidationError errors)` Validates the internal state of this `JavaRenderer` instance.

Methods inherited from class oracle.portal.provider.v2.render.http.BaseManagedRenderer
`addParameter, getContentType, getGeneratesESI, postInitialize, preInitialize, prepareResponse, setContentType, setGeneratesESI, setGeneratesESI, setPageExpires, setPageExpires, setUseInvalidationCaching, setUseInvalidationCaching`

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

Methods inherited from interface oracle.portal.utils.xml.v2.InitializableXMLObject
`postInitialize, preInitialize`

Constructor Detail

### JavaRenderer

    public JavaRenderer()

  Null constructor.

Method Detail

### renderBody

    public void renderBody(PortletRenderRequest pr)
                    throws PortletException

  Renders the request using dynamic invocation of the preset method on an instance of the preset class. The method must take a `PortletRenderRequest` as its only parameter.
  Overrides:
    `renderBody` in class `ManagedRenderer`
  Parameters:
    `pr` - a PortletRenderRequest
  Throws:
    `PortletException` - if dynamic invocation of the method fails

### setClassName

    public void setClassName(java.lang.String className)

  Sets the fully-qualified class name of the object used to render this request.
  Parameters:
    `className` - fully-qualified class name.

### getClassName

    public java.lang.String getClassName()

  Gets the fully-qualified class name of the object used to render this request.
  Returns:
    the fully-qualified class name of the object used to render this request.

### setRenderMethod

    public void setRenderMethod(java.lang.String methodName)

  Sets the name of the method to be called on an instance of the preset class to render a request.
  Parameters:
    `methodName` - a method name.

### getRenderMethod

    public java.lang.String getRenderMethod()

  Gets the name of the method called on an instance of the preset class to render a request.
  Returns:
    a method name.

### validate

    public void validate(java.lang.String context,
                         ValidationError errors)

  Validates the internal state of this `JavaRenderer` instance. Errors found are reported using the supplied `ValidationError` instance.
  Overrides:
    `validate` in class `BaseManagedRenderer`
  Parameters:
    `context` - The context of the calling instance.
    `errors` - The current list of errors.

Overview | Package | Class | Tree | Deprecated | Index | Help
| The PDK Java API is part of the Portal Developer Kit on Portal Studio
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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