Simon Hunt | e05cae4 | 2015-07-23 17:35:24 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2015 Open Networking Laboratory |
| 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 | |
| 18 | package org.onosproject.ui; |
| 19 | |
Simon Hunt | 0af1ec3 | 2015-07-24 12:17:55 -0700 | [diff] [blame] | 20 | import org.onosproject.ui.topo.PropertyPanel; |
Simon Hunt | e05cae4 | 2015-07-23 17:35:24 -0700 | [diff] [blame] | 21 | import org.slf4j.Logger; |
| 22 | import org.slf4j.LoggerFactory; |
| 23 | |
| 24 | /** |
| 25 | * Represents user interface topology view overlay. |
| 26 | */ |
| 27 | public class UiTopoOverlay { |
| 28 | |
| 29 | private final Logger log = LoggerFactory.getLogger(getClass()); |
| 30 | |
| 31 | private final String id; |
| 32 | |
| 33 | /** |
| 34 | * Creates a new user interface topology view overlay descriptor. |
| 35 | * |
| 36 | * @param id overlay identifier |
| 37 | */ |
| 38 | public UiTopoOverlay(String id) { |
| 39 | this.id = id; |
| 40 | } |
| 41 | |
| 42 | /** |
| 43 | * Returns the identifier for this overlay. |
| 44 | * |
| 45 | * @return the identifier |
| 46 | */ |
| 47 | public String id() { |
| 48 | return id; |
| 49 | } |
| 50 | |
| 51 | /** |
| 52 | * Callback invoked to initialize this overlay, soon after creation. |
| 53 | * This default implementation does nothing. |
| 54 | */ |
| 55 | public void init() { |
| 56 | } |
| 57 | |
| 58 | /** |
| 59 | * Callback invoked when this overlay is activated. |
| 60 | */ |
| 61 | public void activate() { |
| 62 | log.debug("Overlay '{}' Activated", id); |
| 63 | } |
| 64 | |
| 65 | /** |
| 66 | * Callback invoked when this overlay is deactivated. |
| 67 | */ |
| 68 | public void deactivate() { |
| 69 | log.debug("Overlay '{}' Deactivated", id); |
| 70 | } |
| 71 | |
| 72 | /** |
| 73 | * Callback invoked to destroy this instance by cleaning up any |
| 74 | * internal state ready for garbage collection. |
| 75 | * This default implementation does nothing. |
| 76 | */ |
| 77 | public void destroy() { |
| 78 | } |
Simon Hunt | 0af1ec3 | 2015-07-24 12:17:55 -0700 | [diff] [blame] | 79 | |
| 80 | /** |
| 81 | * Callback to modify the contents of the summary panel. |
| 82 | * This default implementation does nothing. |
| 83 | * |
| 84 | * @param pp property panel model of summary data |
| 85 | */ |
| 86 | public void modifySummary(PropertyPanel pp) { |
| 87 | } |
Simon Hunt | e05cae4 | 2015-07-23 17:35:24 -0700 | [diff] [blame] | 88 | } |