Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## oracle.portal.provider.v1.http
Class JavaRenderer

    java.lang.Object
      |
      +--oracle.portal.provider.v1.http.BaseManagedRenderer
            |
            +--oracle.portal.provider.v1.http.JavaRenderer

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 Java 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 `postInitialize()` method is called to complete initialization. If the provider is a `DefaultProvider`, 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` | `postInitialize()` Performs the extra steps required to initialize and validate this JavaRenderer once its properties have been set with the appropriate accessor methods.
`void` | `preInitialize(java.lang.Object o)` Performs the steps required to initialize this JavaRenderer after it has been constructed.
`void` | `renderBody(PortletRenderRequest pr)` Renders the request using dynamic invokation 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.

Methods inherited from class oracle.portal.provider.v1.http.BaseManagedRenderer
`getCharSet, getContentType, getPageExpires, prepareResponse, setCharSet, setContentType, setPageExpires, setPageExpires`

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

Constructor Detail

### JavaRenderer

    public JavaRenderer()

  Null constructor.

Method Detail

### renderBody

    public void renderBody(PortletRenderRequest pr)
                    throws PortletException

  Renders the request using dynamic invokation of the preset method on an instance of the preset class. The method must take a `PortletRenderRequest` as its only parameter.
  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.

### preInitialize

    public void preInitialize(java.lang.Object o)
                       throws NodeHandlerException

  Performs the steps required to initialize this JavaRenderer after it has been constructed. Currently, this method does nothing.
  Specified by:
    preInitialize in interface InitializableXMLObject
  Overrides:
    preInitialize in class BaseManagedRenderer
  Parameters:
    `o` - the object that will become this object's parent
  Throws:
    NodeHandlerException - if an error occurs while initializing this application object

### postInitialize

    public void postInitialize()
                        throws NodeHandlerException

  Performs the extra steps required to initialize and validate this JavaRenderer once its properties have been set with the appropriate accessor methods. In this implementation, the method attempts to instantiate an instance of the preset class, and locate the preset method within the class.
  Specified by:
    postInitialize in interface InitializableXMLObject
  Overrides:
    postInitialize in class BaseManagedRenderer
  Throws:
    NodeHandlerException - if the class or method are not set, or an error occurs while initializing the preset class or locating the preset method.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD