summaryrefslogtreecommitdiffstats
path: root/ecomp-sdk
diff options
context:
space:
mode:
authorburdziak <olaf.burdziakowski@nokia.com>2019-04-19 13:31:50 +0200
committerburdziak <olaf.burdziakowski@nokia.com>2019-04-19 13:31:50 +0200
commit03590baf866ed6eb70ced11b8673f5f5e1e57743 (patch)
tree711c8058b06b181337b290f979e68d295d0e6f89 /ecomp-sdk
parentb3ced8c4eb98a152076b3f0a05ba601bce7f8d2a (diff)
Fix sonar issues (part) in WizardProcessor
Change-Id: If94ab91aa4307724ea0a04139cb0365f58175e1f Issue-ID: PORTAL-523 Signed-off-by: burdziak <olaf.burdziakowski@nokia.com>
Diffstat (limited to 'ecomp-sdk')
-rw-r--r--ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/controller/WizardProcessor.java476
1 files changed, 216 insertions, 260 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 47af1b71..f0829d29 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
@@ -33,7 +33,7 @@
*
* ============LICENSE_END============================================
*
- *
+ *
*/
package org.onap.portalsdk.analytics.controller;
@@ -80,35 +80,36 @@ import org.onap.portalsdk.analytics.xmlobj.SemaphoreType;
import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate;
/**<HR/>
- * This class is part of <B><I>RAPTOR (Rapid Application Programming Tool for OLAP Reporting)</I></B><BR/>
+ * This class is part of <B><I>RAPTOR (Rapid Application Programming Tool for OLAP Reporting)</I></B><BR/>
* <HR/>
*
* --------------------------------------------------------------------------------------------------<BR/>
- * <B>WizardProcessor.java</B> - This class is used to process the user input provided in the wizard.<BR/>
+ * <B>WizardProcessor.java</B> - This class is used to process the user input provided in the wizard.<BR/>
* It is called in creation as well as updation process. It builds report xml via JAXB using user<BR/>
* input. This is vital one, to store meta information of each report<BR/>
* ---------------------------------------------------------------------------------------------------<BR/>
*
*
* <U>Change Log</U><BR/><BR/>
- *
- * 31-Aug-2009 : Version 8.5.1 (Sundar);<UL><LI> For Time Series multi series property is exposed. </LI></UL>
- * 28-Aug-2009 : Version 8.5.1 (Sundar);<UL><LI> If user login id is null, it would display user name when user is added for schedule. </LI></UL>
- * 18-Aug-2009 : Version 8.5.1 (Sundar);<UL><LI> request Object is passed to prevent caching user/roles - Datamining/Hosting. </LI></UL>
- * 12-Aug-2009 : Version 8.5 (Sundar); <UL><LI> For Line Charts too options are captured and rendering is customized. </LI></UL>
- * 29-Jul-2009 : Version 8.4 (Sundar); <UL><LI> Maximum Excel Download size would be persisted if changed. </LI></UL>
- * 14-Jul-2009 : Version 8.4 (Sundar); <UL><LI> Schedule feature is added to Dashboard Reports. </LI></UL>
+ *
+ * 31-Aug-2009 : Version 8.5.1 (Sundar);<UL><LI> For Time Series multi series property is exposed. </LI></UL>
+ * 28-Aug-2009 : Version 8.5.1 (Sundar);<UL><LI> If user login id is null, it would display user name when user is added for schedule. </LI></UL>
+ * 18-Aug-2009 : Version 8.5.1 (Sundar);<UL><LI> request Object is passed to prevent caching user/roles - Datamining/Hosting. </LI></UL>
+ * 12-Aug-2009 : Version 8.5 (Sundar); <UL><LI> For Line Charts too options are captured and rendering is customized. </LI></UL>
+ * 29-Jul-2009 : Version 8.4 (Sundar); <UL><LI> Maximum Excel Download size would be persisted if changed. </LI></UL>
+ * 14-Jul-2009 : Version 8.4 (Sundar); <UL><LI> Schedule feature is added to Dashboard Reports. </LI></UL>
* 29-Jun-2009 : Version 8.4 (Sundar); <UL><LI> Options for <I>Compare to Previous year Chart</I> are processed.</LI>
* <LI> In the Bar chart Last Occuring Series/Category can be plotted as Bar or Line Renderer. </LI>
- * </UL>
- * 22-Jun-2009 : Version 8.4 (Sundar); <UL><LI> processChart method is modified to accommodate creating
- * Bar Charts, Time Difference Charts and adding generic chart options.</LI></UL>
- *
+ * </UL>
+ * 22-Jun-2009 : Version 8.4 (Sundar); <UL><LI> processChart method is modified to accommodate creating
+ * Bar Charts, Time Difference Charts and adding generic chart options.</LI></UL>
+ *
*/
public class WizardProcessor extends org.onap.portalsdk.analytics.RaptorObject {
+ private static final EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(WizardProcessor.class);
+
public static Calendar getCalendar(XMLGregorianCalendar xmlCalendar){
- // log.debug("Zone ID is " + xmlCalendar.getTimezone());
TimeZone timeZone = xmlCalendar.getTimeZone(xmlCalendar.getTimezone());
Calendar calendar = Calendar.getInstance(timeZone);
calendar.set(Calendar.YEAR,xmlCalendar.getYear());
@@ -119,12 +120,12 @@ public class WizardProcessor extends org.onap.portalsdk.analytics.RaptorObject {
calendar.set(Calendar.SECOND,xmlCalendar.getSecond());
return calendar;
}
- private static final EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(WizardProcessor.class);
+
public WizardProcessor() {
}
private String adjustDataType(String oracleDataType) {
- return oracleDataType.equals("VARCHAR2") ? AppConstants.CT_CHAR : oracleDataType;
+ return "VARCHAR2".equals(oracleDataType) ? AppConstants.CT_CHAR : oracleDataType;
// Probably should be expanded to convert any CHAR or VARCHAR type to
// CT_CHAR, number type to CT_NUMBER and date to CT_DATE
} // adjustDataType
@@ -148,12 +149,12 @@ public class WizardProcessor extends org.onap.portalsdk.analytics.RaptorObject {
String curStep = rdef.getWizardSequence().getCurrentStep();
String curSubStep = rdef.getWizardSequence().getCurrentSubStep();
- if (AppUtils.getRequestNvlValue(request, "showDashboardOptions").length()<=0)
+ if (AppUtils.getRequestNvlValue(request, "showDashboardOptions").length()<=0)
request.setAttribute("showDashboardOptions", "F");
logger.debug(EELFLoggerDelegate.debugLogger, ("^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^curStep " + curStep + " " + curSubStep + " " + action));
boolean reportUpdated = false;
if (!action.equals(AppConstants.WA_BACK)) {
- if (curStep.equals(AppConstants.WS_DEFINITION)) {
+ if (curStep.equals(AppConstants.WS_DEFINITION)) {
reportUpdated = processDefinition(request);
} else if (curStep.equals(AppConstants.WS_SQL)) {
if (action.equals(AppConstants.WA_VALIDATE))
@@ -171,7 +172,6 @@ public class WizardProcessor extends org.onap.portalsdk.analytics.RaptorObject {
reportUpdated = processColumnAddEdit(request, curSubStep
.equals(AppConstants.WSS_EDIT) || curSubStep
.equals(AppConstants.WA_MODIFY));
- //reportUpdated = processColumnAddEdit(request, true);
}
else if (curSubStep.equals(AppConstants.WSS_ADD_MULTI))
reportUpdated = processColumnAddMulti(request);
@@ -197,7 +197,7 @@ public class WizardProcessor extends org.onap.portalsdk.analytics.RaptorObject {
else if (action.equals(AppConstants.WSS_ADD_BLANK))
reportUpdated = processFormFieldBlank(request);
else if (action.equals(AppConstants.WSS_INFO_BAR))
- reportUpdated = processFormFieldInfoBar(request);
+ reportUpdated = processFormFieldInfoBar(request);
} else if (curStep.equals(AppConstants.WS_FILTERS)) {
if (curSubStep.equals(AppConstants.WSS_ADD)
|| curSubStep.equals(AppConstants.WSS_EDIT))
@@ -236,15 +236,15 @@ public class WizardProcessor extends org.onap.portalsdk.analytics.RaptorObject {
reportUpdated = processClearLog(request);
} else if (curStep.equals(AppConstants.WS_SCHEDULE)) {
reportUpdated = processSchedule(request, action);
- } else if(curStep.equals(AppConstants.WS_DATA_FORECASTING)) {
+ } else if(curStep.equals(AppConstants.WS_DATA_FORECASTING)) {
reportUpdated = processForecasting(request, action);
- }
+ }
/****For Report Maps - Start*****/
else if (curStep.equals(AppConstants.WS_MAP)) {
reportUpdated = processMap(request, action);
- }
+ }
/****For Report Maps - End*****/
-
+
// else
}
if (reportUpdated)
@@ -270,7 +270,7 @@ public class WizardProcessor extends org.onap.portalsdk.analytics.RaptorObject {
.add(new IdNameValue(sem.getSemaphoreId(), sem.getSemaphoreName()));
} // for
- if (importedList.size() > 0) {
+ if (!importedList.isEmpty()) {
request.setAttribute(AppConstants.RI_DATA_SET, importedList);
persistReportDefinition(request, rdef);
} // if
@@ -294,7 +294,7 @@ public class WizardProcessor extends org.onap.portalsdk.analytics.RaptorObject {
rdef.deleteSemaphore(semaphore);
semaphore.setSemaphoreName(semaphoreName);
semaphore.setSemaphoreType(semaphoreType);
-
+
rdef.setSemaphore(semaphore);
}
@@ -308,36 +308,31 @@ public class WizardProcessor extends org.onap.portalsdk.analytics.RaptorObject {
String[] fontColor = request.getParameterValues("fontColor");
String[] fontFace = request.getParameterValues("fontFace");
String[] fontSize = request.getParameterValues("fontSize");
- //String[] anyFmt = request.getParameterValues("anyFmt");
-
- // String[] alignment = request.getParameterValues("alignment");
for (int i = 0; i < lessThanValue.length; i++)
if (i == 0 || nvl(lessThanValue[i]).length() > 0) {
FormatType fmt = null;
if (i == 0 || nvl(formatId[i]).length() > 0)
- fmt = rdef.getSemaphoreFormatById(semaphore, nvl(formatId[i]));
+ fmt = ReportDefinition.getSemaphoreFormatById(semaphore, nvl(formatId[i]));
if (fmt == null)
- fmt = rdef.addEmptyFormatType(new ObjectFactory(), semaphore);
+ fmt = ReportDefinition.addEmptyFormatType(new ObjectFactory(), semaphore);
fmt.setLessThanValue(nvl(lessThanValue[i]));
fmt.setExpression(nvl(expression[i]));
- fmt.setBold(bold[i].equals("Y"));
- fmt.setItalic(italic[i].equals("Y"));
- fmt.setUnderline(underline[i].equals("Y"));
+ fmt.setBold("Y".equals(bold[i]));
+ fmt.setItalic("Y".equals(italic[i]));
+ fmt.setUnderline("Y".equals(underline[i]));
fmt.setBgColor(bgColor[i]);
fmt.setFontColor(fontColor[i]);
fmt.setFontFace(fontFace[i]);
fmt.setFontSize(fontSize[i]);
- //fmt.setAnyFmt((anyFmt[i]!=null)?anyFmt[i].startsWith("Y"):false);
- // fmt.setAlignment(alignment[i]);
} else if (nvl(formatId[i]).length() > 0)
- rdef.deleteFormatType(semaphore, formatId[i]);
+ ReportDefinition.deleteFormatType(semaphore, formatId[i]);
persistReportDefinition(request, rdef);
} // processSemaphorePopup
- private boolean processDefinition(HttpServletRequest request) throws Exception {
+ private boolean processDefinition(HttpServletRequest request) throws RaptorException {
ReportDefinition rdef = (ReportDefinition) request.getSession().getAttribute(
AppConstants.SI_REPORT_DEFINITION);
@@ -350,35 +345,29 @@ public class WizardProcessor extends org.onap.portalsdk.analytics.RaptorObject {
boolean isSizedByContent= (AppUtils.getRequestNvlValue(request, "sizedByContent").length()<=0?"N":AppUtils.getRequestNvlValue(request, "sizedByContent")).startsWith("Y");
boolean reportsInNewWindow = false;
boolean hideFormFieldAfterRun = false;
-
+
/*recurrance in schedule tab - Start*/
- String isOneTimeScheduleAllowed = nvl(AppUtils.getRequestValue(request, "isOneTimeScheduleAllowed"),"N");
+ String isOneTimeScheduleAllowed = nvl(AppUtils.getRequestValue(request, "isOneTimeScheduleAllowed"),"N");
String isHourlyScheduleAllowed = nvl(AppUtils.getRequestValue(request, "isHourlyScheduleAllowed"),"N");
String isDailyScheduleAllowed = nvl(AppUtils.getRequestValue(request, "isDailyScheduleAllowed"),"N");
String isDailyMFScheduleAllowed = nvl(AppUtils.getRequestValue(request, "isDailyMFScheduleAllowed"),"N");
String isWeeklyScheduleAllowed = nvl(AppUtils.getRequestValue(request, "isWeeklyScheduleAllowed"),"N");
String isMonthlyScheduleAllowed = nvl(AppUtils.getRequestValue(request, "isMonthlyScheduleAllowed"),"N");
- //System.out.println("//////////// + isOneTimeScheduleAllowed : " + isOneTimeScheduleAllowed);
- /*recurrance in schedule tab - End*/
+ /*recurrance in schedule tab - End*/
if (reportDescr.length() > 1000)
reportDescr = reportDescr.substring(0, 1000);
boolean reportUpdated;
-
+
String reportType = AppUtils.getRequestNvlValue(request, "reportType");
-
-
-
- //rdef.setReportName(reportName);
- //rdef.setReportDescr(reportDescr);
- //rdef.setReportType(reportType);
+
rdef.setFolderId(folderId);
-// debugLogger.debug("setting folder ID = " + folderId);
+
if(reportType.equals(AppConstants.RT_DASHBOARD)) {
rdef.setReportName(reportName);
rdef.setReportDescr(reportDescr);
- rdef.setReportType(reportType);
+ rdef.setReportType(reportType);
String dashboardLayoutHTML = AppUtils.getRequestNvlValue(request, "dashboardLayoutHTML");
rdef.setDashboardLayoutHTML(dashboardLayoutHTML);
String dataContainerHeight = nvl(AppUtils.getRequestValue(request, "heightContainer"), "auto");
@@ -386,65 +375,32 @@ public class WizardProcessor extends org.onap.portalsdk.analytics.RaptorObject {
rdef.setDataContainerHeight(dataContainerHeight);
rdef.setDataContainerWidth(dataContainerWidth);
rdef.setAllowSchedule(isAllowSchedule?"Y":"N");
-
-
- /*
- String numDashCols = AppUtils.getRequestNvlValue(request, "numDashCols");
- String reports1 = AppUtils.getRequestNvlValue(request, "reports1");
- String reports2 = AppUtils.getRequestNvlValue(request, "reports2");
- String reports3 = AppUtils.getRequestNvlValue(request, "reports3");
- String reports4 = AppUtils.getRequestNvlValue(request, "reports4");
- String repBgColor1 = AppUtils.getRequestNvlValue(request, "repBgColor1");
- String repBgColor2 = AppUtils.getRequestNvlValue(request, "repBgColor2");
- String repBgColor3 = AppUtils.getRequestNvlValue(request, "repBgColor3");
- String repBgColor4 = AppUtils.getRequestNvlValue(request, "repBgColor4");
-
- //List reports = rdef.getDashBoardReports();
- rdef.setNumDashCols(numDashCols);
- DashboardReports reportsList = new DashboardReportsImpl();
-
- String reports[] = new String[]{reports1, reports2, reports3, reports4};
- String repBgColors[] = new String[]{repBgColor1, repBgColor2, repBgColor3, repBgColor4};
- for (int i = 0; i < reports.length; i++) {
- Reports report = new ReportsImpl();
- report.setReportId(reports[i]);
- report.setBgcolor(repBgColors[i]);
- reportsList.getReportsList().add(report);
- }
-
-
-
- rdef.setDashBoardReports(reportsList);
- */
+
+
reportUpdated = true;
-
-// reportUpdated = (!(reportName.equals(nvl(rdef.getReportName()))
-// && reportDescr.equals(nvl(rdef.getReportDescr()))
-// && reportType.equals(nvl(rdef.getReportType()))
-// && numDashCols.equals(nvl(rdef.getNumDashCols()))));
-//// && rdef.getR
-
+
+
if (rdef.getWizardSequence() instanceof WizardSequence)
rdef.generateWizardSequence(request);
-
+
} else {
-
+
if (AppUtils.getRequestNvlValue(request, "reportType").equals(AppConstants.RT_CROSSTAB) || rdef.getReportType().equals(AppConstants.RT_CROSSTAB)) {
-
+
String widthNo = AppUtils.getRequestNvlValue(request, "widthNo");
if(nvl(widthNo).endsWith("px"))
rdef.setWidthNoColumn(widthNo);
else
rdef.setWidthNoColumn(widthNo+"px");
}
-
+
String dataGridAlign = AppUtils.getRequestNvlValue(request, "dataGridAlign");
if(nvl(dataGridAlign).length()>0) {
rdef.setDataGridAlign(dataGridAlign);
} else {
rdef.setDataGridAlign("left");
}
-
+
String pdfImgLogo = AppUtils.getRequestNvlValue(request, "pdfImg");
if(nvl(pdfImgLogo).length()>0)
rdef.setPdfImg(pdfImgLogo);
@@ -464,12 +420,12 @@ public class WizardProcessor extends org.onap.portalsdk.analytics.RaptorObject {
} catch (NumberFormatException ex) {}
if(AppUtils.getRequestNvlValue(request, "excelDownloadSize").length()>0)
rdef.setMaxRowsInExcelDownload(Integer.parseInt(AppUtils.getRequestValue(request, "excelDownloadSize")));
- if(AppUtils.getRequestNvlValue(request, "reportInNewWindow").length()>0)
+ if(AppUtils.getRequestNvlValue(request, "reportInNewWindow").length()>0)
reportsInNewWindow = AppUtils.getRequestNvlValue(request,"reportInNewWindow").equals("Y");
- if(AppUtils.getRequestNvlValue(request, "hideFormFieldsAfterRun").length()>0)
+ if(AppUtils.getRequestNvlValue(request, "hideFormFieldsAfterRun").length()>0)
hideFormFieldAfterRun = AppUtils.getRequestNvlValue(request,"hideFormFieldsAfterRun").equals("Y");
-
+
if(AppUtils.getRequestNvlValue(request, "displayFolderTree").length()>0)
rdef.setDisplayFolderTree(AppUtils.getRequestNvlValue(request,"displayFolderTree").equals("Y"));
else
@@ -481,20 +437,20 @@ public class WizardProcessor extends org.onap.portalsdk.analytics.RaptorObject {
DataSet ds = null;
try {
ds = DbUtils.executeQuery(schemaSql);
-
+
String prefix = "", desc = "";
-
+
for (int i = 0; i < ds.getRowCount(); i++) {
dbType = ds.getItem(i, 2);
}
}
catch (Exception e) {}
-
+
int pageSize = Globals.getDefaultPageSize();
try {
pageSize = Integer.parseInt(AppUtils.getRequestValue(request, "pageSize"));
} catch (NumberFormatException e) {
- }
+ }
String rApproved = nvl(AppUtils.getRequestValue(request, "menuApproved"), "N");
String menuID = "";
String[] menuIDs = request.getParameterValues("menuID");
@@ -502,7 +458,7 @@ public class WizardProcessor extends org.onap.portalsdk.analytics.RaptorObject {
for (int i = 0; i < menuIDs.length; i++)
menuID += (menuID.length() == 0 ? "" : "|") + menuIDs[i];
/* else
- menuID = "";*/
+ menuID = "";*/
// boolean additionalFieldsShown = AppUtils.getRequestNvlValue(request,
// "additionalFieldsShown").equals("Y");
@@ -510,7 +466,7 @@ public class WizardProcessor extends org.onap.portalsdk.analytics.RaptorObject {
String reportDefType = AppUtils.getRequestNvlValue(request, "reportDefType");
String dataContainerHeight = nvl(AppUtils.getRequestValue(request, "heightContainer"), "auto");
String dataContainerWidth = nvl(AppUtils.getRequestValue(request, "widthContainer"), "auto");
-
+
String displayOptions = nvl(AppUtils.getRequestValue(request, "hideForm"), "N")
+ nvl(AppUtils.getRequestValue(request, "hideChart"), "N")
+ nvl(AppUtils.getRequestValue(request, "hideData"), "N")
@@ -522,20 +478,20 @@ public class WizardProcessor extends org.onap.portalsdk.analytics.RaptorObject {
dashboardOptions.append((nvl(AppUtils.getRequestValue(request, "hide"),"chart").equals("chart"))?"Y":"N");
dashboardOptions.append((nvl(AppUtils.getRequestValue(request, "hide"),"").equals("data"))?"Y":"N");
dashboardOptions.append((nvl(AppUtils.getRequestValue(request, "hideBtns"),"").equals("Y"))?"Y":"N");*/
-
+
String numFormCols = nvl(AppUtils.getRequestValue(request, "numFormCols"), "1");
String reportTitle = XSSFilter.filterRequestOnlyScript(AppUtils.getRequestNvlValue(request, "reportTitle"));
String reportSubTitle = XSSFilter.filterRequestOnlyScript(AppUtils.getRequestNvlValue(request, "reportSubTitle"));
String reportHeader = XSSFilter.filterRequestOnlyScript(AppUtils.getRequestNvlValue(request, "reportHeader"));
String reportFooter = XSSFilter.filterRequestOnlyScript(AppUtils.getRequestNvlValue(request, "reportFooter"));
-
+
int frozenColumns = 0;
- try {
+ try {
frozenColumns = Integer.parseInt(AppUtils.getRequestValue(request, "frozenColumns"));
} catch (NumberFormatException ex) {
-
+
}
-
+
/* reportUpdated = (!(reportName.equals(nvl(rdef.getReportName()))))
&& (!(reportDescr.equals(nvl(rdef.getReportDescr()))))
&& (!(formHelp.equals(nvl(rdef.getFormHelpText()))))
@@ -559,17 +515,17 @@ public class WizardProcessor extends org.onap.portalsdk.analytics.RaptorObject {
&& numFormCols.equals(nvl(rdef.getNumFormCols()))
&& reportTitle.equals(nvl(rdef.getReportTitle()))
&& reportSubTitle.equals(nvl(rdef.getReportSubTitle()))
- && reportHeader.equals(nvl(rdef.getReportHeader()))
+ && reportHeader.equals(nvl(rdef.getReportHeader()))
&& reportsInNewWindow == rdef.isReportInNewWindow()
&& reportFooter.equals(nvl(rdef.getReportFooter())))
;*/
-
-
+
+
/*reportUpdated = (!(reportName.equals(nvl(rdef.getReportName()))
&& reportDescr.equals(nvl(rdef.getReportDescr()))
&& formHelp.equals(nvl(rdef.getFormHelpText()))
&& reportType.equals(nvl(rdef.getReportType()))
- && (pageSize == rdef.getPageSize())
+ && (pageSize == rdef.getPageSize())
&& excelDownloadSize == rdef.getMaxRowsInExcelDownload()
&& reportsInNewWindow == rdef.isReportInNewWindow()
&& displayOptions.equals(rdef.getDisplayOptions())
@@ -617,7 +573,7 @@ public class WizardProcessor extends org.onap.portalsdk.analytics.RaptorObject {
rdef.setDashboardOptions(dashboardOptions.toString());
}*/
rdef.setHideFormFieldAfterRun(hideFormFieldAfterRun);
- rdef.setReportInNewWindow(reportsInNewWindow);
+ rdef.setReportInNewWindow(reportsInNewWindow);
rdef.setRuntimeColSortDisabled(rRCSDisabled);
rdef.setNumFormCols(numFormCols);
rdef.setReportTitle(reportTitle);
@@ -633,11 +589,11 @@ public class WizardProcessor extends org.onap.portalsdk.analytics.RaptorObject {
rdef.setFrozenColumns(frozenColumns);
} // if
-
+
if (rdef.getWizardSequence() instanceof WizardSequence)
rdef.generateWizardSequence(request);
-
+
/*
* if(formHelp.length()>255) formHelp = formHelp.substring(0, 255);
*/
@@ -648,10 +604,10 @@ public class WizardProcessor extends org.onap.portalsdk.analytics.RaptorObject {
// String menuID = AppUtils.getRequestNvlValue(request, "menuID");
// boolean dashboardOptionsShown = AppUtils.getRequestNvlValue(request,
-// "dashboardOptionsShown").equals("Y");
+// "dashboardOptionsShown").equals("Y");
reportUpdated = true;
-
+
if (rdef.getReportID().equals("-1"))
// Always need to persist new report - in case it is a copy
reportUpdated = true;
@@ -668,13 +624,13 @@ public class WizardProcessor extends org.onap.portalsdk.analytics.RaptorObject {
String joinTableExpr = null;
String joinTableId = null;
-
- DataSourceType joinTable =
+
+ DataSourceType joinTable =
rdef.getTableById(AppUtils.getRequestValue(request, "joinTableName"));
if (joinTable != null) {
String joinTableName = joinTable.getTableName();
joinTableId = joinTable.getTableId();
-
+
String joinExpr = AppUtils.getRequestNvlValue(request, "joinExpr").toUpperCase();
joinTableExpr = joinExpr.replaceAll("\\["+tableName+"\\]", tableId);
@@ -705,24 +661,24 @@ public class WizardProcessor extends org.onap.portalsdk.analytics.RaptorObject {
String tableName = AppUtils.getRequestNvlValue(request, "tableName").toUpperCase();
String joinTableId = AppUtils.getRequestNvlValue(request, "joinTableName");
-
+
String joinExpr = AppUtils.getRequestNvlValue(request, "joinExpr").toUpperCase();
-
+
String joinTableExpr = null;
if(joinExpr.length()!=0){
joinTableExpr = joinExpr.replaceAll("\\["+tableName+"\\]", rdef.getTableByDBName(tableName).getTableId());
joinTableExpr = joinTableExpr.replaceAll("\\["+rdef.getTableById(joinTableId).getTableName().toUpperCase()+"\\]", joinTableId);
dst.setRefDefinition(joinTableExpr);
}
- boolean reportUpdated = (!displayName.equals(nvl(dst.getDisplayName())) ||
+ boolean reportUpdated = (!displayName.equals(nvl(dst.getDisplayName())) ||
!outerJoin.equals(rdef.getOuterJoinType(dst)) ||
!(joinExpr.length()==0));
-
+
dst.setDisplayName(displayName);
rdef.setOuterJoin(dst, outerJoin);
if (reportUpdated)
rdef.resetCache(true);
-
+
return true; // reportUpdated;
} // processTableEdit
@@ -813,24 +769,24 @@ public class WizardProcessor extends org.onap.portalsdk.analytics.RaptorObject {
}
String dependsOnFormField = AppUtils.getRequestNvlValue(request, "dependsOnFormField");
boolean isGroupBreak = AppUtils.getRequestFlag(request, "groupBreak");
- String groupByPosStr = AppUtils.nvls(AppUtils.getRequestValue(request, "groupByPos"), "0");
+ String groupByPosStr = AppUtils.nvls(AppUtils.getRequestValue(request, "groupByPos"), "0");
int groupByPos = Integer.parseInt(groupByPosStr);
currColumn.setGroupByPos(groupByPos);
-
+
if(groupByPos > 0) {
- String subTotalCustomText = AppUtils.nvls(AppUtils.getRequestValue(request, "subTotalCustomText"), "Sub Total");
+ String subTotalCustomText = AppUtils.nvls(AppUtils.getRequestValue(request, "subTotalCustomText"), "Sub Total");
currColumn.setSubTotalCustomText(subTotalCustomText);
-
+
boolean hideRepeatedKey = AppUtils.getRequestFlag(request, "hideRepeatedKeys");
currColumn.setHideRepeatedKey(hideRepeatedKey);
}
-
+
String displayTotal = AppUtils.getRequestNvlValue(request, "displayTotal");
String widthInPxls = AppUtils.getRequestNvlValue(request, "widthInPxls");
-
+
if (rdef.getReportType().equals(AppConstants.RT_CROSSTAB)) {
-
-
+
+
crossTabValue = AppUtils.getRequestValue(request, "crossTabValue");
isVisible = nvl(crossTabValue).equals(AppConstants.CV_ROW)
@@ -849,7 +805,7 @@ public class WizardProcessor extends org.onap.portalsdk.analytics.RaptorObject {
String displayName = XSSFilter.filterRequestOnlyScript(AppUtils.getRequestNvlValue(request, "displayName"));
String colType = AppUtils.getRequestNvlValue(request, "colType");
String displayFormat = AppUtils.getRequestNvlValue(request, "displayFormat");
-
+
//HYPERLINK
if(colType.equals(AppConstants.CT_HYPERLINK)) {
String hyperlinkURL = AppUtils.getRequestValue(request, "hyperlinkURL");
@@ -861,9 +817,9 @@ public class WizardProcessor extends org.onap.portalsdk.analytics.RaptorObject {
currColumn.setActionImg(actionImg);
}
}
-
-
-
+
+
+
String displayAlign = AppUtils.getRequestValue(request, "displayAlign");
String displayHeaderAlign = AppUtils.getRequestValue(request, "displayHeaderAlign");
String drillDownURL = AppUtils.getRequestValue(request, "drillDownURL");
@@ -888,7 +844,7 @@ public class WizardProcessor extends org.onap.portalsdk.analytics.RaptorObject {
//startColGroupInt = Integer.parseInt(startColGroup);
colGroupColSpanInt = Integer.parseInt(colGroupColSpan);
} catch (NumberFormatException ex) {
-
+
}
}
currColumn.setLevel(level);
@@ -896,13 +852,13 @@ public class WizardProcessor extends org.onap.portalsdk.analytics.RaptorObject {
currColumn.setStart(startColGroupInt);
currColumn.setColspan(colGroupColSpanInt);
}
-
+
String targetColumnId = (semaphoreType.indexOf("|")!= -1 ? semaphoreType.substring(semaphoreType.indexOf("|")+1):"");
DataColumnType targetColumn = rdef.getColumnById(targetColumnId);
-
+
SemaphoreType semaphore = rdef.getSemaphoreById(semaphoreId);
rdef.deleteSemaphore(semaphore);
- if(nvl(semaphoreType).length() > 0 && semaphoreType.indexOf("|")!=-1)
+ if(nvl(semaphoreType).length() > 0 && semaphoreType.indexOf("|")!=-1)
semaphore.setSemaphoreType(semaphoreType.substring(0,semaphoreType.indexOf("|")));
if(semaphore!=null) {
semaphore.setComment(currColumn.getColId());
@@ -910,7 +866,7 @@ public class WizardProcessor extends org.onap.portalsdk.analytics.RaptorObject {
semaphore.setTarget(targetColumnId.length()>0? targetColumnId: "");
rdef.setSemaphore(semaphore);
}
-
+
if (isEdit) {
if(nvl(widthInPxls).length()>0) {
@@ -926,7 +882,7 @@ public class WizardProcessor extends org.onap.portalsdk.analytics.RaptorObject {
currColumn.setDependsOnFormField(dependsOnFormField);
currColumn.setDisplayName(displayName);
//currColumn.setOriginalDisplayName(displayName);
-
+
if (displayWidth > 0)
currColumn.setDisplayWidth(displayWidth);
currColumn.setDisplayAlignment(displayAlign);
@@ -953,11 +909,11 @@ public class WizardProcessor extends org.onap.portalsdk.analytics.RaptorObject {
currColumn.setIsSortable(isSortable);
currColumn.setNowrap(nowrap);
//else
- // currColumn.setVisible(true);
- if (rdef.getReportDefType().equals(AppConstants.RD_SQL_BASED)) {
+ // currColumn.setVisible(true);
+ if (rdef.getReportDefType().equals(AppConstants.RD_SQL_BASED)) {
if(colType!=null)
currColumn.setColType(colType);
- displayFormat = AppUtils.getRequestValue(request, "colDataFormat");
+ displayFormat = AppUtils.getRequestValue(request, "colDataFormat");
if (displayFormat != null){
currColumn.setColFormat(displayFormat);
}
@@ -1138,18 +1094,18 @@ public class WizardProcessor extends org.onap.portalsdk.analytics.RaptorObject {
String rangeStartDateSQL = XSSFilter.filterRequestOnlyScript(AppUtils.getRequestNvlValue(request, "rangeStartDateSQL"));
String rangeEndDateSQL = XSSFilter.filterRequestOnlyScript(AppUtils.getRequestNvlValue(request, "rangeEndDateSQL"));
boolean isGroupFormField = AppUtils.getRequestFlag(request,"isGroupFormField");
-
+
Calendar start = null;
Calendar end = null;
if (AppUtils.nvl(rangeStartDate).length()>0){
SimpleDateFormat dtf = new SimpleDateFormat("MM/dd/yyyy");
start = Calendar.getInstance();
- start.setTime(dtf.parse(rangeStartDate));
+ start.setTime(dtf.parse(rangeStartDate));
}
if (AppUtils.nvl(rangeEndDate).length()>0){
SimpleDateFormat dtf = new SimpleDateFormat("MM/dd/yyyy");
end = Calendar.getInstance();
- end.setTime(dtf.parse(rangeEndDate));
+ end.setTime(dtf.parse(rangeEndDate));
}/*
* if(fieldHelp.length()>255) fieldHelp = fieldHelp.substring(0, 255);
*/
@@ -1168,7 +1124,7 @@ public class WizardProcessor extends org.onap.portalsdk.analytics.RaptorObject {
&& validation.equals(nvl(currField.getValidationType()))
&& mandatory.equals(nvl(currField.getMandatory(), "N"))
&& defaultValue.equals(nvl(currField.getDefaultValue()))
- && fieldSQL.equals(nvl(currField.getFieldSQL()))
+ && fieldSQL.equals(nvl(currField.getFieldSQL()))
&& fieldDefaultSQL.equals(nvl(currField.getFieldDefaultSQL()))
&& dependsOn.equals(nvl(currField.getDependsOn(), "N"))
&& (start == null || (start != null && currField.getRangeStartDate() == null) || (start.compareTo(getCalendar(currField.getRangeStartDate())) )==0)
@@ -1209,9 +1165,9 @@ public class WizardProcessor extends org.onap.portalsdk.analytics.RaptorObject {
/*currField.setRangeEndDate(DatatypeFactory.newInstance()
.newXMLGregorianCalendar(end));*/
} catch (DatatypeConfigurationException ex) {
-
+
}
-
+
currField.setRangeStartDateSQL(rangeStartDateSQL);
currField.setRangeEndDateSQL(rangeEndDateSQL);
currField.setGroupFormField(isGroupFormField);
@@ -1220,7 +1176,7 @@ public class WizardProcessor extends org.onap.portalsdk.analytics.RaptorObject {
currField.setMultiSelectListSize(multiSelectSize);
}
-
+
} // if
} else {
reportUpdated = true;
@@ -1277,7 +1233,7 @@ public class WizardProcessor extends org.onap.portalsdk.analytics.RaptorObject {
rdef.addFormFieldBlank(new ObjectFactory());
return true;
} // processFormFieldMoveDown
-
+
//processFormFieldInfoBar
private boolean processFormFieldInfoBar(HttpServletRequest request) throws Exception {
boolean reportUpdated = false;
@@ -1287,31 +1243,31 @@ public class WizardProcessor extends org.onap.portalsdk.analytics.RaptorObject {
rdef.addCustomizedTextForParameters(XSSFilter.filterRequestOnlyScript(AppUtils.getRequestNvlValue(request, "blueBarField")));
return true;
} // processFormFieldMoveDown
-
-
+
+
private boolean processForecasting(HttpServletRequest request, String action) throws Exception {
ReportDefinition rdef = (ReportDefinition) request.getSession().getAttribute(
AppConstants.SI_REPORT_DEFINITION);
-
+
if(rdef.getDataminingOptions()==null)
- rdef.addDataminingOptions(new ObjectFactory());
-
+ rdef.addDataminingOptions(new ObjectFactory());
+
String classifiers = AppUtils.getRequestNvlValue(request, "classifiers");
rdef.setClassifier(classifiers);
String dateAttrColId = AppUtils.getRequestNvlValue(request, "timeAttribute");
String timeFormat = AppUtils.getRequestNvlValue(request, "timeFormat");
if(timeFormat.equals("Default")) timeFormat = "yyyy-MM-dd HH:mm:ss";
String forecastingPeriod = AppUtils.getRequestNvlValue(request, "forecastingPeriod");
-
+
String[] forecastCols = request.getParameterValues("forecastCol");
List reportCols = rdef.getAllColumns();
DataColumnType dct = null;
Iterator iter = null;
-
-
+
+
if(dateAttrColId != null) {
- for(iter=reportCols.iterator(); iter.hasNext(); ) {
+ for(iter=reportCols.iterator(); iter.hasNext(); ) {
dct = (DataColumnType) iter.next();
if(dct.getColId().equals(dateAttrColId)) {
dct.setDataMiningCol(AppConstants.DM_DATE_ATTR);
@@ -1320,10 +1276,10 @@ public class WizardProcessor extends org.onap.portalsdk.analytics.RaptorObject {
}
}
}
-
+
if(forecastCols != null) {
for (int i = 0; i < forecastCols.length; i++) {
- for(iter=reportCols.iterator(); iter.hasNext(); ) {
+ for(iter=reportCols.iterator(); iter.hasNext(); ) {
dct = (DataColumnType) iter.next();
if(dct.getColId().equals(forecastCols[i])) {
dct.setDataMiningCol(AppConstants.DM_FORECASTING_ATTR);
@@ -1333,11 +1289,11 @@ public class WizardProcessor extends org.onap.portalsdk.analytics.RaptorObject {
rdef.setForecastingPeriod(forecastingPeriod);
}
boolean reportUpdated = true;
-
+
return reportUpdated;
} // processForecasting
-
-
+
+
private boolean processFilterAddEdit(HttpServletRequest request, boolean isEdit)
throws Exception {
ReportDefinition rdef = (ReportDefinition) request.getSession().getAttribute(
@@ -1380,7 +1336,7 @@ public class WizardProcessor extends org.onap.portalsdk.analytics.RaptorObject {
+ nvl(currColumn.getColFormat(),
AppConstants.DEFAULT_DATE_FORMAT) + "')")
: ("'" + argValue + "'"))) + " FROM dual");*/
-
+
DataSet ds = DbUtils.executeQuery("SELECT "
+ (currColType.equals(AppConstants.CT_NUMBER) ? ("TO_NUMBER('"
+ argValue + "')")
@@ -1561,7 +1517,7 @@ public class WizardProcessor extends org.onap.portalsdk.analytics.RaptorObject {
processSaveJavascriptElement(request);
return true;
}
-
+
private boolean processSaveJavascriptElement (HttpServletRequest request) throws Exception {
ReportDefinition rdef = (ReportDefinition) request.getSession().getAttribute(
AppConstants.SI_REPORT_DEFINITION);
@@ -1569,9 +1525,9 @@ public class WizardProcessor extends org.onap.portalsdk.analytics.RaptorObject {
String id = AppUtils.getRequestNvlValue(request, AppConstants.RI_JAVASCRIPT_ITEM_ID);
String fieldId = AppUtils.getRequestNvlValue(request, "javascriptFormField-"+id);
if( nvl(fieldId).length()>0 && !(fieldId.startsWith("-1"))) {
-
+
String callableJavascriptText = AppUtils.getRequestNvlValue(request, "callText-"+id);
-
+
logger.debug(EELFLoggerDelegate.debugLogger, ("FieldId " + fieldId + " Call Text " + callableJavascriptText+ " id " + id));
JavascriptItemType javaScriptType = null;
if(id.length()>0 && id.startsWith("-1")) {
@@ -1585,23 +1541,23 @@ public class WizardProcessor extends org.onap.portalsdk.analytics.RaptorObject {
else
javaScriptType.setId("ol1|1");
}
- javaScriptType.setCallText(callableJavascriptText);
+ javaScriptType.setCallText(callableJavascriptText);
} else {
javaScriptType = rdef.addJavascriptType(new ObjectFactory(), id);
javaScriptType.setCallText(callableJavascriptText);
}
}
return true;
- }
+ }
private boolean processAddJavascriptElement (HttpServletRequest request) throws Exception {
ReportDefinition rdef = (ReportDefinition) request.getSession().getAttribute(
AppConstants.SI_REPORT_DEFINITION);
-
+
JavascriptItemType javaScriptType = rdef.addJavascriptType(new ObjectFactory(), "");
javaScriptType.setId("");
javaScriptType.setFieldId("");
- javaScriptType.setCallText("");
-
+ javaScriptType.setCallText("");
+
return true;
}
@@ -1632,36 +1588,36 @@ public class WizardProcessor extends org.onap.portalsdk.analytics.RaptorObject {
String chartMultiseries = AppUtils.getRequestNvlValue(request, "multiSeries");
String lastSeriesALineChart = AppUtils.getRequestNvlValue(request, "lastSeriesALineChart");
String lastSeriesABarChart = AppUtils.getRequestNvlValue(request, "lastSeriesABarChart");
- String overLayItemLabel = "N";
+ String overLayItemLabel = "N";
String chartDisplay = null;
-
+
String multiplePieOrder = null;
String multiplePieLabelDisplay = null;
String chartOrientation = null;
String secondaryChartRenderer = null;
-
- String linearRegression = null;
+
+ String linearRegression = null;
boolean multiplePieOrderInRunPage = false;
boolean multiplePieLabelDisplayInRunPage = false;
boolean chartOrientationInRunPage = false;
boolean secondaryChartRendererInRunPage = false;
-
+
boolean chartDisplayInRunPage = false;
-
+
String intervalFromdate = null;
String intervalTodate = null;
String intervalLabel = null;
- boolean displayIntervalInputInRunPage = false;
+ boolean displayIntervalInputInRunPage = false;
boolean animate = false;
-
+
animate = AppUtils.getRequestNvlValue(request, "animatedOption").equals("animate");
if(Globals.showAnimatedChartOption())
rdef.setChartAnimate(animate);
-
-
+
+
String removeColId = "";
if (action.equals(AppConstants.WA_DELETE_USER)) {
removeColId = AppUtils.getRequestNvlValue(request, AppConstants.RI_DETAIL_ID);
@@ -1674,27 +1630,27 @@ public class WizardProcessor extends org.onap.portalsdk.analytics.RaptorObject {
}
}
}
-
+
if(rdef.getChartAdditionalOptions()==null)
rdef.addChartAdditionalOptions(new ObjectFactory());
-
+
if(rdef.getChartDrillOptions()==null)
- rdef.addChartDrillOptions(new ObjectFactory());
+ rdef.addChartDrillOptions(new ObjectFactory());
//clearing already added
if(rdef.getChartDrillOptions().getTargetFormfield()!=null)
rdef.getChartDrillOptions().getTargetFormfield().removeAll(rdef.getChartDrillOptions().getTargetFormfield());
-
-
+
+
if(chartType.equals(AppConstants.GT_PIE_MULTIPLE)) {
multiplePieOrder = AppUtils.getRequestNvlValue(request, "multiplePieOrder");
multiplePieLabelDisplay = AppUtils.getRequestNvlValue(request, "multiplePieLabelDisplay");
chartDisplay = AppUtils.getRequestNvlValue(request, "chartDisplay");
- //if(AppUtils.getRequestNvlValue(request, "multiplePieOrderInRunPage").length()>0)
+ //if(AppUtils.getRequestNvlValue(request, "multiplePieOrderInRunPage").length()>0)
multiplePieOrderInRunPage = AppUtils.getRequestNvlValue(request,"multiplePieOrderInRunPage").equals("Y");
- //if(AppUtils.getRequestNvlValue(request, "multiplePieLabelDisplayInRunPage").length()>0)
+ //if(AppUtils.getRequestNvlValue(request, "multiplePieLabelDisplayInRunPage").length()>0)
multiplePieLabelDisplayInRunPage = AppUtils.getRequestNvlValue(request,"multiplePieLabelDisplayInRunPage").equals("Y");
- //if(AppUtils.getRequestNvlValue(request, "chartDisplayInRunPage").length()>0)
+ //if(AppUtils.getRequestNvlValue(request, "chartDisplayInRunPage").length()>0)
chartDisplayInRunPage = AppUtils.getRequestNvlValue(request,"chartDisplayInRunPage").equals("Y");
if(rdef.getChartAdditionalOptions()!=null) {
rdef.setChartMultiplePieOrder(multiplePieOrder+(multiplePieOrderInRunPage?"|Y":""));
@@ -1702,14 +1658,14 @@ public class WizardProcessor extends org.onap.portalsdk.analytics.RaptorObject {
rdef.setChartDisplay(chartDisplay+(chartDisplayInRunPage?"|Y":""));
}
- }
-
+ }
+
if(chartType.equals(AppConstants.GT_REGRESSION)) {
linearRegression = AppUtils.getRequestNvlValue(request, "regressionType");
rdef.setLinearRegressionColor(AppUtils.getRequestNvlValue(request, "valueLinearRegressionColor"));
rdef.setExponentialRegressionColor(AppUtils.getRequestNvlValue(request, "valueExponentialRegressionColor"));
rdef.setCustomizedRegressionPoint(AppUtils.getRequestNvlValue(request, "regressionPointCustomization"));
-
+
if(nvl(linearRegression).length()>0)
rdef.setLinearRegression(linearRegression);
else
@@ -1720,27 +1676,27 @@ 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)
+ //if(AppUtils.getRequestNvlValue(request, "chartOrientationInRunPage").length()>0)
chartOrientationInRunPage = AppUtils.getRequestNvlValue(request,"chartOrientationInRunPage").equals("Y");
- //if(AppUtils.getRequestNvlValue(request, "secondaryChartRendererInRunPage").length()>0)
+ //if(AppUtils.getRequestNvlValue(request, "secondaryChartRendererInRunPage").length()>0)
secondaryChartRendererInRunPage = AppUtils.getRequestNvlValue(request,"secondaryChartRendererInRunPage").equals("Y");
- //if(AppUtils.getRequestNvlValue(request, "chartDisplayInRunPage").length()>0)
+ //if(AppUtils.getRequestNvlValue(request, "chartDisplayInRunPage").length()>0)
chartDisplayInRunPage = AppUtils.getRequestNvlValue(request,"chartDisplayInRunPage").equals("Y");
rdef.setChartOrientation(chartOrientation+(chartOrientationInRunPage?"|Y":""));
rdef.setSecondaryChartRenderer(secondaryChartRenderer+(secondaryChartRendererInRunPage?"|Y":""));
rdef.setChartDisplay(chartDisplay+(chartDisplayInRunPage?"|Y":""));
rdef.setLastSeriesALineChart(nvl(lastSeriesALineChart, "N"));
}
-
+
if(chartType.equals(AppConstants.GT_LINE)) {
chartOrientation = AppUtils.getRequestNvlValue(request, "chartOrientation");
secondaryChartRenderer = AppUtils.getRequestNvlValue(request, "secondaryChartRenderer");
chartDisplay = AppUtils.getRequestNvlValue(request, "chartDisplay");
- //if(AppUtils.getRequestNvlValue(request, "chartOrientationInRunPage").length()>0)
+ //if(AppUtils.getRequestNvlValue(request, "chartOrientationInRunPage").length()>0)
chartOrientationInRunPage = AppUtils.getRequestNvlValue(request,"chartOrientationInRunPage").equals("Y");
- //if(AppUtils.getRequestNvlValue(request, "secondaryChartRendererInRunPage").length()>0)
+ //if(AppUtils.getRequestNvlValue(request, "secondaryChartRendererInRunPage").length()>0)
secondaryChartRendererInRunPage = AppUtils.getRequestNvlValue(request,"secondaryChartRendererInRunPage").equals("Y");
- //if(AppUtils.getRequestNvlValue(request, "chartDisplayInRunPage").length()>0)
+ //if(AppUtils.getRequestNvlValue(request, "chartDisplayInRunPage").length()>0)
chartDisplayInRunPage = AppUtils.getRequestNvlValue(request,"chartDisplayInRunPage").equals("Y");
rdef.setChartOrientation(chartOrientation+(chartOrientationInRunPage?"|Y":""));
rdef.setSecondaryChartRenderer(secondaryChartRenderer+(secondaryChartRendererInRunPage?"|Y":""));
@@ -1750,7 +1706,7 @@ public class WizardProcessor extends org.onap.portalsdk.analytics.RaptorObject {
if(chartType.equals(AppConstants.GT_TIME_DIFFERENCE_CHART)) {
intervalFromdate = AppUtils.getRequestNvlValue(request, "intervalFromDate");
intervalTodate = AppUtils.getRequestNvlValue(request, "intervalToDate");
- intervalLabel = AppUtils.getRequestNvlValue(request, "intervalLabel");
+ intervalLabel = AppUtils.getRequestNvlValue(request, "intervalLabel");
displayIntervalInputInRunPage = AppUtils.getRequestNvlValue(request,"intervalInputInRunPage").equals("Y");
rdef.setIntervalFromdate(intervalFromdate+(displayIntervalInputInRunPage?"|Y":""));
rdef.setIntervalTodate(intervalTodate+(displayIntervalInputInRunPage?"|Y":""));
@@ -1758,7 +1714,7 @@ public class WizardProcessor extends org.onap.portalsdk.analytics.RaptorObject {
}
if(chartType.equals(AppConstants.GT_STACKED_VERT_BAR) || chartType.equals(AppConstants.GT_STACKED_HORIZ_BAR) || chartType.equals(AppConstants.GT_STACKED_VERT_BAR_LINES)
|| chartType.equals(AppConstants.GT_STACKED_HORIZ_BAR_LINES)) {
- overLayItemLabel = AppUtils.getRequestNvlValue(request, "overlayItemValue");
+ overLayItemLabel = AppUtils.getRequestNvlValue(request, "overlayItemValue");
rdef.setOverlayItemValueOnStackBar(nvl(overLayItemLabel, "N"));
animate = AppUtils.getRequestNvlValue(request, "animatedOption").equals("animate");
rdef.setChartAnimate(animate);
@@ -1770,12 +1726,12 @@ public class WizardProcessor extends org.onap.portalsdk.analytics.RaptorObject {
rdef.setLegendPosition(AppUtils.getRequestNvlValue(request,"legendPosition"));
rdef.setMaxLabelsInDomainAxis(AppUtils.getRequestNvlValue(request,"maxLabelsInDomainAxis"));
String chartLegendDisplay = AppUtils.getRequestNvlValue(request,"hideLegend");
- boolean showLegendDisplayOptionsInRunPage = false;
+ boolean showLegendDisplayOptionsInRunPage = false;
showLegendDisplayOptionsInRunPage = AppUtils.getRequestNvlValue(request,"showLegendDisplayOptionsInRunPage").equals("Y");
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 = (!
@@ -1784,7 +1740,7 @@ public class WizardProcessor extends org.onap.portalsdk.analytics.RaptorObject {
rdef.setChartTypeFixed(nvl(chartTypeFixed, "N"));
if (nvl(leftAxisLabel).length()>0)
rdef.setChartLeftAxisLabel(leftAxisLabel);
- else
+ else
rdef.setChartLeftAxisLabel(null);
if (nvl(rightAxisLabel).length()>0)
rdef.setChartRightAxisLabel(rightAxisLabel);
@@ -1822,27 +1778,27 @@ public class WizardProcessor extends org.onap.portalsdk.analytics.RaptorObject {
} // for
int idx = 1;
- List columns = rdef.getAllColumns();
+ List columns = rdef.getAllColumns();
if(chartType.equals(AppConstants.GT_TIME_SERIES)) {
String chartSeries = AppUtils.getRequestNvlValue(request, "chartSeries");
String chartGroup = AppUtils.getRequestNvlValue(request, "chartGroup");
- String yAxis = AppUtils.getRequestNvlValue(request, "yAxis");
+ 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);
+ alldct.setChartSeries((chartSeries.equals(alldct.getColId()))?true : false);
}
-
+
String drillDownReportId = AppUtils.getRequestNvlValue(request, "drillDownReport");
if(!drillDownReportId.equals("-1")) {
ReportRuntime ddRr = (new ReportHandler()).loadReportRuntime(request, drillDownReportId,
false);
if (ddRr != null)
request.setAttribute("CHART_FORMFIELDS", ddRr.getReportFormFields());
-
- for(ddRr.getReportFormFields().resetNext(); ddRr.getReportFormFields().hasNext(); ) {
+
+ for(ddRr.getReportFormFields().resetNext(); ddRr.getReportFormFields().hasNext(); ) {
FormField ff = ddRr.getReportFormFields().getNext();
- if(!ff.getFieldType().equals(FormField.FFT_BLANK)) {
+ if(!ff.getFieldType().equals(FormField.FFT_BLANK)) {
String value = AppUtils.getRequestNvlValue(request, "drillDown_"+ff.getFieldName());
ChartDrillFormfield cdf = new ObjectFactory().createChartDrillFormfield();
cdf.setFormfield(value);
@@ -1850,46 +1806,46 @@ public class WizardProcessor extends org.onap.portalsdk.analytics.RaptorObject {
}
}
}
-
+
} else {
if(chartType.equals(AppConstants.GT_BAR_3D)) {
String chartSeries = AppUtils.getRequestNvlValue(request, "chartSeries");
String chartGroup = AppUtils.getRequestNvlValue(request, "chartGroup");
- String yAxis = AppUtils.getRequestNvlValue(request, "yAxis");
+ 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);
+ alldct.setChartSeries((chartSeries.equals(alldct.getColId()))?true : false);
}
String drillDownReportId = AppUtils.getRequestNvlValue(request, "drillDownReport");
rdef.setDrillReportIdForChart(drillDownReportId);
if(drillDownReportId.equals("-1")){
rdef.setDrillReportIdForChart("");
}
-
+
if(!drillDownReportId.equals("-1")) {
ReportRuntime ddRr = (new ReportHandler()).loadReportRuntime(request, drillDownReportId,
false);
if (ddRr != null)
request.setAttribute("CHART_FORMFIELDS", ddRr.getReportFormFields());
-
- for(ddRr.getReportFormFields().resetNext(); ddRr.getReportFormFields().hasNext(); ) {
+
+ for(ddRr.getReportFormFields().resetNext(); ddRr.getReportFormFields().hasNext(); ) {
FormField ff = ddRr.getReportFormFields().getNext();
- if(!ff.getFieldType().equals(FormField.FFT_BLANK)) {
+ if(!ff.getFieldType().equals(FormField.FFT_BLANK)) {
String value = AppUtils.getRequestNvlValue(request, "drillDown_"+ff.getFieldName());
ChartDrillFormfield cdf = new ObjectFactory().createChartDrillFormfield();
cdf.setFormfield(value);
rdef.getChartDrillOptions().getTargetFormfield().add(cdf);
}
}
-
+
String xAxisFormField = AppUtils.getRequestNvlValue(request, "drillDownXAxisFormfield");
String yAxisFormField = AppUtils.getRequestNvlValue(request, "drillDownYAxisFormfield");
String seriesAxisFormField = AppUtils.getRequestNvlValue(request, "drillDownSeriesAxisFormfield");
-
+
if(!xAxisFormField.equals("-1")){
rdef.setDrillXAxisFormField(xAxisFormField);
-
+
if(!yAxisFormField.equals("-1"))
rdef.setDrillYAxisFormField(yAxisFormField);
if(!seriesAxisFormField.equals("-1"))
@@ -1900,21 +1856,21 @@ public class WizardProcessor extends org.onap.portalsdk.analytics.RaptorObject {
rdef.setDrillSeriesFormField("");
}
}
-
+
} else if(chartType.equals(AppConstants.GT_SCATTER)) {
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);
+ alldct.setChartSeries((chartSeries.equals(alldct.getColId()))?true : false);
}
-
+
}else if(chartType.equals(AppConstants.GT_REGRESSION)) {
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);
+ alldct.setChartSeries((chartSeries.equals(alldct.getColId()))?true : false);
}
}else if(chartType.equals(AppConstants.GT_STACKED_HORIZ_BAR) || chartType.equals(AppConstants.GT_STACKED_VERT_BAR)
|| chartType.equals(AppConstants.GT_STACKED_VERT_BAR_LINES) || chartType.equals(AppConstants.GT_STACKED_HORIZ_BAR_LINES)) {
@@ -1922,66 +1878,66 @@ public class WizardProcessor extends org.onap.portalsdk.analytics.RaptorObject {
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);
+ 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);
+ 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);
+ 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);
+ alldct.setChartSeries((chartSeries.equals(alldct.getColId()))?true : false);
}
} else {
if (rdef.hasSeriesColumn()) {
for (Iterator iterator = columns.iterator(); iterator.hasNext();) {
DataColumnType alldct = (DataColumnType) iterator.next();
- alldct.setChartSeries(false);
+ alldct.setChartSeries(false);
}
}
-
+
String drillDownReportId = AppUtils.getRequestNvlValue(request, "drillDownReport");
rdef.setDrillReportIdForChart(drillDownReportId);
if(drillDownReportId.equals("-1")){
rdef.setDrillReportIdForChart("");
}
-
+
if(!drillDownReportId.equals("-1")) {
ReportRuntime ddRr = (new ReportHandler()).loadReportRuntime(request, drillDownReportId,
false);
if (ddRr != null)
request.setAttribute("CHART_FORMFIELDS", ddRr.getReportFormFields());
- for(ddRr.getReportFormFields().resetNext(); ddRr.getReportFormFields().hasNext(); ) {
+ for(ddRr.getReportFormFields().resetNext(); ddRr.getReportFormFields().hasNext(); ) {
FormField ff = ddRr.getReportFormFields().getNext();
- if(!ff.getFieldType().equals(FormField.FFT_BLANK)) {
+ if(!ff.getFieldType().equals(FormField.FFT_BLANK)) {
String value = AppUtils.getRequestNvlValue(request, "drillDown_"+ff.getFieldName());
ChartDrillFormfield cdf = new ObjectFactory().createChartDrillFormfield();
cdf.setFormfield(value);
rdef.getChartDrillOptions().getTargetFormfield().add(cdf);
}
}
-
+
String xAxisFormField = AppUtils.getRequestNvlValue(request, "drillDownXAxisFormfield");
String yAxisFormField = AppUtils.getRequestNvlValue(request, "drillDownYAxisFormfield");
String seriesAxisFormField = AppUtils.getRequestNvlValue(request, "drillDownSeriesAxisFormfield");
-
+
if(!xAxisFormField.equals("-1")){
rdef.setDrillXAxisFormField(xAxisFormField);
-
+
if(!yAxisFormField.equals("-1"))
rdef.setDrillYAxisFormField(yAxisFormField);
if(!seriesAxisFormField.equals("-1"))
@@ -1992,12 +1948,12 @@ public class WizardProcessor extends org.onap.portalsdk.analytics.RaptorObject {
rdef.setDrillSeriesFormField("");
}
}
-
+
}
}
-
+
for (int i = 1; i < Math.max(valueColsCount, 1) + 1; i++) {
- //debugLogger.debug("********** " + chartSeries);
+ //debugLogger.debug("********** " + chartSeries);
if(i==1) {
/* Range Axis is resetted before adding */
for (Iterator iterator = columns.iterator(); iterator.hasNext();) {
@@ -2011,7 +1967,7 @@ public class WizardProcessor extends org.onap.portalsdk.analytics.RaptorObject {
dct.setYAxis(null);
}
}
-
+
}
String newChartColAxis = AppUtils.getRequestNvlValue(request, "newChart" + i+"Axis");
String valueColId = AppUtils.getRequestNvlValue(request, "valueCol" + i);
@@ -2024,7 +1980,7 @@ public class WizardProcessor extends org.onap.portalsdk.analytics.RaptorObject {
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);
+ // debugLogger.debug("**********Outer If " + chartSeries);
//}
if (valueColId.length() > 0 && (!valueColId.equals(removeColId))) {
@@ -2116,14 +2072,14 @@ public class WizardProcessor extends org.onap.portalsdk.analytics.RaptorObject {
AppUtils.getRequestNvlValue(request, "formFields"));
reportSchedule.setAttachmentMode(
AppUtils.getRequestNvlValue(request, "sendAttachment"));
-
+
String userId = AppUtils.getRequestNvlValue(request, "schedEmailAdd");
String roleId = AppUtils.getRequestNvlValue(request, "schedEmailAddRole");
int flag = 0;
if ((!(userId.length()>0 || roleId.length()>0) && (reportSchedule.getEmailToUsers().isEmpty() && reportSchedule.getEmailToRoles().isEmpty())) ) {
flag = 1;
}
-
+
if (flag == 1 || (action.equals(AppConstants.WA_ADD_USER) || action.equals(AppConstants.WA_ADD_ROLE)) ) {
String loggedInUserId = AppUtils.getUserID(request);
if (Globals.getUseLoginIdInSchedYN().equals("Y")){
@@ -2152,7 +2108,7 @@ public class WizardProcessor extends org.onap.portalsdk.analytics.RaptorObject {
reportSchedule.addEmailToUser(userId, userId);
}
}
-
+
} else if (action.equals(AppConstants.WA_DELETE_USER))
reportSchedule.removeEmailToUser(
AppUtils.getRequestNvlValue(request, AppConstants.RI_DETAIL_ID));
@@ -2164,10 +2120,10 @@ public class WizardProcessor extends org.onap.portalsdk.analytics.RaptorObject {
} else if (action.equals(AppConstants.WA_DELETE_ROLE))
reportSchedule.removeEmailToRole(
AppUtils.getRequestNvlValue(request, AppConstants.RI_DETAIL_ID));
- request.getSession().setAttribute(AppConstants.SI_REPORT_SCHEDULE, reportSchedule);
+ request.getSession().setAttribute(AppConstants.SI_REPORT_SCHEDULE, reportSchedule);
return true;
} // processAdhocSchedule
-
+
private boolean processSchedule(HttpServletRequest request, String action)
throws Exception {
// Added for form field chaining in schedule tab so that setParamValues() is called
@@ -2251,7 +2207,7 @@ public class WizardProcessor extends org.onap.portalsdk.analytics.RaptorObject {
String ownerID = AppUtils.getRequestNvlValue(request, "reportOwner");
String rPublic = nvl(AppUtils.getRequestValue(request, "public"), "N");
-
+
boolean reportUpdated = (!(ownerID.equals(nvl(rdef.getOwnerID())) && rPublic
.equals(rdef.isPublic() ? "Y" : "N")));
@@ -2306,8 +2262,8 @@ public class WizardProcessor extends org.onap.portalsdk.analytics.RaptorObject {
return true;
} // processValidateSQL
-
-
+
+
/*****For Report Maps - Start******/
private boolean processMap(HttpServletRequest request, String action) throws Exception {
ReportDefinition rdef = (ReportDefinition) request.getSession().getAttribute(
@@ -2330,7 +2286,7 @@ public class WizardProcessor extends org.onap.portalsdk.analytics.RaptorObject {
String height = XSSFilter.filterRequestOnlyScript(AppUtils.getRequestNvlValue(request, "height"));
String width = XSSFilter.filterRequestOnlyScript(AppUtils.getRequestNvlValue(request, "width"));
System.out.println(" #$%#$%#$% -- useDefaultSize="+ useDefaultSize+" height = " + height+" width="+width);
-
+
String addAddress = XSSFilter.filterRequestOnlyScript(AppUtils.getRequestNvlValue(request, "addAddress"));
String latCol = XSSFilter.filterRequestOnlyScript(AppUtils.getRequestNvlValue(request, "latColumn"));
String longCol = XSSFilter.filterRequestOnlyScript(AppUtils.getRequestNvlValue(request, "longColumn"));
@@ -2355,7 +2311,7 @@ public class WizardProcessor extends org.onap.portalsdk.analytics.RaptorObject {
repMap.setWidth(width.trim());
repMap.setLegendColumn(legendColumn);
//repMap.setLegendDisplayName(legendDisplayName);
-
+
Marker m = new ObjectFactory().createMarker();
m.setAddressColumn(addressColumn);
m.setDataColumn(dataColumn);
@@ -2380,10 +2336,10 @@ public class WizardProcessor extends org.onap.portalsdk.analytics.RaptorObject {
}
}
}
-
+
return true;
} // processMap
/*****For Report Maps - End******/
-
+
} // WizardProcessor