diff options
author | 2020-05-18 15:17:41 +0000 | |
---|---|---|
committer | 2020-05-18 15:17:41 +0000 | |
commit | 45505117ccea62c60cd57df471a757c77749671f (patch) | |
tree | 79feb9ec88278406c70c538c20278bdb45f7f708 /ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/definition/ReportDefinition.java | |
parent | 4c8ce62291707a0cb10d5b599d87e6c7dd6bfd9f (diff) | |
parent | 759e9e75fc0b5978f98f901744c87c0c8d5ef4fd (diff) |
Merge "Raptor backend java API Code(Analytics), UI Code(Overlay) and pages component in os project"
Diffstat (limited to 'ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/definition/ReportDefinition.java')
-rw-r--r-- | ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/definition/ReportDefinition.java | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/definition/ReportDefinition.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/definition/ReportDefinition.java index e51913e4..11adb35b 100644 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/definition/ReportDefinition.java +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/definition/ReportDefinition.java @@ -73,6 +73,7 @@ import org.onap.portalsdk.analytics.system.DbUtils; import org.onap.portalsdk.analytics.system.Globals; import org.onap.portalsdk.analytics.util.AppConstants; import org.onap.portalsdk.analytics.util.DataSet; +import org.onap.portalsdk.analytics.util.RemDbInfo; import org.onap.portalsdk.analytics.util.Utils; import org.onap.portalsdk.analytics.xmlobj.ChartAdditionalOptions; import org.onap.portalsdk.analytics.xmlobj.ChartDrillOptions; @@ -91,6 +92,8 @@ import org.onap.portalsdk.analytics.xmlobj.ObjectFactory; import org.onap.portalsdk.analytics.xmlobj.PredefinedValueList; import org.onap.portalsdk.analytics.xmlobj.SemaphoreType; import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; /**<HR/> * This class is part of <B><I>RAPTOR (Rapid Application Programming Tool for OLAP Reporting)</I></B><BR/> @@ -110,10 +113,19 @@ import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; * */ +@Component public class ReportDefinition extends ReportWrapper implements Serializable { private static transient final EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(ReportDefinition.class); + protected static RemDbInfo remDbInfo; + + @SuppressWarnings("static-access") + @Autowired + public void setRemDbInfo(RemDbInfo remDbInfo) { + this.remDbInfo = remDbInfo; + } + private ReportSchedule reportSchedule = null; private WizardSequence wizardSequence = null; @@ -124,6 +136,10 @@ public class ReportDefinition extends ReportWrapper implements Serializable { // when persisting report on // each step + public ReportDefinition() { + super(); + } + private ReportDefinition(CustomReportType crType, String reportID, String ownerID, String createID, String createDate, String updateID, String updateDate, String menuID, boolean menuApproved, HttpServletRequest request) throws RaptorException { @@ -214,7 +230,7 @@ public class ReportDefinition extends ReportWrapper implements Serializable { private boolean canPersistDashboard() { - return nvl(getDashboardLayoutHTML()).length() > 0; + return nvl(getDashboardLayoutJSON()).length() > 0; } //canPersistDashboard private boolean canPersistLinearReport() { @@ -1272,7 +1288,6 @@ public class ReportDefinition extends ReportWrapper implements Serializable { boolean isCYMBALScript = false; if (!isNull(dbInfo) && (!dbInfo.equals(AppConstants.DB_LOCAL))) { try { - org.onap.portalsdk.analytics.util.RemDbInfo remDbInfo = new org.onap.portalsdk.analytics.util.RemDbInfo(); String dbType = remDbInfo.getDBType(dbInfo); if (dbType.equals("DAYTONA") && !(nextToken.toUpperCase().equals("SELECT"))) { isCYMBALScript = true; @@ -1419,7 +1434,6 @@ public class ReportDefinition extends ReportWrapper implements Serializable { boolean isCYMBALScript = false; if (!isNull(dbInfo) && (!dbInfo.equals(AppConstants.DB_LOCAL))) { try { - org.onap.portalsdk.analytics.util.RemDbInfo remDbInfo = new org.onap.portalsdk.analytics.util.RemDbInfo(); String dbType = remDbInfo.getDBType(dbInfo); if (dbType.equals("DAYTONA") && !(nextToken.toUpperCase().equals("SELECT"))) { isCYMBALScript = true; |