diff options
author | 2020-05-27 23:14:48 +0530 | |
---|---|---|
committer | 2020-05-27 23:14:59 +0530 | |
commit | 1a39b479b44adc426cbf1dbd5bfaa47adef87068 (patch) | |
tree | c5f2fcb357e80e70f8972364b4332a28f51000be /ecomp-sdk/epsdk-analytics/src/main/java | |
parent | 273ccf87b2609ed82fe681e2211fc402f799307f (diff) |
Removed unwanted codes from WizardProcessor.java
Removed unwanted codes from WizardProcessor.java
Issue-ID: PORTAL-813
Change-Id: I34ca2f9954af40cd0584bc20ba971c57ddcb061c
Signed-off-by: Indrijeet Kumar <indriku1@in.ibm.com>
Diffstat (limited to 'ecomp-sdk/epsdk-analytics/src/main/java')
-rw-r--r-- | ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/controller/WizardProcessor.java | 86 |
1 files changed, 8 insertions, 78 deletions
diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/controller/WizardProcessor.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/controller/WizardProcessor.java index 8605f208..f1c7cf48 100644 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/controller/WizardProcessor.java +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/controller/WizardProcessor.java @@ -540,7 +540,6 @@ public class WizardProcessor extends org.onap.portalsdk.analytics.RaptorObject { joinTableExpr = joinExpr.replaceAll("\\["+tableName+"\\]", tableId); joinTableExpr = joinTableExpr.replaceAll("\\["+joinTableName+"\\]", joinTableId); -// debugLogger.debug("joinExpr : "+joinExpr+"\njoinTableExpr : "+ joinTableExpr); } rdef.addDataSourceType(new ObjectFactory(), tableId, tableName, AppUtils @@ -584,7 +583,7 @@ public class WizardProcessor extends org.onap.portalsdk.analytics.RaptorObject { if (reportUpdated) rdef.resetCache(true); - return true; // reportUpdated; + return true; // reportUpdated } // processTableEdit @@ -614,7 +613,7 @@ public class WizardProcessor extends org.onap.portalsdk.analytics.RaptorObject { if(currColumn!=null) { tableId = currColumn.getTableId(); - colName = currColumn.getDbColName(); // currColumn.getColName(); + colName = currColumn.getDbColName(); dataType = currColumn.getDbColType(); } } else { @@ -746,7 +745,6 @@ public class WizardProcessor extends org.onap.portalsdk.analytics.RaptorObject { int colGroupColSpanInt = 0; if(level > 0) { try { - //startColGroupInt = Integer.parseInt(startColGroup); colGroupColSpanInt = Integer.parseInt(colGroupColSpan); } catch (NumberFormatException ex) { @@ -786,7 +784,6 @@ public class WizardProcessor extends org.onap.portalsdk.analytics.RaptorObject { currColumn.setCrossTabValue(crossTabValue); currColumn.setDependsOnFormField(dependsOnFormField); currColumn.setDisplayName(displayName); - //currColumn.setOriginalDisplayName(displayName); if (displayWidth > 0) currColumn.setDisplayWidth(displayWidth); @@ -801,20 +798,15 @@ public class WizardProcessor extends org.onap.portalsdk.analytics.RaptorObject { if(drillDownPopUp) { rdef.setDrillDownURLInPopupPresent(true); } - /*if(targetColumn!=null) { - currColumn.setSemaphoreId(null); - targetColumn.setSemaphoreId(semaphoreId); - } else */ + currColumn.setSemaphoreId(semaphoreId); currColumn.setGroupBreak(isGroupBreak); logger.debug(EELFLoggerDelegate.debugLogger, (" ------------ Display Total ---------- "+ displayTotal)); currColumn.setDisplayTotal(displayTotal); - //if (currColumn.getDrillDownURL() == null || currColumn.getDrillDownURL().length() == 0) currColumn.setVisible(isVisible); currColumn.setIsSortable(isSortable); currColumn.setNowrap(nowrap); - //else - // currColumn.setVisible(true); + if (rdef.getReportDefType().equals(AppConstants.RD_SQL_BASED)) { if(colType!=null) currColumn.setColType(colType); @@ -831,7 +823,6 @@ public class WizardProcessor extends org.onap.portalsdk.analytics.RaptorObject { currColumn.setColName(colNameValue); if (displayFormat != null) currColumn.setColFormat(displayFormat); - //currColumn.setVisible(isVisible); currColumn.setCalculated(exprFormula.length() > 0); rdef.adjustColumnType(currColumn); @@ -1011,9 +1002,7 @@ public class WizardProcessor extends org.onap.portalsdk.analytics.RaptorObject { SimpleDateFormat dtf = new SimpleDateFormat("MM/dd/yyyy"); end = Calendar.getInstance(); end.setTime(dtf.parse(rangeEndDate)); - }/* - * if(fieldHelp.length()>255) fieldHelp = fieldHelp.substring(0, 255); - */ + } boolean reportUpdated = false; @@ -1067,8 +1056,6 @@ public class WizardProcessor extends org.onap.portalsdk.analytics.RaptorObject { } else { currField.setRangeEndDate(null); } - /*currField.setRangeEndDate(DatatypeFactory.newInstance() - .newXMLGregorianCalendar(end));*/ } catch (DatatypeConfigurationException ex) { } @@ -1232,15 +1219,6 @@ public class WizardProcessor extends org.onap.portalsdk.analytics.RaptorObject { try { String s_sql = Globals.getProcessFilterAddEdit(); s_sql = s_sql.replace("[argValue]", argValue); - /*DataSet ds = DbUtils.executeQuery("SELECT " - + (currColType.equals(AppConstants.CT_NUMBER) ? ("TO_NUMBER('" - + argValue + "')") - : (currColType.equals(AppConstants.CT_DATE) ? ("TO_DATE('" - + argValue - + "', '" - + nvl(currColumn.getColFormat(), - AppConstants.DEFAULT_DATE_FORMAT) + "')") - : ("'" + argValue + "'"))) + " FROM dual");*/ DataSet ds = DbUtils.executeQuery("SELECT " + (currColType.equals(AppConstants.CT_NUMBER) ? ("TO_NUMBER('" @@ -1275,9 +1253,7 @@ public class WizardProcessor extends org.onap.portalsdk.analytics.RaptorObject { currFilter.setJoinCondition(AppUtils.getRequestValue(request, "filterJoin")); currFilter.setOpenBrackets(AppUtils.getRequestValue(request, "openBrackets")); currFilter.setExpression(filterExpr); - // if(argType!=null) currFilter.setArgType(argType); - // if(argValue!=null) currFilter.setArgValue(argValue); currFilter .setCloseBrackets(AppUtils.getRequestValue(request, "closeBrackets")); @@ -1485,7 +1461,6 @@ public class WizardProcessor extends org.onap.portalsdk.analytics.RaptorObject { String chartType = AppUtils.getRequestNvlValue(request, "chartType"); String chartTypeFixed = AppUtils.getRequestValue(request, "chartTypeFixed"); String legendColId = AppUtils.getRequestNvlValue(request, "legendCol"); - // String valueColId = AppUtils.getRequestNvlValue(request, "valueCol"); String leftAxisLabel = AppUtils.getRequestValue(request, "leftAxisLabel"); String rightAxisLabel = AppUtils.getRequestValue(request, "rightAxisLabel"); String chartWidth = XSSFilter.filterRequest(AppUtils.getRequestNvlValue(request, "chartWidth")); @@ -1551,11 +1526,8 @@ public class WizardProcessor extends org.onap.portalsdk.analytics.RaptorObject { multiplePieOrder = AppUtils.getRequestNvlValue(request, "multiplePieOrder"); multiplePieLabelDisplay = AppUtils.getRequestNvlValue(request, "multiplePieLabelDisplay"); chartDisplay = AppUtils.getRequestNvlValue(request, "chartDisplay"); - //if(AppUtils.getRequestNvlValue(request, "multiplePieOrderInRunPage").length()>0) multiplePieOrderInRunPage = AppUtils.getRequestNvlValue(request,"multiplePieOrderInRunPage").equals("Y"); - //if(AppUtils.getRequestNvlValue(request, "multiplePieLabelDisplayInRunPage").length()>0) multiplePieLabelDisplayInRunPage = AppUtils.getRequestNvlValue(request,"multiplePieLabelDisplayInRunPage").equals("Y"); - //if(AppUtils.getRequestNvlValue(request, "chartDisplayInRunPage").length()>0) chartDisplayInRunPage = AppUtils.getRequestNvlValue(request,"chartDisplayInRunPage").equals("Y"); if(rdef.getChartAdditionalOptions()!=null) { rdef.setChartMultiplePieOrder(multiplePieOrder+(multiplePieOrderInRunPage?"|Y":"")); @@ -1581,11 +1553,8 @@ public class WizardProcessor extends org.onap.portalsdk.analytics.RaptorObject { chartOrientation = AppUtils.getRequestNvlValue(request, "chartOrientation"); secondaryChartRenderer = AppUtils.getRequestNvlValue(request, "secondaryChartRenderer"); chartDisplay = AppUtils.getRequestNvlValue(request, "chartDisplay"); - //if(AppUtils.getRequestNvlValue(request, "chartOrientationInRunPage").length()>0) chartOrientationInRunPage = AppUtils.getRequestNvlValue(request,"chartOrientationInRunPage").equals("Y"); - //if(AppUtils.getRequestNvlValue(request, "secondaryChartRendererInRunPage").length()>0) secondaryChartRendererInRunPage = AppUtils.getRequestNvlValue(request,"secondaryChartRendererInRunPage").equals("Y"); - //if(AppUtils.getRequestNvlValue(request, "chartDisplayInRunPage").length()>0) chartDisplayInRunPage = AppUtils.getRequestNvlValue(request,"chartDisplayInRunPage").equals("Y"); rdef.setChartOrientation(chartOrientation+(chartOrientationInRunPage?"|Y":"")); rdef.setSecondaryChartRenderer(secondaryChartRenderer+(secondaryChartRendererInRunPage?"|Y":"")); @@ -1597,11 +1566,8 @@ public class WizardProcessor extends org.onap.portalsdk.analytics.RaptorObject { chartOrientation = AppUtils.getRequestNvlValue(request, "chartOrientation"); secondaryChartRenderer = AppUtils.getRequestNvlValue(request, "secondaryChartRenderer"); chartDisplay = AppUtils.getRequestNvlValue(request, "chartDisplay"); - //if(AppUtils.getRequestNvlValue(request, "chartOrientationInRunPage").length()>0) chartOrientationInRunPage = AppUtils.getRequestNvlValue(request,"chartOrientationInRunPage").equals("Y"); - //if(AppUtils.getRequestNvlValue(request, "secondaryChartRendererInRunPage").length()>0) secondaryChartRendererInRunPage = AppUtils.getRequestNvlValue(request,"secondaryChartRendererInRunPage").equals("Y"); - //if(AppUtils.getRequestNvlValue(request, "chartDisplayInRunPage").length()>0) chartDisplayInRunPage = AppUtils.getRequestNvlValue(request,"chartDisplayInRunPage").equals("Y"); rdef.setChartOrientation(chartOrientation+(chartOrientationInRunPage?"|Y":"")); rdef.setSecondaryChartRenderer(secondaryChartRenderer+(secondaryChartRendererInRunPage?"|Y":"")); @@ -1636,11 +1602,6 @@ public class WizardProcessor extends org.onap.portalsdk.analytics.RaptorObject { rdef.setChartLegendDisplay(chartLegendDisplay+(showLegendDisplayOptionsInRunPage?"|Y":"")); rdef.setChartToolTips(AppUtils.getRequestNvlValue(request,"hideTooltips")); rdef.setDomainAxisValuesAsString(AppUtils.getRequestNvlValue(request,"keepAsString")); - - //System.out.println("KeepAsString " + AppUtils.getRequestNvlValue(request,"keepAsString")); - //System.out.println("From ReportDef " + rdef.keepDomainAxisValueInChartAsString()); - // boolean reportUpdated = (! - // chartType.equals(nvl(rdef.getChartType()))); rdef.setChartType(chartType); rdef.setChartTypeFixed(nvl(chartTypeFixed, "N")); if (nvl(leftAxisLabel).length()>0) @@ -1664,22 +1625,11 @@ public class WizardProcessor extends org.onap.portalsdk.analytics.RaptorObject { DataColumnType dct = (DataColumnType) iter.next(); if (dct.getColId().equals(legendColId)) { - // reportUpdated = reportUpdated||(! - // nvl(dct.getColOnChart()).equals(AppConstants.GC_LEGEND)); dct.setColOnChart(AppConstants.GC_LEGEND); } else { - // reportUpdated = - // reportUpdated||nvl(dct.getColOnChart()).equals(AppConstants.GC_LEGEND); dct.setColOnChart(null); } - - /* - * if(dct.getColId().equals(valueColId)) { reportUpdated = - * reportUpdated||(dct.getChartSeq()<=0); dct.setChartSeq(1); } - * else { reportUpdated = reportUpdated||(dct.getChartSeq()>0); - */ dct.setChartSeq(-1); - /* } */ } // for int idx = 1; @@ -1690,7 +1640,6 @@ public class WizardProcessor extends org.onap.portalsdk.analytics.RaptorObject { String yAxis = AppUtils.getRequestNvlValue(request, "yAxis"); for (Iterator iterator = columns.iterator(); iterator.hasNext();) { DataColumnType alldct = (DataColumnType) iterator.next(); - //debugLogger.debug("**********In " + chartSeries + " " + alldct.getColId()); alldct.setChartSeries((chartSeries.equals(alldct.getColId()))?true : false); } @@ -1719,7 +1668,6 @@ public class WizardProcessor extends org.onap.portalsdk.analytics.RaptorObject { String yAxis = AppUtils.getRequestNvlValue(request, "yAxis"); for (Iterator iterator = columns.iterator(); iterator.hasNext();) { DataColumnType alldct = (DataColumnType) iterator.next(); - //debugLogger.debug("**********In " + chartSeries + " " + alldct.getColId()); alldct.setChartSeries((chartSeries.equals(alldct.getColId()))?true : false); } String drillDownReportId = AppUtils.getRequestNvlValue(request, "drillDownReport"); @@ -1766,7 +1714,6 @@ public class WizardProcessor extends org.onap.portalsdk.analytics.RaptorObject { String chartSeries = AppUtils.getRequestNvlValue(request, "chartSeries"); for (Iterator iterator = columns.iterator(); iterator.hasNext();) { DataColumnType alldct = (DataColumnType) iterator.next(); - //debugLogger.debug("**********In " + chartSeries + " " + alldct.getColId()); alldct.setChartSeries((chartSeries.equals(alldct.getColId()))?true : false); } @@ -1774,7 +1721,6 @@ public class WizardProcessor extends org.onap.portalsdk.analytics.RaptorObject { String chartSeries = AppUtils.getRequestNvlValue(request, "chartSeries"); for (Iterator iterator = columns.iterator(); iterator.hasNext();) { DataColumnType alldct = (DataColumnType) iterator.next(); - //debugLogger.debug("**********In " + chartSeries + " " + alldct.getColId()); alldct.setChartSeries((chartSeries.equals(alldct.getColId()))?true : false); } }else if(chartType.equals(AppConstants.GT_STACKED_HORIZ_BAR) || chartType.equals(AppConstants.GT_STACKED_VERT_BAR) @@ -1782,28 +1728,24 @@ public class WizardProcessor extends org.onap.portalsdk.analytics.RaptorObject { String chartSeries = AppUtils.getRequestNvlValue(request, "chartSeries"); for (Iterator iterator = columns.iterator(); iterator.hasNext();) { DataColumnType alldct = (DataColumnType) iterator.next(); - //debugLogger.debug("**********In " + chartSeries + " " + alldct.getColId()); alldct.setChartSeries((chartSeries.equals(alldct.getColId()))?true : false); } }else if(chartType.equals(AppConstants.GT_LINE)) { String chartSeries = AppUtils.getRequestNvlValue(request, "chartSeries"); for (Iterator iterator = columns.iterator(); iterator.hasNext();) { DataColumnType alldct = (DataColumnType) iterator.next(); - //debugLogger.debug("**********In " + chartSeries + " " + alldct.getColId()); alldct.setChartSeries((chartSeries.equals(alldct.getColId()))?true : false); } } else if (chartType.equals(AppConstants.GT_TIME_DIFFERENCE_CHART)) { String chartSeries = AppUtils.getRequestNvlValue(request, "chartSeries"); for (Iterator iterator = columns.iterator(); iterator.hasNext();) { DataColumnType alldct = (DataColumnType) iterator.next(); - //debugLogger.debug("**********In " + chartSeries + " " + alldct.getColId()); alldct.setChartSeries((chartSeries.equals(alldct.getColId()))?true : false); } } else if (chartType.equals(AppConstants.GT_COMPARE_PREVYEAR_CHART)) { String chartSeries = AppUtils.getRequestNvlValue(request, "chartSeries"); for (Iterator iterator = columns.iterator(); iterator.hasNext();) { DataColumnType alldct = (DataColumnType) iterator.next(); - //debugLogger.debug("**********In " + chartSeries + " " + alldct.getColId()); alldct.setChartSeries((chartSeries.equals(alldct.getColId()))?true : false); } @@ -1858,7 +1800,6 @@ public class WizardProcessor extends org.onap.portalsdk.analytics.RaptorObject { } for (int i = 1; i < Math.max(valueColsCount, 1) + 1; i++) { - //debugLogger.debug("********** " + chartSeries); if(i==1) { /* Range Axis is resetted before adding */ for (Iterator iterator = columns.iterator(); iterator.hasNext();) { @@ -1883,11 +1824,7 @@ public class WizardProcessor extends org.onap.portalsdk.analytics.RaptorObject { String chartGroup = XSSFilter.filterRequestOnlyScript(AppUtils.getRequestNvlValue(request, "chartGroup" + valueColId + "Axis")); String yAxisGroup = ""; yAxisGroup = XSSFilter.filterRequestOnlyScript(AppUtils.getRequestNvlValue(request, "YAxisLabel" + valueColId)); - //debugLogger.debug("^^^^^^^^^^^^^^^^^Chart Group " + chartGroup); - //if(chartType.equals(AppConstants.GT_TIME_SERIES)) { - // debugLogger.debug("**********Outer If " + chartSeries); - //} - + if (valueColId.length() > 0 && (!valueColId.equals(removeColId))) { DataColumnType dct = rdef.getColumnById(valueColId); dct.setChartSeq(idx++); @@ -1906,9 +1843,7 @@ public class WizardProcessor extends org.onap.portalsdk.analytics.RaptorObject { else if (chartType.equals(AppConstants.GT_BAR_3D)) dct.setYAxis(nvl(yAxisGroup)+"|"+valueColId); else dct.setYAxis(""); - //} - //else - //dct.setCreateInNewChart(false); + } else if (valueColId.length() > 0 && (valueColId.equals(removeColId))) {// if DataColumnType dct = rdef.getColumnById(valueColId); dct.setChartSeq(-1); @@ -1941,7 +1876,7 @@ public class WizardProcessor extends org.onap.portalsdk.analytics.RaptorObject { } // if } // for - return true; // reportUpdated; + return true; // reportUpdated } // processChart public boolean processAdhocSchedule(HttpServletRequest request, String action) @@ -1993,7 +1928,6 @@ public class WizardProcessor extends org.onap.portalsdk.analytics.RaptorObject { reportSchedule.addEmailToUser(loggedInUserId, (AppUtils.getUserName(loggedInUserId).length()>0?AppUtils.getUserName(loggedInUserId):(AppUtils.getUserLoginId(loggedInUserId).length()>0?AppUtils.getUserLoginId(loggedInUserId):loggedInUserId) )); } if (action.equals(AppConstants.WA_ADD_USER)) { - //String userId = AppUtils.getRequestNvlValue(request, "schedEmailAdd"); String userName = AppUtils.getUserName(userId); if (Globals.getUseLoginIdInSchedYN().equals("Y")){ String userLoginId = AppUtils.getUserLoginId(userId); @@ -2018,7 +1952,6 @@ public class WizardProcessor extends org.onap.portalsdk.analytics.RaptorObject { reportSchedule.removeEmailToUser( AppUtils.getRequestNvlValue(request, AppConstants.RI_DETAIL_ID)); else if (action.equals(AppConstants.WA_ADD_ROLE)) { - //String roleId = AppUtils.getRequestNvlValue(request, "schedEmailAddRole"); String roleName = AppUtils.getRoleName(roleId); if (roleId.length() > 0 && roleName != null) reportSchedule.addEmailToRole(roleId, roleName); @@ -2183,8 +2116,6 @@ public class WizardProcessor extends org.onap.portalsdk.analytics.RaptorObject { System.out.println(" #$%#$%#$% -- address col = " + addressColumn); String dataColumn = XSSFilter.filterRequestOnlyScript(AppUtils.getRequestNvlValue(request, "dataColumn0")); String legendColumn = XSSFilter.filterRequestOnlyScript(AppUtils.getRequestNvlValue(request, "legendColumn")); - //String legendDisplayName = XSSFilter.filterRequestOnlyScript(AppUtils.getRequestNvlValue(request, "dataHeaderL")); - //if(nvl(legendDisplayName).length()<=0) legendDisplayName = legendColumn; String color = XSSFilter.filterRequestOnlyScript(AppUtils.getRequestNvlValue(request, "markerColor0")); String isMapAllowed = XSSFilter.filterRequestOnlyScript(AppUtils.getRequestNvlValue(request, "isMapAllowed")); String useDefaultSize = XSSFilter.filterRequestOnlyScript(AppUtils.getRequestNvlValue(request, "useDefaultSize")); @@ -2215,7 +2146,6 @@ public class WizardProcessor extends org.onap.portalsdk.analytics.RaptorObject { repMap.setHeight(height.trim()); repMap.setWidth(width.trim()); repMap.setLegendColumn(legendColumn); - //repMap.setLegendDisplayName(legendDisplayName); Marker m = new ObjectFactory().createMarker(); m.setAddressColumn(addressColumn); |