From 64dacdfb02618ae9db997dbcb406cb40575baea2 Mon Sep 17 00:00:00 2001
From: pompert <sdos@astron.nl>
Date: Wed, 24 May 2006 13:52:40 +0000
Subject: [PATCH] BugID: 701 Additions: -updateData method to adhere to new
 IPlotDataAccess version Mods: -None

---
 .../jparmfacade/PlotDataAccessParmDBImpl.java | 19 +++++++++++++++++++
 .../plotter/PlotDataAccessParmDBImpl.java     | 19 +++++++++++++++++++
 2 files changed, 38 insertions(+)

diff --git a/JAVA/CEP/jParmFacade/src/nl/astron/lofar/java/cep/jparmfacade/PlotDataAccessParmDBImpl.java b/JAVA/CEP/jParmFacade/src/nl/astron/lofar/java/cep/jparmfacade/PlotDataAccessParmDBImpl.java
index 2e96b756a29..6478a244a1f 100644
--- a/JAVA/CEP/jParmFacade/src/nl/astron/lofar/java/cep/jparmfacade/PlotDataAccessParmDBImpl.java
+++ b/JAVA/CEP/jParmFacade/src/nl/astron/lofar/java/cep/jparmfacade/PlotDataAccessParmDBImpl.java
@@ -202,6 +202,25 @@ public class PlotDataAccessParmDBImpl implements IPlotDataAccess{
         return returnMap;
     }
     
+    /**
+     * This method updates an already existing Plotter compliant dataset using
+     * the constraints provided by the PlotPanel, and to do that, it uses the 
+     * jParmFacade interface to get the data.
+     * 
+     * @param currentData The current data set to be updated.
+     * @param constraints The update constraints provided by the PlotPanel. 
+     * @return the data set generated
+     * @throws PlotterDataAccessException will be thrown if anything goes wrong 
+     * with the ParmDB interface and calls to it.
+     *
+     */
+    public HashMap updateData(HashMap currentData, Object constraints) throws PlotterDataAccessException{
+        if(parmDB == null){
+            this.initiateConnectionToParmDB();
+        }
+        throw new PlotterDataAccessException("Modifying existing datasets is not supported in "+this.getClass().getName().toString());
+        //Todo: implement!
+    }
     /**
      * This method will check if the jParmFacade ParmDB interface is ready, and if not, it will
      * create a new instance of it.
diff --git a/SAS/OTB/OTB/src/nl/astron/lofar/sas/otb/util/plotter/PlotDataAccessParmDBImpl.java b/SAS/OTB/OTB/src/nl/astron/lofar/sas/otb/util/plotter/PlotDataAccessParmDBImpl.java
index 2e96b756a29..6478a244a1f 100644
--- a/SAS/OTB/OTB/src/nl/astron/lofar/sas/otb/util/plotter/PlotDataAccessParmDBImpl.java
+++ b/SAS/OTB/OTB/src/nl/astron/lofar/sas/otb/util/plotter/PlotDataAccessParmDBImpl.java
@@ -202,6 +202,25 @@ public class PlotDataAccessParmDBImpl implements IPlotDataAccess{
         return returnMap;
     }
     
+    /**
+     * This method updates an already existing Plotter compliant dataset using
+     * the constraints provided by the PlotPanel, and to do that, it uses the 
+     * jParmFacade interface to get the data.
+     * 
+     * @param currentData The current data set to be updated.
+     * @param constraints The update constraints provided by the PlotPanel. 
+     * @return the data set generated
+     * @throws PlotterDataAccessException will be thrown if anything goes wrong 
+     * with the ParmDB interface and calls to it.
+     *
+     */
+    public HashMap updateData(HashMap currentData, Object constraints) throws PlotterDataAccessException{
+        if(parmDB == null){
+            this.initiateConnectionToParmDB();
+        }
+        throw new PlotterDataAccessException("Modifying existing datasets is not supported in "+this.getClass().getName().toString());
+        //Todo: implement!
+    }
     /**
      * This method will check if the jParmFacade ParmDB interface is ready, and if not, it will
      * create a new instance of it.
-- 
GitLab