blob: 0962612bc32eb0ec882a600c3fe1598743e23916 [file] [log] [blame]
Simon Hunt94f7dae2015-08-26 17:40:59 -07001/*
Brian O'Connor5ab426f2016-04-09 01:19:45 -07002 * Copyright 2015-present Open Networking Laboratory
Simon Hunt94f7dae2015-08-26 17:40:59 -07003 *
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.
Simon Hunt94f7dae2015-08-26 17:40:59 -070015 */
16
17package org.onosproject.ui.topo;
18
19/**
20 * Parent class of {@link DeviceHighlight} and {@link HostHighlight}.
21 */
22public abstract class NodeHighlight extends AbstractHighlight {
Simon Hunt85897572015-10-20 16:29:51 -070023
24 private NodeBadge badge;
25
26 /**
27 * Constructs a node highlight entity.
28 *
29 * @param type element type
30 * @param elementId element identifier
31 */
Simon Hunt94f7dae2015-08-26 17:40:59 -070032 public NodeHighlight(TopoElementType type, String elementId) {
33 super(type, elementId);
34 }
Simon Hunt85897572015-10-20 16:29:51 -070035
36 /**
37 * Sets the badge for this node.
38 *
39 * @param badge badge to apply
40 */
41 public void setBadge(NodeBadge badge) {
42 this.badge = badge;
43 }
44
45 /**
46 * Returns the badge for this node, if any.
47 *
48 * @return badge, or null
49 */
50 public NodeBadge badge() {
51 return badge;
52 }
Simon Hunt94f7dae2015-08-26 17:40:59 -070053}