Added endPortA/B to UiLink class.
Removed 'online' property from UiDevice, choosing to look up availability on the fly from device service.

Change-Id: Ib14ab371a11c442a30cf407f11d366271d087c68
diff --git a/core/api/src/main/java/org/onosproject/ui/model/topo/UiDevice.java b/core/api/src/main/java/org/onosproject/ui/model/topo/UiDevice.java
index c029c2b..c05d27b 100644
--- a/core/api/src/main/java/org/onosproject/ui/model/topo/UiDevice.java
+++ b/core/api/src/main/java/org/onosproject/ui/model/topo/UiDevice.java
@@ -32,7 +32,6 @@
 
     private RegionId regionId;
     private NodeId masterId;
-    private boolean online;
 
     /**
      * Creates a new UI device.
@@ -63,15 +62,6 @@
         this.masterId = masterId;
     }
 
-    /**
-     * Sets a flag indicating whether the backing device is online.
-     *
-     * @param online boolen flag
-     */
-    public void setOnline(boolean online) {
-        this.online = online;
-    }
-
     @Override
     public String toString() {
         return MoreObjects.toStringHelper(this)
@@ -136,15 +126,6 @@
     }
 
     /**
-     * Returns a boolean indicating whether the backing device is online.
-     *
-     * @return true if device is online, false otherwise
-     */
-    public boolean isOnline() {
-        return online;
-    }
-
-    /**
      * Returns the identifier for the cluster member that has
      * mastership over this device.
      *
diff --git a/core/api/src/main/java/org/onosproject/ui/model/topo/UiDeviceLink.java b/core/api/src/main/java/org/onosproject/ui/model/topo/UiDeviceLink.java
index 4575678..3eaa827 100644
--- a/core/api/src/main/java/org/onosproject/ui/model/topo/UiDeviceLink.java
+++ b/core/api/src/main/java/org/onosproject/ui/model/topo/UiDeviceLink.java
@@ -59,6 +59,16 @@
         return deviceB + UiLinkId.ID_PORT_DELIMITER + portB;
     }
 
+    @Override
+    public String endPortA() {
+        return portA.toString();
+    }
+
+    @Override
+    public String endPortB() {
+        return portB.toString();
+    }
+
 
     @Override
     protected void destroy() {
diff --git a/core/api/src/main/java/org/onosproject/ui/model/topo/UiEdgeLink.java b/core/api/src/main/java/org/onosproject/ui/model/topo/UiEdgeLink.java
index 909ef1a..f52fbcb 100644
--- a/core/api/src/main/java/org/onosproject/ui/model/topo/UiEdgeLink.java
+++ b/core/api/src/main/java/org/onosproject/ui/model/topo/UiEdgeLink.java
@@ -53,6 +53,13 @@
         return edgeDevice + UiLinkId.ID_PORT_DELIMITER + edgePort;
     }
 
+    // no port for end-point A
+
+    @Override
+    public String endPortB() {
+        return edgePort.toString();
+    }
+
     @Override
     protected void destroy() {
         edgeDevice = null;
diff --git a/core/api/src/main/java/org/onosproject/ui/model/topo/UiLink.java b/core/api/src/main/java/org/onosproject/ui/model/topo/UiLink.java
index 0f65e9f..76ed5ff 100644
--- a/core/api/src/main/java/org/onosproject/ui/model/topo/UiLink.java
+++ b/core/api/src/main/java/org/onosproject/ui/model/topo/UiLink.java
@@ -96,4 +96,28 @@
      * @return end point B identifier
      */
     public abstract String endPointB();
+
+    /**
+     * Returns the port number (as a string) for end-point A, if applicable.
+     * This default implementation returns null, indicating not-applicable.
+     * Subclasses only need to override this method if end-point A has an
+     * associated port.
+     *
+     * @return port number for end-point A
+     */
+    public String endPortA() {
+        return null;
+    }
+
+    /**
+     * Returns the port number (as a string) for end-point B, if applicable.
+     * This default implementation returns null, indicating not-applicable.
+     * Subclasses only need to override this method if end-point B has an
+     * associated port.
+     *
+     * @return port number for end-point B
+     */
+    public String endPortB() {
+        return null;
+    }
 }
diff --git a/core/api/src/main/java/org/onosproject/ui/model/topo/UiRegionDeviceLink.java b/core/api/src/main/java/org/onosproject/ui/model/topo/UiRegionDeviceLink.java
index f749473..e907fbc 100644
--- a/core/api/src/main/java/org/onosproject/ui/model/topo/UiRegionDeviceLink.java
+++ b/core/api/src/main/java/org/onosproject/ui/model/topo/UiRegionDeviceLink.java
@@ -63,6 +63,13 @@
         return device + UiLinkId.ID_PORT_DELIMITER + port;
     }
 
+    // no port for end-point A
+
+    @Override
+    public String endPortB() {
+        return port.toString();
+    }
+
     /**
      * Returns the identity of the region.
      *
diff --git a/core/api/src/main/java/org/onosproject/ui/model/topo/UiRegionLink.java b/core/api/src/main/java/org/onosproject/ui/model/topo/UiRegionLink.java
index 7c3456c..45a27b9 100644
--- a/core/api/src/main/java/org/onosproject/ui/model/topo/UiRegionLink.java
+++ b/core/api/src/main/java/org/onosproject/ui/model/topo/UiRegionLink.java
@@ -58,6 +58,8 @@
         return regionB.id();
     }
 
+    // no ports for end-points A and B
+
     /**
      * Returns the identity of the first region.
      *