Add priority to Intents

Change-Id: Ibe63356f5b15a6aa6ca7731dba3382c3317a95ec
diff --git a/core/api/src/main/java/org/onosproject/net/intent/LinkCollectionIntent.java b/core/api/src/main/java/org/onosproject/net/intent/LinkCollectionIntent.java
index 55c0cfb..17451cb 100644
--- a/core/api/src/main/java/org/onosproject/net/intent/LinkCollectionIntent.java
+++ b/core/api/src/main/java/org/onosproject/net/intent/LinkCollectionIntent.java
@@ -59,7 +59,7 @@
                                 ConnectPoint ingressPoint,
                                 ConnectPoint egressPoint) {
         this(appId, selector, treatment, links, ingressPoint, egressPoint,
-             Collections.emptyList());
+             Collections.emptyList(), DEFAULT_INTENT_PRIORITY);
     }
 
     /**
@@ -74,6 +74,7 @@
      * @param ingressPoint ingress point
      * @param egressPoint egress point
      * @param constraints optional list of constraints
+     * @param priority    priority to use for the flows generated by this intent
      * @throws NullPointerException {@code path} is null
      */
     public LinkCollectionIntent(ApplicationId appId,
@@ -82,8 +83,9 @@
                                 Set<Link> links,
                                 ConnectPoint ingressPoint,
                                 ConnectPoint egressPoint,
-                                List<Constraint> constraints) {
-        super(appId, resources(links), selector, treatment, constraints);
+                                List<Constraint> constraints,
+                                int priority) {
+        super(appId, resources(links), selector, treatment, constraints, priority);
         this.links = links;
         this.ingressPoints = ImmutableSet.of(ingressPoint);
         this.egressPoints = ImmutableSet.of(egressPoint);
@@ -101,6 +103,7 @@
      * @param ingressPoints Set of ingress points
      * @param egressPoints Set of egress points
      * @param constraints  the constraints
+     * @param priority     priority to use for the flows generated by this intent
      * @throws NullPointerException {@code path} is null
      */
     public LinkCollectionIntent(ApplicationId appId,
@@ -109,8 +112,9 @@
                                 Set<Link> links,
                                 Set<ConnectPoint> ingressPoints,
                                 Set<ConnectPoint> egressPoints,
-                                List<Constraint> constraints) {
-        super(appId, resources(links), selector, treatment, constraints);
+                                List<Constraint> constraints,
+                                int priority) {
+        super(appId, resources(links), selector, treatment, constraints, priority);
 
         this.links = links;
         this.ingressPoints = ImmutableSet.copyOf(ingressPoints);
@@ -166,6 +170,7 @@
                 .add("id", id())
                 .add("key", key())
                 .add("appId", appId())
+                .add("priority", priority())
                 .add("resources", resources())
                 .add("selector", selector())
                 .add("treatment", treatment())