From a0571dd31054955aac91abb008b780b04da224ac Mon Sep 17 00:00:00 2001 From: prabathabey Date: Thu, 26 Mar 2015 17:30:29 +0530 Subject: [PATCH 1/3] Fixing API endpoint not getting properly added when the APIs are registered --- .../device/mgt/core/api/mgt/config/APIPublisherConfig.java | 2 +- .../org/wso2/carbon/device/mgt/core/util/DeviceManagerUtil.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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 a781770c6a..8c4c9483d3 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 @@ -67,7 +67,7 @@ public class APIPublisherConfig { return apiConfigs; } - public void setApiConfig(List apiConfigs) { + public void setApiConfigs(List apiConfigs) { this.apiConfigs = apiConfigs; } diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/util/DeviceManagerUtil.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/util/DeviceManagerUtil.java index 5595b1c953..74c7d5d140 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/util/DeviceManagerUtil.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/util/DeviceManagerUtil.java @@ -173,7 +173,7 @@ public final class DeviceManagerUtil { API api = new API(id); try { api.setContext(config.getContext()); - api.setUrl(config.getVersion()); + api.setUrl(config.getEndpoint()); api.setUriTemplates(getURITemplates(config.getEndpoint(), APIConstants.AUTH_APPLICATION_OR_USER_LEVEL_TOKEN)); api.setVisibility(APIConstants.API_GLOBAL_VISIBILITY); From 010045f0ddbf81e3bbf0c9e1e99e1496c66383f1 Mon Sep 17 00:00:00 2001 From: inosh-perera Date: Thu, 26 Mar 2015 17:49:33 +0530 Subject: [PATCH 2/3] fixing api-management auto publishing configuration file read issue --- .../device/mgt/core/api/mgt/config/APIPublisherConfig.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 a781770c6a..8c4c9483d3 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 @@ -67,7 +67,7 @@ public class APIPublisherConfig { return apiConfigs; } - public void setApiConfig(List apiConfigs) { + public void setApiConfigs(List apiConfigs) { this.apiConfigs = apiConfigs; } From d242b3ffe140a207553606f553847f4a8647c3d1 Mon Sep 17 00:00:00 2001 From: inosh-perera Date: Thu, 26 Mar 2015 17:58:47 +0530 Subject: [PATCH 3/3] device list retrival url is added to api auto publishing --- .../src/main/resources/conf/user-api-publisher-config.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/src/main/resources/conf/user-api-publisher-config.xml b/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/src/main/resources/conf/user-api-publisher-config.xml index 3221092ae9..fc89db770c 100644 --- a/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/src/main/resources/conf/user-api-publisher-config.xml +++ b/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/src/main/resources/conf/user-api-publisher-config.xml @@ -21,7 +21,7 @@ appmanager admin - enrollment + devices 1.0.0 http://localhost:9763/ http,https