blob: 289bb8f8a4354045b0a6c58a4649bdb8c084e24b [file] [log] [blame]
Simon Huntf679c4e2016-04-01 17:02:24 -07001/*
Brian O'Connor5ab426f2016-04-09 01:19:45 -07002 * Copyright 2016-present Open Networking Laboratory
Simon Huntf679c4e2016-04-01 17:02:24 -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.
15 */
16
17package org.onosproject.ui.model.topo;
18
19import org.onosproject.net.region.Region;
20
21/**
22 * Represents a specific "subset" of the UI model of the network topology
23 * that a user might wish to view. Backed by a {@link Region}.
24 */
25public class UiTopoLayout {
26
Thomas Vachuska4d66d0a2016-04-15 15:48:13 -070027 private final UiTopoLayoutId id;
28 private final Region region;
Simon Huntf679c4e2016-04-01 17:02:24 -070029
Thomas Vachuska4d66d0a2016-04-15 15:48:13 -070030 /**
31 * Created a new UI topology layout.
32 *
33 * @param id layout identifier
34 * @param region backing region
35 */
36 public UiTopoLayout(UiTopoLayoutId id, Region region) {
37 this.id = id;
38 this.region = region;
39 }
40
41 /**
42 * Returns the UI layout identifier.
43 *
44 * @return identifier of the layout
45 */
46 public UiTopoLayoutId id() {
47 return id;
48 }
49
50 /**
51 * Returns the backing region with which this layout is associated.
52 *
53 * @return backing region
54 */
55 public Region region() {
56 return region;
57 }
58
59 // TODO: additional properties pertinent to the layout
Simon Huntf679c4e2016-04-01 17:02:24 -070060}