Remove deprecated connect point APIs for point to point intents

Change-Id: Ie7d29a9e6d54283d3a3310ed8b1e749a631031b1
diff --git a/core/common/src/main/java/org/onosproject/codec/impl/PointToPointIntentCodec.java b/core/common/src/main/java/org/onosproject/codec/impl/PointToPointIntentCodec.java
index f9e7ebc..eb5305e 100644
--- a/core/common/src/main/java/org/onosproject/codec/impl/PointToPointIntentCodec.java
+++ b/core/common/src/main/java/org/onosproject/codec/impl/PointToPointIntentCodec.java
@@ -18,6 +18,7 @@
 import org.onosproject.codec.CodecContext;
 import org.onosproject.codec.JsonCodec;
 import org.onosproject.net.ConnectPoint;
+import org.onosproject.net.FilteredConnectPoint;
 import org.onosproject.net.intent.ConnectivityIntent;
 import org.onosproject.net.intent.PointToPointIntent;
 
@@ -45,9 +46,9 @@
         final JsonCodec<ConnectPoint> connectPointCodec =
                 context.codec(ConnectPoint.class);
         final ObjectNode ingress =
-                connectPointCodec.encode(intent.ingressPoint(), context);
+                connectPointCodec.encode(intent.filteredIngressPoint().connectPoint(), context);
         final ObjectNode egress =
-                connectPointCodec.encode(intent.egressPoint(), context);
+                connectPointCodec.encode(intent.filteredEgressPoint().connectPoint(), context);
 
         result.set(INGRESS_POINT, ingress);
         result.set(EGRESS_POINT, egress);
@@ -67,13 +68,13 @@
                 INGRESS_POINT + IntentCodec.MISSING_MEMBER_MESSAGE);
         ConnectPoint ingress = context.codec(ConnectPoint.class)
                 .decode(ingressJson, context);
-        builder.ingressPoint(ingress);
+        builder.filteredIngressPoint(new FilteredConnectPoint(ingress));
 
         ObjectNode egressJson = nullIsIllegal(get(json, EGRESS_POINT),
                 EGRESS_POINT + IntentCodec.MISSING_MEMBER_MESSAGE);
         ConnectPoint egress = context.codec(ConnectPoint.class)
                 .decode(egressJson, context);
-        builder.egressPoint(egress);
+        builder.filteredEgressPoint(new FilteredConnectPoint(egress));
 
         return builder.build();
     }
diff --git a/core/common/src/test/java/org/onosproject/codec/impl/IntentCodecTest.java b/core/common/src/test/java/org/onosproject/codec/impl/IntentCodecTest.java
index 5de5e97..b257c5a 100644
--- a/core/common/src/test/java/org/onosproject/codec/impl/IntentCodecTest.java
+++ b/core/common/src/test/java/org/onosproject/codec/impl/IntentCodecTest.java
@@ -33,6 +33,7 @@
 import org.onosproject.net.ChannelSpacing;
 import org.onosproject.net.ConnectPoint;
 import org.onosproject.net.DeviceId;
+import org.onosproject.net.FilteredConnectPoint;
 import org.onosproject.net.GridType;
 import org.onosproject.net.HostId;
 import org.onosproject.net.Lambda;
@@ -136,8 +137,9 @@
                         .appId(appId)
                         .selector(emptySelector)
                         .treatment(emptyTreatment)
-                        .ingressPoint(ingress)
-                        .egressPoint(egress).build();
+                        .filteredIngressPoint(new FilteredConnectPoint(ingress))
+                        .filteredEgressPoint(new FilteredConnectPoint(egress))
+                        .build();
 
         final JsonCodec<PointToPointIntent> intentCodec =
                 context.codec(PointToPointIntent.class);
@@ -187,8 +189,8 @@
                         .appId(appId)
                         .selector(selector)
                         .treatment(treatment)
-                        .ingressPoint(ingress)
-                        .egressPoint(egress)
+                        .filteredIngressPoint(new FilteredConnectPoint(ingress))
+                        .filteredEgressPoint(new FilteredConnectPoint(egress))
                         .constraints(constraints)
                         .build();
 
@@ -235,10 +237,10 @@
 
         PointToPointIntent pointIntent = (PointToPointIntent) intent;
         assertThat(pointIntent.priority(), is(55));
-        assertThat(pointIntent.ingressPoint().deviceId(), is(did("0000000000000001")));
-        assertThat(pointIntent.ingressPoint().port(), is(PortNumber.portNumber(1)));
-        assertThat(pointIntent.egressPoint().deviceId(), is(did("0000000000000007")));
-        assertThat(pointIntent.egressPoint().port(), is(PortNumber.portNumber(2)));
+        assertThat(pointIntent.filteredIngressPoint().connectPoint().deviceId(), is(did("0000000000000001")));
+        assertThat(pointIntent.filteredIngressPoint().connectPoint().port(), is(PortNumber.portNumber(1)));
+        assertThat(pointIntent.filteredEgressPoint().connectPoint().deviceId(), is(did("0000000000000007")));
+        assertThat(pointIntent.filteredEgressPoint().connectPoint().port(), is(PortNumber.portNumber(2)));
 
         assertThat(pointIntent.constraints(), hasSize(1));
 
diff --git a/core/common/src/test/java/org/onosproject/codec/impl/IntentJsonMatcher.java b/core/common/src/test/java/org/onosproject/codec/impl/IntentJsonMatcher.java
index f192e44..0a48e30 100644
--- a/core/common/src/test/java/org/onosproject/codec/impl/IntentJsonMatcher.java
+++ b/core/common/src/test/java/org/onosproject/codec/impl/IntentJsonMatcher.java
@@ -98,7 +98,7 @@
         final PointToPointIntent pointToPointIntent = (PointToPointIntent) intent;
 
         // check ingress connection
-        final ConnectPoint ingress = pointToPointIntent.ingressPoint();
+        final ConnectPoint ingress = pointToPointIntent.filteredIngressPoint().connectPoint();
         final ConnectPointJsonMatcher ingressMatcher =
                 ConnectPointJsonMatcher.matchesConnectPoint(ingress);
         final JsonNode jsonIngress = jsonIntent.get("ingressPoint");
@@ -111,7 +111,7 @@
         }
 
         // check egress connection
-        final ConnectPoint egress = pointToPointIntent.egressPoint();
+        final ConnectPoint egress = pointToPointIntent.filteredEgressPoint().connectPoint();
         final ConnectPointJsonMatcher egressMatcher =
                 ConnectPointJsonMatcher.matchesConnectPoint(egress);
         final JsonNode jsonEgress = jsonIntent.get("egressPoint");