Return intent collection with details
Added backwards compatible flag to GET /intents/ to return full intent JSON.
Added GET /intents/application/{appId} to return application specifc intents.
Extended IntentService to include getIntentsByAppId(appId).
Removed hard-coded intent codec lookup in IntentWebResource.
Change-Id: I38e7b1dbd7669e654afe723f6ec3a4eb7a9af6fb
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 595e7e3..745d7f4 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
@@ -17,6 +17,7 @@
import com.google.common.annotations.Beta;
+import org.onosproject.core.ApplicationId;
import org.onosproject.event.ListenerService;
import java.util.List;
@@ -72,6 +73,14 @@
Iterable<Intent> getIntents();
/**
+ * Returns an iterable of all intents with this application ID.
+ *
+ * @param id the application ID to look up
+ * @return collection of intents
+ */
+ Iterable<Intent> getIntentsByAppId(ApplicationId id);
+
+ /**
* Adds an intent data object to the pending map for processing.
* <p>
* This method is intended to only be called by core components, not