More code cleanups

merge-requests/7/head
prabathabey 10 years ago
parent 98e1d5b1ec
commit 0d5c80c80b

@ -60,7 +60,7 @@ public class APIConfig {
return provider; return provider;
} }
@XmlElement(name = "Name", nillable = false) @XmlElement(name = "Name", required = true)
public String getName() { public String getName() {
return name; return name;
} }
@ -69,7 +69,7 @@ public class APIConfig {
this.name = name; this.name = name;
} }
@XmlElement(name = "Owner", nillable = false) @XmlElement(name = "Owner", required = true)
public String getOwner() { public String getOwner() {
return owner; return owner;
} }
@ -79,7 +79,7 @@ public class APIConfig {
this.owner = owner; this.owner = owner;
} }
@XmlElement(name = "Context", nillable = false) @XmlElement(name = "Context", required = true)
public String getContext() { public String getContext() {
return context; return context;
} }
@ -89,7 +89,7 @@ public class APIConfig {
this.context = context; this.context = context;
} }
@XmlElement(name = "Endpoint", nillable = false) @XmlElement(name = "Endpoint", required = true)
public String getEndpoint() { public String getEndpoint() {
return endpoint; return endpoint;
} }
@ -99,7 +99,7 @@ public class APIConfig {
this.endpoint = endpoint; this.endpoint = endpoint;
} }
@XmlElement(name = "Version", nillable = false) @XmlElement(name = "Version", required = false)
public String getVersion() { public String getVersion() {
return version; return version;
} }
@ -109,7 +109,7 @@ public class APIConfig {
this.version = version; this.version = version;
} }
@XmlElement(name = "Transports", nillable = false) @XmlElement(name = "Transports", required = false)
public String getTransports() { public String getTransports() {
return transports; return transports;
} }

@ -80,7 +80,7 @@ public class APIPublisherConfig {
File publisherConfig = new File(APIPublisherConfig.USER_DEFINED_API_CONFIG_PATH); File publisherConfig = new File(APIPublisherConfig.USER_DEFINED_API_CONFIG_PATH);
Document doc = DeviceManagerUtil.convertToDocument(publisherConfig); Document doc = DeviceManagerUtil.convertToDocument(publisherConfig);
/* Un-marshaling Device Management configuration */ /* Un-marshaling API publisher configuration */
JAXBContext ctx = JAXBContext.newInstance(APIPublisherConfig.class); JAXBContext ctx = JAXBContext.newInstance(APIPublisherConfig.class);
Unmarshaller unmarshaller = ctx.createUnmarshaller(); Unmarshaller unmarshaller = ctx.createUnmarshaller();
config = (APIPublisherConfig) unmarshaller.unmarshal(doc); config = (APIPublisherConfig) unmarshaller.unmarshal(doc);

Loading…
Cancel
Save