[SDFAB-359] Purge all objective for a given application ID

Change-Id: I51847b0be890deacec5caddc18d52bcd2993959a
(cherry picked from commit 607fd0b70e4553226d0937d36de9cde655f2eb62)
diff --git a/core/api/src/main/java/org/onosproject/net/behaviour/Pipeliner.java b/core/api/src/main/java/org/onosproject/net/behaviour/Pipeliner.java
index 6f497e7..bd4af6c 100644
--- a/core/api/src/main/java/org/onosproject/net/behaviour/Pipeliner.java
+++ b/core/api/src/main/java/org/onosproject/net/behaviour/Pipeliner.java
@@ -17,6 +17,7 @@
 
 import java.util.List;
 
+import org.onosproject.core.ApplicationId;
 import org.onosproject.net.DeviceId;
 import org.onosproject.net.driver.HandlerBehaviour;
 import org.onosproject.net.flowobjective.FilteringObjective;
@@ -68,6 +69,13 @@
     void next(NextObjective nextObjective);
 
     /**
+     * Purges all objectives for the given application.
+     *
+     * @param appId application identifier
+     */
+    void purgeAll(ApplicationId appId);
+
+    /**
      *  Retrieves a mapping of the nextObjective to the groups in the dataplane,
      *  and returns it in a form that can be displayed on the CLI. Typically
      *  group-ids are returned for groups with multiple buckets, where each list element
diff --git a/core/api/src/main/java/org/onosproject/net/flowobjective/FlowObjectiveService.java b/core/api/src/main/java/org/onosproject/net/flowobjective/FlowObjectiveService.java
index 11a7f5f..4def953 100644
--- a/core/api/src/main/java/org/onosproject/net/flowobjective/FlowObjectiveService.java
+++ b/core/api/src/main/java/org/onosproject/net/flowobjective/FlowObjectiveService.java
@@ -25,6 +25,7 @@
 import com.google.common.collect.Maps;
 import org.apache.commons.lang.NotImplementedException;
 import org.apache.commons.lang3.tuple.Pair;
+import org.onosproject.core.ApplicationId;
 import org.onosproject.net.DeviceId;
 
 /**
@@ -129,6 +130,14 @@
     List<String> getPendingFlowObjectives();
 
     /**
+     * Purges all flow objectives on a given device and for a given application.
+     *
+     * @param deviceId device identifier
+     * @param appId application identifier
+     */
+    void purgeAll(DeviceId deviceId, ApplicationId appId);
+
+    /**
      * Returns all filtering objective that are waiting for the completion of previous objective
      * with the same FilteringObjQueueKey.
      *
diff --git a/core/api/src/test/java/org/onosproject/net/behaviour/PipelinerAdapter.java b/core/api/src/test/java/org/onosproject/net/behaviour/PipelinerAdapter.java
index c87dee2..0ff3644 100644
--- a/core/api/src/test/java/org/onosproject/net/behaviour/PipelinerAdapter.java
+++ b/core/api/src/test/java/org/onosproject/net/behaviour/PipelinerAdapter.java
@@ -17,6 +17,7 @@
 
 import java.util.List;
 
+import org.onosproject.core.ApplicationId;
 import org.onosproject.net.DeviceId;
 import org.onosproject.net.driver.DriverData;
 import org.onosproject.net.driver.DriverHandler;
@@ -49,6 +50,11 @@
     }
 
     @Override
+    public void purgeAll(ApplicationId appId) {
+
+    }
+
+    @Override
     public DriverHandler handler() {
         return null;
     }
diff --git a/core/api/src/test/java/org/onosproject/net/flowobjective/FlowObjectiveServiceAdapter.java b/core/api/src/test/java/org/onosproject/net/flowobjective/FlowObjectiveServiceAdapter.java
index 0b17ce8..66ff125 100644
--- a/core/api/src/test/java/org/onosproject/net/flowobjective/FlowObjectiveServiceAdapter.java
+++ b/core/api/src/test/java/org/onosproject/net/flowobjective/FlowObjectiveServiceAdapter.java
@@ -18,6 +18,7 @@
 
 import com.google.common.collect.ImmutableList;
 import com.google.common.collect.ImmutableMap;
+import org.onosproject.core.ApplicationId;
 import org.onosproject.net.DeviceId;
 import org.apache.commons.lang3.tuple.Pair;
 import java.util.Map;
@@ -70,6 +71,11 @@
     }
 
     @Override
+    public void purgeAll(DeviceId deviceId, ApplicationId appId) {
+
+    }
+
+    @Override
     public Map<Pair<Integer, DeviceId>, List<String>> getNextMappingsChain() {
         return ImmutableMap.of();
     }
diff --git a/core/api/src/test/java/org/onosproject/net/meter/MeterServiceAdapter.java b/core/api/src/test/java/org/onosproject/net/meter/MeterServiceAdapter.java
index cc55672..7148c06 100644
--- a/core/api/src/test/java/org/onosproject/net/meter/MeterServiceAdapter.java
+++ b/core/api/src/test/java/org/onosproject/net/meter/MeterServiceAdapter.java
@@ -16,6 +16,7 @@
 
 package org.onosproject.net.meter;
 
+import org.onosproject.core.ApplicationId;
 import org.onosproject.net.DeviceId;
 
 import java.util.Collection;
@@ -65,6 +66,11 @@
     }
 
     @Override
+    public void purgeMeters(DeviceId deviceId, ApplicationId appId) {
+
+    }
+
+    @Override
     public void addListener(MeterListener listener) {
 
     }