blob: fd4f7f51f8e4ea71bcb3016292d5f90c14772e95 [file] [log] [blame]
Thomas Vachuska781d18b2014-10-27 10:31:25 -07001/*
2 * Licensed to the Apache Software Foundation (ASF) under one
3 * or more contributor license agreements. See the NOTICE file
4 * distributed with this work for additional information
5 * regarding copyright ownership. The ASF licenses this file
6 * to you under the Apache License, Version 2.0 (the
7 * "License"); you may not use this file except in compliance
8 * with the License. You may obtain a copy of the License at
9 *
10 * http://www.apache.org/licenses/LICENSE-2.0
11 *
12 * Unless required by applicable law or agreed to in writing,
13 * software distributed under the License is distributed on an
14 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 * KIND, either express or implied. See the License for the
16 * specific language governing permissions and limitations
17 * under the License.
18 */
weibit38c42ed2014-10-09 19:03:54 -070019package org.onlab.onos.optical.cfg;
20
21import java.util.Map;
22import org.codehaus.jackson.JsonNode;
23import org.onlab.util.HexString;
24
25/**
26 * Public class corresponding to JSON described data model.
27 */
28public class OpticalLinkDescription {
29 protected String type;
30 protected Boolean allowed;
31 protected long dpid1;
32 protected long dpid2;
33 protected String nodeDpid1;
34 protected String nodeDpid2;
35 protected Map<String, JsonNode> params;
36 protected Map<String, String> publishAttributes;
37
38 public String getType() {
39 return type;
40 }
41
42 public void setType(String type) {
43 this.type = type;
44 }
45
46 public Boolean isAllowed() {
47 return allowed;
48 }
49
50 public void setAllowed(Boolean allowed) {
51 this.allowed = allowed;
52 }
53
54 public String getNodeDpid1() {
55 return nodeDpid1;
56 }
57
58 public void setNodeDpid1(String nodeDpid1) {
59 this.nodeDpid1 = nodeDpid1;
60 this.dpid1 = HexString.toLong(nodeDpid1);
61 }
62
63 public String getNodeDpid2() {
64 return nodeDpid2;
65 }
66
67 public void setNodeDpid2(String nodeDpid2) {
68 this.nodeDpid2 = nodeDpid2;
69 this.dpid2 = HexString.toLong(nodeDpid2);
70 }
71
72 public long getDpid1() {
73 return dpid1;
74 }
75
76 public void setDpid1(long dpid1) {
77 this.dpid1 = dpid1;
78 this.nodeDpid1 = HexString.toHexString(dpid1);
79 }
80
81 public long getDpid2() {
82 return dpid2;
83 }
84
85 public void setDpid2(long dpid2) {
86 this.dpid2 = dpid2;
87 this.nodeDpid2 = HexString.toHexString(dpid2);
88 }
89
90 public Map<String, JsonNode> getParams() {
91 return params;
92 }
93
94 public void setParams(Map<String, JsonNode> params) {
95 this.params = params;
96 }
97
98 public Map<String, String> getPublishAttributes() {
99 return publishAttributes;
100 }
101
102 public void setPublishAttributes(Map<String, String> publishAttributes) {
103 this.publishAttributes = publishAttributes;
104 }
105
106}
107