Class ReportsWizard

java.lang.Object
io.jmix.reportsui.screen.report.wizard.ReportsWizard

@Component("report_ReportsWizard") public class ReportsWizard extends Object
API for report wizard
  • Field Details

  • Constructor Details

    • ReportsWizard

      public ReportsWizard()
  • Method Details

    • toReport

      public Report toReport(ReportData reportData, boolean temporary)
    • createBands

      protected Set<BandDefinition> createBands(Report report, BandDefinition rootReportBandDefinition, ReportData reportData, ReportInputParameter mainParameter)
    • createParameters

      @Nullable protected ReportInputParameter createParameters(ReportData reportData, Report report)
    • createReport

      protected Report createReport(ReportData reportData, boolean isTmp)
    • createJpqlDataSet

      protected void createJpqlDataSet(ReportData reportData, ReportRegion reportRegion, BandDefinition dataBand)
    • createEntityDataSet

      protected void createEntityDataSet(ReportData reportData, ReportRegion reportRegion, BandDefinition dataBand, ReportInputParameter mainParameter, FetchPlan parameterFetchPlan)
    • createRootBand

      protected BandDefinition createRootBand(Report report)
    • createMainInputParameter

      protected ReportInputParameter createMainInputParameter(Report report, ReportData reportData)
    • createParameter

      protected ReportInputParameter createParameter(Report report, int position)
    • createDefaultTemplate

      protected ReportTemplate createDefaultTemplate(Report report, ReportData reportData)
    • createDataBand

      protected BandDefinition createDataBand(Report report, BandDefinition rootBandDefinition, String name, int bandDefPos)
    • createDefaultFormats

      protected void createDefaultFormats(Report report, ReportData reportData, ReportRegion reportRegion)
    • createHeaderBand

      protected BandDefinition createHeaderBand(Report report, BandDefinition rootReportBandDefinition, int bandDefPos, ReportRegion reportRegion)
    • createFetchPlanByReportRegions

      public FetchPlan createFetchPlanByReportRegions(EntityTreeNode entityTreeRootNode, List<ReportRegion> reportRegions)
    • createReportRegionByFetchPlan

      public ReportRegion createReportRegionByFetchPlan(EntityTree entityTree, boolean isTabulated, @Nullable FetchPlan fetchPlan, @Nullable String collectionPropertyName)
      Create report region using fetch plan and whole entity model as entityTree param For creating tabulated report region for collection of entity (when used # in alias of dataset) fetch plan and parameters must to be non-nul values because otherwise necessary ReportRegion.regionPropertiesRootNode field value will be null. That value is determined by that fetch plan.
      Parameters:
      entityTree - the whole entity tree model
      isTabulated - determine which region will be created
      fetchPlan - by that fetch plan the region will be created
      collectionPropertyName - must to be non-null for a tabulated region
      Returns:
      report region
    • ensureParentFetchPlansExist

      @Nullable protected FetchPlanBuilder ensureParentFetchPlansExist(EntityTreeNode entityTreeNode, Map<EntityTreeNode,FetchPlanBuilder> fetchPlansForNodes)
      Search for fetch plan for parent node If does not exists - createDataSet it and add property to parent of parent fetch plan
      Parameters:
      entityTreeNode - entity tree node
      fetchPlansForNodes - fetch plans for previous nodes
      Returns:
      fetch plan builder
    • iterateFetchPlanAndCreatePropertiesForRegion

      protected void iterateFetchPlanAndCreatePropertiesForRegion(boolean scalarOnly, FetchPlan parentFetchPlan, Map<String,EntityTreeNode> allNodesAndHierarchicalPathsMap, List<RegionProperty> regionProperties, @Nullable String pathFromParentFetchPlan, long propertyOrderNum)
    • nodesToMap

      protected void nodesToMap(EntityTreeNode node, Map<String,EntityTreeNode> allNodesAndHierarchicalPathsMap)
    • isEntityAllowedForReportWizard

      public boolean isEntityAllowedForReportWizard(MetaClass effectiveMetaClass)
    • isPropertyAllowedForReportWizard

      public boolean isPropertyAllowedForReportWizard(MetaClass metaClass, MetaProperty metaProperty)
    • generateTemplate

      public byte[] generateTemplate(ReportData reportData, TemplateFileType templateFileType) throws TemplateGenerationException
      Throws:
      TemplateGenerationException
    • buildEntityTree

      public EntityTree buildEntityTree(MetaClass metaClass)
    • getWizardBlackListedEntities

      protected List<String> getWizardBlackListedEntities()
    • getWizardWhiteListedEntities

      protected List<String> getWizardWhiteListedEntities()
    • getEffectiveEntities

      protected List<String> getEffectiveEntities(List<String> entitiesList)
    • getWizardBlackListedProperties

      protected List<String> getWizardBlackListedProperties()
    • getWizardPropertiesExcludedBlackList

      protected List<String> getWizardPropertiesExcludedBlackList()
    • getOriginalMetaClass

      protected MetaClass getOriginalMetaClass(MetaClass metaClass)