Simon Hunt | 5f6dbf8 | 2016-03-30 08:53:33 -0700 | [diff] [blame] | 1 | /* |
Brian O'Connor | 5ab426f | 2016-04-09 01:19:45 -0700 | [diff] [blame] | 2 | * Copyright 2016-present Open Networking Laboratory |
Simon Hunt | 5f6dbf8 | 2016-03-30 08:53:33 -0700 | [diff] [blame] | 3 | * |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
| 7 | * |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | * |
| 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | * See the License for the specific language governing permissions and |
| 14 | * limitations under the License. |
| 15 | */ |
| 16 | |
| 17 | package org.onosproject.ui.model.topo; |
| 18 | |
Simon Hunt | 338a3b4 | 2016-04-14 09:43:52 -0700 | [diff] [blame] | 19 | import org.onosproject.cluster.NodeId; |
Simon Hunt | c0f20c1 | 2016-05-09 09:30:20 -0700 | [diff] [blame] | 20 | import org.onosproject.net.DeviceId; |
| 21 | import org.onosproject.net.HostId; |
| 22 | import org.onosproject.net.region.RegionId; |
Simon Hunt | 23fb135 | 2016-04-11 12:15:19 -0700 | [diff] [blame] | 23 | import org.slf4j.Logger; |
| 24 | import org.slf4j.LoggerFactory; |
| 25 | |
Simon Hunt | d5b9673 | 2016-07-08 13:22:27 -0700 | [diff] [blame] | 26 | import java.util.ArrayList; |
| 27 | import java.util.Collections; |
| 28 | import java.util.Comparator; |
Simon Hunt | c0f20c1 | 2016-05-09 09:30:20 -0700 | [diff] [blame] | 29 | import java.util.HashMap; |
| 30 | import java.util.HashSet; |
Simon Hunt | d5b9673 | 2016-07-08 13:22:27 -0700 | [diff] [blame] | 31 | import java.util.List; |
Simon Hunt | c0f20c1 | 2016-05-09 09:30:20 -0700 | [diff] [blame] | 32 | import java.util.Map; |
Simon Hunt | 23fb135 | 2016-04-11 12:15:19 -0700 | [diff] [blame] | 33 | import java.util.Set; |
Simon Hunt | c0f20c1 | 2016-05-09 09:30:20 -0700 | [diff] [blame] | 34 | |
| 35 | import static com.google.common.base.MoreObjects.toStringHelper; |
Simon Hunt | 23fb135 | 2016-04-11 12:15:19 -0700 | [diff] [blame] | 36 | |
Simon Hunt | 5f6dbf8 | 2016-03-30 08:53:33 -0700 | [diff] [blame] | 37 | /** |
| 38 | * Represents the overall network topology. |
| 39 | */ |
Simon Hunt | cda9c03 | 2016-04-11 10:32:54 -0700 | [diff] [blame] | 40 | public class UiTopology extends UiElement { |
Simon Hunt | 23fb135 | 2016-04-11 12:15:19 -0700 | [diff] [blame] | 41 | |
Simon Hunt | 58a0dd0 | 2016-05-17 11:54:23 -0700 | [diff] [blame] | 42 | private static final String INDENT_1 = " "; |
| 43 | private static final String INDENT_2 = " "; |
| 44 | private static final String EOL = String.format("%n"); |
| 45 | |
Simon Hunt | c0f20c1 | 2016-05-09 09:30:20 -0700 | [diff] [blame] | 46 | private static final String E_UNMAPPED = |
| 47 | "Attempting to retrieve unmapped {}: {}"; |
| 48 | |
Simon Hunt | 642bc45 | 2016-05-04 19:34:45 -0700 | [diff] [blame] | 49 | private static final String DEFAULT_TOPOLOGY_ID = "TOPOLOGY-0"; |
| 50 | |
Simon Hunt | 23fb135 | 2016-04-11 12:15:19 -0700 | [diff] [blame] | 51 | private static final Logger log = LoggerFactory.getLogger(UiTopology.class); |
| 52 | |
Simon Hunt | d5b9673 | 2016-07-08 13:22:27 -0700 | [diff] [blame] | 53 | private static final Comparator<UiClusterMember> CLUSTER_MEMBER_COMPARATOR = |
| 54 | (o1, o2) -> o1.idAsString().compareTo(o2.idAsString()); |
| 55 | |
Simon Hunt | c0f20c1 | 2016-05-09 09:30:20 -0700 | [diff] [blame] | 56 | |
| 57 | // top level mappings of topology elements by ID |
| 58 | private final Map<NodeId, UiClusterMember> cnodeLookup = new HashMap<>(); |
| 59 | private final Map<RegionId, UiRegion> regionLookup = new HashMap<>(); |
| 60 | private final Map<DeviceId, UiDevice> deviceLookup = new HashMap<>(); |
| 61 | private final Map<HostId, UiHost> hostLookup = new HashMap<>(); |
| 62 | private final Map<UiLinkId, UiLink> linkLookup = new HashMap<>(); |
| 63 | |
Simon Hunt | b1ce260 | 2016-07-23 14:04:31 -0700 | [diff] [blame] | 64 | // a container for devices, hosts, etc. belonging to no region |
| 65 | private final UiRegion nullRegion = new UiRegion(this, null); |
| 66 | |
Simon Hunt | 23fb135 | 2016-04-11 12:15:19 -0700 | [diff] [blame] | 67 | |
Simon Hunt | 338a3b4 | 2016-04-14 09:43:52 -0700 | [diff] [blame] | 68 | @Override |
| 69 | public String toString() { |
Simon Hunt | c0f20c1 | 2016-05-09 09:30:20 -0700 | [diff] [blame] | 70 | return toStringHelper(this) |
| 71 | .add("#cnodes", clusterMemberCount()) |
| 72 | .add("#regions", regionCount()) |
| 73 | .add("#devices", deviceLookup.size()) |
| 74 | .add("#hosts", hostLookup.size()) |
| 75 | .add("#links", linkLookup.size()) |
| 76 | .toString(); |
| 77 | } |
| 78 | |
| 79 | @Override |
| 80 | public String idAsString() { |
| 81 | return DEFAULT_TOPOLOGY_ID; |
Simon Hunt | 338a3b4 | 2016-04-14 09:43:52 -0700 | [diff] [blame] | 82 | } |
| 83 | |
Simon Hunt | 23fb135 | 2016-04-11 12:15:19 -0700 | [diff] [blame] | 84 | /** |
| 85 | * Clears the topology state; that is, drops all regions, devices, hosts, |
| 86 | * links, and cluster members. |
| 87 | */ |
| 88 | public void clear() { |
| 89 | log.debug("clearing topology model"); |
Simon Hunt | c0f20c1 | 2016-05-09 09:30:20 -0700 | [diff] [blame] | 90 | cnodeLookup.clear(); |
| 91 | regionLookup.clear(); |
| 92 | deviceLookup.clear(); |
| 93 | hostLookup.clear(); |
| 94 | linkLookup.clear(); |
Simon Hunt | b1ce260 | 2016-07-23 14:04:31 -0700 | [diff] [blame] | 95 | |
| 96 | nullRegion.destroy(); |
Simon Hunt | 23fb135 | 2016-04-11 12:15:19 -0700 | [diff] [blame] | 97 | } |
Simon Hunt | 338a3b4 | 2016-04-14 09:43:52 -0700 | [diff] [blame] | 98 | |
Simon Hunt | d5b9673 | 2016-07-08 13:22:27 -0700 | [diff] [blame] | 99 | |
| 100 | /** |
| 101 | * Returns all the cluster members, sorted by their ID. |
| 102 | * |
| 103 | * @return all cluster members |
| 104 | */ |
| 105 | public List<UiClusterMember> allClusterMembers() { |
| 106 | List<UiClusterMember> members = new ArrayList<>(cnodeLookup.values()); |
| 107 | Collections.sort(members, CLUSTER_MEMBER_COMPARATOR); |
| 108 | return members; |
| 109 | } |
| 110 | |
Simon Hunt | 338a3b4 | 2016-04-14 09:43:52 -0700 | [diff] [blame] | 111 | /** |
| 112 | * Returns the cluster member with the given identifier, or null if no |
Simon Hunt | c0f20c1 | 2016-05-09 09:30:20 -0700 | [diff] [blame] | 113 | * such member exists. |
Simon Hunt | 338a3b4 | 2016-04-14 09:43:52 -0700 | [diff] [blame] | 114 | * |
| 115 | * @param id cluster node identifier |
Simon Hunt | c0f20c1 | 2016-05-09 09:30:20 -0700 | [diff] [blame] | 116 | * @return corresponding UI cluster member |
Simon Hunt | 338a3b4 | 2016-04-14 09:43:52 -0700 | [diff] [blame] | 117 | */ |
| 118 | public UiClusterMember findClusterMember(NodeId id) { |
Simon Hunt | c0f20c1 | 2016-05-09 09:30:20 -0700 | [diff] [blame] | 119 | return cnodeLookup.get(id); |
Simon Hunt | 338a3b4 | 2016-04-14 09:43:52 -0700 | [diff] [blame] | 120 | } |
| 121 | |
| 122 | /** |
| 123 | * Adds the given cluster member to the topology model. |
| 124 | * |
| 125 | * @param member cluster member to add |
| 126 | */ |
| 127 | public void add(UiClusterMember member) { |
Simon Hunt | c0f20c1 | 2016-05-09 09:30:20 -0700 | [diff] [blame] | 128 | cnodeLookup.put(member.id(), member); |
Simon Hunt | 338a3b4 | 2016-04-14 09:43:52 -0700 | [diff] [blame] | 129 | } |
| 130 | |
| 131 | /** |
Simon Hunt | 642bc45 | 2016-05-04 19:34:45 -0700 | [diff] [blame] | 132 | * Removes the given cluster member from the topology model. |
| 133 | * |
| 134 | * @param member cluster member to remove |
| 135 | */ |
| 136 | public void remove(UiClusterMember member) { |
Simon Hunt | c0f20c1 | 2016-05-09 09:30:20 -0700 | [diff] [blame] | 137 | UiClusterMember m = cnodeLookup.remove(member.id()); |
| 138 | if (m != null) { |
| 139 | m.destroy(); |
| 140 | } |
Simon Hunt | 642bc45 | 2016-05-04 19:34:45 -0700 | [diff] [blame] | 141 | } |
| 142 | |
| 143 | /** |
Simon Hunt | 338a3b4 | 2016-04-14 09:43:52 -0700 | [diff] [blame] | 144 | * Returns the number of members in the cluster. |
| 145 | * |
| 146 | * @return number of cluster members |
| 147 | */ |
| 148 | public int clusterMemberCount() { |
Simon Hunt | c0f20c1 | 2016-05-09 09:30:20 -0700 | [diff] [blame] | 149 | return cnodeLookup.size(); |
| 150 | } |
| 151 | |
Simon Hunt | 10973dd | 2016-08-01 15:50:35 -0700 | [diff] [blame] | 152 | |
| 153 | /** |
Simon Hunt | 4f4ffc3 | 2016-08-03 18:30:47 -0700 | [diff] [blame] | 154 | * Returns all regions in the model (except the |
| 155 | * {@link #nullRegion() null region}). |
Simon Hunt | 10973dd | 2016-08-01 15:50:35 -0700 | [diff] [blame] | 156 | * |
| 157 | * @return all regions |
| 158 | */ |
| 159 | public Set<UiRegion> allRegions() { |
| 160 | return new HashSet<>(regionLookup.values()); |
| 161 | } |
| 162 | |
Simon Hunt | c0f20c1 | 2016-05-09 09:30:20 -0700 | [diff] [blame] | 163 | /** |
Simon Hunt | b1ce260 | 2016-07-23 14:04:31 -0700 | [diff] [blame] | 164 | * Returns a reference to the null-region. That is, the container for |
| 165 | * devices, hosts, and links that belong to no region. |
| 166 | * |
| 167 | * @return the null-region |
| 168 | */ |
| 169 | public UiRegion nullRegion() { |
| 170 | return nullRegion; |
| 171 | } |
| 172 | |
| 173 | /** |
Simon Hunt | c0f20c1 | 2016-05-09 09:30:20 -0700 | [diff] [blame] | 174 | * Returns the region with the specified identifier, or null if |
| 175 | * no such region exists. |
| 176 | * |
| 177 | * @param id region identifier |
| 178 | * @return corresponding UI region |
| 179 | */ |
| 180 | public UiRegion findRegion(RegionId id) { |
Simon Hunt | 4f4ffc3 | 2016-08-03 18:30:47 -0700 | [diff] [blame] | 181 | return UiRegion.NULL_ID.equals(id) ? nullRegion() : regionLookup.get(id); |
Simon Hunt | 338a3b4 | 2016-04-14 09:43:52 -0700 | [diff] [blame] | 182 | } |
| 183 | |
| 184 | /** |
Simon Hunt | c0f20c1 | 2016-05-09 09:30:20 -0700 | [diff] [blame] | 185 | * Adds the given region to the topology model. |
| 186 | * |
| 187 | * @param uiRegion region to add |
| 188 | */ |
| 189 | public void add(UiRegion uiRegion) { |
| 190 | regionLookup.put(uiRegion.id(), uiRegion); |
Simon Hunt | 642bc45 | 2016-05-04 19:34:45 -0700 | [diff] [blame] | 191 | } |
Simon Hunt | c0f20c1 | 2016-05-09 09:30:20 -0700 | [diff] [blame] | 192 | |
| 193 | /** |
| 194 | * Removes the given region from the topology model. |
| 195 | * |
| 196 | * @param uiRegion region to remove |
| 197 | */ |
| 198 | public void remove(UiRegion uiRegion) { |
Simon Hunt | 58a0dd0 | 2016-05-17 11:54:23 -0700 | [diff] [blame] | 199 | UiRegion r = regionLookup.remove(uiRegion.id()); |
| 200 | if (r != null) { |
| 201 | r.destroy(); |
| 202 | } |
| 203 | } |
| 204 | |
| 205 | /** |
| 206 | * Returns the number of regions configured in the topology. |
| 207 | * |
| 208 | * @return number of regions |
| 209 | */ |
| 210 | public int regionCount() { |
| 211 | return regionLookup.size(); |
Simon Hunt | c0f20c1 | 2016-05-09 09:30:20 -0700 | [diff] [blame] | 212 | } |
| 213 | |
| 214 | /** |
Simon Hunt | b1ce260 | 2016-07-23 14:04:31 -0700 | [diff] [blame] | 215 | * Returns all devices in the model. |
| 216 | * |
| 217 | * @return all devices |
| 218 | */ |
| 219 | public Set<UiDevice> allDevices() { |
| 220 | return new HashSet<>(deviceLookup.values()); |
| 221 | } |
| 222 | |
| 223 | /** |
Simon Hunt | c0f20c1 | 2016-05-09 09:30:20 -0700 | [diff] [blame] | 224 | * Returns the device with the specified identifier, or null if |
| 225 | * no such device exists. |
| 226 | * |
| 227 | * @param id device identifier |
| 228 | * @return corresponding UI device |
| 229 | */ |
| 230 | public UiDevice findDevice(DeviceId id) { |
| 231 | return deviceLookup.get(id); |
| 232 | } |
| 233 | |
| 234 | /** |
| 235 | * Adds the given device to the topology model. |
| 236 | * |
| 237 | * @param uiDevice device to add |
| 238 | */ |
| 239 | public void add(UiDevice uiDevice) { |
| 240 | deviceLookup.put(uiDevice.id(), uiDevice); |
| 241 | } |
| 242 | |
| 243 | /** |
| 244 | * Removes the given device from the topology model. |
| 245 | * |
| 246 | * @param uiDevice device to remove |
| 247 | */ |
| 248 | public void remove(UiDevice uiDevice) { |
| 249 | UiDevice d = deviceLookup.remove(uiDevice.id()); |
| 250 | if (d != null) { |
| 251 | d.destroy(); |
| 252 | } |
| 253 | } |
| 254 | |
| 255 | /** |
Simon Hunt | 58a0dd0 | 2016-05-17 11:54:23 -0700 | [diff] [blame] | 256 | * Returns the number of devices configured in the topology. |
| 257 | * |
| 258 | * @return number of devices |
| 259 | */ |
| 260 | public int deviceCount() { |
| 261 | return deviceLookup.size(); |
| 262 | } |
| 263 | |
| 264 | /** |
Simon Hunt | 4854f3d | 2016-08-02 18:13:15 -0700 | [diff] [blame] | 265 | * Returns all links in the model. |
| 266 | * |
| 267 | * @return all links |
| 268 | */ |
| 269 | public Set<UiLink> allLinks() { |
| 270 | return new HashSet<>(linkLookup.values()); |
| 271 | } |
| 272 | |
| 273 | /** |
Simon Hunt | c0f20c1 | 2016-05-09 09:30:20 -0700 | [diff] [blame] | 274 | * Returns the link with the specified identifier, or null if no such |
| 275 | * link exists. |
| 276 | * |
| 277 | * @param id the canonicalized link identifier |
| 278 | * @return corresponding UI link |
| 279 | */ |
| 280 | public UiLink findLink(UiLinkId id) { |
| 281 | return linkLookup.get(id); |
| 282 | } |
| 283 | |
| 284 | /** |
| 285 | * Adds the given UI link to the topology model. |
| 286 | * |
| 287 | * @param uiLink link to add |
| 288 | */ |
| 289 | public void add(UiLink uiLink) { |
| 290 | linkLookup.put(uiLink.id(), uiLink); |
| 291 | } |
| 292 | |
| 293 | /** |
| 294 | * Removes the given UI link from the model. |
| 295 | * |
| 296 | * @param uiLink link to remove |
| 297 | */ |
| 298 | public void remove(UiLink uiLink) { |
Simon Hunt | 58a0dd0 | 2016-05-17 11:54:23 -0700 | [diff] [blame] | 299 | UiLink link = linkLookup.remove(uiLink.id()); |
Simon Hunt | c0f20c1 | 2016-05-09 09:30:20 -0700 | [diff] [blame] | 300 | if (link != null) { |
| 301 | link.destroy(); |
| 302 | } |
| 303 | } |
| 304 | |
| 305 | /** |
Simon Hunt | 58a0dd0 | 2016-05-17 11:54:23 -0700 | [diff] [blame] | 306 | * Returns the number of links configured in the topology. |
| 307 | * |
| 308 | * @return number of links |
| 309 | */ |
| 310 | public int linkCount() { |
| 311 | return linkLookup.size(); |
| 312 | } |
| 313 | |
| 314 | /** |
Simon Hunt | 4854f3d | 2016-08-02 18:13:15 -0700 | [diff] [blame] | 315 | * Returns all hosts in the model. |
| 316 | * |
| 317 | * @return all hosts |
| 318 | */ |
| 319 | public Set<UiHost> allHosts() { |
| 320 | return new HashSet<>(hostLookup.values()); |
| 321 | } |
| 322 | |
| 323 | /** |
Simon Hunt | c0f20c1 | 2016-05-09 09:30:20 -0700 | [diff] [blame] | 324 | * Returns the host with the specified identifier, or null if no such |
| 325 | * host exists. |
| 326 | * |
| 327 | * @param id host identifier |
| 328 | * @return corresponding UI host |
| 329 | */ |
| 330 | public UiHost findHost(HostId id) { |
| 331 | return hostLookup.get(id); |
| 332 | } |
| 333 | |
| 334 | /** |
| 335 | * Adds the given host to the topology model. |
| 336 | * |
| 337 | * @param uiHost host to add |
| 338 | */ |
| 339 | public void add(UiHost uiHost) { |
| 340 | hostLookup.put(uiHost.id(), uiHost); |
| 341 | } |
| 342 | |
| 343 | /** |
| 344 | * Removes the given host from the topology model. |
| 345 | * |
| 346 | * @param uiHost host to remove |
| 347 | */ |
| 348 | public void remove(UiHost uiHost) { |
| 349 | UiHost h = hostLookup.remove(uiHost.id()); |
| 350 | if (h != null) { |
| 351 | h.destroy(); |
| 352 | } |
| 353 | } |
| 354 | |
Simon Hunt | 58a0dd0 | 2016-05-17 11:54:23 -0700 | [diff] [blame] | 355 | /** |
| 356 | * Returns the number of hosts configured in the topology. |
| 357 | * |
| 358 | * @return number of hosts |
| 359 | */ |
| 360 | public int hostCount() { |
| 361 | return hostLookup.size(); |
| 362 | } |
| 363 | |
| 364 | |
Simon Hunt | c0f20c1 | 2016-05-09 09:30:20 -0700 | [diff] [blame] | 365 | // == |
| 366 | // package private methods for supporting linkage amongst topology entities |
| 367 | // == |
| 368 | |
| 369 | /** |
| 370 | * Returns the set of UI devices with the given identifiers. |
| 371 | * |
| 372 | * @param deviceIds device identifiers |
| 373 | * @return set of matching UI device instances |
| 374 | */ |
| 375 | Set<UiDevice> deviceSet(Set<DeviceId> deviceIds) { |
| 376 | Set<UiDevice> uiDevices = new HashSet<>(); |
| 377 | for (DeviceId id : deviceIds) { |
| 378 | UiDevice d = deviceLookup.get(id); |
| 379 | if (d != null) { |
| 380 | uiDevices.add(d); |
| 381 | } else { |
| 382 | log.warn(E_UNMAPPED, "device", id); |
| 383 | } |
| 384 | } |
| 385 | return uiDevices; |
| 386 | } |
| 387 | |
| 388 | /** |
| 389 | * Returns the set of UI hosts with the given identifiers. |
| 390 | * |
| 391 | * @param hostIds host identifiers |
| 392 | * @return set of matching UI host instances |
| 393 | */ |
| 394 | Set<UiHost> hostSet(Set<HostId> hostIds) { |
| 395 | Set<UiHost> uiHosts = new HashSet<>(); |
| 396 | for (HostId id : hostIds) { |
| 397 | UiHost h = hostLookup.get(id); |
| 398 | if (h != null) { |
| 399 | uiHosts.add(h); |
| 400 | } else { |
| 401 | log.warn(E_UNMAPPED, "host", id); |
| 402 | } |
| 403 | } |
| 404 | return uiHosts; |
| 405 | } |
| 406 | |
| 407 | /** |
| 408 | * Returns the set of UI links with the given identifiers. |
| 409 | * |
| 410 | * @param uiLinkIds link identifiers |
| 411 | * @return set of matching UI link instances |
| 412 | */ |
| 413 | Set<UiLink> linkSet(Set<UiLinkId> uiLinkIds) { |
| 414 | Set<UiLink> uiLinks = new HashSet<>(); |
| 415 | for (UiLinkId id : uiLinkIds) { |
| 416 | UiLink link = linkLookup.get(id); |
| 417 | if (link != null) { |
| 418 | uiLinks.add(link); |
| 419 | } else { |
| 420 | log.warn(E_UNMAPPED, "link", id); |
| 421 | } |
| 422 | } |
| 423 | return uiLinks; |
| 424 | } |
| 425 | |
Simon Hunt | 58a0dd0 | 2016-05-17 11:54:23 -0700 | [diff] [blame] | 426 | /** |
| 427 | * Returns a detailed (multi-line) string showing the contents of the |
| 428 | * topology. |
| 429 | * |
| 430 | * @return detailed string |
| 431 | */ |
| 432 | public String dumpString() { |
| 433 | StringBuilder sb = new StringBuilder("Topology:").append(EOL); |
| 434 | |
| 435 | sb.append(INDENT_1).append("Cluster Members").append(EOL); |
| 436 | for (UiClusterMember m : cnodeLookup.values()) { |
| 437 | sb.append(INDENT_2).append(m).append(EOL); |
| 438 | } |
| 439 | |
| 440 | sb.append(INDENT_1).append("Regions").append(EOL); |
| 441 | for (UiRegion r : regionLookup.values()) { |
| 442 | sb.append(INDENT_2).append(r).append(EOL); |
| 443 | } |
| 444 | |
| 445 | sb.append(INDENT_1).append("Devices").append(EOL); |
| 446 | for (UiDevice d : deviceLookup.values()) { |
| 447 | sb.append(INDENT_2).append(d).append(EOL); |
| 448 | } |
| 449 | |
| 450 | sb.append(INDENT_1).append("Hosts").append(EOL); |
| 451 | for (UiHost h : hostLookup.values()) { |
| 452 | sb.append(INDENT_2).append(h).append(EOL); |
| 453 | } |
| 454 | |
| 455 | sb.append(INDENT_1).append("Links").append(EOL); |
| 456 | for (UiLink link : linkLookup.values()) { |
| 457 | sb.append(INDENT_2).append(link).append(EOL); |
| 458 | } |
| 459 | sb.append("------").append(EOL); |
| 460 | |
| 461 | return sb.toString(); |
| 462 | } |
| 463 | |
Simon Hunt | 5f6dbf8 | 2016-03-30 08:53:33 -0700 | [diff] [blame] | 464 | } |