blob: ae75a9526ae98f0712176ce342b5c665c5a1b6d1 [file] [log] [blame]
Kalyankumar Asangi27728f22016-02-17 15:46:28 +05301/*
2 * Copyright 2016 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 */
16package org.onosproject.ospf.controller.area;
17
18import com.google.common.base.MoreObjects;
19import org.onosproject.ospf.controller.OspfProcess;
20
21import java.util.List;
22
23/**
24 * Representation of an OSPF configuration data.
25 */
26public class Configuration {
27 private List<OspfProcess> processes;
28 private String method;
29
30 /**
31 * Gets the configured processes.
32 *
33 * @return list of configured processes.
34 */
35 public List<OspfProcess> getProcesses() {
36 return processes;
37 }
38
39 /**
40 * Sets the configured processes.
41 *
42 * @param processes configured processes
43 */
44 public void setProcesses(List<OspfProcess> processes) {
45 this.processes = processes;
46 }
47
48 /**
49 * Gets whether to update, add or delete configuration.
50 *
51 * @return update, add or delete configuration
52 */
53 public String getMethod() {
54 return method;
55 }
56
57 /**
58 * Sets whether to update, add or delete configuration.
59 *
60 * @param method configuration method.
61 */
62 public void setMethod(String method) {
63 this.method = method;
64 }
65
66
67 @Override
68 public String toString() {
69 return MoreObjects.toStringHelper(getClass())
70 .omitNullValues()
71 .add("method", method)
72 .add("processes", processes)
73 .toString();
74 }
75}