net.sourceforge.rtf.template.velocity
Class RTFVelocityTransformerImpl

java.lang.Object
  extended by net.sourceforge.rtf.template.AbstractRTFDocumentTransformer
      extended by net.sourceforge.rtf.template.velocity.RTFVelocityTransformerImpl
All Implemented Interfaces:
IRTFFieldNameTransform, IRTFDocumentTransformer

public class RTFVelocityTransformerImpl
extends AbstractRTFDocumentTransformer

RTF Velocity Transformer which transform RTF Document to RTF Document with Velocity Macro.

Version:
1.0.0
Author:
Angelo ZERR

Field Summary
 
Fields inherited from class net.sourceforge.rtf.template.AbstractRTFDocumentTransformer
bookmarkBkmEndMap, bookmarkEndMap, bookmarkStartMap, groupByPerPageBreak, lastEndLoopRTFBookmark, pageBeforeEndBookmarkMap, rowMustNotGenerateForeachList, RTF_ELEMENT_BOOKMARK, RTF_ELEMENT_DOCUMENT, RTF_ELEMENT_FIELD, RTF_ELEMENT_PAGE, RTF_ELEMENT_ROW, RTF_ELEMENT_STRINGBUFFER, RTF_ELEMENT_USERPROPERTY, rtfTransformMap, startBookmarksList, startBookmarksNotEnded
 
Constructor Summary
RTFVelocityTransformerImpl()
           
 
Method Summary
protected  java.lang.String getForeach(java.lang.String fieldName, java.lang.String fieldNameWithListInfo)
           
protected  java.lang.String getMacroEndForEach()
          Return string for end for each
protected  java.lang.String getMacroPageBreak(java.lang.String itemNameList, java.lang.String rtfPageBreakContent)
           
protected  java.lang.String getMacroPageBreak(java.lang.String itemNameList, java.lang.String rtfPageBreakContent, int groupByPerPageBreak)
           
protected  java.lang.String getObjectValueList(java.lang.String fieldName, boolean withGetter)
           
protected  java.lang.String getObjectValueList(java.lang.String fieldName, java.lang.String fieldNameWithListInfo, boolean withGetter)
          Return velocity name used into #foreach for the field name fieldname. eg : for fieldname developers.Name, this function return $item_developers (if withGetter = false) and $item_developers.Name (if withGetter = true) for fieldname developers.Roles.Name, this function return $item_developers_roles (if withGetter = false) and $item_developers_roles.Name (if withGetter = true)
 
Methods inherited from class net.sourceforge.rtf.template.AbstractRTFDocumentTransformer
formatSubFieldName, getContextFields, getItemListName, getTransformedFieldName, getTransformerConfig, isBookmarkEndLoop, isBookmarkStartLoop, setGroupByPerPageBreak, setTransformerConfig, transform, transform, transform
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RTFVelocityTransformerImpl

public RTFVelocityTransformerImpl()
Method Detail

getMacroEndForEach

protected java.lang.String getMacroEndForEach()
Description copied from class: AbstractRTFDocumentTransformer
Return string for end for each

Specified by:
getMacroEndForEach in class AbstractRTFDocumentTransformer
Returns:

getObjectValueList

protected java.lang.String getObjectValueList(java.lang.String fieldName,
                                              java.lang.String fieldNameWithListInfo,
                                              boolean withGetter)
Return velocity name used into #foreach for the field name fieldname. eg :

Specified by:
getObjectValueList in class AbstractRTFDocumentTransformer
Parameters:
fieldName - field name to translate into velocity name.
withGetter - true if getter must be returned and false otherwise.
Returns:

getObjectValueList

protected java.lang.String getObjectValueList(java.lang.String fieldName,
                                              boolean withGetter)
Specified by:
getObjectValueList in class AbstractRTFDocumentTransformer

getForeach

protected java.lang.String getForeach(java.lang.String fieldName,
                                      java.lang.String fieldNameWithListInfo)
Specified by:
getForeach in class AbstractRTFDocumentTransformer

getMacroPageBreak

protected java.lang.String getMacroPageBreak(java.lang.String itemNameList,
                                             java.lang.String rtfPageBreakContent)
Specified by:
getMacroPageBreak in class AbstractRTFDocumentTransformer

getMacroPageBreak

protected java.lang.String getMacroPageBreak(java.lang.String itemNameList,
                                             java.lang.String rtfPageBreakContent,
                                             int groupByPerPageBreak)
Specified by:
getMacroPageBreak in class AbstractRTFDocumentTransformer


Copyright 2007 null. All Rights Reserved.