Class ReportTemplateImpl
java.lang.Object
io.jmix.reports.yarg.structure.impl.ReportTemplateImpl
- All Implemented Interfaces:
ReportTemplate
,Serializable
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionprotected String
protected boolean
protected CustomReport
protected byte[]
protected String
protected String
protected boolean
protected String
protected ReportOutputType
Fields inherited from interface io.jmix.reports.yarg.structure.ReportTemplate
DEFAULT_TEMPLATE_CODE
-
Constructor Summary
ConstructorDescriptionReportTemplateImpl
(String code, String documentName, String documentPath, ReportOutputType reportOutputType) ReportTemplateImpl
(String code, String documentName, String documentPath, ReportOutputType reportOutputType, boolean groovy) ReportTemplateImpl
(String code, String documentName, String documentPath, InputStream documentContent, ReportOutputType reportOutputType) -
Method Summary
-
Field Details
-
code
-
documentName
-
documentPath
-
documentContent
protected byte[] documentContent -
reportOutputType
-
outputNamePattern
-
groovy
protected boolean groovy -
customReport
-
custom
protected boolean custom
-
-
Constructor Details
-
ReportTemplateImpl
public ReportTemplateImpl(String code, String documentName, String documentPath, InputStream documentContent, ReportOutputType reportOutputType) throws IOException - Throws:
IOException
-
ReportTemplateImpl
public ReportTemplateImpl(String code, String documentName, String documentPath, ReportOutputType reportOutputType) throws IOException - Throws:
IOException
-
ReportTemplateImpl
public ReportTemplateImpl(String code, String documentName, String documentPath, ReportOutputType reportOutputType, boolean groovy) throws IOException - Throws:
IOException
-
-
Method Details
-
getCode
- Specified by:
getCode
in interfaceReportTemplate
-
getDocumentName
- Specified by:
getDocumentName
in interfaceReportTemplate
-
getDocumentContent
- Specified by:
getDocumentContent
in interfaceReportTemplate
- Returns:
- stream containing resulting document
-
getOutputType
- Specified by:
getOutputType
in interfaceReportTemplate
- Returns:
- output type of for this template
-
getDocumentPath
- Specified by:
getDocumentPath
in interfaceReportTemplate
-
getOutputNamePattern
- Specified by:
getOutputNamePattern
in interfaceReportTemplate
- Returns:
- name pattern for generating document. Example: ${Band1.FILE_NAME} or myDocument.doc
-
isGroovy
public boolean isGroovy()- Specified by:
isGroovy
in interfaceReportTemplate
- Returns:
- if it is groovy html template.
-
isCustom
public boolean isCustom()- Specified by:
isCustom
in interfaceReportTemplate
- Returns:
- if report is defined by custom class. In this case band data will be passed in io.jmix.reports.yarg.structure.ReportTemplate#getCustomReport() object and it will generate binary.
-
getCustomReport
- Specified by:
getCustomReport
in interfaceReportTemplate
- Returns:
- implementation of custom report logic.
-