Class
caplin.element.factory

RendererFactory

The RendererFactory creates instances of a Renderer based on pre-loaded XML renderer definitions.

Constructor Summary

Attributes Name and Description
caplin.element.factory.RendererFactory()

Method Summary

Attributes Name and Description
Object createDownstreams(caplin.stream.attribute.AttributeDefinitions attributeDefinitions, Object node)

Creates a renderer downstream.

caplin.element.Renderer createRenderer(String rendererName, Array fieldNames)

Creates the appropriate renderer instance to support the supplied renderer name.

caplin.element.Renderer createRendererByType(caplin.element.factory.RendererType rendererType, Array fieldNames)

Creates the appropriate renderer instance to support the supplied renderer name.

Object createUpstreams(caplin.stream.attribute.AttributeDefinitions attributeDefinitions, Object node)

Creates a renderer upstream.

void toString()

Returns a human-readable string representation of the object, which is useful for debugging.

Constructor Detail

caplin.element.factory.RendererFactory()

Method Detail

Object createDownstreams(caplin.stream.attribute.AttributeDefinitions attributeDefinitions, Object node)

Creates a renderer downstream.

Parameters
caplin.stream.attribute.AttributeDefinitions attributeDefinitions Attribute definitions.
Object node JSON object specifying downstreams and their transforms.
Returns
{Object} A map of stream names to downstreams.

caplin.element.Renderer createRenderer(String rendererName, Array fieldNames)

Creates the appropriate renderer instance to support the supplied renderer name.

Parameters
String rendererName the logical name of the renderer.
Array fieldNames the field names the renderer listens to.
Returns
{caplin.element.Renderer} Renderer of the type defined by the logical name provided rendererName.

caplin.element.Renderer createRendererByType(caplin.element.factory.RendererType rendererType, Array fieldNames)

Creates the appropriate renderer instance to support the supplied renderer name.

Parameters
caplin.element.factory.RendererType rendererType The renderer type.
Array fieldNames The field names the renderer listens to.
Returns
{caplin.element.Renderer} Renderer of the type defined by the renderer type provided.

Object createUpstreams(caplin.stream.attribute.AttributeDefinitions attributeDefinitions, Object node)

Creates a renderer upstream.

Parameters
caplin.stream.attribute.AttributeDefinitions attributeDefinitions Attribute definitions.
Object node JSON object specifying upstreams and their transforms.
Returns
{Object} A map of stream names to upstreams.

void toString()

Returns a human-readable string representation of the object, which is useful for debugging.