1 package org.opendaylight.controller.controllermanager.northbound;
3 import java.util.HashMap;
4 import java.util.HashSet;
8 import javax.xml.bind.annotation.XmlAccessType;
9 import javax.xml.bind.annotation.XmlAccessorType;
10 import javax.xml.bind.annotation.XmlElementRef;
11 import javax.xml.bind.annotation.XmlElementWrapper;
12 import javax.xml.bind.annotation.XmlRootElement;
14 import org.codehaus.jackson.annotate.JsonIgnore;
15 import org.codehaus.jackson.annotate.JsonProperty;
16 import org.opendaylight.controller.sal.core.Property;
19 * The class describes set of properties attached to a controller
23 @XmlAccessorType(XmlAccessType.NONE)
24 public class ControllerProperties {
30 * Set to store the controller properties
32 private Set<Property> properties;
34 // JAXB required constructor
35 private ControllerProperties() {
36 this.properties = null;
39 public ControllerProperties(Set<Property> properties) {
40 this.properties = properties;
43 @JsonProperty(value="properties")
44 public Map<String, Property> getMapProperties() {
45 Map<String, Property> map = new HashMap<String, Property>();
46 for (Property p : properties) {
47 map.put(p.getName(), p);
52 public void setMapProperties(Map<String, Property> propertiesMap) {
53 this.properties = new HashSet<Property>(propertiesMap.values());
56 public Set<Property> getProperties() {
60 public void setProperties(Set<Property> properties) {
61 this.properties = properties;