Change IntentUpdate and CompletedIntentUpdate to be interface

Instead of abstract class, defined as interface by using default method

Change-Id: I23135da32db3e1bf3b161edca4db8a61f392eb78
diff --git a/core/net/src/main/java/org/onosproject/net/intent/impl/IntentManager.java b/core/net/src/main/java/org/onosproject/net/intent/impl/IntentManager.java
index 23e5cbe..7c3bb3e 100644
--- a/core/net/src/main/java/org/onosproject/net/intent/impl/IntentManager.java
+++ b/core/net/src/main/java/org/onosproject/net/intent/impl/IntentManager.java
@@ -483,7 +483,7 @@
         }
     }
 
-    private abstract class IntentUpdate {
+    private interface IntentUpdate {
 
         /**
          * Execute the procedure represented by the instance
@@ -491,7 +491,7 @@
          *
          * @return next update
          */
-        public Optional<IntentUpdate> execute() {
+        default Optional<IntentUpdate> execute() {
             return Optional.empty();
         }
 
@@ -500,28 +500,28 @@
          *
          * @param batchWrite batchWrite
          */
-        public void writeBeforeExecution(BatchWrite batchWrite) {}
+        default void writeBeforeExecution(BatchWrite batchWrite) {}
     }
 
-    private abstract class CompletedIntentUpdate extends IntentUpdate {
+    private interface CompletedIntentUpdate extends IntentUpdate {
 
         /**
          * Write data to the specified BatchWrite after execution() is called.
          *
          * @param batchWrite batchWrite
          */
-        public void writeAfterExecution(BatchWrite batchWrite) {}
+        default void writeAfterExecution(BatchWrite batchWrite) {}
 
-        public void batchSuccess() {}
+        default void batchSuccess() {}
 
-        public void batchFailed() {}
+        default void batchFailed() {}
 
         /**
          * Returns the current FlowRuleBatchOperation.
          *
          * @return current FlowRuleBatchOperation
          */
-        public FlowRuleBatchOperation currentBatch() {
+        default FlowRuleBatchOperation currentBatch() {
             return null;
         }
 
@@ -530,12 +530,12 @@
          *
          * @return all of installable intents
          */
-        public List<Intent> allInstallables() {
+        default List<Intent> allInstallables() {
             return Collections.emptyList();
         }
     }
 
-    private class InstallRequest extends IntentUpdate {
+    private class InstallRequest implements IntentUpdate {
 
         private final Intent intent;
 
@@ -556,7 +556,7 @@
         }
     }
 
-    private class WithdrawRequest extends IntentUpdate {
+    private class WithdrawRequest implements IntentUpdate {
 
         private final Intent intent;
         private final List<Intent> installables;
@@ -577,7 +577,7 @@
         }
     }
 
-    private class ReplaceRequest extends IntentUpdate {
+    private class ReplaceRequest implements IntentUpdate {
 
         private final Intent newIntent;
         private final Intent oldIntent;
@@ -611,11 +611,11 @@
         }
     }
 
-    private class DoNothing extends CompletedIntentUpdate {
+    private class DoNothing implements CompletedIntentUpdate {
     }
 
     // TODO: better naming
-    private class WithdrawStateChange1 extends CompletedIntentUpdate {
+    private class WithdrawStateChange1 implements CompletedIntentUpdate {
 
         private final Intent intent;
 
@@ -637,7 +637,7 @@
     }
 
     // TODO: better naming
-    private class WithdrawStateChange2 extends CompletedIntentUpdate {
+    private class WithdrawStateChange2 implements CompletedIntentUpdate {
 
         private final Intent intent;
 
@@ -660,7 +660,7 @@
         }
     }
 
-    private class Compiling extends IntentUpdate {
+    private class Compiling implements IntentUpdate {
 
         private final Intent intent;
 
@@ -684,7 +684,7 @@
     }
 
     // TODO: better naming because install() method actually generate FlowRuleBatchOperations
-    private class Installing extends IntentUpdate {
+    private class Installing implements IntentUpdate {
 
         private final Intent intent;
         private final List<Intent> installables;
@@ -721,7 +721,7 @@
         }
     }
 
-    private class Withdrawing extends IntentUpdate {
+    private class Withdrawing implements IntentUpdate {
 
         private final Intent intent;
         private final List<Intent> installables;
@@ -739,7 +739,7 @@
         }
     }
 
-    private class Replacing extends IntentUpdate {
+    private class Replacing implements IntentUpdate {
 
         private final Intent newIntent;
         private final Intent oldIntent;
@@ -799,7 +799,7 @@
         }
     }
 
-    private class Installed extends CompletedIntentUpdate {
+    private class Installed implements CompletedIntentUpdate {
 
         private final Intent intent;
         private final List<Intent> installables;
@@ -859,7 +859,7 @@
         }
     }
 
-    private class Withdrawn extends CompletedIntentUpdate {
+    private class Withdrawn implements CompletedIntentUpdate {
 
         private final Intent intent;
         private final List<Intent> installables;
@@ -906,7 +906,7 @@
         }
     }
 
-    private class Replaced extends CompletedIntentUpdate {
+    private class Replaced implements CompletedIntentUpdate {
 
         private final Intent newIntent;
         private final Intent oldIntent;
@@ -971,7 +971,7 @@
         }
     }
 
-    private class CompilingFailed extends CompletedIntentUpdate {
+    private class CompilingFailed implements CompletedIntentUpdate {
 
         private final Intent intent;
         private final IntentException exception;
@@ -999,7 +999,7 @@
         }
     }
 
-    private class InstallingFailed extends CompletedIntentUpdate {
+    private class InstallingFailed implements CompletedIntentUpdate {
 
         private final Intent intent;
         private final List<Intent> installables;
@@ -1046,7 +1046,7 @@
         }
     }
 
-    private class ReplacingFailed extends CompletedIntentUpdate {
+    private class ReplacingFailed implements CompletedIntentUpdate {
 
         private final Intent newIntent;
         private final Intent oldIntent;