blob: 26666adb66b0a899241416dcf4026852ae935df5 [file] [log] [blame]
Kalyankumar Asangi27728f22016-02-17 15:46:28 +05301/*
Brian O'Connora09fe5b2017-08-03 21:12:30 -07002 * Copyright 2016-present Open Networking Foundation
Kalyankumar Asangi27728f22016-02-17 15:46:28 +05303 *
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 */
16package org.onosproject.ospf.controller.area;
17
18import com.fasterxml.jackson.annotation.JsonProperty;
19import com.google.common.base.MoreObjects;
20import org.onosproject.ospf.controller.OspfArea;
21import org.onosproject.ospf.controller.OspfProcess;
22
23import java.util.List;
24
25/**
26 * Representation of the configuration data for OSPF Process, which will be configured using rest URI.
27 */
28public class OspfProcessImpl implements OspfProcess {
29
30 private String processId;
31 private List<OspfArea> areas;
32
33 /**
34 * Gets the list of areas belonging to this process.
35 *
36 * @return list of areas belonging to this process
37 */
38 public List<OspfArea> areas() {
39 return areas;
40 }
41
42 /**
43 * Sets the list of areas belonging to this process.
44 *
45 * @param areas list of areas belonging to this process
46 */
47 @JsonProperty("areas")
48 public void setAreas(List<OspfArea> areas) {
49 this.areas = areas;
50 }
51
52 /**
53 * Gets the process id.
54 *
55 * @return process id
56 */
57 public String processId() {
58 return processId;
59 }
60
61 /**
62 * Sets the process id.
63 *
64 * @param processId the process id
65 */
66 @JsonProperty("processId")
67 public void setProcessId(String processId) {
68 this.processId = processId;
69 }
70
71 @Override
72 public String toString() {
73 return MoreObjects.toStringHelper(getClass())
74 .omitNullValues()
75 .add("areas", areas)
76 .toString();
77 }
78}