Kalyankumar Asangi | 27728f2 | 2016-02-17 15:46:28 +0530 | [diff] [blame] | 1 | /* |
Brian O'Connor | a09fe5b | 2017-08-03 21:12:30 -0700 | [diff] [blame] | 2 | * Copyright 2016-present Open Networking Foundation |
Kalyankumar Asangi | 27728f2 | 2016-02-17 15:46:28 +0530 | [diff] [blame] | 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 | package org.onosproject.ospf.controller.area; |
| 17 | |
| 18 | import com.fasterxml.jackson.annotation.JsonProperty; |
| 19 | import com.google.common.base.MoreObjects; |
| 20 | import org.onosproject.ospf.controller.OspfArea; |
| 21 | import org.onosproject.ospf.controller.OspfProcess; |
| 22 | |
| 23 | import java.util.List; |
| 24 | |
| 25 | /** |
| 26 | * Representation of the configuration data for OSPF Process, which will be configured using rest URI. |
| 27 | */ |
| 28 | public 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 | } |