org.mmbase.framework
Interface Renderer

All Known Implementing Classes:
AbstractRenderer, CachedRenderer, ChainedRenderer, ConnectionRenderer, DeniedRenderer, DocumentationRenderer, EditwizardRenderer, ErrorRenderer, IFrameRenderer, JspRenderer, ResourceRenderer, StringRenderer, WrappedRenderer

public interface Renderer

A Renderer renders a certain aspect of a Block. Currently every block has two renderers, which are identified by the renderer 'type' (see getType()). Every block also has a Processor, which is similar to a Renderer, but a processor never generates content, only handles interaction. A Renderer is stateless. Rendering itself happens with the render(org.mmbase.util.functions.Parameters, java.io.Writer, org.mmbase.framework.RenderHints) method, which is typically done using Framework.render(org.mmbase.framework.Renderer, org.mmbase.util.functions.Parameters, org.mmbase.util.functions.Parameters, java.io.Writer, org.mmbase.framework.WindowState).

Since:
MMBase-1.9
Version:
$Id: Renderer.java 41989 2010-04-20 16:45:39Z michiel $
Author:
Michiel Meeuwissen

Nested Class Summary
static class Renderer.Type
           
 
Method Summary
 Block getBlock()
          Every renderer renders for a certain block.
 Parameter<?>[] getParameters()
          A renderer may need certain parameters.
 Renderer.Type getType()
          Describes what kind of renderer this is
 URI getUri()
          An URI which may identify the implementation of this Renderer.
 URI getUri(Parameters blockParameters, RenderHints hints)
          Ann URL which may identify a specific rendition
 void render(Parameters blockParameters, Writer w, RenderHints hints)
          Renders to a writer.
 

Method Detail

getType

Renderer.Type getType()
Describes what kind of renderer this is


getBlock

Block getBlock()
Every renderer renders for a certain block.


getParameters

Parameter<?>[] getParameters()
A renderer may need certain parameters. These are added to the block-parameters. This method is called on instantation of the renderer.


render

void render(Parameters blockParameters,
            Writer w,
            RenderHints hints)
            throws FrameworkException
Renders to a writer. In case of e.g. a JSPView, the parameters must also contain the Http Servlet response and request, besided specific parameters for this component.

Throws:
FrameworkException

getUri

URI getUri()
An URI which may identify the implementation of this Renderer.


getUri

URI getUri(Parameters blockParameters,
           RenderHints hints)
Ann URL which may identify a specific rendition

Since:
MMBase-1.9.1


MMBase 2.0-SNAPSHOT - null