fr.opensagres.xdocreport.template.formatter
Class AbstractDocumentFormatter
java.lang.Object
fr.opensagres.xdocreport.template.formatter.AbstractDocumentFormatter
- All Implemented Interfaces:
- IDocumentFormatter
- Direct Known Subclasses:
- FreemarkerDocumentFormatter, VelocityDocumentFormatter
public abstract class AbstractDocumentFormatter
- extends Object
- implements IDocumentFormatter
Method Summary |
String |
extractItemNameList(String content,
String fieldName,
boolean forceAsField)
|
int |
extractListDirectiveInfo(String content,
DirectivesStack directives)
|
String |
formatAsSimpleField(boolean encloseInDirective,
String... fields)
|
protected AbstractDocumentFormatter.DirectiveToParse |
getDirectiveToParse(int startLoopIndex,
int endLoopIndex,
int startIfIndex,
int endIfIndex)
|
String |
getEndDocumentDirective()
|
String |
getFunctionDirective(boolean encloseInDirective,
String key,
String methodName,
String... parameters)
|
String |
getFunctionDirective(String key,
String methodName,
String... parameters)
|
protected abstract String |
getItemToken()
|
int |
getMinIndex(int startLoopIndex,
int endLoopIndex,
int startIfIndex,
int endIfIndex)
|
String |
getSetDirective(String name,
String value)
|
String |
getStartDocumentDirective()
|
String |
getStartIfDirective(String fieldName)
|
String |
getStartLoopDirective(String itemNameList)
|
protected String |
getVariableName(long variableIndex)
|
protected abstract boolean |
isModelField(String content,
String fieldName)
|
void |
setEndDocumentDirective(String endDocumentDirective)
|
void |
setStartDocumentDirective(String startDocumentDirective)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface fr.opensagres.xdocreport.template.formatter.IDocumentFormatter |
containsInterpolation, extractListDirectiveInfo, extractModelTokenPrefix, formatAsCallTextStyling, formatAsFieldItemList, formatAsSimpleField, formatAsTextStylingField, getDefineDirective, getElseDirective, getEndIfDirective, getEndLoopDirective, getEndNoParse, getFunctionDirective, getIndexOfScript, getLoopCountDirective, getSetDirective, getStartIfDirective, getStartLoopDirective, getStartNoParse, hasDirective |
NO_ESCAPE
public static final String NO_ESCAPE
- See Also:
- Constant Field Values
AbstractDocumentFormatter
public AbstractDocumentFormatter()
extractItemNameList
public String extractItemNameList(String content,
String fieldName,
boolean forceAsField)
- Specified by:
extractItemNameList
in interface IDocumentFormatter
getStartDocumentDirective
public String getStartDocumentDirective()
- Specified by:
getStartDocumentDirective
in interface IDocumentFormatter
setStartDocumentDirective
public void setStartDocumentDirective(String startDocumentDirective)
getEndDocumentDirective
public String getEndDocumentDirective()
- Specified by:
getEndDocumentDirective
in interface IDocumentFormatter
setEndDocumentDirective
public void setEndDocumentDirective(String endDocumentDirective)
getStartLoopDirective
public String getStartLoopDirective(String itemNameList)
- Specified by:
getStartLoopDirective
in interface IDocumentFormatter
extractListDirectiveInfo
public int extractListDirectiveInfo(String content,
DirectivesStack directives)
- Specified by:
extractListDirectiveInfo
in interface IDocumentFormatter
getItemToken
protected abstract String getItemToken()
isModelField
protected abstract boolean isModelField(String content,
String fieldName)
getDirectiveToParse
protected AbstractDocumentFormatter.DirectiveToParse getDirectiveToParse(int startLoopIndex,
int endLoopIndex,
int startIfIndex,
int endIfIndex)
getMinIndex
public int getMinIndex(int startLoopIndex,
int endLoopIndex,
int startIfIndex,
int endIfIndex)
getVariableName
protected String getVariableName(long variableIndex)
formatAsSimpleField
public String formatAsSimpleField(boolean encloseInDirective,
String... fields)
- Specified by:
formatAsSimpleField
in interface IDocumentFormatter
getFunctionDirective
public String getFunctionDirective(boolean encloseInDirective,
String key,
String methodName,
String... parameters)
- Specified by:
getFunctionDirective
in interface IDocumentFormatter
getFunctionDirective
public String getFunctionDirective(String key,
String methodName,
String... parameters)
- Specified by:
getFunctionDirective
in interface IDocumentFormatter
getSetDirective
public String getSetDirective(String name,
String value)
- Specified by:
getSetDirective
in interface IDocumentFormatter
getStartIfDirective
public String getStartIfDirective(String fieldName)
- Specified by:
getStartIfDirective
in interface IDocumentFormatter
Copyright © 2013. All rights reserved.