diff options
author | 2020-05-05 12:20:30 -0400 | |
---|---|---|
committer | 2020-05-16 01:50:52 +0530 | |
commit | 759e9e75fc0b5978f98f901744c87c0c8d5ef4fd (patch) | |
tree | 4b61ca0a05ec79d45f88b81142264e0407d2ddb3 /ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/system | |
parent | 03abc05e6217274f557ec4987aa8e8bd34b2f4a4 (diff) |
Raptor backend java API Code(Analytics), UI Code(Overlay) and pages
component in os project
Issue-ID: PORTAL-902
Change-Id: Id297d9493a77e6816ed0f2a82c15b2eaa1e57a72
Signed-off-by: Sudarshan Kumar <sudarshan.kumar@att.com>
Diffstat (limited to 'ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/system')
5 files changed, 149 insertions, 40 deletions
diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/system/Globals.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/system/Globals.java index 6f55037b..b64f8e07 100644 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/system/Globals.java +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/system/Globals.java @@ -82,6 +82,7 @@ import org.onap.portalsdk.analytics.model.runtime.ReportFormFields; import org.onap.portalsdk.analytics.model.runtime.ReportRuntime; import org.onap.portalsdk.analytics.util.AppConstants; import org.onap.portalsdk.analytics.util.ExcelColorDef; +import org.onap.portalsdk.analytics.util.RemDbInfo; import org.onap.portalsdk.analytics.util.Scheduler; import org.onap.portalsdk.analytics.util.Utils; import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; @@ -358,6 +359,7 @@ public class Globals extends org.onap.portalsdk.analytics.RaptorObject { dbUtils.initializeDbUtils(servletContext); if(!Globals.getSystemType().equals(Globals.ST_GENERIC)) { + RemDbInfo.load(); rdbUtils = (RDbUtils) Class.forName( ANALYTIC_SYSTEM + systemType.toLowerCase() + ".RemoteDbUtils") .newInstance(); diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/system/fusion/RemoteDbUtils.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/system/fusion/RemoteDbUtils.java index fcff3183..a3659bab 100644 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/system/fusion/RemoteDbUtils.java +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/system/fusion/RemoteDbUtils.java @@ -44,13 +44,23 @@ import javax.servlet.ServletContext; import org.onap.portalsdk.analytics.system.RDbUtils; import org.onap.portalsdk.analytics.system.fusion.adapter.RaptorAdapter; import org.onap.portalsdk.analytics.system.fusion.adapter.SpringContext; +import org.onap.portalsdk.analytics.util.RemDbInfo; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; - +@Component public class RemoteDbUtils implements RDbUtils{ private RaptorAdapter raptorAdapter; + private static RemDbInfo remDbInfo; + + @SuppressWarnings("static-access") + @Autowired + public void setRemDbInfo(RemDbInfo remDbInfo) { + this.remDbInfo = remDbInfo; + } public void initializeDbUtils(ServletContext servletContext) { raptorAdapter = (RaptorAdapter)SpringContext.getApplicationContext().getBean("raptorAdapter"); @@ -59,7 +69,6 @@ public class RemoteDbUtils implements RDbUtils{ public Connection getRemoteConnection(String dbKey) { try { - org.onap.portalsdk.analytics.util.RemDbInfo remDbInfo = new org.onap.portalsdk.analytics.util.RemDbInfo(); return remDbInfo.getDBConnection(dbKey); } catch (Exception ex) { ex.printStackTrace(); diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/system/fusion/adapter/DateUtils.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/system/fusion/adapter/DateUtils.java index c0f25892..1921d857 100644 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/system/fusion/adapter/DateUtils.java +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/system/fusion/adapter/DateUtils.java @@ -45,13 +45,18 @@ import java.util.Date; import java.util.List; import java.util.TimeZone; +import org.bouncycastle.asn1.dvcs.Data; import org.onap.portalsdk.core.domain.FusionObject; import org.onap.portalsdk.core.domain.User; import org.onap.portalsdk.core.service.DataAccessService; import org.onap.portalsdk.core.util.SystemProperties; import org.onap.portalsdk.core.web.support.AppUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.context.ApplicationContext; +import org.springframework.stereotype.Component; +import org.springframework.stereotype.Service; - +@Component public class DateUtils implements Serializable, FusionObject{ public static final String US_PACIFIC = "US/Pacific"; @@ -67,14 +72,21 @@ public class DateUtils implements Serializable, FusionObject{ private static final String DB_DATE_FORMAT = "yyyy-MM-dd HH:mm:ss"; private static final String GET_CURRENT_DATE = "getCurrentDate"; + + //@Autowired private static DataAccessService dataAccessService; - public static DataAccessService getDataAccessService() { - return dataAccessService; - } - - public void setDataAccessService(DataAccessService dataAccessService) { - this.dataAccessService = dataAccessService; +// public static DataAccessService getDataAccessService() { +// return dataAccessService; +// } +// +// public void setDataAccessService(DataAccessService dataAccessService) { +// DateUtils.dataAccessService = dataAccessService; +// } + + @Autowired + public DateUtils(DataAccessService dataAccessService) { + DateUtils.dataAccessService = dataAccessService; } /** @@ -124,7 +136,8 @@ public class DateUtils implements Serializable, FusionObject{ * */ public static Date parseUserDate(String dateValue, String inPattern, Long userId) throws Exception{ - User user = (User)getDataAccessService().getDomainObject(User.class, userId, null); +// User user = (User)getDataAccessService().getDomainObject(User.class, userId, null); + User user = (User)dataAccessService.getDomainObject(User.class, userId, null); String userTimeZone = null; Long timezoneId = user.getTimeZoneId(); @@ -230,8 +243,8 @@ public class DateUtils implements Serializable, FusionObject{ * */ public static String formatUserDate(String dateValue,String inPattern, Long userId,String outPattern,String requiredTimeZone) throws Exception{ - User user = (User)getDataAccessService().getDomainObject(User.class, userId, null); - + //User user = (User)getDataAccessService().getDomainObject(User.class, userId, null); + User user = (User)dataAccessService.getDomainObject(User.class, userId, null); String userTimeZone = null; Long timezoneId = user.getTimeZoneId(); @@ -255,7 +268,8 @@ public class DateUtils implements Serializable, FusionObject{ * */ public static String formatUserDateForDBTimeZone(String dateValue,String inPattern, Long userId,String outPattern) throws Exception{ - User user = (User)getDataAccessService().getDomainObject(User.class, userId, null); +// User user = (User)getDataAccessService().getDomainObject(User.class, userId, null); + User user = (User)dataAccessService.getDomainObject(User.class, userId, null); String userTimeZone = null; Long timezoneId = user.getTimeZoneId(); @@ -275,8 +289,11 @@ public class DateUtils implements Serializable, FusionObject{ */ public static Date getCurrentDBDate()throws Exception{ String dbTimeZone = SystemProperties.getProperty(SystemProperties.DATABASE_TIME_ZONE); - List results = (List)getDataAccessService().executeNamedQuery(GET_CURRENT_DATE, null, null); - return parseDate(((Object[])results.get(0))[0]+" "+((Object[])results.get(0))[1],DB_DATE_FORMAT,dbTimeZone); + //List results = (List)getDataAccessService().executeNamedQuery(GET_CURRENT_DATE, null, null); + List results = (List) dataAccessService.executeNamedQuery(GET_CURRENT_DATE, null, null); + /*Object[] currentDate = (Object[]) results.get(0) ; + System.out.println(currentDate[0]);*/ + return parseDate((String)results.get(0),DB_DATE_FORMAT,dbTimeZone); } /** @@ -288,7 +305,8 @@ public class DateUtils implements Serializable, FusionObject{ * @throws Exception */ public static String getCurrentDBDateForUser(String outPattern,Long userId)throws Exception{ - User user = (User)getDataAccessService().getDomainObject(User.class, userId, null); + //User user = (User)getDataAccessService().getDomainObject(User.class, userId, null); + User user = (User)dataAccessService.getDomainObject(User.class, userId, null); String userTimeZone = null; Long timezoneId = user.getTimeZoneId(); diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/system/fusion/adapter/RaptorAdapter.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/system/fusion/adapter/RaptorAdapter.java index c934f8d4..211e098e 100644 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/system/fusion/adapter/RaptorAdapter.java +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/system/fusion/adapter/RaptorAdapter.java @@ -65,12 +65,11 @@ import org.onap.portalsdk.core.web.support.UserUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; -@Service("raptorAdapter") +@Service public class RaptorAdapter extends FusionAdapter { private static final EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(RaptorAdapter.class); - @Autowired private static DataAccessService dataAccessService; public static final int RAPTOR_USER_ID = 20000; // RAPTOR system user id (for auditing purposes) @@ -373,12 +372,13 @@ public class RaptorAdapter extends FusionAdapter { public static DataAccessService getDataAccessService() { - return org.onap.portalsdk.core.web.support.AppUtils.getDataAccessService(); + return dataAccessService; } - public static void setDataAccessService(DataAccessService dataAccessService) { - dataAccessService = dataAccessService; + @Autowired + public void setDataAccessService(DataAccessService dataAccessService) { + this.dataAccessService = dataAccessService; } diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/system/fusion/web/RaptorControllerAsync.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/system/fusion/web/RaptorControllerAsync.java index 517d2672..178a4c27 100644 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/system/fusion/web/RaptorControllerAsync.java +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/system/fusion/web/RaptorControllerAsync.java @@ -108,6 +108,7 @@ import org.onap.portalsdk.analytics.xmlobj.DataColumnType; import org.onap.portalsdk.analytics.xmlobj.FormFieldType; import org.onap.portalsdk.analytics.xmlobj.ObjectFactory; import org.onap.portalsdk.analytics.xmlobj.PredefinedValueList; +import org.onap.portalsdk.analytics.xmlobj.SemaphoreList; import org.onap.portalsdk.core.controller.RestrictedBaseController; import org.onap.portalsdk.core.domain.User; import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; @@ -115,6 +116,7 @@ import org.onap.portalsdk.core.util.SecurityCodecUtil; import org.onap.portalsdk.core.web.support.UserUtils; import org.owasp.esapi.ESAPI; import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.CrossOrigin; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; @@ -145,7 +147,7 @@ public class RaptorControllerAsync extends RestrictedBaseController { HttpSession session = request.getSession(); User user = UserUtils.getUserSession(request); - + boolean isPageDownload = Boolean.valueOf(request.getParameter(AppConstants.PAGE_DOWNLOAD)); if ("report.download.excel2007.session".equals(actionKey) || "report.download.csv.session".equals(actionKey) || "report.download.excel.session".equals(actionKey) || "report.download.pdf.session".equals(actionKey)) { @@ -193,24 +195,27 @@ public class RaptorControllerAsync extends RestrictedBaseController { : Globals.getDownloadLimit(); if ("report.csv.download".equals(actionKey)) downloadLimit = Globals.getCSVDownloadLimit(); - if(rr != null) { - String sqlWhole = rr.getReportDataSQL(userId, downloadLimit, request); - request.setAttribute(AppConstants.RI_REPORT_SQL_WHOLE, sqlWhole); + + final boolean isDashboard = (session.getAttribute(AppConstants.SI_DASHBOARD_REP_ID) != null) && + (((String) session.getAttribute(AppConstants.SI_DASHBOARD_REP_ID)).equals(rr.getReportID())); + + if(!isDashboard) + { + String sql_whole = rr.getReportDataSQL(userId, downloadLimit, request); + request.setAttribute(AppConstants.RI_REPORT_SQL_WHOLE, sql_whole); } try { OutputStreamWriter out = new OutputStreamWriter(response.getOutputStream()); - + if(rr != null) + //rr.setSinglePageDownload(isPageDownload); if ("report.download.pdf.session".equals(actionKey)) { new PdfReportHandler().createPdfFileContent(request, response, 3); } else if ("report.download.csv.session".equals(actionKey)) { (new ReportHandler()).createCSVFileContent(out, rd, rr, request, response); } else if ("report.download.excel.session".equals(actionKey)) { - new ReportHandler().createExcelFileContent(out, rd, rr, request, response, userId, 3); // 3 - // whole + new ReportHandler().createExcelFileContent(out, rd, rr, request, response, userId, 3); } else { - - new ReportHandler().createExcel2007FileContent(out, rd, rr, request, response, userId, 3); // 3 - // whole + new ReportHandler().createExcel2007FileContent(out, rd, rr, request, response, userId, 3); } } catch (Exception e) { logger.error(EELFLoggerDelegate.errorLogger, @@ -526,6 +531,17 @@ public class RaptorControllerAsync extends RestrictedBaseController { return formFieldGroupsJSON; } + @RequestMapping(value = "report/wizard/clearSession", method = RequestMethod.GET) + public @ResponseBody MessageJSON clearSession(HttpServletRequest request, HttpServletResponse response) { + MessageJSON messageJSON = new MessageJSON(); + removeVariablesFromSession(request); + request.getSession().setAttribute("COPY_REPORT_EVENT", ""); + messageJSON.setMessage("CopyReport Cancelled"); + return messageJSON; + + } + + @RequestMapping(value = "report/wizard/save_formfield_groups_data", method = RequestMethod.POST) public @ResponseBody MessageJSON saveFFGroupsData(@RequestBody FormFieldGroupsJSON formFieldGroupsJSON, HttpServletRequest request, HttpServletResponse response) throws IOException, RaptorException { @@ -573,9 +589,18 @@ public class RaptorControllerAsync extends RestrictedBaseController { String fieldId = formEditJSON.getFieldId(); + boolean lastUpdateIdFlag = false; + if (rdef.getFormFieldList() != null) { + + +// fft.getlastUpdatedFieldId() + for (FormFieldType fft : rdef.getFormFieldList().getFormField()) { - if (fft.getFieldId().equals(fieldId)) { + + System.out.println(fft.getFieldId() + " " + fft.getFieldName() + " " + fft.getlastUpdatedFieldId() + " " + formEditJSON.getLastUpdatedFieldId() ); + if (fft.getFieldId().equals(fieldId) && !lastUpdateIdFlag) { + fft.setFieldId(formEditJSON.getLastUpdatedFieldId() != null ? formEditJSON.getLastUpdatedFieldId() : fft.getFieldId()); fft.setFieldName(formEditJSON.getFieldName()); fft.setFieldType(formEditJSON.getFieldType()); fft.setVisible(formEditJSON.isVisible() ? "Y" : "N"); @@ -589,15 +614,35 @@ public class RaptorControllerAsync extends RestrictedBaseController { PredefinedValueList predefinedValueList = new ObjectFactory().createPredefinedValueList(); fft.setPredefinedValueList(predefinedValueList); + fft.setlastUpdatedFieldId("Y"); + lastUpdateIdFlag = true; + List<IdNameBooleanJSON> predefList = formEditJSON.getPredefinedValueList(); if (predefList != null && predefList.size() > 0) { for (IdNameBooleanJSON item : predefList) { fft.getPredefinedValueList().getPredefinedValue().add(item.getId()); } } + int cnt=0; + for (FormFieldType fft1 : rdef.getFormFieldList().getFormField()) { + + if(fft1.getlastUpdatedFieldId().equals("Y")) + { + cnt++; + } + + if(cnt >= 2) + { + for (FormFieldType fft2 : rdef.getFormFieldList().getFormField()) { + fft2.setlastUpdatedFieldId("N"); + } + cnt = 0; + } } } + System.out.println(fft.getFieldId() + " " + fft.getFieldName() + " " + fft.getlastUpdatedFieldId() + " " + formEditJSON.getLastUpdatedFieldId() ); + } } persistReportDefinition(request, rdef); @@ -634,7 +679,18 @@ public class RaptorControllerAsync extends RestrictedBaseController { if(rdef.getFormFieldList()==null || rdef.getFormFieldList().getFormField()==null || rdef.getFormFieldList().getFormField().size()==0) fieldId = "ff1"; else - fieldId = "ff"+(rdef.getFormFieldList().getFormField().size()+1); + { + int maxFormFieldSeq = 0; + for(FormFieldType ffType : rdef.getFormFieldList().getFormField()) + { + if(Integer.parseInt(ffType.getFieldId().substring(2)) > maxFormFieldSeq) + { + maxFormFieldSeq = Integer.parseInt(ffType.getFieldId().substring(2)); + } + } + maxFormFieldSeq++; + fieldId = "ff"+ maxFormFieldSeq; + } FormFieldType currField = rdef.addFormFieldType(new ObjectFactory(), "", "", "", "", "", "", "", "", null, null, "",""); currField.setFieldId(fieldId); currField.setFieldName(formEditJSON.getFieldName()); @@ -676,6 +732,8 @@ public class RaptorControllerAsync extends RestrictedBaseController { if (rdef != null) { String colId = columnEditJSON.getColId(); List<DataColumnType> reportColumnList = rdef.getAllColumns(); + rdef.setSemaphoreList(columnEditJSON.getSemaphoreList()); + for (DataColumnType reportColumnType : reportColumnList) { @@ -702,6 +760,8 @@ public class RaptorControllerAsync extends RestrictedBaseController { reportColumnType.setDrillDownType(columnEditJSON.getDrilldownType()); if(columnEditJSON.getDisplayTotal()!=null) reportColumnType.setDisplayTotal(columnEditJSON.getDisplayTotal()); + reportColumnType.setSemaphoreId(columnEditJSON.getSemaphoreId()); + } @@ -745,6 +805,9 @@ public class RaptorControllerAsync extends RestrictedBaseController { newReport = true; System.out.println("&&&&&&&&&&&&&&&&&&&&&& CHECK Report Type " + (AppUtils.nvl(rdef.getReportType()).length() <= 0)); + + rdef.setReportType(definitionJSON.getReportType()); + if (AppUtils.nvl(rdef.getReportType()).length() <= 0) { rdef.setReportType(AppConstants.RT_LINEAR); System.out.println("&&&&&&&&&&&&&&&&&&&&&& ADDED Report Type in session "); @@ -899,6 +962,16 @@ public class RaptorControllerAsync extends RestrictedBaseController { messageJSON.setAnyStacktrace((newReport ? " New Report info is added to Session " : rdef.getReportID() + "- is Modified and added to session and DB.")); + if(rdef.getReportType() != null) { + if(rdef.getReportType().equals("Dashboard") && id.equals("Create")) { + messageJSON.setAnyStacktrace(rdef.getReportID() + "- is Modified and added to session and DB."); + } + } + if(request.getSession().getAttribute("COPY_REPORT_EVENT") == "true" || (rdef.getReportType().equals("Dashboard") && id.equals("Create")) ) { + removeVariablesFromSession(request); + request.getSession().setAttribute("COPY_REPORT_EVENT", ""); + } + } catch (Exception ex) { messageJSON.setMessage("Error occured while saving definition Tab"); messageJSON.setAnyStacktrace(getStackTrace(ex)); @@ -1015,6 +1088,10 @@ public class RaptorControllerAsync extends RestrictedBaseController { Globals.initializeSystem(servletContext); } if (rdef != null) { + if(rdef.getSemaphoreList() != null) { + wizardJSON.setSemaphoreList(rdef.getSemaphoreList()); + }else { wizardJSON.setSemaphoreList(new SemaphoreList()); } + wizardJSON.setTabId("ColEdit"); wizardJSON.setTabName("Column Edit"); @@ -1049,6 +1126,8 @@ public class RaptorControllerAsync extends RestrictedBaseController { wizardJSON.setColspan(reportColumnType.getColspan()==null?null:reportColumnType.getColspan()); wizardJSON.setDisplayName(reportColumnType.getDisplayName()); wizardJSON.setDisplayTotal(reportColumnType.getDisplayTotal()); + wizardJSON.setSemaphoreId(reportColumnType.getSemaphoreId()); + } } } else { @@ -1673,7 +1752,9 @@ public class RaptorControllerAsync extends RestrictedBaseController { QueryResultJSON queryResultJSON = new QueryResultJSON(); queryResultJSON.setQuery(queryJSON.getQuery()); String query = XSSFilter.filterRequestOnlyScript(queryJSON.getQuery()); + if(validate) { rdef.parseReportSQL(query,validate); + } queryResultJSON.setQuery(query); queryResultJSON.setTotalRows(ds.getRowCount()); @@ -1796,7 +1877,7 @@ public class RaptorControllerAsync extends RestrictedBaseController { @RequestMapping(value = "save_chart", method = RequestMethod.POST) public void reportChartReceive(@RequestBody ChartJSON chartJSON, HttpServletRequest request, - HttpServletResponse response) throws IOException { + HttpServletResponse response) { //ReportRuntime reportRuntime; //reportRuntime = (ReportRuntime) request.getSession().getAttribute(AppConstants.SI_REPORT_RUNTIME); // changing ReportDefinition reportDefn; @@ -1828,7 +1909,7 @@ public class RaptorControllerAsync extends RestrictedBaseController { List<DataColumnType> reportCols = reportDefn.getAllColumns(); for (Iterator<DataColumnType> iter = reportCols.iterator(); iter.hasNext();) { - DataColumnType dct = (DataColumnType) iter.next(); + DataColumnType dct = iter.next(); if (dct.getColId().equals(domainAxis)) { dct.setColOnChart(AppConstants.GC_LEGEND); } else { @@ -1837,14 +1918,14 @@ public class RaptorControllerAsync extends RestrictedBaseController { } CategoryAxisJSON categoryAxisJSON = chartJSON.getCategoryAxisJSON(); - String categoryAxis = null; + String categoryAxis; categoryAxis = (categoryAxisJSON != null ? categoryAxisJSON.getValue() : ""); reportCols = reportDefn.getAllColumns(); for (Iterator<DataColumnType> iter = reportCols.iterator(); iter.hasNext();) { - DataColumnType dct = (DataColumnType) iter.next(); + DataColumnType dct = iter.next(); if (dct.getColId().equals(categoryAxis)) { dct.setChartSeries(true); } else { @@ -1867,7 +1948,7 @@ public class RaptorControllerAsync extends RestrictedBaseController { String rangeLineType = AppUtils.nvl(rangeAxisJSON.getRangeLineType()); rangefor: for (Iterator<DataColumnType> iterator = reportCols.iterator(); iterator.hasNext();) { - DataColumnType dct = (DataColumnType) iterator.next(); + DataColumnType dct = iterator.next(); if (dct.getColId().equals(rangeAxis)) { if(removeRangeAxisMap.contains(rangeAxis)) dct.setChartSeq(-1); // if we set it to -1, means this range axis will not be included @@ -1947,7 +2028,7 @@ public class RaptorControllerAsync extends RestrictedBaseController { reportDefn.setRightMargin(chartJSON.getCommonChartOptions().getRightMargin()); for (Iterator<DataColumnType> iterator = reportCols.iterator(); iterator.hasNext();) { - DataColumnType dct = (DataColumnType) iterator.next(); + DataColumnType dct = iterator.next(); if (!(AppUtils.nvl(dct.getColOnChart()).equals(AppConstants.GC_LEGEND) || (dct.getChartSeq() != null && dct.getChartSeq() > 0) || dct.isChartSeries())) { dct.setChartSeq(-1); @@ -1970,7 +2051,6 @@ public class RaptorControllerAsync extends RestrictedBaseController { } } - public String getViewName() { return viewName; } |