IntentStore interface changes

Change-Id: Ifa8728fb4c7edcc6d58a5e071f7252493ab2a578
diff --git a/core/api/src/main/java/org/onosproject/net/intent/IntentEvent.java b/core/api/src/main/java/org/onosproject/net/intent/IntentEvent.java
index e3a0522..b1571ad 100644
--- a/core/api/src/main/java/org/onosproject/net/intent/IntentEvent.java
+++ b/core/api/src/main/java/org/onosproject/net/intent/IntentEvent.java
@@ -72,6 +72,10 @@
         super(type, intent);
     }
 
+    public static IntentEvent getEvent(IntentData data) {
+        return getEvent(data.state(), data.intent());
+    }
+
     public static IntentEvent getEvent(IntentState state, Intent intent) {
         Type type;
         switch (state) {
diff --git a/core/api/src/main/java/org/onosproject/net/intent/IntentService.java b/core/api/src/main/java/org/onosproject/net/intent/IntentService.java
index 3c1c91a..1ba1b29 100644
--- a/core/api/src/main/java/org/onosproject/net/intent/IntentService.java
+++ b/core/api/src/main/java/org/onosproject/net/intent/IntentService.java
@@ -52,18 +52,6 @@
     void replace(IntentId oldIntentId, Intent newIntent);
 
     /**
-     * Submits a batch of submit & withdraw operations. Such a batch is
-     * assumed to be processed together.
-     * <p>
-     * This is an asynchronous request meaning that the environment may be
-     * affected at later time.
-     * </p>
-     * @param operations batch of intent operations
-     */
-    @Deprecated
-    void execute(IntentOperations operations);
-
-    /**
      * Returns an iterable of intents currently in the system.
      *
      * @return set of intents
diff --git a/core/api/src/main/java/org/onosproject/net/intent/IntentStore.java b/core/api/src/main/java/org/onosproject/net/intent/IntentStore.java
index dcb2259..00f638d 100644
--- a/core/api/src/main/java/org/onosproject/net/intent/IntentStore.java
+++ b/core/api/src/main/java/org/onosproject/net/intent/IntentStore.java
@@ -46,7 +46,9 @@
      * @return intent or null if not found
      */
     @Deprecated
-    Intent getIntent(IntentId intentId);
+    default Intent getIntent(IntentId intentId) {
+        throw new UnsupportedOperationException("deprecated");
+    };
 
     /**
      * Returns the state of the specified intent.
@@ -55,7 +57,9 @@
      * @return current intent state
      */
     @Deprecated
-    IntentState getIntentState(IntentId intentId);
+    default IntentState getIntentState(IntentId intentId) {
+        throw new UnsupportedOperationException("deprecated");
+    }
 
     /**
      * Returns the list of the installable events associated with the specified
@@ -65,7 +69,9 @@
      * @return compiled installable intents
      */
     @Deprecated
-    List<Intent> getInstallableIntents(IntentId intentId);
+    default List<Intent> getInstallableIntents(IntentId intentId) {
+        throw new UnsupportedOperationException("deprecated");
+    }
 
     /**
      * Execute writes in a batch.
@@ -74,7 +80,10 @@
      * @param batch BatchWrite to execute
      * @return failed operations
      */
+    @Deprecated
     List<Operation> batchWrite(BatchWrite batch);
+    default void write(IntentData newData) {}
+    default void batchWrite(Iterable<IntentData> updates) {}
 
     /**
      * Returns the intent with the specified identifier.
diff --git a/core/api/src/test/java/org/onosproject/net/intent/FakeIntentManager.java b/core/api/src/test/java/org/onosproject/net/intent/FakeIntentManager.java
index ae9bcf5..a9a331f 100644
--- a/core/api/src/test/java/org/onosproject/net/intent/FakeIntentManager.java
+++ b/core/api/src/test/java/org/onosproject/net/intent/FakeIntentManager.java
@@ -191,11 +191,6 @@
     }
 
     @Override
-    public void execute(IntentOperations operations) {
-        // TODO: implement later
-    }
-
-    @Override
     public Set<Intent> getIntents() {
         return Collections.unmodifiableSet(new HashSet<>(intents.values()));
     }
diff --git a/core/api/src/test/java/org/onosproject/net/intent/IntentServiceAdapter.java b/core/api/src/test/java/org/onosproject/net/intent/IntentServiceAdapter.java
index 335d9f1..e80883b 100644
--- a/core/api/src/test/java/org/onosproject/net/intent/IntentServiceAdapter.java
+++ b/core/api/src/test/java/org/onosproject/net/intent/IntentServiceAdapter.java
@@ -38,11 +38,6 @@
     }
 
     @Override
-    public void execute(IntentOperations operations) {
-
-    }
-
-    @Override
     public Iterable<Intent> getIntents() {
         return null;
     }