Added getter needed for a usage in onos-app-samples

Change-Id: Idd5b2102d96a6a526bd08eb12de6edc64efcb443
diff --git a/incubator/api/src/main/java/org/onosproject/incubator/net/domain/DomainEdge.java b/incubator/api/src/main/java/org/onosproject/incubator/net/domain/DomainEdge.java
index d13955a..4a42a74 100644
--- a/incubator/api/src/main/java/org/onosproject/incubator/net/domain/DomainEdge.java
+++ b/incubator/api/src/main/java/org/onosproject/incubator/net/domain/DomainEdge.java
@@ -29,6 +29,7 @@
  */
 @Beta
 public class DomainEdge extends AbstractEdge<DomainVertex> {
+
     ConnectPoint connectPoint;
 
     public DomainEdge(DomainVertex src, DomainVertex dst, ConnectPoint connectPoint) {
@@ -62,4 +63,13 @@
                 .add("connectPoint", connectPoint)
                 .toString();
     }
+
+    /**
+     * Returns the connect point associated with the domain edge.
+     *
+     * @return this edges connect point
+     */
+    public ConnectPoint connectPoint() {
+        return connectPoint;
+    }
 }
diff --git a/incubator/api/src/main/java/org/onosproject/incubator/net/domain/DomainVertex.java b/incubator/api/src/main/java/org/onosproject/incubator/net/domain/DomainVertex.java
index 0fdf25a..7d11a76 100644
--- a/incubator/api/src/main/java/org/onosproject/incubator/net/domain/DomainVertex.java
+++ b/incubator/api/src/main/java/org/onosproject/incubator/net/domain/DomainVertex.java
@@ -33,6 +33,7 @@
     // A domain vertex is either an intent domain or a device:
     private final IntentDomainId domainId;
     // ----- or -----
+
     private final DeviceId deviceId;
 
     // Serialization constructor
@@ -66,4 +67,22 @@
                     .toString();
         }
     }
+
+    /**
+     * Returns the device ID of this vertex if it is a device, returns null if it is a domain.
+     *
+     * @return the device ID of this vertex if applicable, else null
+     */
+    public DeviceId deviceId() {
+        return deviceId;
+    }
+
+    /**
+     * Returns the domain ID of this vertex if it is a domain, returns null if it is a device.
+     *
+     * @return the domain ID of this vertex if applicable, else null
+     */
+    public IntentDomainId domainId() {
+        return domainId;
+    }
 }
diff --git a/incubator/api/src/main/java/org/onosproject/incubator/net/domain/IntentPrimitive.java b/incubator/api/src/main/java/org/onosproject/incubator/net/domain/IntentPrimitive.java
index 7cfd14b..ad3081a 100644
--- a/incubator/api/src/main/java/org/onosproject/incubator/net/domain/IntentPrimitive.java
+++ b/incubator/api/src/main/java/org/onosproject/incubator/net/domain/IntentPrimitive.java
@@ -29,4 +29,13 @@
     public IntentPrimitive(ApplicationId appId) {
         this.appId = appId;
     }
-}
+
+    /**
+     * The getter for the application ID associated with the intent primitive upon creation.
+     *
+     * @return the application ID associated with the intent primitive
+     */
+    public ApplicationId appId() {
+        return appId;
+    }
+}
\ No newline at end of file
diff --git a/incubator/api/src/main/java/org/onosproject/incubator/net/domain/IntentResource.java b/incubator/api/src/main/java/org/onosproject/incubator/net/domain/IntentResource.java
index 6902483..9cd9aac 100644
--- a/incubator/api/src/main/java/org/onosproject/incubator/net/domain/IntentResource.java
+++ b/incubator/api/src/main/java/org/onosproject/incubator/net/domain/IntentResource.java
@@ -25,23 +25,44 @@
 
     private final IntentPrimitive primitive;
     private final long tunnelId;
+    private final IntentDomainId domainId;
 
     // TODO add other common fields
     //String ingressTag;
     //String egressTag;
     //etc.
 
-    public IntentResource(IntentPrimitive primitive, long tunnelId) {
+    public IntentResource(IntentPrimitive primitive, long tunnelId, IntentDomainId domainId) {
         this.primitive = primitive;
         this.tunnelId = tunnelId;
+        this.domainId = domainId;
     }
 
+    /**
+     * Returns the intent primitive associated with this resource as creation.
+     *
+     * @return this resource's intent primitive
+     */
     public IntentPrimitive primitive() {
         return primitive;
     }
 
+    /**
+     * Returns the tunnel ID associated with this resource as creation.
+     *
+     * @return this resource's tunnel ID
+     */
     public long tunnelId() {
         return tunnelId;
     }
 
+    /**
+     * Returns the domain ID associated with this resource as creation.
+     *
+     * @return this resource's domain ID
+     */
+    public IntentDomainId domainId() {
+        return domainId;
+    }
+
 }
diff --git a/incubator/api/src/main/java/org/onosproject/incubator/net/domain/RequestContext.java b/incubator/api/src/main/java/org/onosproject/incubator/net/domain/RequestContext.java
index 90593dd..338c840 100644
--- a/incubator/api/src/main/java/org/onosproject/incubator/net/domain/RequestContext.java
+++ b/incubator/api/src/main/java/org/onosproject/incubator/net/domain/RequestContext.java
@@ -16,6 +16,7 @@
 package org.onosproject.incubator.net.domain;
 
 import com.google.common.annotations.Beta;
+import org.onosproject.net.Path;
 
 /**
  * Context for intent primitive requests to an intent domain provider. A context
@@ -29,12 +30,14 @@
 public class RequestContext {
     private final IntentDomain domain;
     private final IntentResource resource;
+    private final Path path;
     //TODO other common parameters:
     //String cost;
 
-    public RequestContext(IntentDomain domain, IntentResource resource) {
+    public RequestContext(IntentDomain domain, IntentResource resource, Path path) {
         this.domain = domain;
         this.resource = resource;
+        this.path = path;
     }
 
     public IntentDomain domain() {
@@ -44,4 +47,8 @@
     public IntentResource resource() {
         return resource;
     }
+
+    public Path path() {
+        return path;
+    }
 }
diff --git a/incubator/api/src/main/java/org/onosproject/incubator/net/domain/TunnelPrimitive.java b/incubator/api/src/main/java/org/onosproject/incubator/net/domain/TunnelPrimitive.java
index c624e92..975708d 100644
--- a/incubator/api/src/main/java/org/onosproject/incubator/net/domain/TunnelPrimitive.java
+++ b/incubator/api/src/main/java/org/onosproject/incubator/net/domain/TunnelPrimitive.java
@@ -31,4 +31,21 @@
         this.one = one;
         this.two = two;
     }
+
+    /**
+     * The getter for the first connection point associated with a tunnel.
+     *
+     * @return the first connection point
+     */
+    public ConnectPoint one() {
+        return one;
+    }
+
+    /**
+     * The getter for the second connection point associated with a tunnel.
+     * @return the second connection point
+     */
+    public ConnectPoint two() {
+        return two;
+    }
 }