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 |
TEMP_FILE_EXTENSION |
static java.lang.String |
TEMP_FILE_PREFIX |
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)
Deprecated.
since 1811
|
java.util.List<ReportConversionData> |
convert(java.util.stream.Stream<ReportView> reports,
RendererTemplateModel template,
java.util.Map<java.lang.String,java.lang.Object> context) |
protected ReportConversionData |
convertUsingTemplate(RendererTemplateModel template,
java.util.Map<java.lang.String,java.lang.Object> conversionContext)
Converts the given reports 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)
Deprecated.
since 1811
|
protected java.util.Map<java.lang.String,java.lang.Object> |
createConversionContext(java.util.Map<java.lang.String,java.lang.Object> context)
Create context for conversion.
|
java.util.Collection<Directive> |
getCustomDirectives() |
I18NService |
getI18NService() |
protected RendererService |
getRendererService() |
java.lang.String |
getReportName() |
SessionService |
getSessionService() |
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.
|
protected void |
registerRequiredCustomDirectives() |
void |
setCustomDirectives(java.util.Collection<Directive> customDirectives) |
void |
setI18NService(I18NService i18NService) |
void |
setRendererService(RendererService rendererService) |
void |
setReportName(java.lang.String reportName)
Sets a name of the report.
|
void |
setSessionService(SessionService sessionService) |
void |
setTextConverterStrategy(ReportViewConverterStrategy textConverterStrategy)
Sets an implementation of the
ReportViewConverterStrategy which generates text representation of the report. |
convert, 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
public static final java.lang.String TEMP_FILE_EXTENSION
public static final java.lang.String TEMP_FILE_PREFIX
@Deprecated protected java.util.List<ReportConversionData> convert(java.util.List<ReportView> reports, RendererTemplateModel template, java.util.Map<java.lang.String,java.lang.Object> context)
AbstractTemplateViewConverterStrategyAbstractTemplateViewConverterStrategy.convert(java.util.stream.Stream, de.hybris.platform.commons.model.renderer.RendererTemplateModel, java.util.Map)
will become abstract.convert in class AbstractTemplateViewConverterStrategypublic java.util.List<ReportConversionData> convert(java.util.stream.Stream<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.Map<java.lang.String,java.lang.Object> context)
context - a map used to pass in additional jsonData needed by the strategy.@Deprecated 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)
reports - generated report viewcontext - a map used to pass in additional jsonData needed by the strategy.protected ReportConversionData convertUsingTemplate(RendererTemplateModel template, java.util.Map<java.lang.String,java.lang.Object> conversionContext)
template - template used to convert the raw data into desired format.conversionContext - conversion context.protected void registerRequiredCustomDirectives()
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)
public SessionService getSessionService()
public void setSessionService(SessionService sessionService)
public I18NService getI18NService()
public void setI18NService(I18NService i18NService)
public java.util.Collection<Directive> getCustomDirectives()
public void setCustomDirectives(java.util.Collection<Directive> customDirectives)
Copyright © 2018 SAP SE. All Rights Reserved.