1 package org.opendaylight.controller.controllermanager.northbound;
3 import java.util.HashMap;
4 import java.util.HashSet;
7 import javax.xml.bind.annotation.XmlAccessType;
8 import javax.xml.bind.annotation.XmlAccessorType;
9 import javax.xml.bind.annotation.XmlElementRef;
10 import javax.xml.bind.annotation.XmlElementWrapper;
11 import javax.xml.bind.annotation.XmlRootElement;
13 import com.fasterxml.jackson.annotation.JsonIgnore;
14 import com.fasterxml.jackson.annotation.JsonProperty;
15 import org.opendaylight.controller.sal.core.Property;
18 * The class describes set of properties attached to a controller
22 @XmlAccessorType(XmlAccessType.NONE)
23 public class ControllerProperties {
29 * Set to store the controller properties
31 private Set<Property> properties;
33 // JAXB required constructor
34 private ControllerProperties() {
35 this.properties = null;
38 public ControllerProperties(Set<Property> properties) {
39 this.properties = properties;
42 @JsonProperty(value="properties")
43 public Map<String, Property> getMapProperties() {
44 Map<String, Property> map = new HashMap<String, Property>();
45 for (Property p : properties) {
46 map.put(p.getName(), p);
51 public void setMapProperties(Map<String, Property> propertiesMap) {
52 this.properties = new HashSet<Property>(propertiesMap.values());
55 public Set<Property> getProperties() {
59 public void setProperties(Set<Property> properties) {
60 this.properties = properties;