@Component(value="report_ReportingApi") public class ReportingBean extends java.lang.Object implements ReportingApi
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
REPORT_EDIT_VIEW_NAME |
NAME
Constructor and Description |
---|
ReportingBean() |
Modifier and Type | Method and Description |
---|---|
com.haulmont.yarg.reporting.ReportOutputDocument |
bulkPrint(Report report,
java.util.List<java.util.Map<java.lang.String,java.lang.Object>> paramsList)
Prints the report several times for each parameter map in the paramsList.
|
com.haulmont.yarg.reporting.ReportOutputDocument |
bulkPrint(Report report,
java.lang.String templateCode,
ReportOutputType outputType,
java.util.List<java.util.Map<java.lang.String,java.lang.Object>> paramsList)
Prints the report several times for each parameter map in the paramsList.
|
void |
cancelReportExecution(java.util.UUID userSessionId,
java.util.UUID reportId)
Cancel report execution
|
Report |
convertToReport(java.lang.String serializedReport) |
java.lang.String |
convertToString(Report report) |
Report |
copyReport(Report source) |
com.haulmont.cuba.core.entity.FileDescriptor |
createAndSaveReport(Report report,
java.util.Map<java.lang.String,java.lang.Object> params,
java.lang.String fileName)
Generates a report and saves its output to the file storage.
|
com.haulmont.cuba.core.entity.FileDescriptor |
createAndSaveReport(Report report,
ReportTemplate template,
java.util.Map<java.lang.String,java.lang.Object> params,
java.lang.String fileName)
Generates a report and saves its output to the file storage.
|
com.haulmont.cuba.core.entity.FileDescriptor |
createAndSaveReport(ReportRunParams reportRunParams)
Generates a report and saves its output to the file storage.
|
com.haulmont.cuba.core.entity.FileDescriptor |
createAndSaveReport(Report report,
java.lang.String templateCode,
java.util.Map<java.lang.String,java.lang.Object> params,
java.lang.String fileName)
Generates a report and saves its output to the file storage.
|
com.haulmont.yarg.reporting.ReportOutputDocument |
createReport(Report report,
java.util.Map<java.lang.String,java.lang.Object> params)
Generates a report.
|
com.haulmont.yarg.reporting.ReportOutputDocument |
createReport(Report report,
java.util.Map<java.lang.String,java.lang.Object> params,
ReportOutputType outputType)
Generates a report.
|
com.haulmont.yarg.reporting.ReportOutputDocument |
createReport(Report report,
ReportTemplate template,
java.util.Map<java.lang.String,java.lang.Object> params)
Generates a report.
|
com.haulmont.yarg.reporting.ReportOutputDocument |
createReport(ReportRunParams reportRunParams)
Generates a report.
|
com.haulmont.yarg.reporting.ReportOutputDocument |
createReport(Report report,
java.lang.String templateCode,
java.util.Map<java.lang.String,java.lang.Object> params)
Generates a report.
|
com.haulmont.yarg.reporting.ReportOutputDocument |
createReport(Report report,
java.lang.String templateCode,
java.util.Map<java.lang.String,java.lang.Object> params,
ReportOutputType outputType)
Generates a report.
|
java.util.Date |
currentDateOrTime(ParameterType parameterType)
Get current date
Date according to ParameterType value |
byte[] |
exportReports(java.util.Collection<Report> reports)
Exports all reports and their templates into one zip archive.
|
com.haulmont.chile.core.model.MetaClass |
findMetaClassByDataSetEntityAlias(java.lang.String alias,
DataSetType dataSetType,
java.util.List<ReportInputParameter> reportInputParameters) |
java.lang.String |
generateReportName(java.lang.String sourceName) |
java.util.Collection<Report> |
importReports(byte[] zipBytes)
Imports reports from ZIP archive.
|
java.util.Collection<Report> |
importReports(byte[] zipBytes,
java.util.EnumSet<ReportImportOption> importOptions)
Imports reports from ZIP archive.
|
ReportImportResult |
importReportsWithResult(byte[] zipBytes,
java.util.EnumSet<ReportImportOption> importOptions)
Imports reports from ZIP archive.
|
java.util.List |
loadDataForParameterPrototype(ParameterPrototype prototype) |
<T extends com.haulmont.cuba.core.entity.Entity> |
reloadEntity(T entity,
com.haulmont.cuba.core.global.View view) |
Report |
storeReportEntity(Report report)
Saves Report entity to the database.
|
public static final java.lang.String REPORT_EDIT_VIEW_NAME
public Report storeReportEntity(Report report)
ReportingApi
storeReportEntity
in interface ReportingApi
report
- report entity instancepublic com.haulmont.yarg.reporting.ReportOutputDocument createReport(Report report, java.util.Map<java.lang.String,java.lang.Object> params)
ReportingApi
createReport
in interface ReportingApi
report
- entity instance defining the reportparams
- report parameterspublic com.haulmont.yarg.reporting.ReportOutputDocument createReport(Report report, java.util.Map<java.lang.String,java.lang.Object> params, ReportOutputType outputType)
ReportingApi
createReport
in interface ReportingApi
report
- entity instance defining the reportparams
- report parametersoutputType
- desired report output typepublic com.haulmont.yarg.reporting.ReportOutputDocument createReport(Report report, java.lang.String templateCode, java.util.Map<java.lang.String,java.lang.Object> params)
ReportingApi
createReport
in interface ReportingApi
report
- entity instance defining the reporttemplateCode
- code of a template to useparams
- report parameterspublic com.haulmont.yarg.reporting.ReportOutputDocument createReport(Report report, java.lang.String templateCode, java.util.Map<java.lang.String,java.lang.Object> params, ReportOutputType outputType)
ReportingApi
createReport
in interface ReportingApi
report
- entity instance defining the reporttemplateCode
- code of a template to useparams
- report parametersoutputType
- desired report output typepublic com.haulmont.yarg.reporting.ReportOutputDocument createReport(ReportRunParams reportRunParams)
ReportingApi
createReport
in interface ReportingApi
reportRunParams
- all report parameters in a single POJOpublic com.haulmont.yarg.reporting.ReportOutputDocument bulkPrint(Report report, java.util.List<java.util.Map<java.lang.String,java.lang.Object>> paramsList)
ReportingApi
bulkPrint
in interface ReportingApi
public com.haulmont.yarg.reporting.ReportOutputDocument bulkPrint(Report report, java.lang.String templateCode, ReportOutputType outputType, java.util.List<java.util.Map<java.lang.String,java.lang.Object>> paramsList)
ReportingApi
bulkPrint
in interface ReportingApi
public com.haulmont.yarg.reporting.ReportOutputDocument createReport(Report report, ReportTemplate template, java.util.Map<java.lang.String,java.lang.Object> params)
ReportingApi
createReport
in interface ReportingApi
report
- entity instance defining the reporttemplate
- template to useparams
- report parameterspublic java.util.List loadDataForParameterPrototype(ParameterPrototype prototype)
loadDataForParameterPrototype
in interface ReportingApi
public Report copyReport(Report source)
copyReport
in interface ReportingApi
public byte[] exportReports(java.util.Collection<Report> reports)
ReportingApi
exportReports
in interface ReportingApi
reports
- Collection of Report objects to be exported.public com.haulmont.cuba.core.entity.FileDescriptor createAndSaveReport(Report report, java.util.Map<java.lang.String,java.lang.Object> params, java.lang.String fileName)
ReportingApi
createAndSaveReport
in interface ReportingApi
report
- entity instance defining the reportparams
- report parametersfileName
- output file namepublic com.haulmont.cuba.core.entity.FileDescriptor createAndSaveReport(Report report, java.lang.String templateCode, java.util.Map<java.lang.String,java.lang.Object> params, java.lang.String fileName)
ReportingApi
createAndSaveReport
in interface ReportingApi
report
- entity instance defining the reporttemplateCode
- code of a template to useparams
- report parametersfileName
- output file namepublic com.haulmont.cuba.core.entity.FileDescriptor createAndSaveReport(Report report, ReportTemplate template, java.util.Map<java.lang.String,java.lang.Object> params, java.lang.String fileName)
ReportingApi
createAndSaveReport
in interface ReportingApi
report
- entity instance defining the reporttemplate
- template to useparams
- report parametersfileName
- output file namepublic com.haulmont.cuba.core.entity.FileDescriptor createAndSaveReport(ReportRunParams reportRunParams)
ReportingApi
createAndSaveReport
in interface ReportingApi
reportRunParams
- all report parameters in a single POJOpublic java.util.Collection<Report> importReports(byte[] zipBytes)
ReportingApi
importReports
in interface ReportingApi
zipBytes
- ZIP archive as a byte array.public java.util.Collection<Report> importReports(byte[] zipBytes, java.util.EnumSet<ReportImportOption> importOptions)
ReportingApi
importReports
in interface ReportingApi
zipBytes
- ZIP archive as a byte array.importOptions
- - report import optionspublic ReportImportResult importReportsWithResult(byte[] zipBytes, java.util.EnumSet<ReportImportOption> importOptions)
ReportingApi
importReportsWithResult
in interface ReportingApi
zipBytes
- ZIP archive as a byte array.importOptions
- report - import optionspublic java.lang.String convertToString(Report report)
convertToString
in interface ReportingApi
public Report convertToReport(java.lang.String serializedReport)
convertToReport
in interface ReportingApi
public <T extends com.haulmont.cuba.core.entity.Entity> T reloadEntity(T entity, com.haulmont.cuba.core.global.View view)
reloadEntity
in interface ReportingApi
public com.haulmont.chile.core.model.MetaClass findMetaClassByDataSetEntityAlias(java.lang.String alias, DataSetType dataSetType, java.util.List<ReportInputParameter> reportInputParameters)
findMetaClassByDataSetEntityAlias
in interface ReportingApi
public java.lang.String generateReportName(java.lang.String sourceName)
generateReportName
in interface ReportingApi
public void cancelReportExecution(java.util.UUID userSessionId, java.util.UUID reportId)
ReportingApi
cancelReportExecution
in interface ReportingApi
userSessionId
- - user session that started report executionreportId
- - identifier of executed reportpublic java.util.Date currentDateOrTime(ParameterType parameterType)
ReportingApi
Date
according to ParameterType
valuecurrentDateOrTime
in interface ReportingApi
parameterType
- - ParameterType value.