/** * 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; }
/** * 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 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"); }
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"); }
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); } }
@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); } }
@Override public void perform(GraphRewrite event, EvaluationContext context) { int inputApplicationCount = Iterables.size(WindupConfigurationService.getConfigurationModel(event.getGraphContext()).getInputPaths()); if (inputApplicationCount > 1) { createGlobalMigrationIssuesReport(event.getGraphContext()); } for (FileModel inputPath : WindupConfigurationService.getConfigurationModel(event.getGraphContext()).getInputPaths()) { ApplicationReportModel report = createSingleApplicationMigrationIssuesReport(event.getGraphContext(), inputPath.getProjectModel()); report.setMainApplicationReport(false); } }
private ApplicationReportModel createAboutWindup(GraphContext context, ProjectModel projectModel) { ApplicationReportService applicationReportService = new ApplicationReportService(context); ApplicationReportModel applicationReportModel = applicationReportService.create(); applicationReportModel.setReportPriority(10000); applicationReportModel.setReportName(REPORT_NAME); applicationReportModel.setDescription(REPORT_DESCRIPTION); applicationReportModel.setReportIconClass("fa fa-question-circle"); applicationReportModel.setMainApplicationReport(false); applicationReportModel.setDisplayInApplicationReportIndex(true); if (projectModel == null) applicationReportModel.setDisplayInGlobalApplicationIndex(true); else applicationReportModel.setProjectModel(projectModel); applicationReportModel.setTemplatePath(TEMPLATE_APPLICATION_REPORT); applicationReportModel.setTemplateType(TemplateType.FREEMARKER); Map<String, WindupVertexFrame> related = new HashMap<>(); AboutWindupModel aboutWindupModel = context.getFramed().addFramedVertex(AboutWindupModel.class); aboutWindupModel.setWindupRuntimeVersion(addon.getId().getVersion().toString()); related.put("windupAbout", aboutWindupModel); applicationReportModel.setRelatedResource(related); // Set the filename for the report ReportService reportService = new ReportService(context); String filename = projectModel == null ? "about_global" : "about_" + projectModel.getName(); reportService.setUniqueFilename(applicationReportModel, filename, "html"); return applicationReportModel; }
private ApplicationReportModel createAboutWindup(GraphContext context, ProjectModel projectModel) { ApplicationReportService applicationReportService = new ApplicationReportService(context); ApplicationReportModel applicationReportModel = applicationReportService.create(); applicationReportModel.setReportPriority(10000); applicationReportModel.setReportName(REPORT_NAME); applicationReportModel.setDescription(REPORT_DESCRIPTION); applicationReportModel.setReportIconClass("fa fa-question-circle"); applicationReportModel.setMainApplicationReport(false); applicationReportModel.setDisplayInApplicationReportIndex(true); if (projectModel == null) applicationReportModel.setDisplayInGlobalApplicationIndex(true); else applicationReportModel.setProjectModel(projectModel); applicationReportModel.setTemplatePath(TEMPLATE_APPLICATION_REPORT); applicationReportModel.setTemplateType(TemplateType.FREEMARKER); Map<String, WindupVertexFrame> related = new HashMap<>(); AboutWindupModel aboutWindupModel = context.getFramed().addFramedVertex(AboutWindupModel.class); aboutWindupModel.setWindupRuntimeVersion(addon.getId().getVersion().toString()); related.put("windupAbout", aboutWindupModel); applicationReportModel.setRelatedResource(related); // Set the filename for the report ReportService reportService = new ReportService(context); String filename = projectModel == null ? "about_global" : "about_" + projectModel.getName(); reportService.setUniqueFilename(applicationReportModel, filename, "html"); return applicationReportModel; }
private void createReportIndex(GraphContext context, ProjectModel projectModel) { ApplicationReportService service = new ApplicationReportService(context); ApplicationReportModel applicationReportModel = service.create(); applicationReportModel.setReportPriority(100); applicationReportModel.setDisplayInApplicationReportIndex(true); applicationReportModel.setReportName(REPORT_INDEX); applicationReportModel.setReportIconClass("glyphicon glyphicon-dashboard"); applicationReportModel.setMainApplicationReport(true); applicationReportModel.setTemplatePath(TEMPLATE); applicationReportModel.setTemplateType(TemplateType.FREEMARKER); applicationReportModel.setProjectModel(projectModel); applicationReportModel.setDescription( "Dashboard report aggregating findings from the analysis."); // Set the filename for the report ReportService reportService = new ReportService(context); reportService.setUniqueFilename(applicationReportModel, "report_index_" + projectModel.getName(), "html"); }
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; } }
private ApplicationReportModel createApplicationReport(GraphContext context, ProjectModel application) { ApplicationReportService applicationReportService = new ApplicationReportService(context); ApplicationReportModel applicationReportModel = applicationReportService.create(); applicationReportModel.setReportPriority(200); applicationReportModel.setDisplayInApplicationReportIndex(true); applicationReportModel.setReportName("Compatible Files"); applicationReportModel.setDescription(REPORT_DESCRIPTION); applicationReportModel.setReportIconClass("glyphicon glyphicon-check"); applicationReportModel.setMainApplicationReport(false); applicationReportModel.setProjectModel(application); applicationReportModel.setTemplatePath(TEMPLATE_APPLICATION_REPORT); applicationReportModel.setTemplateType(TemplateType.FREEMARKER); // Set the filename for the report ReportService reportService = new ReportService(context); reportService.setUniqueFilename(applicationReportModel, "compatiblefiles_" + application.getName(), "html"); return applicationReportModel; } }
private void createReportIndex(GraphContext context, ProjectModel projectModel) { ApplicationReportService service = new ApplicationReportService(context); ApplicationReportModel applicationReportModel = service.create(); applicationReportModel.setReportPriority(100); applicationReportModel.setDisplayInApplicationReportIndex(true); applicationReportModel.setReportName(REPORT_INDEX); applicationReportModel.setReportIconClass("glyphicon glyphicon-dashboard"); applicationReportModel.setMainApplicationReport(true); applicationReportModel.setTemplatePath(TEMPLATE); applicationReportModel.setTemplateType(TemplateType.FREEMARKER); applicationReportModel.setProjectModel(projectModel); applicationReportModel.setDescription( "Dashboard report aggregating findings from the analysis."); // Set the filename for the report ReportService reportService = new ReportService(context); reportService.setUniqueFilename(applicationReportModel, "report_index_" + projectModel.getName(), "html"); }
private ApplicationReportModel createApplicationReport(GraphContext context, ProjectModel application) { ApplicationReportService applicationReportService = new ApplicationReportService(context); ApplicationReportModel applicationReportModel = applicationReportService.create(); applicationReportModel.setReportPriority(200); applicationReportModel.setDisplayInApplicationReportIndex(true); applicationReportModel.setReportName("Compatible Files"); applicationReportModel.setDescription(REPORT_DESCRIPTION); applicationReportModel.setReportIconClass("glyphicon glyphicon-check"); applicationReportModel.setMainApplicationReport(false); applicationReportModel.setProjectModel(application); applicationReportModel.setTemplatePath(TEMPLATE_APPLICATION_REPORT); applicationReportModel.setTemplateType(TemplateType.FREEMARKER); // Set the filename for the report ReportService reportService = new ReportService(context); reportService.setUniqueFilename(applicationReportModel, "compatiblefiles_" + application.getName(), "html"); return applicationReportModel; } }
applicationReportModel.setReportName(OVERVIEW); applicationReportModel.setReportIconClass("glyphicon glyphicon-home"); applicationReportModel.setMainApplicationReport(true); applicationReportModel.setProjectModel(projectModel); applicationReportModel.setTemplatePath(TEMPLATE_APPLICATION_REPORT);