2 * Copyright (c) 2014 Cisco Systems, Inc. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
8 package org.opendaylight.controller.controllermanager.northbound;
10 import java.util.HashMap;
11 import java.util.HashSet;
14 import javax.xml.bind.annotation.XmlAccessType;
15 import javax.xml.bind.annotation.XmlAccessorType;
16 import javax.xml.bind.annotation.XmlElementRef;
17 import javax.xml.bind.annotation.XmlElementWrapper;
18 import javax.xml.bind.annotation.XmlRootElement;
20 import com.fasterxml.jackson.annotation.JsonIgnore;
21 import com.fasterxml.jackson.annotation.JsonProperty;
22 import org.opendaylight.controller.sal.core.Property;
25 * The class describes set of properties attached to a controller
29 @XmlAccessorType(XmlAccessType.NONE)
30 public class ControllerProperties {
36 * Set to store the controller properties
38 private Set<Property> properties;
40 // JAXB required constructor
41 private ControllerProperties() {
42 this.properties = null;
45 public ControllerProperties(Set<Property> properties) {
46 this.properties = properties;
49 @JsonProperty(value="properties")
50 public Map<String, Property> getMapProperties() {
51 Map<String, Property> map = new HashMap<String, Property>();
52 for (Property p : properties) {
53 map.put(p.getName(), p);
58 public void setMapProperties(Map<String, Property> propertiesMap) {
59 this.properties = new HashSet<Property>(propertiesMap.values());
62 public Set<Property> getProperties() {
66 public void setProperties(Set<Property> properties) {
67 this.properties = properties;