com.fatwire.cs.ui.view.renderer.attribute
Class BaseRenderer

java.lang.Object
  extended by com.fatwire.cs.ui.view.renderer.attribute.BaseRenderer
Direct Known Subclasses:
BasicDataRenderer

public abstract class BaseRenderer
extends java.lang.Object

Base class of both attribute data and data type renderers. This class assumes it has been initialized properly by first setting the RenderDataContext.


Constructor Summary
BaseRenderer()
           
 
Method Summary
protected  CoreOutputText createLabel(java.lang.Object value, java.lang.String toolTip)
          Creates a label
protected  java.util.List<UIComponent> createList(UIComponent component)
          Creates and Adds a UI component member to the list of UI
protected  CoreOutputText createText()
          This method will create a text UI component
protected  CoreOutputText createText(java.lang.Object value)
          This method will create a text UI component
protected static java.lang.String formatId(java.lang.String input)
          Generates a formated UI component unique identifier
protected  java.lang.String generateID(int index)
          Generates a formated input component unique identifier.
protected  java.lang.String generateLabelID()
          Generates a label identifier.
 RenderDataContext getContext()
          This method will get retrieve the initilized render data context
protected  boolean isMultiValued(AttributeDef attributeDef)
          Determines if attribute definition is a Multi Valued Data Object
protected  boolean isMultiValueOrdered(AttributeDef attributeDef)
          Determines if attribute definition is a Multi Valued Ordered Data Object
protected  boolean isSingleValued(AttributeDef attributeDef)
          Determines if attribute definition is a Single Valued data Object
 void setContext(RenderDataContext renderContex)
          This method will set the render data context.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BaseRenderer

public BaseRenderer()
Method Detail

getContext

public RenderDataContext getContext()
This method will get retrieve the initilized render data context

Returns:
RenderDataContext object

setContext

public void setContext(RenderDataContext renderContex)
This method will set the render data context.

Parameters:
renderContex - new render data context.

createText

protected CoreOutputText createText()
This method will create a text UI component

Returns:
CoreOutputText object with empty String value.

createText

protected CoreOutputText createText(java.lang.Object value)
This method will create a text UI component

Parameters:
value - text UI object
Returns:
CoreOutputText object with passed in object as its value.

createLabel

protected CoreOutputText createLabel(java.lang.Object value,
                                     java.lang.String toolTip)
Creates a label

Parameters:
value - used to display as text value.
toolTip - used to display as toolTip.
Returns:
CoreOutputText object with both of its value and toolTip set.

createList

protected java.util.List<UIComponent> createList(UIComponent component)
Creates and Adds a UI component member to the list of UI

Parameters:
UIComponent - data object to add to the list
Returns:
List A list of UI components

formatId

protected static java.lang.String formatId(java.lang.String input)
Generates a formated UI component unique identifier

Parameters:
input - input id.
Returns:
formated component id.

generateID

protected java.lang.String generateID(int index)
Generates a formated input component unique identifier.

Parameters:
index - position of rendering component in the asset.
Returns:
id value for the rendering component.

generateLabelID

protected java.lang.String generateLabelID()
Generates a label identifier. Replaces unaccepted characters for ID like space,- etc

Returns:
formated label id.

isMultiValued

protected boolean isMultiValued(AttributeDef attributeDef)
Determines if attribute definition is a Multi Valued Data Object

Parameters:
attributeDef - rendering attribute definition input.
Returns:
true if the rendering attribute is a multiple values object; false otherwise.

isMultiValueOrdered

protected boolean isMultiValueOrdered(AttributeDef attributeDef)
Determines if attribute definition is a Multi Valued Ordered Data Object

Parameters:
attributeDef - rendering attribute definition input.
Returns:
true if the rendering attribute is a multiple values ordered object; false otherwise.

isSingleValued

protected boolean isSingleValued(AttributeDef attributeDef)
Determines if attribute definition is a Single Valued data Object

Parameters:
AttributeDef - attributeDefinput
Returns:
true if the rendering attribute is a single value object; false otherwise.


Copyright (c) 2003 - 2011 FatWire Corporation All Rights Reserved.