From 0d5c80c80b878c62c803949278ecfb64fce96e7d Mon Sep 17 00:00:00 2001 From: prabathabey Date: Fri, 27 Mar 2015 13:12:27 +0530 Subject: [PATCH] More code cleanups --- .../carbon/device/mgt/core/api/mgt/APIConfig.java | 12 ++++++------ .../mgt/core/api/mgt/config/APIPublisherConfig.java | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/api/mgt/APIConfig.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/api/mgt/APIConfig.java index dbcd8370a3..20530959d0 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/api/mgt/APIConfig.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/api/mgt/APIConfig.java @@ -60,7 +60,7 @@ public class APIConfig { return provider; } - @XmlElement(name = "Name", nillable = false) + @XmlElement(name = "Name", required = true) public String getName() { return name; } @@ -69,7 +69,7 @@ public class APIConfig { this.name = name; } - @XmlElement(name = "Owner", nillable = false) + @XmlElement(name = "Owner", required = true) public String getOwner() { return owner; } @@ -79,7 +79,7 @@ public class APIConfig { this.owner = owner; } - @XmlElement(name = "Context", nillable = false) + @XmlElement(name = "Context", required = true) public String getContext() { return context; } @@ -89,7 +89,7 @@ public class APIConfig { this.context = context; } - @XmlElement(name = "Endpoint", nillable = false) + @XmlElement(name = "Endpoint", required = true) public String getEndpoint() { return endpoint; } @@ -99,7 +99,7 @@ public class APIConfig { this.endpoint = endpoint; } - @XmlElement(name = "Version", nillable = false) + @XmlElement(name = "Version", required = false) public String getVersion() { return version; } @@ -109,7 +109,7 @@ public class APIConfig { this.version = version; } - @XmlElement(name = "Transports", nillable = false) + @XmlElement(name = "Transports", required = false) public String getTransports() { return transports; } diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/api/mgt/config/APIPublisherConfig.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/api/mgt/config/APIPublisherConfig.java index dc926ca1d7..93aec93e4d 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/api/mgt/config/APIPublisherConfig.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/api/mgt/config/APIPublisherConfig.java @@ -80,7 +80,7 @@ public class APIPublisherConfig { File publisherConfig = new File(APIPublisherConfig.USER_DEFINED_API_CONFIG_PATH); Document doc = DeviceManagerUtil.convertToDocument(publisherConfig); - /* Un-marshaling Device Management configuration */ + /* Un-marshaling API publisher configuration */ JAXBContext ctx = JAXBContext.newInstance(APIPublisherConfig.class); Unmarshaller unmarshaller = ctx.createUnmarshaller(); config = (APIPublisherConfig) unmarshaller.unmarshal(doc);