diff options
author | Lorraine Welch <lb2391@att.com> | 2020-05-28 16:55:30 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2020-05-28 16:55:30 +0000 |
commit | b0621c35806be79972d57fc3c3c53aa72502e2e4 (patch) | |
tree | 8e5a3cfc0acaab63c1f92e42c6218a47d7b1ff8b /ecomp-sdk/epsdk-analytics/src | |
parent | faf499b3af8a9ce1b9a9d08a28c2f79ad875b56c (diff) | |
parent | 06245203c36599ed6951569c24587bd7373ca771 (diff) |
Merge "Removed unwanted codes from AAFService & ActionHan"
Diffstat (limited to 'ecomp-sdk/epsdk-analytics/src')
-rw-r--r-- | ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/controller/ActionHandler.java | 62 |
1 files changed, 1 insertions, 61 deletions
diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/controller/ActionHandler.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/controller/ActionHandler.java index 1cc75b5e..b660ca95 100644 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/controller/ActionHandler.java +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/controller/ActionHandler.java @@ -613,7 +613,6 @@ public class ActionHandler extends org.onap.portalsdk.analytics.RaptorObject { if (aLR!=null && !aLR.getReportID().equals(reportID)) { request.setAttribute(AppConstants.RI_SHOW_BACK_BTN, "Y"); } -// } } if(rDisplayContent) @@ -1829,29 +1828,6 @@ public class ActionHandler extends org.onap.portalsdk.analytics.RaptorObject { public String getChildDropDown(HttpServletRequest request, String nextPage) throws RaptorRuntimeException { if(request.getParameter("firstTime") != null) { return nextPage; } - - /*ReportRuntime rr = (ReportRuntime) request.getSession().getAttribute( - AppConstants.SI_REPORT_RUNTIME); - - String c_master = request.getParameter("c_master"); - java.util.HashMap valuesMap = Globals.getRequestParamtersMap(request); - request.setAttribute("c_master", c_master); - - int idx = 0; - ReportFormFields rff = rr.getReportFormFields(); - FormField ff = null; - for(rff.resetNext(); rff.hasNext(); idx++) { - ff = rff.getNext(); - - - if(ff.getDependsOn() != null && ff.getDependsOn().trim() != "") - { - String val = request.getParameter(ff.getFieldName()); - request.setAttribute(ff.getFieldName(), ff.getHtml(val, valuesMap, rr)); - } - - } - */ return nextPage; } @@ -1940,20 +1916,16 @@ public class ActionHandler extends org.onap.portalsdk.analytics.RaptorObject { colNames.append(dc.getColId()); if (dc.isVisible()) { //TODO: Drilldown URL - //sql = reportRuntime.parseReportSQLForDrillDownParams(sql, dc, request); } } DataSet ds = null; - // try { String dbInfo = reportRuntime.getDBInfo(); if(maxRows == 1) sql += " limit "+ maxRows; System.out.println("SQL getReportData()- " + sql); ds = ConnectionUtils.getDataSet(sql, dbInfo); int totalRows = 0; - /*if (reportRuntime.getReportDataSize() < 0) {*/ - //String countSQL = "SELECT count(*) FROM (" + sql + ") x"; String dbType = ""; if (dbInfo!=null && (!dbInfo.equals(AppConstants.DB_LOCAL))) { @@ -1966,18 +1938,12 @@ public class ActionHandler extends org.onap.portalsdk.analytics.RaptorObject { } totalRows = ds.getRowCount(); - /*}*/ ReportData rd = new ReportData(0, true); if(totalRows > 0) { // Already defined changed for modifying request parameters - //List reportCols = getAllColumns(); Vector visibleCols = new Vector(reportCols.size()); Vector formatProcessors = new Vector(reportCols.size()); - - // ColumnHeaderRow chr = new ColumnHeaderRow(); - // rd.reportColumnHeaderRows.addColumnHeaderRow(chr); - // chr.setRowHeight("30"); int count =0 ; /* ADDED */ @@ -1993,7 +1959,6 @@ public class ActionHandler extends org.onap.portalsdk.analytics.RaptorObject { for(int i = 0 ; i < rff.size(); i++) { fieldDisplayName = "["+((FormField)rff.getFormField(i)).getFieldDisplayName()+"]"; fieldValue = ""; - //if(dct.getOriginalDisplayName()==null) dct.setOriginalDisplayName(dct.getDisplayName()); if (dct.getDependsOnFormField().equals(fieldDisplayName)) { fieldValue = nvl(request.getParameter(((FormField)rff.getFormField(i)).getFieldName())); @@ -2028,7 +1993,6 @@ public class ActionHandler extends org.onap.portalsdk.analytics.RaptorObject { } if (dc.isVisible()) { visibleCols.add(count,dc); - //if(dc.getColId().startsWith("group")) { for (int d = 0; d < reportCols.size(); d++) { if(reportCols.get(d)!=null) { DataColumnType dct1 = (DataColumnType) reportCols.get(d); @@ -2038,21 +2002,17 @@ public class ActionHandler extends org.onap.portalsdk.analytics.RaptorObject { } } } - //} VisualManager visualManager = reportRuntime.getVisualManager(); rd.createColumn(dc.getColId(), dc.getDisplayName(), dc.getDisplayWidthInPxls(),dc.getDisplayHeaderAlignment(), visualManager.isColumnVisible(dc.getColId()), visualManager .getSortByColId().equals(dc.getColId()) ? visualManager .getSortByAscDesc() : null, true, dc.getLevel()!=null?dc.getLevel():0, dc.getStart()!=null?dc.getStart():0, dc.getColspan()!=null?dc.getColspan():0, dc.isIsSortable()!=null?dc.isIsSortable():false); - // chr.addColumnHeader(new ColumnHeader(dc.getDisplayName(), - // (dc.getDisplayWidth()>100)?"10%":(""+dc.getDisplayWidth()+"%"))); } // if else { visibleCols.add(count,null); rd.createColumn(dc.getColId(), AppConstants.HIDDEN, dc.getDisplayWidthInPxls(), dc.getDisplayHeaderAlignment(), false, null,false,dc.getLevel()!=null?dc.getLevel():0, dc.getStart()!=null?dc.getStart():0, dc.getColspan()!=null?dc.getColspan():0, dc.isIsSortable()!=null?dc.isIsSortable():false); -// formatProcessors.add(count,null); } count++; } // for @@ -2097,7 +2057,6 @@ public class ActionHandler extends org.onap.portalsdk.analytics.RaptorObject { } if (dv.getDisplayValue().length() == 0) { - //dv.setDisplayValue("[NULL]"); dv.setDisplayValue(""); } } // if @@ -2116,34 +2075,18 @@ public class ActionHandler extends org.onap.portalsdk.analytics.RaptorObject { dv.setVisible(true); dv.setAlignment(dct.getDisplayAlignment()); dv.setDisplayTotal(dct.getDisplayTotal()); - dv.setDisplayName(dct.getDisplayName()); - -// if (nvl(dct.getDrillDownURL()).length() > 0) { - -// if(dv.getDisplayValue().length() > 0) { - //TODO: Below Drilldown URL -// dv.setDrillDownURL(reportRuntime.parseDrillDownURL(r, /* c, */ds, dct,request, childReportFormFields)); -// dv.setDrillDowninPoPUp(dct.isDrillinPoPUp()); -// } -// -// if (dv.getDisplayValue().length() == 0) { -// //dv.setDisplayValue("[NULL]"); -// dv.setDisplayValue(""); -// } -// } // if + dv.setDisplayName(dct.getDisplayName()); } else { dv.setVisible(false); dv.setHidden(true); } - //System.out.println("in Linear report b4" + dr.getFormatId() + dr.getBgColorHtml() + dv.getDisplayValue()); if(dr.getFormatId()!=null) ((FormatProcessor) formatProcessors.get(c)).setHtmlFormatters(dv, dr, true); else ((FormatProcessor) formatProcessors.get(c)).setHtmlFormatters(dv, dr, false); - //System.out.println("in Linear report After" + dr.getFormatId() + dr.getBgColorHtml() + dv.getDisplayValue()); } // if reportCols } // for reportDataList.add(dr); @@ -2151,7 +2094,6 @@ public class ActionHandler extends org.onap.portalsdk.analytics.RaptorObject { rd.setReportDataList(reportDataList); //Only if rownumber options is needed - //rd.addRowNumbers(pageNo, getPageSize()); DataRow colDataTotalsLinear = null; if (colDataTotalsLinear == null) colDataTotalsLinear = reportRuntime.generateColumnDataTotalsLinear(new ArrayList(reportCols), AppUtils.getUserID(request), @@ -2171,8 +2113,6 @@ public class ActionHandler extends org.onap.portalsdk.analytics.RaptorObject { if(rr!=null) { ReportJSONRuntime reportJSONRuntime = rr.createFormFieldJSONRuntime(request); ObjectMapper mapper = new ObjectMapper(); - //mapper.setVisibility(JsonMethod.FIELD, Visibility.ANY); - //mapper.setVisibilityChecker(mapper.getVisibilityChecker().with(JsonAutoDetect.Visibility.NONE)); mapper.configure(SerializationFeature.FAIL_ON_EMPTY_BEANS, false); mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); String jsonInString = ""; |