rendsite.renderer
Class RendererCatalog

java.lang.Object
  extended by rendsite.renderer.RendererCatalog
All Implemented Interfaces:
Resetable

public class RendererCatalog
extends java.lang.Object
implements Resetable

Catalog of renderers.

Mostly hardcoded for now. When it gets bigger, the configuration can go into a file.

Author:
erich Version History
 10NOV09 - EPG - First package release.
 

Field Summary
static java.lang.String DEFAULT_RENDERER_CLASS_NAME
           
static java.lang.String DEFAULT_RENDERER_NAME
          Default renderer name.
static int MAX_CLASS_NOT_FOUND_FOR_PANIC
           
static java.lang.String SOURCETEMPLATE_V1_RENDERER_CLASS_NAME
           
static java.lang.String SOURCETEMPLATE_V1_RENDERER_NAME
          Template for code (software) processing version 1.
static java.lang.String TEMPLATE_V1_RENDERER_CLASS_NAME
           
static java.lang.String TEMPLATE_V1_RENDERER_NAME
          Template processing version 1.
 
Constructor Summary
RendererCatalog()
          Construct a renderer catalog.
 
Method Summary
 Renderer getRenderer(java.lang.String name, RenderingContext rcontext, PropertiesGeneralContext pcontext)
          Get a renderer by name.
 void reset()
          Reset the object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MAX_CLASS_NOT_FOUND_FOR_PANIC

public static final int MAX_CLASS_NOT_FOUND_FOR_PANIC
See Also:
Constant Field Values

DEFAULT_RENDERER_NAME

public static final java.lang.String DEFAULT_RENDERER_NAME
Default renderer name.

See Also:
Constant Field Values

DEFAULT_RENDERER_CLASS_NAME

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

TEMPLATE_V1_RENDERER_NAME

public static final java.lang.String TEMPLATE_V1_RENDERER_NAME
Template processing version 1.

See Also:
Constant Field Values

TEMPLATE_V1_RENDERER_CLASS_NAME

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

SOURCETEMPLATE_V1_RENDERER_NAME

public static final java.lang.String SOURCETEMPLATE_V1_RENDERER_NAME
Template for code (software) processing version 1. It will process rather than just copy code files.

See Also:
Constant Field Values

SOURCETEMPLATE_V1_RENDERER_CLASS_NAME

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

RendererCatalog

public RendererCatalog()
                throws java.lang.Throwable
Construct a renderer catalog.

Throws:
java.lang.Throwable - will only happen if the context is bad or the catalog could not be loaded.
Method Detail

getRenderer

public Renderer getRenderer(java.lang.String name,
                            RenderingContext rcontext,
                            PropertiesGeneralContext pcontext)
                     throws things.common.ThingsException
Get a renderer by name.

Parameters:
name - The name. It is case sensitive! If null or empty, it will get the default.
rcontext - needed if the renderer will be constructed.
pcontext - needed if the renderer will be constructed.
Returns:
an instantiated renderer. There will be only one instance per catalog, so instantiate more catalogs if you expect lots of simultaneous usage.
Throws:
things.common.ThingsException

reset

public void reset()
           throws java.lang.Throwable
Reset the object. It should lose all state except what was set during construction.

Specified by:
reset in interface Resetable
Throws:
java.lang.Throwable - if it could not completely reset state.


rendsite.