ONOS-1479 -- GUI - augmenting topology view for extensibility:
- Added id field to property panel, as well as overloaded constructors.
- Added modify*Details() methods to UiTopoOverlay.
- Cleaned up use of string constants.
- Reworked RequestDetails in Topo view msg handler (and base).
- Fixed bug in topo UI where selected host title click caused exception on server.
Change-Id: Ib2a3cf60fae8ad8cda77a3b6933ee758262e6f3c
diff --git a/web/gui/src/main/java/org/onosproject/ui/impl/TopoOverlayCache.java b/web/gui/src/main/java/org/onosproject/ui/impl/TopoOverlayCache.java
index 3d6d900..f7690e8 100644
--- a/web/gui/src/main/java/org/onosproject/ui/impl/TopoOverlayCache.java
+++ b/web/gui/src/main/java/org/onosproject/ui/impl/TopoOverlayCache.java
@@ -74,12 +74,20 @@
return isNullOrEmpty(id) ? NONE : overlays.get(id);
}
+ /**
+ * Returns the current overlay instance.
+ * Note that this method always returns a reference; when there is no
+ * overlay selected the "NULL" overlay instance is returned.
+ *
+ * @return the current overlay
+ */
public UiTopoOverlay currentOverlay() {
return current;
}
/**
- * Returns the number of overlays in the cache.
+ * Returns the number of overlays in the cache. Remember that this
+ * includes the "NULL" overlay, representing "no overlay selected".
*
* @return number of overlays
*/
@@ -88,16 +96,13 @@
}
-
+ // overlay instance representing "no overlay selected"
private static class NullOverlay extends UiTopoOverlay {
public NullOverlay() {
super(null);
}
- @Override
- public void init() {
- }
-
+ // override activate and deactivate, so no log messages are written
@Override
public void activate() {
}
@@ -105,9 +110,5 @@
@Override
public void deactivate() {
}
-
- @Override
- public void destroy() {
- }
}
}