Remove deprecated Flow Rule constructors

Change-Id: I2a078cbfbeb9db4a04ef1c59acde2fb45672a3cf
diff --git a/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/LinkCollectionIntentCompiler.java b/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/LinkCollectionIntentCompiler.java
index 9085f08..43a7fb7 100644
--- a/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/LinkCollectionIntentCompiler.java
+++ b/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/LinkCollectionIntentCompiler.java
@@ -135,7 +135,7 @@
             }
 
             DefaultFlowRule rule = new DefaultFlowRule(deviceId, selector, treatment, 123, appId,
-                    new DefaultGroupId((short) (intent.id().fingerprint() & 0xffff)), 0, true);
+                    new DefaultGroupId((short) (intent.id().fingerprint() & 0xffff)), 0, true, null);
 
             rules.add(rule);
         }
diff --git a/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/MplsPathIntentCompiler.java b/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/MplsPathIntentCompiler.java
index d6eae35..f9e445a 100644
--- a/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/MplsPathIntentCompiler.java
+++ b/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/MplsPathIntentCompiler.java
@@ -256,6 +256,13 @@
 
     protected FlowRule createFlowRule(MplsPathIntent intent, DeviceId deviceId,
                                       TrafficSelector selector, TrafficTreatment treat) {
-        return new DefaultFlowRule(deviceId, selector, treat, intent.priority(), appId, 0, true);
+        return DefaultFlowRule.builder()
+                .forDevice(deviceId)
+                .withSelector(selector)
+                .withTreatment(treat)
+                .withPriority(intent.priority())
+                .fromApp(appId)
+                .makePermanent()
+                .build();
     }
 }
diff --git a/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/PathIntentCompiler.java b/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/PathIntentCompiler.java
index d6187cd..90e3981 100644
--- a/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/PathIntentCompiler.java
+++ b/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/PathIntentCompiler.java
@@ -97,7 +97,14 @@
         }
         TrafficTreatment treatment = treatmentBuilder.setOutput(egress.port()).build();
 
-        return new DefaultFlowRule(ingress.deviceId(), selector, treatment, 123, appId, 0, true);
+        return DefaultFlowRule.builder()
+                .forDevice(ingress.deviceId())
+                .withSelector(selector)
+                .withTreatment(treatment)
+                .withPriority(123)
+                .fromApp(appId)
+                .makePermanent()
+                .build();
     }
 
     private boolean isLast(List<Link> links, int i) {
diff --git a/core/net/src/test/java/org/onosproject/net/flow/impl/FlowRuleManagerTest.java b/core/net/src/test/java/org/onosproject/net/flow/impl/FlowRuleManagerTest.java
index 5097bb8..520cb8c 100644
--- a/core/net/src/test/java/org/onosproject/net/flow/impl/FlowRuleManagerTest.java
+++ b/core/net/src/test/java/org/onosproject/net/flow/impl/FlowRuleManagerTest.java
@@ -144,7 +144,14 @@
     private FlowRule flowRule(int tsval, int trval) {
         TestSelector ts = new TestSelector(tsval);
         TestTreatment tr = new TestTreatment(trval);
-        return new DefaultFlowRule(DID, ts, tr, 10, appId, TIMEOUT, false);
+        return DefaultFlowRule.builder()
+                .forDevice(DID)
+                .withSelector(ts)
+                .withTreatment(tr)
+                .withPriority(10)
+                .fromApp(appId)
+                .makeTemporary(TIMEOUT)
+                .build();
     }