private ApplicationReportModel createApplicationReport(GraphContext context, ProjectModel projectModel) { ApplicationReportService applicationReportService = new ApplicationReportService(context); ApplicationReportModel applicationReportModel = applicationReportService.create(); applicationReportModel.setReportPriority(200); applicationReportModel.setDisplayInApplicationReportIndex(true); applicationReportModel.setReportName("Unclassified Files"); applicationReportModel.setReportIconClass("glyphicon glyphicon-question-sign"); applicationReportModel.setMainApplicationReport(false); applicationReportModel.setProjectModel(projectModel); applicationReportModel.setTemplatePath(TEMPLATE_APPLICATION_REPORT); applicationReportModel.setTemplateType(TemplateType.FREEMARKER); applicationReportModel.setDisplayInApplicationList(false); // Set the filename for the report ReportService reportService = new ReportService(context); reportService.setUniqueFilename(applicationReportModel, "nonclassifiedfiles_" + projectModel.getName(), "html"); return applicationReportModel; } }
report.setReportPriority(1); report.setReportIconClass("glyphicon glyphicon-home"); report.setReportName(APPLICATION_LIST_REPORT); report.setTemplatePath(TEMPLATE_PATH); report.setTemplateType(TemplateType.FREEMARKER); report.setDisplayInApplicationReportIndex(false); report.setReportFilename(OUTPUT_FILENAME); for (ApplicationReportModel applicationReportModel : apps) if (applicationReportModel.isMainApplicationReport() != null && applicationReportModel.isMainApplicationReport()) if (ProjectService.SHARED_LIBS_UNIQUE_ID.equals(applicationReportModel.getProjectModel().getUniqueID())) relatedData.put("sharedLibsApplicationReport", applicationReportModel); // Used as kind of boolean in the template. appsListVertex.addItem(applicationReportModel); report.setRelatedResource(relatedData);
private ApplicationReportModel createMigrationIssuesReportBase(GraphContext context) { ApplicationReportService applicationReportService = new ApplicationReportService(context); ApplicationReportModel report = applicationReportService.create(); report.setReportPriority(101); report.setReportIconClass("glyphicon glyphicon-warning-sign"); report.setTemplatePath(TEMPLATE_PATH); report.setTemplateType(TemplateType.FREEMARKER); report.setDisplayInApplicationReportIndex(true); report.setDescription(REPORT_DESCRIPTION); new GraphService<>(context, MigrationIssuesReportModel.class).addTypeToModel(report); return report; }
/** * Overrides GraphService.create() to create the object with some reasonable defaults */ public ApplicationReportModel create() { ApplicationReportModel applicationReportModel = super.create(); applicationReportModel.setDisplayInApplicationReportIndex(false); applicationReportModel.setMainApplicationReport(false); applicationReportModel.setReportPriority(Integer.MAX_VALUE); return applicationReportModel; }
private ApplicationReportModel createAppDependencyGraphReport(GraphContext context) { ApplicationReportService applicationReportService = new ApplicationReportService(context); ApplicationReportModel report = applicationReportService.create(); report.setReportPriority(104); report.setReportIconClass("glyphicon glyphicon-tree-deciduous"); report.setTemplatePath(TEMPLATE); report.setTemplateType(TemplateType.FREEMARKER); report.setDisplayInApplicationReportIndex(Boolean.TRUE); return report; }
private void createSingleAppDependencyGraphReport(GraphContext context, ProjectModel projectModel) { ReportService reportService = new ReportService(context); ApplicationReportModel report = createAppDependencyGraphReport(context); report.setReportName(REPORT_NAME); report.setProjectModel(projectModel); report.setMainApplicationReport(Boolean.FALSE); report.setDescription(SINGLE_APPLICATION_REPORT_DESCRIPTION + "."); reportService.setUniqueFilename(report, REPORT_BASEFILENAME, "html"); }
applicationReportModel.setReportPriority(300); applicationReportModel.setDisplayInApplicationReportIndex(false); applicationReportModel.setReportName("jboss-web.xml"); applicationReportModel.setProjectModel(projectModel); applicationReportModel.setTemplatePath(JBOSS_WEB_TEMPLATE); applicationReportModel.setTemplateType(TemplateType.FREEMARKER); applicationReportModel.setRelatedResource(additionalData); if (webDescriptor.getProjectModel().getName() == null || ancestorFolder.equals(webDescriptor.getProjectModel().getName())) applicationReportModel.setReportFilename(reportService.getUniqueFilename("jboss-web", "xml", false, ancestorFolder)); } else applicationReportModel.setReportFilename(reportService.getUniqueFilename("jboss-web", "xml", false, ancestorFolder, webDescriptor.getProjectModel().getName())); LOG.info("Generated jboss-web.xml for " + webDescriptor.getFilePath() + " at: " + applicationReportModel.getReportFilename()); LinkModel link = linkService.create(); link.setDescription("JBoss Web XML Descriptor - Generated by " + Util.WINDUP_BRAND_NAME_LONG); link.setLink(applicationReportModel.getReportFilename()); generatedDescriptor.setLink(applicationReportModel.getReportFilename());
@Override public void perform(GraphRewrite event, EvaluationContext context) { WindupConfigurationModel cfg = WindupConfigurationService.getConfigurationModel(event.getGraphContext()); FileModel inputFM = cfg.getInputPath(); ProjectModel inputProjectModel = inputFM.getProjectModel(); ApplicationReportModel applicationReportModel = new ApplicationReportService(event.getGraphContext()).create(); applicationReportModel.setReportName("Tattletale"); applicationReportModel.setDisplayInApplicationReportIndex(true); applicationReportModel.setProjectModel(inputProjectModel); applicationReportModel.setTemplateType(TemplateType.OTHER); applicationReportModel.setReportFilename(TATTLETALE_INDEX_HTML); } }
private TechReportModel createTechReportBase(GraphContext graphContext) { ApplicationReportService applicationReportService = new ApplicationReportService(graphContext); ApplicationReportModel report = applicationReportService.create(); report.setTemplateType(TemplateType.FREEMARKER); report.setMainApplicationReport(false); report.setReportPriority(103); return new GraphService<>(graphContext, TechReportModel.class).addTypeToModel(report); } }
private ApplicationReportModel createSingleApplicationMigrationIssuesReport(GraphContext context, ProjectModel projectModel) { ReportService reportService = new ReportService(context); ApplicationReportModel report = createMigrationIssuesReportBase(context); report.setReportName(MIGRATION_ISSUES_REPORT_NAME); report.setProjectModel(projectModel); reportService.setUniqueFilename(report, "migration_issues", "html"); return report; }
private void createGlobalAppDependencyGraphReport(GraphContext context) { ReportService reportService = new ReportService(context); ApplicationReportModel report = createAppDependencyGraphReport(context); report.setReportName(REPORT_NAME); report.setDisplayInGlobalApplicationIndex(Boolean.TRUE); report.setDescription(GLOBAL_REPORT_DESCRIPTION + "."); reportService.setUniqueFilename(report, REPORT_BASEFILENAME + "_global", "html"); } }
private ApplicationReportModel createGlobalMigrationIssuesReport(GraphContext context, boolean exportAllIssuesCSV) { ReportService reportService = new ReportService(context); ApplicationReportModel report = createMigrationIssuesReportBase(context); report.setReportName(ALL_MIGRATION_ISSUES_REPORT_NAME); report.setDisplayInGlobalApplicationIndex(true); report.setExportAllIssuesCSV(exportAllIssuesCSV); reportService.setUniqueFilename(report, "migration_issues", "html"); return report; } }
private ApplicationReportModel createGlobalMigrationIssuesReport(GraphContext context) { ReportService reportService = new ReportService(context); ApplicationReportModel report = createMigrationIssuesReportBase(context); report.setReportName(ALL_MIGRATION_ISSUES_REPORT_NAME); report.setDisplayInGlobalApplicationIndex(true); reportService.setUniqueFilename(report, "migration_issues", "html"); return report; } }
@Override public void perform(GraphRewrite event, EvaluationContext context) { WindupConfigurationModel conf = WindupConfigurationService.getConfigurationModel(event.getGraphContext()); int inputApplicationCount = Iterables.size(conf.getInputPaths()); if (inputApplicationCount > 1) { createGlobalMigrationIssuesReport(event.getGraphContext(), conf.isExportingCSV()); } for (FileModel inputPath : conf.getInputPaths()) { ApplicationReportModel report = createSingleApplicationMigrationIssuesReport(event.getGraphContext(), inputPath.getProjectModel()); report.setMainApplicationReport(false); } }
applicationReportModel.setReportPriority(300); applicationReportModel.setDisplayInApplicationReportIndex(false); applicationReportModel.setReportName("jboss-web.xml"); applicationReportModel.setProjectModel(projectModel); applicationReportModel.setTemplatePath(JBOSS_WEB_TEMPLATE); applicationReportModel.setTemplateType(TemplateType.FREEMARKER); applicationReportModel.setRelatedResource(additionalData); if (webDescriptor.getProjectModel().getName() == null || ancestorFolder.equals(webDescriptor.getProjectModel().getName())) applicationReportModel.setReportFilename(reportService.getUniqueFilename("jboss-web", "xml", false, ancestorFolder)); } else applicationReportModel.setReportFilename(reportService.getUniqueFilename("jboss-web", "xml", false, ancestorFolder, webDescriptor.getProjectModel().getName())); LOG.info("Generated jboss-web.xml for " + webDescriptor.getFilePath() + " at: " + applicationReportModel.getReportFilename()); LinkModel link = linkService.create(); link.setDescription("JBoss Web XML Descriptor - Generated by " + Util.WINDUP_BRAND_NAME_LONG); link.setLink(applicationReportModel.getReportFilename()); generatedDescriptor.setLink(applicationReportModel.getReportFilename());
private void createSingleAppDependencyGraphReport(GraphContext context, ProjectModel projectModel) { ReportService reportService = new ReportService(context); ApplicationReportModel report = createAppDependencyGraphReport(context); report.setReportName(REPORT_NAME); report.setProjectModel(projectModel); report.setMainApplicationReport(Boolean.FALSE); report.setDescription(SINGLE_APPLICATION_REPORT_DESCRIPTION + "."); reportService.setUniqueFilename(report, REPORT_BASEFILENAME, "html"); }
/** * Overrides GraphService.create() to create the object with some reasonable defaults */ public ApplicationReportModel create() { ApplicationReportModel applicationReportModel = super.create(); applicationReportModel.setDisplayInApplicationReportIndex(false); applicationReportModel.setMainApplicationReport(false); applicationReportModel.setReportPriority(Integer.MAX_VALUE); return applicationReportModel; }
private TechReportModel createTechReportBase(GraphContext graphContext) { ApplicationReportService applicationReportService = new ApplicationReportService(graphContext); ApplicationReportModel report = applicationReportService.create(); report.setTemplateType(TemplateType.FREEMARKER); report.setMainApplicationReport(false); report.setReportPriority(103); return new GraphService<>(graphContext, TechReportModel.class).addTypeToModel(report); } }
private ApplicationReportModel createSingleApplicationMigrationIssuesReport(GraphContext context, ProjectModel projectModel) { ReportService reportService = new ReportService(context); ApplicationReportModel report = createMigrationIssuesReportBase(context); report.setReportName(MIGRATION_ISSUES_REPORT_NAME); report.setProjectModel(projectModel); reportService.setUniqueFilename(report, "migration_issues", "html"); return report; }
private void createGlobalAppDependencyGraphReport(GraphContext context) { ReportService reportService = new ReportService(context); ApplicationReportModel report = createAppDependencyGraphReport(context); report.setReportName(REPORT_NAME); report.setDisplayInGlobalApplicationIndex(Boolean.TRUE); report.setDescription(GLOBAL_REPORT_DESCRIPTION + "."); reportService.setUniqueFilename(report, REPORT_BASEFILENAME + "_global", "html"); } }