[ONOS-6446] ObjectiveTrackerService is not a public service
If an application want to create custom Intent installer, it might need
ObjectiveTrackerService.
However, the ObjectiveTrackerService is not public api (in /core/net,
should be /core/api); so application outside the ONOS can't use it.
Move ObjectiveTrackerService and it's dependence to /code/api
Change-Id: Ie2ad8dd9d39ccae1c91f4b57887089e0aec83ede
diff --git a/core/net/src/main/java/org/onosproject/net/intent/impl/ObjectiveTrackerService.java b/core/api/src/main/java/org/onosproject/net/intent/ObjectiveTrackerService.java
similarity index 93%
rename from core/net/src/main/java/org/onosproject/net/intent/impl/ObjectiveTrackerService.java
rename to core/api/src/main/java/org/onosproject/net/intent/ObjectiveTrackerService.java
index 51cdc4f..78a28eb 100644
--- a/core/net/src/main/java/org/onosproject/net/intent/impl/ObjectiveTrackerService.java
+++ b/core/api/src/main/java/org/onosproject/net/intent/ObjectiveTrackerService.java
@@ -13,11 +13,9 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.onosproject.net.intent.impl;
+package org.onosproject.net.intent;
import org.onosproject.net.NetworkResource;
-import org.onosproject.net.intent.IntentData;
-import org.onosproject.net.intent.Key;
import java.util.Collection;
diff --git a/core/net/src/main/java/org/onosproject/net/intent/impl/TopologyChangeDelegate.java b/core/api/src/main/java/org/onosproject/net/intent/TopologyChangeDelegate.java
similarity index 93%
rename from core/net/src/main/java/org/onosproject/net/intent/impl/TopologyChangeDelegate.java
rename to core/api/src/main/java/org/onosproject/net/intent/TopologyChangeDelegate.java
index ba5fc05..1836347 100644
--- a/core/net/src/main/java/org/onosproject/net/intent/impl/TopologyChangeDelegate.java
+++ b/core/api/src/main/java/org/onosproject/net/intent/TopologyChangeDelegate.java
@@ -13,9 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.onosproject.net.intent.impl;
-
-import org.onosproject.net.intent.Key;
+package org.onosproject.net.intent;
/**
* Auxiliary delegate for integration of intent manager and flow trackerService.
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 f94ad8c..7b09a1a 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
@@ -50,7 +50,9 @@
import org.onosproject.net.intent.IntentStore;
import org.onosproject.net.intent.IntentStoreDelegate;
import org.onosproject.net.intent.Key;
+import org.onosproject.net.intent.ObjectiveTrackerService;
import org.onosproject.net.intent.PointToPointIntent;
+import org.onosproject.net.intent.TopologyChangeDelegate;
import org.onosproject.net.intent.impl.compiler.PointToPointIntentCompiler;
import org.onosproject.net.intent.impl.phase.FinalIntentProcessPhase;
import org.onosproject.net.intent.impl.phase.IntentProcessPhase;
diff --git a/core/net/src/main/java/org/onosproject/net/intent/impl/ObjectiveTracker.java b/core/net/src/main/java/org/onosproject/net/intent/impl/ObjectiveTracker.java
index b11bb0e..4a03009 100644
--- a/core/net/src/main/java/org/onosproject/net/intent/impl/ObjectiveTracker.java
+++ b/core/net/src/main/java/org/onosproject/net/intent/impl/ObjectiveTracker.java
@@ -43,6 +43,8 @@
import org.onosproject.net.intent.IntentData;
import org.onosproject.net.intent.IntentService;
import org.onosproject.net.intent.Key;
+import org.onosproject.net.intent.ObjectiveTrackerService;
+import org.onosproject.net.intent.TopologyChangeDelegate;
import org.onosproject.net.intent.WorkPartitionEvent;
import org.onosproject.net.intent.WorkPartitionEventListener;
import org.onosproject.net.intent.WorkPartitionService;
diff --git a/core/net/src/main/java/org/onosproject/net/intent/impl/installer/DomainIntentInstaller.java b/core/net/src/main/java/org/onosproject/net/intent/impl/installer/DomainIntentInstaller.java
index a713034..fe36853 100644
--- a/core/net/src/main/java/org/onosproject/net/intent/impl/installer/DomainIntentInstaller.java
+++ b/core/net/src/main/java/org/onosproject/net/intent/impl/installer/DomainIntentInstaller.java
@@ -31,7 +31,7 @@
import org.onosproject.net.intent.IntentInstaller;
import org.onosproject.net.intent.IntentOperationContext;
import org.onosproject.net.intent.impl.IntentManager;
-import org.onosproject.net.intent.impl.ObjectiveTrackerService;
+import org.onosproject.net.intent.ObjectiveTrackerService;
import org.slf4j.Logger;
import java.util.List;
diff --git a/core/net/src/main/java/org/onosproject/net/intent/impl/installer/FlowObjectiveIntentInstaller.java b/core/net/src/main/java/org/onosproject/net/intent/impl/installer/FlowObjectiveIntentInstaller.java
index 22ff970..a237b8e 100644
--- a/core/net/src/main/java/org/onosproject/net/intent/impl/installer/FlowObjectiveIntentInstaller.java
+++ b/core/net/src/main/java/org/onosproject/net/intent/impl/installer/FlowObjectiveIntentInstaller.java
@@ -39,7 +39,7 @@
import org.onosproject.net.intent.IntentOperationContext;
import org.onosproject.net.intent.IntentInstaller;
import org.onosproject.net.intent.impl.IntentManager;
-import org.onosproject.net.intent.impl.ObjectiveTrackerService;
+import org.onosproject.net.intent.ObjectiveTrackerService;
import org.slf4j.Logger;
import java.util.Collection;
diff --git a/core/net/src/main/java/org/onosproject/net/intent/impl/installer/FlowRuleIntentInstaller.java b/core/net/src/main/java/org/onosproject/net/intent/impl/installer/FlowRuleIntentInstaller.java
index df2c28c..e736e01 100644
--- a/core/net/src/main/java/org/onosproject/net/intent/impl/installer/FlowRuleIntentInstaller.java
+++ b/core/net/src/main/java/org/onosproject/net/intent/impl/installer/FlowRuleIntentInstaller.java
@@ -33,7 +33,7 @@
import org.onosproject.net.intent.IntentOperationContext;
import org.onosproject.net.intent.IntentInstaller;
import org.onosproject.net.intent.impl.IntentManager;
-import org.onosproject.net.intent.impl.ObjectiveTrackerService;
+import org.onosproject.net.intent.ObjectiveTrackerService;
import org.slf4j.Logger;
import java.util.Collection;
diff --git a/core/net/src/main/java/org/onosproject/net/intent/impl/installer/ProtectionEndpointIntentInstaller.java b/core/net/src/main/java/org/onosproject/net/intent/impl/installer/ProtectionEndpointIntentInstaller.java
index 58c24e6..c2fde34 100644
--- a/core/net/src/main/java/org/onosproject/net/intent/impl/installer/ProtectionEndpointIntentInstaller.java
+++ b/core/net/src/main/java/org/onosproject/net/intent/impl/installer/ProtectionEndpointIntentInstaller.java
@@ -38,7 +38,7 @@
import org.onosproject.net.intent.IntentInstaller;
import org.onosproject.net.intent.ProtectionEndpointIntent;
import org.onosproject.net.intent.impl.IntentManager;
-import org.onosproject.net.intent.impl.ObjectiveTrackerService;
+import org.onosproject.net.intent.ObjectiveTrackerService;
import org.slf4j.Logger;
import java.util.ArrayList;
diff --git a/core/net/src/test/java/org/onosproject/net/intent/impl/IntentManagerTest.java b/core/net/src/test/java/org/onosproject/net/intent/impl/IntentManagerTest.java
index 45c90e7..b015f24 100644
--- a/core/net/src/test/java/org/onosproject/net/intent/impl/IntentManagerTest.java
+++ b/core/net/src/test/java/org/onosproject/net/intent/impl/IntentManagerTest.java
@@ -52,6 +52,8 @@
import org.onosproject.net.intent.IntentService;
import org.onosproject.net.intent.IntentState;
import org.onosproject.net.intent.Key;
+import org.onosproject.net.intent.ObjectiveTrackerService;
+import org.onosproject.net.intent.TopologyChangeDelegate;
import org.onosproject.store.trivial.SimpleIntentStore;
import java.util.Collection;
diff --git a/core/net/src/test/java/org/onosproject/net/intent/impl/ObjectiveTrackerTest.java b/core/net/src/test/java/org/onosproject/net/intent/impl/ObjectiveTrackerTest.java
index bd12884..73414ce 100644
--- a/core/net/src/test/java/org/onosproject/net/intent/impl/ObjectiveTrackerTest.java
+++ b/core/net/src/test/java/org/onosproject/net/intent/impl/ObjectiveTrackerTest.java
@@ -32,6 +32,7 @@
import org.onosproject.net.device.DeviceListener;
import org.onosproject.net.intent.AbstractIntentTest;
import org.onosproject.net.intent.Key;
+import org.onosproject.net.intent.TopologyChangeDelegate;
import org.onosproject.net.link.LinkEvent;
import org.onosproject.net.resource.ResourceEvent;
import org.onosproject.net.resource.ResourceListener;
diff --git a/core/net/src/test/java/org/onosproject/net/intent/impl/installer/AbstractIntentInstallerTest.java b/core/net/src/test/java/org/onosproject/net/intent/impl/installer/AbstractIntentInstallerTest.java
index a7725bd..b9969d5 100644
--- a/core/net/src/test/java/org/onosproject/net/intent/impl/installer/AbstractIntentInstallerTest.java
+++ b/core/net/src/test/java/org/onosproject/net/intent/impl/installer/AbstractIntentInstallerTest.java
@@ -31,7 +31,7 @@
import org.onosproject.net.intent.IntentOperationContext;
import org.onosproject.net.intent.Key;
import org.onosproject.net.intent.PointToPointIntent;
-import org.onosproject.net.intent.impl.ObjectiveTrackerService;
+import org.onosproject.net.intent.ObjectiveTrackerService;
import static org.easymock.EasyMock.createMock;