org.zodiac.autoconfigure.ureport.UReportConsoleReactiveActionAutoConfiguration Maven / Gradle / Ivy
package org.zodiac.autoconfigure.ureport;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication;
import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication.Type;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.Bean;
import org.zodiac.autoconfigure.ureport.condition.ConditionalOnUReportEnabled;
//@SpringBootConfiguration
@ConditionalOnUReportEnabled
@ConditionalOnWebApplication(type = Type.REACTIVE)
@ConditionalOnClass(value = {com.bstek.ureport.CellRenderer.class, org.zodiac.ureport.UReport.class, org.springframework.web.server.WebHandler.class})
public class UReportConsoleReactiveActionAutoConfiguration {
private final ApplicationContext applicationContext;
private final com.bstek.ureport.export.ExportManager exportManager;
private final com.bstek.ureport.build.ReportBuilder reportBuilder;
private final com.bstek.ureport.parser.ReportParser reportParser;
private final com.bstek.ureport.export.ReportRender reportRender;
private final UReportProperties uReportProperties;
//private boolean disableHttpSessionReportCache;
public UReportConsoleReactiveActionAutoConfiguration(ApplicationContext applicationContext, UReportProperties uReportProperties,
@Autowired @Qualifier(value = org.zodiac.ureport.costants.UReportCoreBeanConstants.EXPORT_MANAGER_NAME) com.bstek.ureport.export.ExportManager exportManager,
@Autowired @Qualifier(value = org.zodiac.ureport.costants.UReportCoreBeanConstants.REPORT_BUILDER_NAME) com.bstek.ureport.build.ReportBuilder reportBuilder,
@Autowired @Qualifier(value = org.zodiac.ureport.costants.UReportCoreBeanConstants.REPORT_PARSER_NAME) com.bstek.ureport.parser.ReportParser reportParser,
@Autowired @Qualifier(value = org.zodiac.ureport.costants.UReportCoreBeanConstants.REPORT_RENDER_NAME) com.bstek.ureport.export.ReportRender reportRender
/*@Value(value = "${ureport.disableHttpSessionReportCache:false}") boolean disableHttpSessionReportCache*/) {
this.applicationContext = applicationContext;
this.exportManager = exportManager;
this.reportBuilder = reportBuilder;
this.reportParser = reportParser;
this.reportRender = reportRender;
this.uReportProperties = uReportProperties;
//this.disableHttpSessionReportCache = disableHttpSessionReportCache;
}
@Bean
@ConditionalOnMissingBean
protected org.zodiac.ureport.console.reactive.action.UReportHandler uReportHandler() {
return new org.zodiac.ureport.console.reactive.action.UReportHandler(applicationContext);
}
@ConditionalOnMissingBean
@Bean(value = {org.zodiac.ureport.costants.UReportConsoleBeanConstants.HTTP_SESSION_REPORT_CACHE_NAME})
protected org.zodiac.ureport.console.reactive.cache.HttpSessionReportCache httpSessionReportCache() {
//return new org.zodiac.ureport.console.reactive.cache.HttpSessionReportCache().setDisabled(disableHttpSessionReportCache);
return new org.zodiac.ureport.console.reactive.cache.HttpSessionReportCache(uReportProperties);
}
/*=============================================================== Data Source ===============================================================*/
@ConditionalOnMissingBean
@Bean(value = {org.zodiac.ureport.costants.UReportConsoleBeanConstants.DATASOURCE_ACTION_NAME})
protected org.zodiac.ureport.console.reactive.action.designer.DatasourceHandlerAction datasourceAction() {
return new org.zodiac.ureport.console.reactive.action.designer.DatasourceHandlerAction();
}
/*=============================================================== Designer ===============================================================*/
@ConditionalOnMissingBean
@Bean(value = {org.zodiac.ureport.costants.UReportConsoleBeanConstants.DESIGNER_ACTION})
protected org.zodiac.ureport.console.reactive.action.designer.DesignerHandlerAction designerAction() {
return new org.zodiac.ureport.console.reactive.action.designer.DesignerHandlerAction()
.setReportParser(reportParser).setReportRender(reportRender);
}
@ConditionalOnMissingBean
@Bean(value = {org.zodiac.ureport.costants.UReportConsoleBeanConstants.SEARCH_FORM_DESIGNER_ACTION})
protected org.zodiac.ureport.console.reactive.action.designer.SearchFormDesignerHandlerAction searchFormDesignerAction() {
return new org.zodiac.ureport.console.reactive.action.designer.SearchFormDesignerHandlerAction();
}
/*=============================================================== HTML ===============================================================*/
@ConditionalOnMissingBean
@Bean(value = {org.zodiac.ureport.costants.UReportConsoleBeanConstants.HTML_PREVIEW_ACTION})
protected org.zodiac.ureport.console.reactive.action.html.HtmlPreviewHandlerAction htmlPreviewAction() {
return new org.zodiac.ureport.console.reactive.action.html.HtmlPreviewHandlerAction()
.setExportManager(exportManager).setReportBuilder(reportBuilder).setReportRender(reportRender);
}
/*=============================================================== Resource ===============================================================*/
@ConditionalOnMissingBean
@Bean(value = {org.zodiac.ureport.costants.UReportConsoleBeanConstants.RESOURCE_LOADER_ACTION})
protected org.zodiac.ureport.console.reactive.action.res.ResourceLoaderHandlerAction resourceLoaderAction() {
return new org.zodiac.ureport.console.reactive.action.res.ResourceLoaderHandlerAction();
}
/*=============================================================== Chart Excel ===============================================================*/
@ConditionalOnMissingBean
@Bean(value = {org.zodiac.ureport.costants.UReportConsoleBeanConstants.CHART_ACTION})
protected org.zodiac.ureport.console.reactive.action.chart.ChartHandlerAction chartAction() {
return new org.zodiac.ureport.console.reactive.action.chart.ChartHandlerAction();
}
/*=============================================================== Image ===============================================================*/
@ConditionalOnMissingBean
@Bean(value = {org.zodiac.ureport.costants.UReportConsoleBeanConstants.IMAGE_ACTION})
protected org.zodiac.ureport.console.reactive.action.image.ImageHandlerAction imageAction() {
return new org.zodiac.ureport.console.reactive.action.image.ImageHandlerAction();
}
/*=============================================================== Excel ===============================================================*/
@ConditionalOnMissingBean
@Bean(value = {org.zodiac.ureport.costants.UReportConsoleBeanConstants.EXPORT_EXCEL97_ACTION})
protected org.zodiac.ureport.console.reactive.action.excel.ExportExcel97HandlerAction exportExcel97Action() {
return new org.zodiac.ureport.console.reactive.action.excel.ExportExcel97HandlerAction()
.setExportManager(exportManager).setReportBuilder(reportBuilder);
}
@ConditionalOnMissingBean
@Bean(value = {org.zodiac.ureport.costants.UReportConsoleBeanConstants.EXPORT_EXCEL_ACTION})
protected org.zodiac.ureport.console.reactive.action.excel.ExportExcelHandlerAction exportExcelAction() {
return new org.zodiac.ureport.console.reactive.action.excel.ExportExcelHandlerAction()
.setExportManager(exportManager).setReportBuilder(reportBuilder);
}
/*=============================================================== Import Excel ===============================================================*/
@ConditionalOnMissingBean
@Bean(value = {org.zodiac.ureport.costants.UReportConsoleBeanConstants.IMPORT_EXCEL_ACTION})
protected org.zodiac.ureport.console.reactive.action.importexcel.ImportExcelHandlerAction importExcelAction() {
return new org.zodiac.ureport.console.reactive.action.importexcel.ImportExcelHandlerAction();
}
/*=============================================================== PDF ===============================================================*/
@ConditionalOnMissingBean
@Bean(value = {org.zodiac.ureport.costants.UReportConsoleBeanConstants.EXPORT_PDF_ACTION})
protected org.zodiac.ureport.console.reactive.action.pdf.ExportPdfHandlerAction exportPdfAction() {
return new org.zodiac.ureport.console.reactive.action.pdf.ExportPdfHandlerAction()
.setExportManager(exportManager).setReportBuilder(reportBuilder).setReportRender(reportRender);
}
/*=============================================================== Word ===============================================================*/
@ConditionalOnMissingBean
@Bean(value = {org.zodiac.ureport.costants.UReportConsoleBeanConstants.EXPORT_WORD_ACTION})
protected org.zodiac.ureport.console.reactive.action.word.ExportWordHandlerAction exportWordAction() {
return new org.zodiac.ureport.console.reactive.action.word.ExportWordHandlerAction()
.setExportManager(exportManager).setReportBuilder(reportBuilder);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy