public class DefaultReportViewConverterStrategy extends AbstractTemplateViewConverterStrategy
VELOCITY_CTX_REPORTS) or text representation of that java object (generated by
an implementation of the ReportViewConverterStrategy, key VELOCITY_CTX_REPORTS_TEXT).| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
DEFAULT_FILE_NAME |
static java.lang.String |
VELOCITY_CTX_CONFIG_NAME |
static java.lang.String |
VELOCITY_CTX_GENERATED_BY |
static java.lang.String |
VELOCITY_CTX_GENERATED_FOR |
static java.lang.String |
VELOCITY_CTX_GENERATED_TIMESTAMP |
static java.lang.String |
VELOCITY_CTX_REPORT_NAME |
static java.lang.String |
VELOCITY_CTX_REPORTS
Key under which a Velocity context stores a collection with
ReportView objects. |
static java.lang.String |
VELOCITY_CTX_REPORTS_TEXT
Key under which a Velocity context stores text representation of the collection with
ReportView objects. |
CTX_CONFIG_NAME, CTX_CURRENT_USER, CTX_REPORT_ID, CTX_ROOT_ITEM, CTX_TEMPLATE| Constructor and Description |
|---|
DefaultReportViewConverterStrategy() |
| Modifier and Type | Method and Description |
|---|---|
protected java.util.List<ReportConversionData> |
convert(java.util.List<ReportView> reports,
RendererTemplateModel template,
java.util.Map<java.lang.String,java.lang.Object> context) |
protected ReportConversionData |
convertUsingTemplate(RendererTemplateModel template,
java.lang.Object conversionContext)
Converts the given reports to list to HTML format.
|
protected java.util.Map<java.lang.String,java.lang.Object> |
createConversionContext(java.util.List<ReportView> reports,
java.util.Map<java.lang.String,java.lang.Object> context)
Create context for conversion.
|
protected RendererService |
getRendererService() |
java.lang.String |
getReportName() |
protected ReportViewConverterStrategy |
getTextConverterStrategy() |
protected java.util.Map<java.lang.String,java.lang.Object> |
prepareAdditionalContext(java.util.Map<java.lang.String,java.lang.Object> context)
Prepares a Velocity context.
|
void |
setRendererService(RendererService rendererService) |
void |
setReportName(java.lang.String reportName)
Sets a name of the report.
|
void |
setTextConverterStrategy(ReportViewConverterStrategy textConverterStrategy)
Sets an implementation of the
ReportViewConverterStrategy which generates text representation of the report. |
convertpublic static final java.lang.String VELOCITY_CTX_REPORTS
ReportView objects.public static final java.lang.String VELOCITY_CTX_REPORTS_TEXT
ReportView objects.VELOCITY_CTX_REPORTS,
Constant Field Valuespublic static final java.lang.String VELOCITY_CTX_GENERATED_TIMESTAMP
public static final java.lang.String VELOCITY_CTX_GENERATED_BY
public static final java.lang.String VELOCITY_CTX_GENERATED_FOR
public static final java.lang.String VELOCITY_CTX_REPORT_NAME
public static final java.lang.String VELOCITY_CTX_CONFIG_NAME
public static final java.lang.String DEFAULT_FILE_NAME
protected java.util.List<ReportConversionData> convert(java.util.List<ReportView> reports, RendererTemplateModel template, java.util.Map<java.lang.String,java.lang.Object> context)
convert in class AbstractTemplateViewConverterStrategyprotected java.util.Map<java.lang.String,java.lang.Object> createConversionContext(java.util.List<ReportView> reports, java.util.Map<java.lang.String,java.lang.Object> context)
reports - generated report viewcontext - a map used to pass in additional jsonData needed by the strategy.protected ReportConversionData convertUsingTemplate(RendererTemplateModel template, java.lang.Object conversionContext)
template - template used to convert the raw data into desired format.conversionContext - the list of report jsonData to convert.protected java.util.Map<java.lang.String,java.lang.Object> prepareAdditionalContext(java.util.Map<java.lang.String,java.lang.Object> context)
context - original context passed to the AbstractTemplateViewConverterStrategy.convert(List, Map) method.VelocityContext containing the generation timestamp, report id, configuration name and user names
(generated by and for).public java.lang.String getReportName()
public void setReportName(java.lang.String reportName)
DEFAULT_FILE_NAME.reportName - the report name.protected ReportViewConverterStrategy getTextConverterStrategy()
public void setTextConverterStrategy(ReportViewConverterStrategy textConverterStrategy)
ReportViewConverterStrategy which generates text representation of the report.textConverterStrategy - the strategy which produces text representation of the report.protected RendererService getRendererService()
public void setRendererService(RendererService rendererService)
Copyright © 2018 SAP SE. All Rights Reserved.