diff options
author | Lorraine Welch <lb2391@att.com> | 2020-06-01 14:52:02 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2020-06-01 14:52:02 +0000 |
commit | 486f3972b259af9217a9f90d3c3e577ad2e8a8ff (patch) | |
tree | 75ef173e02b6d3e194569ed529e705f241e47ee2 /ecomp-sdk/epsdk-analytics/src/main | |
parent | d83ef9b7f06a6bbe9b4027c228483d7665afb605 (diff) | |
parent | 51659fe2ff1143463790c1e2a5667bf3c8d6e9a9 (diff) |
Merge "lowered code smells in PdfReportHandler.java"
Diffstat (limited to 'ecomp-sdk/epsdk-analytics/src/main')
-rw-r--r-- | ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/pdf/PdfReportHandler.java | 60 |
1 files changed, 4 insertions, 56 deletions
diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/pdf/PdfReportHandler.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/pdf/PdfReportHandler.java index 1ff21200..f3aad70f 100644 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/pdf/PdfReportHandler.java +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/pdf/PdfReportHandler.java @@ -533,7 +533,6 @@ public class PdfReportHandler extends org.onap.portalsdk.analytics.RaptorObject{ if(i%2 ==0) document.newPage(); cellValue.setImage(image); - //table.getDefaultCell().setHorizontalAlignment(Rectangle.ALIGN_CENTER); table.addCell(cellValue); document.add(table); } @@ -580,7 +579,6 @@ public class PdfReportHandler extends org.onap.portalsdk.analytics.RaptorObject{ final String FILENOTFOUNDEXCEPTION_MSG = "FileNotFoundException in generateNewImage"; final String IOEXCEPTION_MSG = "IOException in generateNewImage"; try { - //ReportRuntime rr = (ReportRuntime) request.getSession().getAttribute(AppConstants.SI_REPORT_RUNTIME); DataSet ds = null; if(request.getSession().getAttribute(AppConstants.RI_CHART_DATA)!=null) { ds = (DataSet) request.getSession().getAttribute(AppConstants.RI_CHART_DATA); @@ -601,7 +599,6 @@ public class PdfReportHandler extends org.onap.portalsdk.analytics.RaptorObject{ additionalChartOptionsMap.put("lastSeriesALineChart", new Boolean(rr.isLastSeriesALineChart())); } else if (chartType.equals(AppConstants.GT_LINE)) { additionalChartOptionsMap.put("chartOrientation", new Boolean((AppUtils.getRequestNvlValue(request, "chartOrientation").length()>0?AppUtils.getRequestNvlValue(request, "chartOrientation").equals("vertical"):rr.isVerticalOrientation())) ); - //additionalChartOptionsMap.put("secondaryChartRenderer", AppUtils.getRequestNvlValue(request, "secondaryChartRenderer").length()>0? AppUtils.getRequestNvlValue(request, "secondaryChartRenderer"):rr.getSecondaryChartRenderer()); additionalChartOptionsMap.put("chartDisplay", new Boolean(AppUtils.getRequestNvlValue(request, "chartDisplay").length()>0? AppUtils.getRequestNvlValue(request, "chartDisplay").equals("3D"):rr.isChartDisplayIn3D())); additionalChartOptionsMap.put("lastSeriesABarChart", new Boolean(rr.isLastSeriesABarChart())); } else if (chartType.equals(AppConstants.GT_TIME_DIFFERENCE_CHART)) { @@ -726,31 +723,8 @@ public class PdfReportHandler extends org.onap.portalsdk.analytics.RaptorObject{ String chartTitle = Globals.getDisplayChartTitle()? rr.getReportName():""; chartTitle = rr.getFormFieldFilled(chartTitle); - filename = null; /*(String) ChartGen.generateChart( chartType, - request.getSession(), - ds, - legendColumnName, - chartLeftAxisLabel, - chartRightAxisLabel, - (chartType.equals(AppConstants.GT_PIE_MULTIPLE))?rr.getChartDisplayNamesList(AppConstants.CHART_ALL_COLUMNS, formValues):rr.getChartDisplayNamesList(AppConstants.CHART_NEWCHART_COLUMNS, formValues).subList(i, i+1), - (chartType.equals(AppConstants.GT_PIE_MULTIPLE))?rr.getChartColumnColorsList(AppConstants.CHART_ALL_COLUMNS, formValues):rr.getChartColumnColorsList(AppConstants.CHART_NEWCHART_COLUMNS, formValues).subList(i, i+1), - (chartType.equals(AppConstants.GT_PIE_MULTIPLE))?rr.getChartValueColumnAxisList(AppConstants.CHART_ALL_COLUMNS, formValues):rr.getChartValueColumnAxisList(AppConstants.CHART_NEWCHART_COLUMNS, formValues).subList(i, i+1), - "", - chartTitle, - null, - rr.getChartWidthAsInt(), - rr.getChartHeightAsInt(), - rr.getChartValueColumnsList(AppConstants.CHART_NEWCHART_COLUMNS, formValues).subList(i,i+1), - rr.hasSeriesColumn(), - //rr.isChartMultiSeries(), - rr.isMultiSeries(), - rr.getAllColumns(), - downloadFileName, - totalOnChart, - AppConstants.WEB_VERSION, - additionalChartOptionsMap, - true - );*/ + filename = null; + try { Image image = Image.getInstance(downloadFileName); images.add(image); @@ -769,9 +743,6 @@ public class PdfReportHandler extends org.onap.portalsdk.analytics.RaptorObject{ } } /** second rest of the columns are merged to one single chart - sundar**/ - // System.out.println(" rr.getChartDisplayNamesList(AppConstants.CHART_WITHOUT_NEWCHART_COLUMNS) " + rr.getChartDisplayNamesList(AppConstants.CHART_WITHOUT_NEWCHART_COLUMNS)); - // System.out.println(" rr.getChartValueColumnAxisList(AppConstants.CHART_WITHOUT_NEWCHART_COLUMNS) " + rr.getChartValueColumnAxisList(AppConstants.CHART_WITHOUT_NEWCHART_COLUMNS)); - // System.out.println(" rr.getChartValueColumnsList(AppConstants.CHART_WITHOUT_NEWCHART_COLUMNS) " + rr.getChartValueColumnsList(AppConstants.CHART_WITHOUT_NEWCHART_COLUMNS)); if((!(lGroups!=null && lGroups.size() > 0))) { @@ -780,31 +751,8 @@ public class PdfReportHandler extends org.onap.portalsdk.analytics.RaptorObject{ String chartTitle = Globals.getDisplayChartTitle()? rr.getReportName():""; chartTitle = rr.getFormFieldFilled(chartTitle); - filename = null; /*(String) ChartGen.generateChart( chartType, - request.getSession(), - ds, - legendColumnName, - chartLeftAxisLabel, - chartRightAxisLabel, - rr.getChartDisplayNamesList(AppConstants.CHART_WITHOUT_NEWCHART_COLUMNS, formValues), - rr.getChartColumnColorsList(AppConstants.CHART_WITHOUT_NEWCHART_COLUMNS, formValues), - rr.getChartValueColumnAxisList(AppConstants.CHART_WITHOUT_NEWCHART_COLUMNS, formValues), - "", - chartTitle, - null, - rr.getChartWidthAsInt(), - rr.getChartHeightAsInt(), - rr.getChartValueColumnsList(AppConstants.CHART_WITHOUT_NEWCHART_COLUMNS, formValues), - rr.hasSeriesColumn(), - //rr.isChartMultiSeries(), - rr.isMultiSeries(), - rr.getAllColumns(), - downloadFileName, - totalOnChart, - AppConstants.WEB_VERSION, - additionalChartOptionsMap, - true - );*/ + filename = null; + try { Image image = Image.getInstance(downloadFileName); images.add(image); |