summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLorraine Welch <lb2391@att.com>2020-04-08 13:50:13 +0000
committerGerrit Code Review <gerrit@onap.org>2020-04-08 13:50:13 +0000
commit459f0e54fa1c30f5d5054488c7a6e75590149875 (patch)
tree0d2629284c5f9bac0a0de5bf5ca731806dcaac89
parentd07837ee769fb29090f0e71e4134fdf8f78e60e4 (diff)
parente92a0523542289590101d588aa0c3303f6ed592c (diff)
Merge "improved code structure"
-rw-r--r--ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/pdf/PdfReportHandler.java32
1 files changed, 20 insertions, 12 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 b42bdf9c..d77e6bc7 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
@@ -1,7 +1,7 @@
/*
* ============LICENSE_START==========================================
* ONAP Portal SDK
- * ===================================================================
+ * ===================================================================
* Copyright © 2017 AT&T Intellectual Property. All rights reserved.
* ===================================================================
*
@@ -10,7 +10,7 @@
* you may not use this software except in compliance with the License.
* You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -124,7 +124,7 @@ import org.onap.portalsdk.analytics.view.ReportData;
import org.onap.portalsdk.analytics.view.RowHeader;
import org.onap.portalsdk.analytics.view.RowHeaderCol;
import org.onap.portalsdk.analytics.xmlobj.DataColumnType;
-import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate;
+import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate;
/**
* @author mwliu and sundar
@@ -161,7 +161,8 @@ public class PdfReportHandler extends org.onap.portalsdk.analytics.RaptorObject{
int returnValue = 0;
ReportRuntime rr = null;
- if(rr==null) rr = (ReportRuntime) request.getSession().getAttribute(AppConstants.SI_REPORT_RUNTIME);
+ if(rr==null)
+ rr = (ReportRuntime) request.getSession().getAttribute(AppConstants.SI_REPORT_RUNTIME);
boolean isDashboard = false;
if ((request.getSession().getAttribute(AppConstants.SI_DASHBOARD_REP_ID)!=null) && ( ((String) request.getSession().getAttribute(AppConstants.SI_DASHBOARD_REP_ID)).equals(rr.getReportID())) ) {
@@ -247,17 +248,21 @@ public class PdfReportHandler extends org.onap.portalsdk.analytics.RaptorObject{
//ReportRuntime rr = (ReportRuntime) request.getSession().getAttribute(AppConstants.SI_REPORT_RUNTIME);
//ReportData rd = (ReportData) request.getSession().getAttribute(AppConstants.RI_REPORT_DATA);
rr = null;
- ReportData rd = null;
+ ReportData rd = null;
String parent = "";
int parentFlag = 0;
- if(!nvl(request.getParameter("parent"), "").equals("N")) parent = nvl(request.getParameter("parent"), "");
- if(parent.startsWith("parent_")) parentFlag = 1;
+ if(!nvl(request.getParameter("parent"), "").equals("N"))
+ parent = nvl(request.getParameter("parent"), "");
+ if(parent.startsWith("parent_"))
+ parentFlag = 1;
if(parentFlag == 1) {
rr = (ReportRuntime) request.getSession().getAttribute(parent+"_rr");
rd = (ReportData) request.getSession().getAttribute(parent+"_rd");
}
- if(rr==null) rr = (ReportRuntime) request.getSession().getAttribute(AppConstants.SI_REPORT_RUNTIME);
- if(rd==null) rd = (ReportData) request.getSession().getAttribute(AppConstants.RI_REPORT_DATA);
+ if(rr==null)
+ rr = (ReportRuntime) request.getSession().getAttribute(AppConstants.SI_REPORT_RUNTIME);
+ if(rd==null)
+ rd = (ReportData) request.getSession().getAttribute(AppConstants.RI_REPORT_DATA);
pb = preparePdfBean(request,rr);
FONT_FAMILY = rr.getPDFFont();
@@ -738,9 +743,11 @@ public class PdfReportHandler extends org.onap.portalsdk.analytics.RaptorObject{
//System.out.println("chartGroupOrg " + chartGroupOrg);
if(nvl(chartGroupOrg).length()>0)
tempChartGroupCurrent = chartGroupOrg.substring(0,chartGroupOrg.lastIndexOf("|"));
- if(i>0) tempChartGroupPrev = ((String) lGroups.get(i-1)).substring(0,((String) lGroups.get(i-1)).lastIndexOf("|"));
+ if(i>0)
+ tempChartGroupPrev = ((String) lGroups.get(i-1)).substring(0,((String) lGroups.get(i-1)).lastIndexOf("|"));
//System.out.println("TEMPCHARTGROUP " + tempChartGroupCurrent + " " + tempChartGroupPrev);
- if(tempChartGroupCurrent.equals(tempChartGroupPrev)) continue;
+ if(tempChartGroupCurrent.equals(tempChartGroupPrev))
+ continue;
//System.out.println("CHARTGROUPORG " + chartGroupOrg + " " + lGroups) ;
//String chartGroup = chartGroupOrg.substring(0,chartGroupOrg.lastIndexOf("|"));
String chartGroup = chartGroupOrg;
@@ -1422,7 +1429,8 @@ public class PdfReportHandler extends org.onap.portalsdk.analytics.RaptorObject{
DataRow dr = rd.reportDataRows.getNext();
for(dr.resetNext();dr.hasNext();) {
DataValue dv = dr.getNext();
- if(!dv.isVisible()) totalVisbleColumn--;
+ if(!dv.isVisible())
+ totalVisbleColumn--;
}
break;