@UIScope
@Component(value="report_ReportGuiManager")
public class ReportGuiManager
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected io.jmix.core.CoreProperties |
coreProperties |
protected io.jmix.core.security.CurrentAuthentication |
currentAuthentication |
protected io.jmix.core.DataManager |
dataManager |
protected io.jmix.ui.Dialogs |
dialogs |
protected io.jmix.ui.download.Downloader |
downloader |
protected io.jmix.core.FetchPlans |
fetchPlans |
protected io.jmix.core.Messages |
messages |
protected io.jmix.core.Metadata |
metadata |
protected io.jmix.core.MetadataTools |
metadataTools |
protected ReportsClientProperties |
reportingClientConfig |
protected Reports |
reports |
protected ReportSecurityManager |
reportSecurityManager |
protected io.jmix.ui.ScreenBuilders |
screenBuilders |
protected io.jmix.ui.Screens |
screens |
protected io.jmix.ui.UiProperties |
uiProperties |
Constructor and Description |
---|
ReportGuiManager() |
Modifier and Type | Method and Description |
---|---|
void |
bulkPrint(Report report,
java.lang.String alias,
java.util.Collection selectedEntities)
Print certain reports for list of entities and pack result files into ZIP.
|
void |
bulkPrint(Report report,
java.lang.String alias,
java.util.Collection selectedEntities,
io.jmix.ui.screen.FrameOwner screen)
Print certain reports for list of entities and pack result files into ZIP.
|
void |
bulkPrint(Report report,
java.lang.String alias,
java.util.Collection selectedEntities,
io.jmix.ui.screen.FrameOwner screen,
java.util.Map<java.lang.String,java.lang.Object> additionalParameters)
Print certain reports for list of entities and pack result files into ZIP.
|
void |
bulkPrint(Report report,
java.lang.String templateCode,
ReportOutputType outputType,
java.lang.String alias,
java.util.Collection selectedEntities,
io.jmix.ui.screen.FrameOwner screen,
java.util.Map<java.lang.String,java.lang.Object> additionalParameters)
Print certain reports for list of entities and pack result files into ZIP.
|
void |
bulkPrintBackground(Report report,
java.lang.String alias,
java.util.Collection selectedEntities,
io.jmix.ui.screen.FrameOwner screen)
Print certain reports for list of entities and pack result files into ZIP.
|
void |
bulkPrintBackground(Report report,
java.lang.String alias,
java.util.Collection selectedEntities,
io.jmix.ui.screen.FrameOwner window,
java.util.Map<java.lang.String,java.lang.Object> additionalParameters)
Print certain reports for list of entities and pack result files into ZIP.
|
void |
bulkPrintBackground(Report report,
java.lang.String templateCode,
ReportOutputType outputType,
java.lang.String alias,
java.util.Collection selectedEntities,
io.jmix.ui.screen.FrameOwner screen,
java.util.Map<java.lang.String,java.lang.Object> additionalParameters)
Print certain reports for list of entities and pack result files into ZIP.
|
void |
bulkPrintSync(Report report,
java.lang.String alias,
java.util.Collection selectedEntities,
io.jmix.ui.screen.FrameOwner screen)
Print certain reports for list of entities and pack result files into ZIP.
|
void |
bulkPrintSync(Report report,
java.lang.String alias,
java.util.Collection selectedEntities,
io.jmix.ui.screen.FrameOwner screen,
java.util.Map<java.lang.String,java.lang.Object> additionalParameters)
Print certain reports for list of entities and pack result files into ZIP.
|
void |
bulkPrintSync(Report report,
java.lang.String templateCode,
ReportOutputType outputType,
java.lang.String alias,
java.util.Collection selectedEntities,
io.jmix.ui.screen.FrameOwner screen,
java.util.Map<java.lang.String,java.lang.Object> additionalParameters)
Print certain reports for list of entities and pack result files into ZIP.
|
boolean |
containsAlterableTemplate(Report report) |
protected java.lang.Object |
convertParameterIfNecessary(ReportInputParameter parameter,
java.lang.Object paramValue,
boolean useForInputParametersForm) |
java.util.List<Report> |
getAvailableReports(java.lang.String screenId,
org.springframework.security.core.userdetails.UserDetails user,
io.jmix.core.metamodel.model.MetaClass inputValueMetaClass)
Return list of reports, available for certain screen, user and input parameter
|
protected Report |
getReportForPrinting(Report report)
Defensive copy
|
com.haulmont.yarg.reporting.ReportOutputDocument |
getReportResult(Report report,
java.util.Map<java.lang.String,java.lang.Object> params,
java.lang.String templateCode)
Generate ReportOutputDocument
|
com.haulmont.yarg.reporting.ReportOutputDocument |
getReportResult(Report report,
java.util.Map<java.lang.String,java.lang.Object> params,
java.lang.String templateCode,
ReportOutputType outputType)
Generate ReportOutputDocument
|
protected java.lang.Object |
handleCollectionParameter(java.lang.Object paramValue,
boolean convertToSingleItem) |
boolean |
inputParametersRequiredByTemplates(Report report) |
protected void |
openReportParamsDialog(io.jmix.ui.screen.FrameOwner screen,
Report report,
java.util.Map<java.lang.String,java.lang.Object> parameters,
ReportInputParameter inputParameter,
java.lang.String templateCode,
java.lang.String outputFileName,
boolean bulkPrint) |
protected void |
openReportParamsDialog(io.jmix.ui.screen.FrameOwner screen,
Report report,
java.util.Map<java.lang.String,java.lang.Object> parameters,
java.lang.String templateCode,
java.lang.String outputFileName) |
boolean |
parameterMatchesMetaClass(ReportInputParameter parameter,
io.jmix.core.metamodel.model.MetaClass metaClass)
Check if the meta class is applicable for the input parameter
|
void |
printReport(Report report,
java.util.Map<java.lang.String,java.lang.Object> params)
Print report synchronously
|
void |
printReport(Report report,
java.util.Map<java.lang.String,java.lang.Object> params,
io.jmix.ui.screen.FrameOwner screen)
Print report synchronously or asynchronously, depending on configurations
|
void |
printReport(Report report,
java.util.Map<java.lang.String,java.lang.Object> params,
java.lang.String templateCode,
java.lang.String outputFileName)
Print report synchronously
|
void |
printReport(Report report,
java.util.Map<java.lang.String,java.lang.Object> params,
java.lang.String templateCode,
java.lang.String outputFileName,
io.jmix.ui.screen.FrameOwner screen)
Print report synchronously or asynchronously, depending on configurations
|
void |
printReport(Report report,
java.util.Map<java.lang.String,java.lang.Object> params,
java.lang.String templateCode,
java.lang.String outputFileName,
ReportOutputType outputType,
io.jmix.ui.screen.FrameOwner screen)
Print report synchronously or asynchronously, depending on configurations
|
void |
printReportBackground(Report report,
java.util.Map<java.lang.String,java.lang.Object> params,
java.lang.String templateCode,
java.lang.String outputFileName,
io.jmix.ui.screen.FrameOwner screen)
Print report in background task with window, supports cancel
|
void |
printReportBackground(Report report,
java.util.Map<java.lang.String,java.lang.Object> params,
java.lang.String templateCode,
java.lang.String outputFileName,
ReportOutputType outputType,
io.jmix.ui.screen.FrameOwner screen)
Print report in background task with window, supports cancel
|
void |
printReportSync(Report report,
java.util.Map<java.lang.String,java.lang.Object> params,
java.lang.String templateCode,
java.lang.String outputFileName,
io.jmix.ui.screen.FrameOwner screen)
Print report synchronously
|
void |
printReportSync(Report report,
java.util.Map<java.lang.String,java.lang.Object> params,
java.lang.String templateCode,
java.lang.String outputFileName,
ReportOutputType outputType,
io.jmix.ui.screen.FrameOwner screen)
Print report synchronously
|
void |
runReport(Report report,
io.jmix.ui.screen.FrameOwner screen)
Open input parameters dialog if report has parameters otherwise print report
|
void |
runReport(Report report,
io.jmix.ui.screen.FrameOwner screen,
ReportInputParameter parameter,
java.lang.Object parameterValue,
java.lang.String templateCode,
java.lang.String outputFileName)
Open input parameters dialog if report has parameters otherwise print report.
|
protected void |
showReportResult(com.haulmont.yarg.reporting.ReportOutputDocument document,
java.util.Map<java.lang.String,java.lang.Object> params,
java.lang.String templateCode,
java.lang.String outputFileName,
io.jmix.ui.screen.FrameOwner screen) |
protected void |
showReportResult(com.haulmont.yarg.reporting.ReportOutputDocument document,
java.util.Map<java.lang.String,java.lang.Object> params,
java.lang.String templateCode,
java.lang.String outputFileName,
ReportOutputType outputType,
io.jmix.ui.screen.FrameOwner screen) |
boolean |
supportAlterableForTemplate(ReportTemplate template) |
@Autowired protected Reports reports
@Autowired protected io.jmix.core.DataManager dataManager
@Autowired protected io.jmix.core.Messages messages
@Autowired protected io.jmix.core.Metadata metadata
@Autowired protected ReportSecurityManager reportSecurityManager
@Autowired protected io.jmix.core.MetadataTools metadataTools
@Autowired protected io.jmix.ui.UiProperties uiProperties
@Autowired protected io.jmix.core.CoreProperties coreProperties
@Autowired protected io.jmix.ui.download.Downloader downloader
@Autowired protected ReportsClientProperties reportingClientConfig
@Autowired protected io.jmix.core.FetchPlans fetchPlans
@Autowired protected io.jmix.ui.ScreenBuilders screenBuilders
@Autowired protected io.jmix.ui.Screens screens
@Autowired protected io.jmix.ui.Dialogs dialogs
@Autowired protected io.jmix.core.security.CurrentAuthentication currentAuthentication
public void runReport(Report report, io.jmix.ui.screen.FrameOwner screen)
report
- - target reportscreen
- - caller windowpublic void runReport(Report report, io.jmix.ui.screen.FrameOwner screen, ReportInputParameter parameter, java.lang.Object parameterValue, @Nullable java.lang.String templateCode, @Nullable java.lang.String outputFileName)
report
- target reportscreen
- caller windowparameter
- input parameter linked with passed parameter valueparameterValue
- parameter valuetemplateCode
- target template codeoutputFileName
- name for output filepublic void printReport(Report report, java.util.Map<java.lang.String,java.lang.Object> params, @Nullable java.lang.String templateCode, @Nullable java.lang.String outputFileName)
report
- - target reportparams
- - report parameters (map keys should match with parameter aliases)templateCode
- - target template codeoutputFileName
- - name for output filepublic void printReport(Report report, java.util.Map<java.lang.String,java.lang.Object> params)
report
- - target reportparams
- - report parameters (map keys should match with parameter aliases)public void printReport(Report report, java.util.Map<java.lang.String,java.lang.Object> params, io.jmix.ui.screen.FrameOwner screen)
report
- - target reportparams
- - report parameters (map keys should match with parameter aliases)screen
- - caller windowpublic void printReport(Report report, java.util.Map<java.lang.String,java.lang.Object> params, @Nullable java.lang.String templateCode, @Nullable java.lang.String outputFileName, @Nullable io.jmix.ui.screen.FrameOwner screen)
report
- - target reportparams
- - report parameters (map keys should match with parameter aliases)templateCode
- - target template codeoutputFileName
- - name for output filescreen
- - caller windowpublic void printReport(Report report, java.util.Map<java.lang.String,java.lang.Object> params, @Nullable java.lang.String templateCode, @Nullable java.lang.String outputFileName, @Nullable ReportOutputType outputType, io.jmix.ui.screen.FrameOwner screen)
report
- - target reportparams
- - report parameters (map keys should match with parameter aliases)templateCode
- - target template codeoutputFileName
- - name for output fileoutputType
- - output type for filescreen
- - caller windowpublic void printReportSync(Report report, java.util.Map<java.lang.String,java.lang.Object> params, @Nullable java.lang.String templateCode, @Nullable java.lang.String outputFileName, @Nullable io.jmix.ui.screen.FrameOwner screen)
report
- - target reportparams
- - report parameters (map keys should match with parameter aliases)templateCode
- - target template codeoutputFileName
- - name for output filescreen
- - caller windowpublic void printReportSync(Report report, java.util.Map<java.lang.String,java.lang.Object> params, @Nullable java.lang.String templateCode, @Nullable java.lang.String outputFileName, @Nullable ReportOutputType outputType, @Nullable io.jmix.ui.screen.FrameOwner screen)
report
- - target reportparams
- - report parameters (map keys should match with parameter aliases)templateCode
- - target template codeoutputFileName
- - name for output fileoutputType
- - output type for filescreen
- - caller windowpublic com.haulmont.yarg.reporting.ReportOutputDocument getReportResult(Report report, java.util.Map<java.lang.String,java.lang.Object> params, @Nullable java.lang.String templateCode)
report
- - target reportparams
- - report parameters (map keys should match with parameter aliases)templateCode
- - target template codepublic com.haulmont.yarg.reporting.ReportOutputDocument getReportResult(Report report, java.util.Map<java.lang.String,java.lang.Object> params, @Nullable java.lang.String templateCode, @Nullable ReportOutputType outputType)
report
- - target reportparams
- - report parameters (map keys should match with parameter aliases)templateCode
- - target template codeoutputType
- - target output typeprotected void showReportResult(com.haulmont.yarg.reporting.ReportOutputDocument document, java.util.Map<java.lang.String,java.lang.Object> params, @Nullable java.lang.String templateCode, @Nullable java.lang.String outputFileName, @Nullable io.jmix.ui.screen.FrameOwner screen)
protected void showReportResult(com.haulmont.yarg.reporting.ReportOutputDocument document, java.util.Map<java.lang.String,java.lang.Object> params, @Nullable java.lang.String templateCode, @Nullable java.lang.String outputFileName, @Nullable ReportOutputType outputType, @Nullable io.jmix.ui.screen.FrameOwner screen)
public void printReportBackground(Report report, java.util.Map<java.lang.String,java.lang.Object> params, @Nullable java.lang.String templateCode, @Nullable java.lang.String outputFileName, io.jmix.ui.screen.FrameOwner screen)
report
- - target reportparams
- - report parameters (map keys should match with parameter aliases)templateCode
- - target template codeoutputFileName
- - name for output filescreen
- - caller windowpublic void printReportBackground(Report report, java.util.Map<java.lang.String,java.lang.Object> params, @Nullable java.lang.String templateCode, @Nullable java.lang.String outputFileName, @Nullable ReportOutputType outputType, io.jmix.ui.screen.FrameOwner screen)
report
- - target reportparams
- - report parameters (map keys should match with parameter aliases)templateCode
- - target template codeoutputFileName
- - name for output fileoutputType
- - output type for filescreen
- - caller windowpublic java.util.List<Report> getAvailableReports(@Nullable java.lang.String screenId, @Nullable org.springframework.security.core.userdetails.UserDetails user, @Nullable io.jmix.core.metamodel.model.MetaClass inputValueMetaClass)
screenId
- - id of the screenuser
- - caller userinputValueMetaClass
- - meta class of report input parameterpublic void bulkPrint(Report report, @Nullable java.lang.String templateCode, @Nullable ReportOutputType outputType, java.lang.String alias, java.util.Collection selectedEntities, @Nullable io.jmix.ui.screen.FrameOwner screen, @Nullable java.util.Map<java.lang.String,java.lang.Object> additionalParameters)
report
- - target reporttemplateCode
- - target template codeoutputType
- - output type for filealias
- - parameter aliasselectedEntities
- - list of selected entitiesscreen
- - caller windowadditionalParameters
- - user-defined parameterspublic void bulkPrint(Report report, java.lang.String alias, java.util.Collection selectedEntities, @Nullable io.jmix.ui.screen.FrameOwner screen, @Nullable java.util.Map<java.lang.String,java.lang.Object> additionalParameters)
report
- target reportalias
- parameter aliasselectedEntities
- list of selected entitiesscreen
- caller windowadditionalParameters
- user-defined parameterspublic void bulkPrint(Report report, java.lang.String alias, java.util.Collection selectedEntities, @Nullable io.jmix.ui.screen.FrameOwner screen)
report
- - target reportalias
- - inputParameter aliasselectedEntities
- - list of selected entitiesscreen
- - caller windowpublic void bulkPrint(Report report, java.lang.String alias, java.util.Collection selectedEntities)
report
- - target reportalias
- - parameter aliasselectedEntities
- - list of selected entitiespublic void bulkPrintSync(Report report, java.lang.String alias, java.util.Collection selectedEntities, @Nullable io.jmix.ui.screen.FrameOwner screen, java.util.Map<java.lang.String,java.lang.Object> additionalParameters)
report
- - target reportalias
- - parameter aliasselectedEntities
- - list of selected entitiesscreen
- - caller windowadditionalParameters
- - user-defined parameterspublic void bulkPrintSync(Report report, @Nullable java.lang.String templateCode, @Nullable ReportOutputType outputType, java.lang.String alias, java.util.Collection selectedEntities, @Nullable io.jmix.ui.screen.FrameOwner screen, java.util.Map<java.lang.String,java.lang.Object> additionalParameters)
report
- - target reporttemplateCode
- - target template codeoutputType
- - output type for filealias
- - parameter aliasselectedEntities
- - list of selected entitiesscreen
- - caller windowadditionalParameters
- - user-defined parameterspublic void bulkPrintSync(Report report, java.lang.String alias, java.util.Collection selectedEntities, @Nullable io.jmix.ui.screen.FrameOwner screen)
report
- - target reportalias
- - inputParameter aliasselectedEntities
- - list of selected entitiesscreen
- - caller windowpublic void bulkPrintBackground(Report report, java.lang.String alias, java.util.Collection selectedEntities, io.jmix.ui.screen.FrameOwner window, java.util.Map<java.lang.String,java.lang.Object> additionalParameters)
report
- - target reportalias
- - parameter aliasselectedEntities
- - list of selected entitieswindow
- - caller windowadditionalParameters
- - user-defined parameterspublic void bulkPrintBackground(Report report, @Nullable java.lang.String templateCode, @Nullable ReportOutputType outputType, java.lang.String alias, java.util.Collection selectedEntities, io.jmix.ui.screen.FrameOwner screen, java.util.Map<java.lang.String,java.lang.Object> additionalParameters)
report
- - target reporttemplateCode
- - target template codeoutputType
- - output type for filealias
- - parameter aliasselectedEntities
- - list of selected entitiesscreen
- - caller windowadditionalParameters
- - user-defined parameterspublic void bulkPrintBackground(Report report, java.lang.String alias, java.util.Collection selectedEntities, io.jmix.ui.screen.FrameOwner screen)
report
- - target reportalias
- - parameter aliasselectedEntities
- - list of selected entitiesscreen
- - caller windowpublic boolean parameterMatchesMetaClass(ReportInputParameter parameter, io.jmix.core.metamodel.model.MetaClass metaClass)
protected void openReportParamsDialog(io.jmix.ui.screen.FrameOwner screen, Report report, @Nullable java.util.Map<java.lang.String,java.lang.Object> parameters, @Nullable ReportInputParameter inputParameter, @Nullable java.lang.String templateCode, @Nullable java.lang.String outputFileName, boolean bulkPrint)
protected void openReportParamsDialog(io.jmix.ui.screen.FrameOwner screen, Report report, @Nullable java.util.Map<java.lang.String,java.lang.Object> parameters, @Nullable java.lang.String templateCode, @Nullable java.lang.String outputFileName)
@Nullable protected java.lang.Object convertParameterIfNecessary(ReportInputParameter parameter, @Nullable java.lang.Object paramValue, boolean useForInputParametersForm)
@Nullable protected java.lang.Object handleCollectionParameter(@Nullable java.lang.Object paramValue, boolean convertToSingleItem)
public boolean inputParametersRequiredByTemplates(Report report)
public boolean containsAlterableTemplate(Report report)
public boolean supportAlterableForTemplate(ReportTemplate template)