diff --git a/components/apimgt-extensions/org.wso2.carbon.apimgt.annotations/pom.xml b/components/apimgt-extensions/org.wso2.carbon.apimgt.annotations/pom.xml
index e139bb93fe..99c6bd9043 100644
--- a/components/apimgt-extensions/org.wso2.carbon.apimgt.annotations/pom.xml
+++ b/components/apimgt-extensions/org.wso2.carbon.apimgt.annotations/pom.xml
@@ -22,13 +22,13 @@
apimgt-extensions
org.wso2.carbon.devicemgt
- 3.0.244-SNAPSHOT
+ 3.1.6-SNAPSHOT
../pom.xml
4.0.0
org.wso2.carbon.apimgt.annotations
- 3.0.244-SNAPSHOT
+ 3.1.6-SNAPSHOT
bundle
WSO2 Carbon - API Management Annotations
WSO2 Carbon - API Management Custom Annotation Module
diff --git a/components/apimgt-extensions/org.wso2.carbon.apimgt.application.extension.api/pom.xml b/components/apimgt-extensions/org.wso2.carbon.apimgt.application.extension.api/pom.xml
index ccb4cd89cf..089d61b5b9 100644
--- a/components/apimgt-extensions/org.wso2.carbon.apimgt.application.extension.api/pom.xml
+++ b/components/apimgt-extensions/org.wso2.carbon.apimgt.application.extension.api/pom.xml
@@ -21,12 +21,12 @@
apimgt-extensions
org.wso2.carbon.devicemgt
- 3.0.244-SNAPSHOT
+ 3.1.6-SNAPSHOT
../pom.xml
4.0.0
- 3.0.244-SNAPSHOT
+ 3.1.6-SNAPSHOT
org.wso2.carbon.apimgt.application.extension.api
war
WSO2 Carbon - API Application Management API
diff --git a/components/apimgt-extensions/org.wso2.carbon.apimgt.application.extension/pom.xml b/components/apimgt-extensions/org.wso2.carbon.apimgt.application.extension/pom.xml
index 444aaa99bc..3a4054f517 100644
--- a/components/apimgt-extensions/org.wso2.carbon.apimgt.application.extension/pom.xml
+++ b/components/apimgt-extensions/org.wso2.carbon.apimgt.application.extension/pom.xml
@@ -22,12 +22,12 @@
apimgt-extensions
org.wso2.carbon.devicemgt
- 3.0.244-SNAPSHOT
+ 3.1.6-SNAPSHOT
../pom.xml
4.0.0
- 3.0.244-SNAPSHOT
+ 3.1.6-SNAPSHOT
org.wso2.carbon.apimgt.application.extension
bundle
WSO2 Carbon - API Application Management
diff --git a/components/apimgt-extensions/org.wso2.carbon.apimgt.handlers/pom.xml b/components/apimgt-extensions/org.wso2.carbon.apimgt.handlers/pom.xml
index 1c50373019..0423bc62e3 100644
--- a/components/apimgt-extensions/org.wso2.carbon.apimgt.handlers/pom.xml
+++ b/components/apimgt-extensions/org.wso2.carbon.apimgt.handlers/pom.xml
@@ -21,13 +21,13 @@
apimgt-extensions
org.wso2.carbon.devicemgt
- 3.0.244-SNAPSHOT
+ 3.1.6-SNAPSHOT
../pom.xml
4.0.0
org.wso2.carbon.apimgt.handlers
- 3.0.244-SNAPSHOT
+ 3.1.6-SNAPSHOT
bundle
WSO2 Carbon - API Security Handler Component
WSO2 Carbon - API Management Security Handler Module
@@ -140,4 +140,4 @@
-
\ No newline at end of file
+
diff --git a/components/apimgt-extensions/org.wso2.carbon.apimgt.handlers/src/main/resources/iot-api-config.xml b/components/apimgt-extensions/org.wso2.carbon.apimgt.handlers/src/main/resources/iot-api-config.xml
index ed61a4a115..bb8e00495d 100644
--- a/components/apimgt-extensions/org.wso2.carbon.apimgt.handlers/src/main/resources/iot-api-config.xml
+++ b/components/apimgt-extensions/org.wso2.carbon.apimgt.handlers/src/main/resources/iot-api-config.xml
@@ -29,7 +29,7 @@
admin
- https://${iot.keymanager.host}:${iot.keymanager.https.port}/client-registration/v0.11/register
+ https://${iot.keymanager.host}:${iot.keymanager.https.port}/client-registration/v0.12/register
https://${iot.keymanager.host}:${iot.keymanager.https.port}/oauth2/token
diff --git a/components/apimgt-extensions/org.wso2.carbon.apimgt.handlers/src/test/java/org/wso2/carbon/apimgt/handlers/IOTServerConfigurationTest.java b/components/apimgt-extensions/org.wso2.carbon.apimgt.handlers/src/test/java/org/wso2/carbon/apimgt/handlers/IOTServerConfigurationTest.java
index 84ebc86365..1b7a88dd3b 100644
--- a/components/apimgt-extensions/org.wso2.carbon.apimgt.handlers/src/test/java/org/wso2/carbon/apimgt/handlers/IOTServerConfigurationTest.java
+++ b/components/apimgt-extensions/org.wso2.carbon.apimgt.handlers/src/test/java/org/wso2/carbon/apimgt/handlers/IOTServerConfigurationTest.java
@@ -47,7 +47,7 @@ public class IOTServerConfigurationTest extends BaseAPIHandlerTest {
Assert.assertEquals(serverConfiguration.getUsername(), "testuser");
Assert.assertEquals(serverConfiguration.getPassword(), "testuserpwd");
Assert.assertEquals(serverConfiguration.getDynamicClientRegistrationEndpoint(),
- "https://${iot.keymanager.host}:${iot.keymanager.https.port}/client-registration/v0.11/register");
+ "https://${iot.keymanager.host}:${iot.keymanager.https.port}/client-registration/v0.12/register");
Assert.assertEquals(serverConfiguration.getOauthTokenEndpoint(),
"https://${iot.keymanager.host}:${iot.keymanager.https.port}/oauth2/token");
Assert.assertEquals(serverConfiguration.getApis().size(), 1);
@@ -87,7 +87,7 @@ public class IOTServerConfigurationTest extends BaseAPIHandlerTest {
Assert.assertEquals(serverConfiguration.getPassword(), "testuserpwd");
Assert.assertEquals(serverConfiguration.getDynamicClientRegistrationEndpoint(),
"https://" + TestUtils.IOT_KEYMANAGER_HOST + ":" + TestUtils.IOT_KEYMANAGER_PORT
- + "/client-registration/v0.11/register");
+ + "/client-registration/v0.12/register");
Assert.assertEquals(serverConfiguration.getOauthTokenEndpoint(),
"https://" + TestUtils.IOT_KEYMANAGER_HOST + ":" + TestUtils.IOT_KEYMANAGER_PORT
+ "/oauth2/token");
diff --git a/components/apimgt-extensions/org.wso2.carbon.apimgt.handlers/src/test/resources/carbon-home/repository/conf/iot-api-config-invalid-xml.xml b/components/apimgt-extensions/org.wso2.carbon.apimgt.handlers/src/test/resources/carbon-home/repository/conf/iot-api-config-invalid-xml.xml
index b7519e99ac..25110b26a6 100644
--- a/components/apimgt-extensions/org.wso2.carbon.apimgt.handlers/src/test/resources/carbon-home/repository/conf/iot-api-config-invalid-xml.xml
+++ b/components/apimgt-extensions/org.wso2.carbon.apimgt.handlers/src/test/resources/carbon-home/repository/conf/iot-api-config-invalid-xml.xml
@@ -29,7 +29,7 @@
testuserpwd
- https://${iot.keymanager.host}:${iot.keymanager.https.port}/client-registration/v0.11/register
+ https://${iot.keymanager.host}:${iot.keymanager.https.port}/client-registration/v0.12/register
https://${iot.keymanager.host}:${iot.keymanager.https.port}/oauth2/token
diff --git a/components/apimgt-extensions/org.wso2.carbon.apimgt.handlers/src/test/resources/carbon-home/repository/conf/iot-api-config-invalid.xml b/components/apimgt-extensions/org.wso2.carbon.apimgt.handlers/src/test/resources/carbon-home/repository/conf/iot-api-config-invalid.xml
index 9951e7b98e..67ffc7fd8c 100644
--- a/components/apimgt-extensions/org.wso2.carbon.apimgt.handlers/src/test/resources/carbon-home/repository/conf/iot-api-config-invalid.xml
+++ b/components/apimgt-extensions/org.wso2.carbon.apimgt.handlers/src/test/resources/carbon-home/repository/conf/iot-api-config-invalid.xml
@@ -29,7 +29,7 @@
testuserpwd
- https://${iot.keymanager.host}:${iot.keymanager.https.port}/client-registration/v0.11/register
+ https://${iot.keymanager.host}:${iot.keymanager.https.port}/client-registration/v0.12/register
https://${iot.keymanager.host}:${iot.keymanager.https.port}/oauth2/token
diff --git a/components/apimgt-extensions/org.wso2.carbon.apimgt.handlers/src/test/resources/carbon-home/repository/conf/iot-api-config.xml b/components/apimgt-extensions/org.wso2.carbon.apimgt.handlers/src/test/resources/carbon-home/repository/conf/iot-api-config.xml
index fcb53bd009..73af43c45f 100644
--- a/components/apimgt-extensions/org.wso2.carbon.apimgt.handlers/src/test/resources/carbon-home/repository/conf/iot-api-config.xml
+++ b/components/apimgt-extensions/org.wso2.carbon.apimgt.handlers/src/test/resources/carbon-home/repository/conf/iot-api-config.xml
@@ -29,7 +29,7 @@
testuserpwd
- https://${iot.keymanager.host}:${iot.keymanager.https.port}/client-registration/v0.11/register
+ https://${iot.keymanager.host}:${iot.keymanager.https.port}/client-registration/v0.12/register
https://${iot.keymanager.host}:${iot.keymanager.https.port}/oauth2/token
diff --git a/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/pom.xml b/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/pom.xml
index 49ec26d413..9c592cddfa 100644
--- a/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/pom.xml
+++ b/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/pom.xml
@@ -13,13 +13,13 @@
apimgt-extensions
org.wso2.carbon.devicemgt
- 3.0.244-SNAPSHOT
+ 3.1.6-SNAPSHOT
../pom.xml
4.0.0
org.wso2.carbon.apimgt.integration.client
- 3.0.244-SNAPSHOT
+ 3.1.6-SNAPSHOT
bundle
WSO2 Carbon - API Management Integration Client
WSO2 Carbon - API Management Integration Client
diff --git a/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.generated.client/pom.xml b/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.generated.client/pom.xml
index 702dcbc7c0..8849bb158d 100644
--- a/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.generated.client/pom.xml
+++ b/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.generated.client/pom.xml
@@ -13,13 +13,13 @@
apimgt-extensions
org.wso2.carbon.devicemgt
- 3.0.244-SNAPSHOT
+ 3.1.6-SNAPSHOT
../pom.xml
4.0.0
org.wso2.carbon.apimgt.integration.generated.client
- 3.0.244-SNAPSHOT
+ 3.1.6-SNAPSHOT
bundle
WSO2 Carbon - API Management Integration Generated Client
WSO2 Carbon - API Management Integration Client
diff --git a/components/apimgt-extensions/org.wso2.carbon.apimgt.webapp.publisher/pom.xml b/components/apimgt-extensions/org.wso2.carbon.apimgt.webapp.publisher/pom.xml
index cb65c33f18..5cb3cd3191 100644
--- a/components/apimgt-extensions/org.wso2.carbon.apimgt.webapp.publisher/pom.xml
+++ b/components/apimgt-extensions/org.wso2.carbon.apimgt.webapp.publisher/pom.xml
@@ -22,13 +22,13 @@
apimgt-extensions
org.wso2.carbon.devicemgt
- 3.0.244-SNAPSHOT
+ 3.1.6-SNAPSHOT
../pom.xml
4.0.0
org.wso2.carbon.apimgt.webapp.publisher
- 3.0.244-SNAPSHOT
+ 3.1.6-SNAPSHOT
bundle
WSO2 Carbon - API Management Webapp Publisher
WSO2 Carbon - API Management Webapp Publisher
diff --git a/components/apimgt-extensions/pom.xml b/components/apimgt-extensions/pom.xml
index 60b05dddaf..9a7e1a66d6 100644
--- a/components/apimgt-extensions/pom.xml
+++ b/components/apimgt-extensions/pom.xml
@@ -22,13 +22,13 @@
org.wso2.carbon.devicemgt
carbon-devicemgt
- 3.0.244-SNAPSHOT
+ 3.1.6-SNAPSHOT
../../pom.xml
4.0.0
apimgt-extensions
- 3.0.244-SNAPSHOT
+ 3.1.6-SNAPSHOT
pom
WSO2 Carbon - API Management Extensions Component
http://wso2.org
diff --git a/components/certificate-mgt/org.wso2.carbon.certificate.mgt.api/pom.xml b/components/certificate-mgt/org.wso2.carbon.certificate.mgt.api/pom.xml
index d6c2892ef4..67521cddd9 100644
--- a/components/certificate-mgt/org.wso2.carbon.certificate.mgt.api/pom.xml
+++ b/components/certificate-mgt/org.wso2.carbon.certificate.mgt.api/pom.xml
@@ -22,7 +22,7 @@
certificate-mgt
org.wso2.carbon.devicemgt
- 3.0.244-SNAPSHOT
+ 3.1.6-SNAPSHOT
../pom.xml
diff --git a/components/certificate-mgt/org.wso2.carbon.certificate.mgt.cert.admin.api/pom.xml b/components/certificate-mgt/org.wso2.carbon.certificate.mgt.cert.admin.api/pom.xml
index 361362620d..b84c0b25ec 100644
--- a/components/certificate-mgt/org.wso2.carbon.certificate.mgt.cert.admin.api/pom.xml
+++ b/components/certificate-mgt/org.wso2.carbon.certificate.mgt.cert.admin.api/pom.xml
@@ -22,7 +22,7 @@
certificate-mgt
org.wso2.carbon.devicemgt
- 3.0.244-SNAPSHOT
+ 3.1.6-SNAPSHOT
../pom.xml
diff --git a/components/certificate-mgt/org.wso2.carbon.certificate.mgt.cert.admin.v09.api/pom.xml b/components/certificate-mgt/org.wso2.carbon.certificate.mgt.cert.admin.v09.api/pom.xml
index 7c9ba87ede..95ef3b0b58 100644
--- a/components/certificate-mgt/org.wso2.carbon.certificate.mgt.cert.admin.v09.api/pom.xml
+++ b/components/certificate-mgt/org.wso2.carbon.certificate.mgt.cert.admin.v09.api/pom.xml
@@ -1,7 +1,7 @@
+
Admin-Webapp
diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.v09.api/src/test/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/DeviceAgentServiceTest.java b/components/device-mgt/org.wso2.carbon.device.mgt.v09.api/src/test/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/DeviceAgentServiceTest.java
index efd573b11f..05bd490a85 100644
--- a/components/device-mgt/org.wso2.carbon.device.mgt.v09.api/src/test/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/DeviceAgentServiceTest.java
+++ b/components/device-mgt/org.wso2.carbon.device.mgt.v09.api/src/test/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/DeviceAgentServiceTest.java
@@ -15,6 +15,7 @@
* specific language governing permissions and limitations
* under the License.
*/
+
package org.wso2.carbon.device.mgt.jaxrs.service.impl;
import org.apache.axis2.AxisFault;
diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.v09.api/src/test/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/DeviceTypeManagementServiceTest.java b/components/device-mgt/org.wso2.carbon.device.mgt.v09.api/src/test/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/DeviceTypeManagementServiceTest.java
index 9629afb07a..09680a9d9e 100644
--- a/components/device-mgt/org.wso2.carbon.device.mgt.v09.api/src/test/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/DeviceTypeManagementServiceTest.java
+++ b/components/device-mgt/org.wso2.carbon.device.mgt.v09.api/src/test/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/DeviceTypeManagementServiceTest.java
@@ -15,6 +15,7 @@
* specific language governing permissions and limitations
* under the License.
*/
+
package org.wso2.carbon.device.mgt.jaxrs.service.impl;
import org.apache.commons.logging.Log;
diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.v09.api/src/test/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/GeoLocationBasedServiceImplTest.java b/components/device-mgt/org.wso2.carbon.device.mgt.v09.api/src/test/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/GeoLocationBasedServiceImplTest.java
index be7209a8e9..bbeeea1dd6 100644
--- a/components/device-mgt/org.wso2.carbon.device.mgt.v09.api/src/test/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/GeoLocationBasedServiceImplTest.java
+++ b/components/device-mgt/org.wso2.carbon.device.mgt.v09.api/src/test/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/GeoLocationBasedServiceImplTest.java
@@ -1,3 +1,22 @@
+/*
+ * Copyright (c) 2017, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
+ *
+ * WSO2 Inc. licenses this file to you under the Apache License,
+ * Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+
package org.wso2.carbon.device.mgt.jaxrs.service.impl;
diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.v09.api/src/test/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/util/DeviceMgtAPITestHelper.java b/components/device-mgt/org.wso2.carbon.device.mgt.v09.api/src/test/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/util/DeviceMgtAPITestHelper.java
index f1f0d1628d..884f67923f 100644
--- a/components/device-mgt/org.wso2.carbon.device.mgt.v09.api/src/test/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/util/DeviceMgtAPITestHelper.java
+++ b/components/device-mgt/org.wso2.carbon.device.mgt.v09.api/src/test/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/util/DeviceMgtAPITestHelper.java
@@ -15,6 +15,7 @@
* specific language governing permissions and limitations
* under the License.
*/
+
package org.wso2.carbon.device.mgt.jaxrs.service.impl.util;
import org.wso2.carbon.device.mgt.common.Device;
diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.v09.api/src/test/resources/log4j.properties b/components/device-mgt/org.wso2.carbon.device.mgt.v09.api/src/test/resources/log4j.properties
index e415fd607d..90c5d0edce 100644
--- a/components/device-mgt/org.wso2.carbon.device.mgt.v09.api/src/test/resources/log4j.properties
+++ b/components/device-mgt/org.wso2.carbon.device.mgt.v09.api/src/test/resources/log4j.properties
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
+# Copyright (c) 2017, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
#
# WSO2 Inc. licenses this file to you under the Apache License,
# Version 2.0 (the "License"); you may not use this file except
diff --git a/components/device-mgt/pom.xml b/components/device-mgt/pom.xml
index 0e11d34439..fdf15d96fb 100644
--- a/components/device-mgt/pom.xml
+++ b/components/device-mgt/pom.xml
@@ -22,7 +22,7 @@
org.wso2.carbon.devicemgt
carbon-devicemgt
- 3.0.244-SNAPSHOT
+ 3.1.6-SNAPSHOT
../../pom.xml
diff --git a/components/email-sender/org.wso2.carbon.email.sender.core/pom.xml b/components/email-sender/org.wso2.carbon.email.sender.core/pom.xml
index 595c6d212a..14a0ab73bd 100644
--- a/components/email-sender/org.wso2.carbon.email.sender.core/pom.xml
+++ b/components/email-sender/org.wso2.carbon.email.sender.core/pom.xml
@@ -22,7 +22,7 @@
org.wso2.carbon.devicemgt
email-sender
- 3.0.244-SNAPSHOT
+ 3.1.6-SNAPSHOT
../pom.xml
diff --git a/components/email-sender/pom.xml b/components/email-sender/pom.xml
index 2097c0b687..c38a44b205 100644
--- a/components/email-sender/pom.xml
+++ b/components/email-sender/pom.xml
@@ -22,7 +22,7 @@
org.wso2.carbon.devicemgt
carbon-devicemgt
- 3.0.244-SNAPSHOT
+ 3.1.6-SNAPSHOT
../../pom.xml
diff --git a/components/identity-extensions/org.wso2.carbon.device.mgt.oauth.extensions/pom.xml b/components/identity-extensions/org.wso2.carbon.device.mgt.oauth.extensions/pom.xml
index 9e9289a379..cc6b4d437a 100644
--- a/components/identity-extensions/org.wso2.carbon.device.mgt.oauth.extensions/pom.xml
+++ b/components/identity-extensions/org.wso2.carbon.device.mgt.oauth.extensions/pom.xml
@@ -22,13 +22,13 @@
org.wso2.carbon.devicemgt
identity-extensions
- 3.0.244-SNAPSHOT
+ 3.1.6-SNAPSHOT
../pom.xml
4.0.0
org.wso2.carbon.device.mgt.oauth.extensions
- 3.0.244-SNAPSHOT
+ 3.1.6-SNAPSHOT
bundle
WSO2 Carbon - OAuth Extensions
http://wso2.org
@@ -110,7 +110,8 @@
org.wso2.carbon.identity.base;version="${carbon.identity.framework.version.range}",
org.wso2.carbon.identity.oauth2.*;version="${carbon.identity.framework.version.range}",
org.wso2.carbon.utils.multitenancy,
- org.apache.oltu.oauth2.common.validators
+ org.apache.oltu.oauth2.common.validators,
+ org.apache.commons.lang3.tuple,
diff --git a/components/identity-extensions/org.wso2.carbon.device.mgt.oauth.extensions/src/main/java/org/wso2/carbon/device/mgt/oauth/extensions/validators/ExtendedJDBCScopeValidator.java b/components/identity-extensions/org.wso2.carbon.device.mgt.oauth.extensions/src/main/java/org/wso2/carbon/device/mgt/oauth/extensions/validators/ExtendedJDBCScopeValidator.java
index 58c975bbec..48e224c087 100644
--- a/components/identity-extensions/org.wso2.carbon.device.mgt.oauth.extensions/src/main/java/org/wso2/carbon/device/mgt/oauth/extensions/validators/ExtendedJDBCScopeValidator.java
+++ b/components/identity-extensions/org.wso2.carbon.device.mgt.oauth.extensions/src/main/java/org/wso2/carbon/device/mgt/oauth/extensions/validators/ExtendedJDBCScopeValidator.java
@@ -28,9 +28,9 @@ import org.wso2.carbon.identity.core.util.IdentityTenantUtil;
import org.wso2.carbon.identity.oauth.cache.CacheEntry;
import org.wso2.carbon.identity.oauth.cache.OAuthCache;
import org.wso2.carbon.identity.oauth.cache.OAuthCacheKey;
-import org.wso2.carbon.identity.oauth.config.OAuthServerConfiguration;
import org.wso2.carbon.identity.oauth2.IdentityOAuth2Exception;
-import org.wso2.carbon.identity.oauth2.dao.TokenMgtDAO;
+import org.wso2.carbon.identity.oauth2.dao.OAuthScopeDAOImpl;
+import org.wso2.carbon.identity.oauth2.dao.TokenManagementDAOImpl;
import org.wso2.carbon.identity.oauth2.model.AccessTokenDO;
import org.wso2.carbon.identity.oauth2.model.ResourceScopeCacheEntry;
import org.wso2.carbon.identity.oauth2.validators.OAuth2ScopeValidator;
@@ -62,11 +62,12 @@ public class ExtendedJDBCScopeValidator extends OAuth2ScopeValidator {
}
String resourceScope = null;
- TokenMgtDAO tokenMgtDAO = new TokenMgtDAO();
-
+ OAuthScopeDAOImpl scopeDAO = new OAuthScopeDAOImpl();
+ TokenManagementDAOImpl tokenManagementDAO = new TokenManagementDAOImpl();
boolean cacheHit = false;
+
// Check the cache, if caching is enabled.
- if (OAuthServerConfiguration.getInstance().isCacheEnabled()) {
+ if (OAuthCache.getInstance().isEnabled()) {
OAuthCache oauthCache = OAuthCache.getInstance();
OAuthCacheKey cacheKey = new OAuthCacheKey(resource);
CacheEntry result = oauthCache.getValueFromCache(cacheKey);
@@ -79,9 +80,9 @@ public class ExtendedJDBCScopeValidator extends OAuth2ScopeValidator {
}
if (!cacheHit) {
- resourceScope = tokenMgtDAO.findScopeOfResource(resource);
+ resourceScope = tokenManagementDAO.findTenantAndScopeOfResource(resource).getKey();
- if (OAuthServerConfiguration.getInstance().isCacheEnabled()) {
+ if (OAuthCache.getInstance().isEnabled()) {
OAuthCache oauthCache = OAuthCache.getInstance();
OAuthCacheKey cacheKey = new OAuthCacheKey(resource);
ResourceScopeCacheEntry cacheEntry = new ResourceScopeCacheEntry(resourceScope);
@@ -93,7 +94,7 @@ public class ExtendedJDBCScopeValidator extends OAuth2ScopeValidator {
//Return TRUE if - There does not exist a scope definition for the resource
if (resourceScope == null) {
- if(log.isDebugEnabled()){
+ if (log.isDebugEnabled()) {
log.debug("Resource '" + resource + "' is not protected with a scope");
}
return true;
@@ -102,39 +103,39 @@ public class ExtendedJDBCScopeValidator extends OAuth2ScopeValidator {
List scopeList = new ArrayList<>(Arrays.asList(scopes));
//If the access token does not bear the scope required for accessing the Resource.
- if(!scopeList.contains(resourceScope)){
- if(log.isDebugEnabled()){
+ if (!scopeList.contains(resourceScope)) {
+ if (log.isDebugEnabled()) {
log.debug("Access token '" + accessTokenDO.getAccessToken() + "' does not bear the scope '" +
- resourceScope + "'");
+ resourceScope + "'");
}
return false;
}
try {
+ User authorizedUser = accessTokenDO.getAuthzUser();
+ RealmService realmService = OAuthExtensionsDataHolder.getInstance().getRealmService();
+ int tenantId = realmService.getTenantManager().getTenantId(authorizedUser.getTenantDomain());
+
//Get the permissions associated with the scope, if any
- Set permissionsOfScope = tokenMgtDAO.getRolesOfScopeByScopeKey(resourceScope);
+ Set permissionsOfScope = scopeDAO.getBindingsOfScopeByScopeName(resourceScope, tenantId);
//If the scope doesn't have any permissions associated with it.
- if(permissionsOfScope == null || permissionsOfScope.isEmpty()){
- if(log.isDebugEnabled()){
+ if (permissionsOfScope == null || permissionsOfScope.isEmpty()) {
+ if (log.isDebugEnabled()) {
log.debug("Did not find any roles associated to the scope " + resourceScope);
}
return true;
}
- if(log.isDebugEnabled()){
+ if (log.isDebugEnabled()) {
StringBuilder logMessage = new StringBuilder("Found permissions of scope '" + resourceScope + "' ");
- for(String permission : permissionsOfScope){
+ for (String permission : permissionsOfScope) {
logMessage.append(permission);
logMessage.append(", ");
}
log.debug(logMessage.toString());
}
- User authorizedUser = accessTokenDO.getAuthzUser();
- RealmService realmService = OAuthExtensionsDataHolder.getInstance().getRealmService();
-
- int tenantId = realmService.getTenantManager().getTenantId(authorizedUser.getTenantDomain());
if (tenantId == 0 || tenantId == -1) {
tenantId = IdentityTenantUtil.getTenantIdOfUser(authorizedUser.getUserName());
@@ -144,12 +145,12 @@ public class ExtendedJDBCScopeValidator extends OAuth2ScopeValidator {
String[] userRoles;
boolean tenantFlowStarted = false;
- try{
+ try {
//If this is a tenant user
- if(tenantId != MultitenantConstants.SUPER_TENANT_ID){
+ if (tenantId != MultitenantConstants.SUPER_TENANT_ID) {
PrivilegedCarbonContext.startTenantFlow();
PrivilegedCarbonContext.getThreadLocalCarbonContext().setTenantDomain(
- realmService.getTenantManager().getDomain(tenantId),true);
+ realmService.getTenantManager().getDomain(tenantId), true);
tenantFlowStarted = true;
}
@@ -170,7 +171,7 @@ public class ExtendedJDBCScopeValidator extends OAuth2ScopeValidator {
status = authorizationManager
.isUserAuthorized(userStore + "/" + username, permission, UI_EXECUTE);
} else {
- status = authorizationManager.isUserAuthorized(username , permission, UI_EXECUTE);
+ status = authorizationManager.isUserAuthorized(username, permission, UI_EXECUTE);
}
if (status) {
break;
@@ -179,13 +180,13 @@ public class ExtendedJDBCScopeValidator extends OAuth2ScopeValidator {
}
if (status) {
- if(log.isDebugEnabled()){
+ if (log.isDebugEnabled()) {
log.debug("User '" + authorizedUser.getUserName() + "' is authorized");
}
return true;
}
- if(log.isDebugEnabled()){
+ if (log.isDebugEnabled()) {
log.debug("No permissions associated for the user " + authorizedUser.getUserName());
}
return false;
diff --git a/components/identity-extensions/org.wso2.carbon.device.mgt.oauth.extensions/src/main/java/org/wso2/carbon/device/mgt/oauth/extensions/validators/PermissionBasedScopeValidator.java b/components/identity-extensions/org.wso2.carbon.device.mgt.oauth.extensions/src/main/java/org/wso2/carbon/device/mgt/oauth/extensions/validators/PermissionBasedScopeValidator.java
index 5be19a5a0c..2d4010bf1c 100644
--- a/components/identity-extensions/org.wso2.carbon.device.mgt.oauth.extensions/src/main/java/org/wso2/carbon/device/mgt/oauth/extensions/validators/PermissionBasedScopeValidator.java
+++ b/components/identity-extensions/org.wso2.carbon.device.mgt.oauth.extensions/src/main/java/org/wso2/carbon/device/mgt/oauth/extensions/validators/PermissionBasedScopeValidator.java
@@ -26,7 +26,8 @@ import org.wso2.carbon.device.mgt.oauth.extensions.internal.OAuthExtensionsDataH
import org.wso2.carbon.identity.application.common.model.User;
import org.wso2.carbon.identity.core.util.IdentityTenantUtil;
import org.wso2.carbon.identity.oauth2.IdentityOAuth2Exception;
-import org.wso2.carbon.identity.oauth2.dao.TokenMgtDAO;
+import org.wso2.carbon.identity.oauth2.dao.OAuthScopeDAO;
+import org.wso2.carbon.identity.oauth2.dao.OAuthTokenPersistenceFactory;
import org.wso2.carbon.identity.oauth2.model.AccessTokenDO;
import org.wso2.carbon.identity.oauth2.validators.OAuth2ScopeValidator;
import org.wso2.carbon.user.api.AuthorizationManager;
@@ -56,59 +57,57 @@ public class PermissionBasedScopeValidator extends OAuth2ScopeValidator {
return true;
}
- TokenMgtDAO tokenMgtDAO = new TokenMgtDAO();
-
+ OAuthScopeDAO authScopeDAO = OAuthTokenPersistenceFactory.getInstance().getOAuthScopeDAO();
List scopeList = new ArrayList<>(Arrays.asList(scopes));
//If the access token does not bear the scope required for accessing the Resource.
- if(!scopeList.contains(resourceScope)){
- if(log.isDebugEnabled()){
+ if (!scopeList.contains(resourceScope)) {
+ if (log.isDebugEnabled()) {
log.debug("Access token '" + accessTokenDO.getAccessToken() + "' does not bear the scope '" +
- resourceScope + "'");
+ resourceScope + "'");
}
return false;
}
try {
+ User authorizedUser = accessTokenDO.getAuthzUser();
+ RealmService realmService = OAuthExtensionsDataHolder.getInstance().getRealmService();
+
+ int tenantId = realmService.getTenantManager().getTenantId(authorizedUser.getTenantDomain());
+
+ if (tenantId == 0 || tenantId == -1) {
+ tenantId = IdentityTenantUtil.getTenantIdOfUser(authorizedUser.getUserName());
+ }
//Get the permissions associated with the scope, if any
- Set permissionsOfScope = tokenMgtDAO.getRolesOfScopeByScopeKey(resourceScope);
+ Set permissionsOfScope = authScopeDAO.getBindingsOfScopeByScopeName(resourceScope, tenantId);
//If the scope doesn't have any permissions associated with it.
- if(permissionsOfScope == null || permissionsOfScope.isEmpty()){
- if(log.isDebugEnabled()){
+ if (permissionsOfScope == null || permissionsOfScope.isEmpty()) {
+ if (log.isDebugEnabled()) {
log.debug("Did not find any roles associated to the scope " + resourceScope);
}
return true;
}
- if(log.isDebugEnabled()){
+ if (log.isDebugEnabled()) {
StringBuilder logMessage = new StringBuilder("Found permissions of scope '" + resourceScope + "' ");
- for(String permission : permissionsOfScope){
+ for (String permission : permissionsOfScope) {
logMessage.append(permission);
logMessage.append(", ");
}
log.debug(logMessage.toString());
}
- User authorizedUser = accessTokenDO.getAuthzUser();
- RealmService realmService = OAuthExtensionsDataHolder.getInstance().getRealmService();
-
- int tenantId = realmService.getTenantManager().getTenantId(authorizedUser.getTenantDomain());
-
- if (tenantId == 0 || tenantId == -1) {
- tenantId = IdentityTenantUtil.getTenantIdOfUser(authorizedUser.getUserName());
- }
-
AuthorizationManager authorizationManager;
String[] userRoles;
boolean tenantFlowStarted = false;
- try{
+ try {
//If this is a tenant user
- if(tenantId != MultitenantConstants.SUPER_TENANT_ID){
+ if (tenantId != MultitenantConstants.SUPER_TENANT_ID) {
PrivilegedCarbonContext.startTenantFlow();
PrivilegedCarbonContext.getThreadLocalCarbonContext().setTenantDomain(
- realmService.getTenantManager().getDomain(tenantId),true);
+ realmService.getTenantManager().getDomain(tenantId), true);
tenantFlowStarted = true;
}
@@ -129,7 +128,7 @@ public class PermissionBasedScopeValidator extends OAuth2ScopeValidator {
status = authorizationManager
.isUserAuthorized(userStore + "/" + username, permission, UI_EXECUTE);
} else {
- status = authorizationManager.isUserAuthorized(username , permission, UI_EXECUTE);
+ status = authorizationManager.isUserAuthorized(username, permission, UI_EXECUTE);
}
if (status) {
break;
@@ -138,13 +137,13 @@ public class PermissionBasedScopeValidator extends OAuth2ScopeValidator {
}
if (status) {
- if(log.isDebugEnabled()){
+ if (log.isDebugEnabled()) {
log.debug("User '" + authorizedUser.getUserName() + "' is authorized");
}
return true;
}
- if(log.isDebugEnabled()){
+ if (log.isDebugEnabled()) {
log.debug("No permissions associated for the user " + authorizedUser.getUserName());
}
return false;
diff --git a/components/identity-extensions/org.wso2.carbon.device.mgt.oauth.extensions/src/main/java/org/wso2/carbon/device/mgt/oauth/extensions/validators/RoleBasedScopeValidator.java b/components/identity-extensions/org.wso2.carbon.device.mgt.oauth.extensions/src/main/java/org/wso2/carbon/device/mgt/oauth/extensions/validators/RoleBasedScopeValidator.java
index 593d9d0c89..23e6d9d9a7 100644
--- a/components/identity-extensions/org.wso2.carbon.device.mgt.oauth.extensions/src/main/java/org/wso2/carbon/device/mgt/oauth/extensions/validators/RoleBasedScopeValidator.java
+++ b/components/identity-extensions/org.wso2.carbon.device.mgt.oauth.extensions/src/main/java/org/wso2/carbon/device/mgt/oauth/extensions/validators/RoleBasedScopeValidator.java
@@ -28,7 +28,7 @@ import org.wso2.carbon.identity.base.IdentityConstants;
import org.wso2.carbon.identity.core.util.IdentityTenantUtil;
import org.wso2.carbon.identity.core.util.IdentityUtil;
import org.wso2.carbon.identity.oauth2.IdentityOAuth2Exception;
-import org.wso2.carbon.identity.oauth2.dao.TokenMgtDAO;
+import org.wso2.carbon.identity.oauth2.dao.OAuthScopeDAOImpl;
import org.wso2.carbon.identity.oauth2.model.AccessTokenDO;
import org.wso2.carbon.identity.oauth2.validators.OAuth2ScopeValidator;
import org.wso2.carbon.user.api.UserStoreException;
@@ -61,8 +61,7 @@ public class RoleBasedScopeValidator extends OAuth2ScopeValidator {
return true;
}
- TokenMgtDAO tokenMgtDAO = new TokenMgtDAO();
-
+ OAuthScopeDAOImpl scopeDAO = new OAuthScopeDAOImpl();
List scopeList = new ArrayList<>(Arrays.asList(scopes));
//If the access token does not bear the scope required for accessing the Resource.
@@ -75,8 +74,15 @@ public class RoleBasedScopeValidator extends OAuth2ScopeValidator {
}
try {
+ User authzUser = accessTokenDO.getAuthzUser();
+ RealmService realmService = OAuthExtensionsDataHolder.getInstance().getRealmService();
+ int tenantId = realmService.getTenantManager().getTenantId(authzUser.getTenantDomain());
+ if (tenantId == 0 || tenantId == -1) {
+ tenantId = IdentityTenantUtil.getTenantIdOfUser(authzUser.getUserName());
+ }
+
//Get the roles associated with the scope, if any
- Set rolesOfScope = tokenMgtDAO.getRolesOfScopeByScopeKey(resourceScope);
+ Set rolesOfScope = scopeDAO.getBindingsOfScopeByScopeName(resourceScope, tenantId);
//If the scope doesn't have any roles associated with it.
if(rolesOfScope == null || rolesOfScope.isEmpty()){
@@ -95,16 +101,6 @@ public class RoleBasedScopeValidator extends OAuth2ScopeValidator {
log.debug(logMessage.toString());
}
- User authzUser = accessTokenDO.getAuthzUser();
- RealmService realmService = OAuthExtensionsDataHolder.getInstance().getRealmService();
-
- int tenantId = realmService.getTenantManager().
- getTenantId(authzUser.getTenantDomain());
-
- if (tenantId == 0 || tenantId == -1) {
- tenantId = IdentityTenantUtil.getTenantIdOfUser(authzUser.getUserName());
- }
-
UserStoreManager userStoreManager;
String[] userRoles;
boolean tenantFlowStarted = false;
diff --git a/components/identity-extensions/org.wso2.carbon.identity.authenticator.backend.oauth/pom.xml b/components/identity-extensions/org.wso2.carbon.identity.authenticator.backend.oauth/pom.xml
index 742b013acf..9f7a0d14e8 100644
--- a/components/identity-extensions/org.wso2.carbon.identity.authenticator.backend.oauth/pom.xml
+++ b/components/identity-extensions/org.wso2.carbon.identity.authenticator.backend.oauth/pom.xml
@@ -21,7 +21,7 @@
identity-extensions
org.wso2.carbon.devicemgt
- 3.0.244-SNAPSHOT
+ 3.1.6-SNAPSHOT
4.0.0
diff --git a/components/identity-extensions/org.wso2.carbon.identity.jwt.client.extension/pom.xml b/components/identity-extensions/org.wso2.carbon.identity.jwt.client.extension/pom.xml
index 464e96b4b5..bf79fb5d18 100644
--- a/components/identity-extensions/org.wso2.carbon.identity.jwt.client.extension/pom.xml
+++ b/components/identity-extensions/org.wso2.carbon.identity.jwt.client.extension/pom.xml
@@ -22,7 +22,7 @@
org.wso2.carbon.devicemgt
identity-extensions
- 3.0.244-SNAPSHOT
+ 3.1.6-SNAPSHOT
../pom.xml
diff --git a/components/identity-extensions/pom.xml b/components/identity-extensions/pom.xml
index e549a40360..6aec08ab8d 100644
--- a/components/identity-extensions/pom.xml
+++ b/components/identity-extensions/pom.xml
@@ -22,7 +22,7 @@
org.wso2.carbon.devicemgt
carbon-devicemgt
- 3.0.244-SNAPSHOT
+ 3.1.6-SNAPSHOT
../../pom.xml
diff --git a/components/policy-mgt/org.wso2.carbon.complex.policy.decision.point/pom.xml b/components/policy-mgt/org.wso2.carbon.complex.policy.decision.point/pom.xml
index e2433cbd8f..6c272d2b4a 100644
--- a/components/policy-mgt/org.wso2.carbon.complex.policy.decision.point/pom.xml
+++ b/components/policy-mgt/org.wso2.carbon.complex.policy.decision.point/pom.xml
@@ -22,14 +22,14 @@
org.wso2.carbon.devicemgt
policy-mgt
- 3.0.244-SNAPSHOT
+ 3.1.6-SNAPSHOT
../pom.xml
4.0.0
org.wso2.carbon.devicemgt
org.wso2.carbon.complex.policy.decision.point
- 3.0.244-SNAPSHOT
+ 3.1.6-SNAPSHOT
bundle
WSO2 Carbon - Policy Decision Point
WSO2 Carbon - Policy Decision Point
diff --git a/components/policy-mgt/org.wso2.carbon.policy.decision.point/pom.xml b/components/policy-mgt/org.wso2.carbon.policy.decision.point/pom.xml
index 5b10b90a1f..e3d1c37328 100644
--- a/components/policy-mgt/org.wso2.carbon.policy.decision.point/pom.xml
+++ b/components/policy-mgt/org.wso2.carbon.policy.decision.point/pom.xml
@@ -3,14 +3,14 @@
org.wso2.carbon.devicemgt
policy-mgt
- 3.0.244-SNAPSHOT
+ 3.1.6-SNAPSHOT
../pom.xml
4.0.0
org.wso2.carbon.devicemgt
org.wso2.carbon.policy.decision.point
- 3.0.244-SNAPSHOT
+ 3.1.6-SNAPSHOT
bundle
WSO2 Carbon - Policy Decision Point
WSO2 Carbon - Policy Decision Point
diff --git a/components/policy-mgt/org.wso2.carbon.policy.information.point/pom.xml b/components/policy-mgt/org.wso2.carbon.policy.information.point/pom.xml
index f2e3b8ffd7..7d7ae5cad5 100644
--- a/components/policy-mgt/org.wso2.carbon.policy.information.point/pom.xml
+++ b/components/policy-mgt/org.wso2.carbon.policy.information.point/pom.xml
@@ -3,7 +3,7 @@
org.wso2.carbon.devicemgt
policy-mgt
- 3.0.244-SNAPSHOT
+ 3.1.6-SNAPSHOT
../pom.xml
@@ -11,7 +11,7 @@
4.0.0
org.wso2.carbon.devicemgt
org.wso2.carbon.policy.information.point
- 3.0.244-SNAPSHOT
+ 3.1.6-SNAPSHOT
bundle
WSO2 Carbon - Policy Information Point
WSO2 Carbon - Policy Information Point
diff --git a/components/policy-mgt/org.wso2.carbon.policy.mgt.common/pom.xml b/components/policy-mgt/org.wso2.carbon.policy.mgt.common/pom.xml
index 02bf370df6..4ed3d3a1d4 100644
--- a/components/policy-mgt/org.wso2.carbon.policy.mgt.common/pom.xml
+++ b/components/policy-mgt/org.wso2.carbon.policy.mgt.common/pom.xml
@@ -22,14 +22,14 @@
org.wso2.carbon.devicemgt
policy-mgt
- 3.0.244-SNAPSHOT
+ 3.1.6-SNAPSHOT
../pom.xml
4.0.0
org.wso2.carbon.devicemgt
org.wso2.carbon.policy.mgt.common
- 3.0.244-SNAPSHOT
+ 3.1.6-SNAPSHOT
bundle
WSO2 Carbon - Policy Management Common
WSO2 Carbon - Policy Management Common
diff --git a/components/policy-mgt/org.wso2.carbon.policy.mgt.core/pom.xml b/components/policy-mgt/org.wso2.carbon.policy.mgt.core/pom.xml
index 6a3d219720..c44aedc40b 100644
--- a/components/policy-mgt/org.wso2.carbon.policy.mgt.core/pom.xml
+++ b/components/policy-mgt/org.wso2.carbon.policy.mgt.core/pom.xml
@@ -22,14 +22,14 @@
org.wso2.carbon.devicemgt
policy-mgt
- 3.0.244-SNAPSHOT
+ 3.1.6-SNAPSHOT
../pom.xml
4.0.0
org.wso2.carbon.devicemgt
org.wso2.carbon.policy.mgt.core
- 3.0.244-SNAPSHOT
+ 3.1.6-SNAPSHOT
bundle
WSO2 Carbon - Policy Management Core
WSO2 Carbon - Policy Management Core
diff --git a/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/test/java/org/wso2/carbon/policy/mgt/core/task/TestTaskManagerImpl.java b/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/test/java/org/wso2/carbon/policy/mgt/core/task/TestTaskManagerImpl.java
index cf15c76b0a..3d3f40c0ec 100644
--- a/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/test/java/org/wso2/carbon/policy/mgt/core/task/TestTaskManagerImpl.java
+++ b/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/test/java/org/wso2/carbon/policy/mgt/core/task/TestTaskManagerImpl.java
@@ -21,6 +21,7 @@ package org.wso2.carbon.policy.mgt.core.task;
import org.wso2.carbon.ntask.common.TaskException;
import org.wso2.carbon.ntask.core.TaskInfo;
import org.wso2.carbon.ntask.core.TaskManager;
+import org.wso2.carbon.ntask.core.impl.LocalTaskActionListener;
import java.util.ArrayList;
import java.util.List;
@@ -97,4 +98,9 @@ public class TestTaskManagerImpl implements TaskManager {
public boolean isTaskScheduled(String taskName) throws TaskException {
return this.registeredTasks.size() > 0;
}
+
+ @Override
+ public void registerLocalTaskActionListener(LocalTaskActionListener localTaskActionListener, String s) {
+
+ }
}
diff --git a/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/test/resources/sql/CreateH2TestDB.sql b/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/test/resources/sql/CreateH2TestDB.sql
index 9d4af5087d..af592e6a81 100644
--- a/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/test/resources/sql/CreateH2TestDB.sql
+++ b/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/test/resources/sql/CreateH2TestDB.sql
@@ -414,19 +414,32 @@ CREATE TABLE IF NOT EXISTS DM_APPLICATION (
);
DROP TABLE IF EXISTS DM_DEVICE_APPLICATION_MAPPING;
+
CREATE TABLE IF NOT EXISTS DM_DEVICE_APPLICATION_MAPPING (
ID INTEGER AUTO_INCREMENT NOT NULL,
DEVICE_ID INTEGER NOT NULL,
+ ENROLMENT_ID INTEGER NOT NULL,
APPLICATION_ID INTEGER NOT NULL,
APP_PROPERTIES BLOB NULL,
MEMORY_USAGE INTEGER(10) NULL,
IS_ACTIVE BOOLEAN NOT NULL DEFAULT FALSE,
TENANT_ID INTEGER NOT NULL,
PRIMARY KEY (ID),
- CONSTRAINT fk_dm_device FOREIGN KEY (DEVICE_ID) REFERENCES
- DM_DEVICE (ID) ON DELETE NO ACTION ON UPDATE NO ACTION,
- CONSTRAINT fk_dm_application FOREIGN KEY (APPLICATION_ID) REFERENCES
- DM_APPLICATION (ID) ON DELETE NO ACTION ON UPDATE NO ACTION
+ CONSTRAINT fk_dm_device
+ FOREIGN KEY (DEVICE_ID)
+ REFERENCES DM_DEVICE (ID)
+ ON DELETE NO ACTION
+ ON UPDATE NO ACTION,
+ CONSTRAINT fk_dm_application
+ FOREIGN KEY (APPLICATION_ID)
+ REFERENCES DM_APPLICATION (ID)
+ ON DELETE NO ACTION
+ ON UPDATE NO ACTION,
+ CONSTRAINT FK_DM_APP_MAP_DM_ENROL
+ FOREIGN KEY (ENROLMENT_ID)
+ REFERENCES DM_ENROLMENT (ID)
+ ON DELETE NO ACTION
+ ON UPDATE NO ACTION
);
-- POLICY RELATED TABLES FINISHED --
@@ -448,10 +461,10 @@ CREATE TABLE IF NOT EXISTS DM_NOTIFICATION (
);
-- NOTIFICATION TABLE END --
-DROP TABLE IF EXISTS DM_DEVICE_INFO;
CREATE TABLE IF NOT EXISTS DM_DEVICE_INFO (
ID INTEGER AUTO_INCREMENT NOT NULL,
DEVICE_ID INT NULL,
+ ENROLMENT_ID INT NOT NULL,
KEY_FIELD VARCHAR(45) NULL,
VALUE_FIELD VARCHAR(100) NULL,
PRIMARY KEY (ID),
@@ -459,35 +472,46 @@ CREATE TABLE IF NOT EXISTS DM_DEVICE_INFO (
FOREIGN KEY (DEVICE_ID)
REFERENCES DM_DEVICE (ID)
ON DELETE NO ACTION
+ ON UPDATE NO ACTION,
+ CONSTRAINT DM_DEVICE_INFO_DEVICE_ENROLLMENT
+ FOREIGN KEY (ENROLMENT_ID)
+ REFERENCES DM_ENROLMENT (ID)
+ ON DELETE NO ACTION
ON UPDATE NO ACTION
);
-
-DROP TABLE IF EXISTS DM_DEVICE_LOCATION;
CREATE TABLE IF NOT EXISTS DM_DEVICE_LOCATION (
ID INTEGER AUTO_INCREMENT NOT NULL,
DEVICE_ID INT NULL,
+ ENROLMENT_ID INT NOT NULL,
LATITUDE DOUBLE NULL,
LONGITUDE DOUBLE NULL,
- STREET1 VARCHAR(45) NULL,
+ STREET1 VARCHAR(255) NULL,
STREET2 VARCHAR(45) NULL,
CITY VARCHAR(45) NULL,
ZIP VARCHAR(10) NULL,
STATE VARCHAR(45) NULL,
COUNTRY VARCHAR(45) NULL,
+ GEO_HASH VARCHAR(45) NULL,
UPDATE_TIMESTAMP BIGINT(15) NOT NULL,
PRIMARY KEY (ID),
CONSTRAINT DM_DEVICE_LOCATION_DEVICE
FOREIGN KEY (DEVICE_ID)
REFERENCES DM_DEVICE (ID)
ON DELETE NO ACTION
+ ON UPDATE NO ACTION,
+ CONSTRAINT DM_DEVICE_LOCATION_DM_ENROLLMENT
+ FOREIGN KEY (ENROLMENT_ID)
+ REFERENCES DM_ENROLMENT (ID)
+ ON DELETE NO ACTION
ON UPDATE NO ACTION
);
-DROP TABLE IF EXISTS DM_DEVICE_DETAIL;
+
CREATE TABLE IF NOT EXISTS DM_DEVICE_DETAIL (
ID INT NOT NULL AUTO_INCREMENT,
DEVICE_ID INT NOT NULL,
+ ENROLMENT_ID INT NOT NULL,
DEVICE_MODEL VARCHAR(45) NULL,
VENDOR VARCHAR(45) NULL,
OS_VERSION VARCHAR(45) NULL,
@@ -497,7 +521,7 @@ CREATE TABLE IF NOT EXISTS DM_DEVICE_DETAIL (
INTERNAL_AVAILABLE_MEMORY DECIMAL(30,3) NULL,
EXTERNAL_TOTAL_MEMORY DECIMAL(30,3) NULL,
EXTERNAL_AVAILABLE_MEMORY DECIMAL(30,3) NULL,
- CONNECTION_TYPE VARCHAR(10) NULL,
+ CONNECTION_TYPE VARCHAR(50) NULL,
SSID VARCHAR(45) NULL,
CPU_USAGE DECIMAL(5) NULL,
TOTAL_RAM_MEMORY DECIMAL(30,3) NULL,
@@ -509,10 +533,16 @@ CREATE TABLE IF NOT EXISTS DM_DEVICE_DETAIL (
FOREIGN KEY (DEVICE_ID)
REFERENCES DM_DEVICE (ID)
ON DELETE NO ACTION
+ ON UPDATE NO ACTION,
+ CONSTRAINT FK_DM_ENROLMENT_DEVICE_DETAILS
+ FOREIGN KEY (ENROLMENT_ID)
+ REFERENCES DM_ENROLMENT (ID)
+ ON DELETE NO ACTION
ON UPDATE NO ACTION
);
+
-- POLICY AND DEVICE GROUP MAPPING --
DROP TABLE IF EXISTS DM_DEVICE_GROUP_POLICY;
CREATE TABLE IF NOT EXISTS DM_DEVICE_GROUP_POLICY (
diff --git a/components/policy-mgt/pom.xml b/components/policy-mgt/pom.xml
index 11f4909cb0..21a06e536e 100644
--- a/components/policy-mgt/pom.xml
+++ b/components/policy-mgt/pom.xml
@@ -23,13 +23,13 @@
org.wso2.carbon.devicemgt
carbon-devicemgt
- 3.0.244-SNAPSHOT
+ 3.1.6-SNAPSHOT
../../pom.xml
4.0.0
policy-mgt
- 3.0.244-SNAPSHOT
+ 3.1.6-SNAPSHOT
pom
WSO2 Carbon - Policy Management Component
http://wso2.org
diff --git a/components/test-coverage/pom.xml b/components/test-coverage/pom.xml
index d8ab3645a2..6209b29d1d 100644
--- a/components/test-coverage/pom.xml
+++ b/components/test-coverage/pom.xml
@@ -21,7 +21,7 @@
carbon-devicemgt
org.wso2.carbon.devicemgt
- 3.0.244-SNAPSHOT
+ 3.1.6-SNAPSHOT
../../pom.xml
4.0.0
diff --git a/components/webapp-authenticator-framework/org.wso2.carbon.webapp.authenticator.framework/pom.xml b/components/webapp-authenticator-framework/org.wso2.carbon.webapp.authenticator.framework/pom.xml
index 18fefe60f5..38a8c7efc5 100644
--- a/components/webapp-authenticator-framework/org.wso2.carbon.webapp.authenticator.framework/pom.xml
+++ b/components/webapp-authenticator-framework/org.wso2.carbon.webapp.authenticator.framework/pom.xml
@@ -21,14 +21,14 @@
org.wso2.carbon.devicemgt
webapp-authenticator-framework
- 3.0.244-SNAPSHOT
+ 3.1.6-SNAPSHOT
../pom.xml
4.0.0
org.wso2.carbon.devicemgt
org.wso2.carbon.webapp.authenticator.framework
- 3.0.244-SNAPSHOT
+ 3.1.6-SNAPSHOT
bundle
WSO2 Carbon - Web Application Authenticator Framework Bundle
WSO2 Carbon - Web Application Authenticator Framework Bundle
@@ -184,6 +184,12 @@
org.wso2.carbon.identity.framework
org.wso2.carbon.identity.core
+
+
+ org.slf4j
+ slf4j-api
+
+
org.wso2.carbon.identity.inbound.auth.oauth2
@@ -217,10 +223,6 @@
commons-httpclient.wso2
commons-httpclient
-
- org.testng
- testng
-
commons-pool.wso2
commons-pool
diff --git a/components/webapp-authenticator-framework/pom.xml b/components/webapp-authenticator-framework/pom.xml
index 64756a4791..16b0d5de3a 100644
--- a/components/webapp-authenticator-framework/pom.xml
+++ b/components/webapp-authenticator-framework/pom.xml
@@ -22,14 +22,14 @@
org.wso2.carbon.devicemgt
carbon-devicemgt
- 3.0.244-SNAPSHOT
+ 3.1.6-SNAPSHOT
../../pom.xml
4.0.0
org.wso2.carbon.devicemgt
webapp-authenticator-framework
- 3.0.244-SNAPSHOT
+ 3.1.6-SNAPSHOT
pom
WSO2 Carbon - Webapp Authenticator Framework
http://wso2.org
diff --git a/features/apimgt-extensions/org.wso2.carbon.apimgt.application.extension.feature/pom.xml b/features/apimgt-extensions/org.wso2.carbon.apimgt.application.extension.feature/pom.xml
index 12b0955257..6f69688e96 100644
--- a/features/apimgt-extensions/org.wso2.carbon.apimgt.application.extension.feature/pom.xml
+++ b/features/apimgt-extensions/org.wso2.carbon.apimgt.application.extension.feature/pom.xml
@@ -21,14 +21,14 @@
org.wso2.carbon.devicemgt
apimgt-extensions-feature
- 3.0.244-SNAPSHOT
+ 3.1.6-SNAPSHOT
../pom.xml
4.0.0
org.wso2.carbon.apimgt.application.extension.feature
pom
- 3.0.244-SNAPSHOT
+ 3.1.6-SNAPSHOT
WSO2 Carbon - API Management Application Extension Feature
http://wso2.org
This feature contains an implementation of a api application registration, which takes care of subscription
@@ -129,4 +129,4 @@
-
\ No newline at end of file
+
diff --git a/features/apimgt-extensions/org.wso2.carbon.apimgt.handler.server.feature/pom.xml b/features/apimgt-extensions/org.wso2.carbon.apimgt.handler.server.feature/pom.xml
index 1d8dd99dee..fb4bb0e895 100644
--- a/features/apimgt-extensions/org.wso2.carbon.apimgt.handler.server.feature/pom.xml
+++ b/features/apimgt-extensions/org.wso2.carbon.apimgt.handler.server.feature/pom.xml
@@ -22,14 +22,14 @@
org.wso2.carbon.devicemgt
apimgt-extensions-feature
- 3.0.244-SNAPSHOT
+ 3.1.6-SNAPSHOT
../pom.xml
4.0.0
org.wso2.carbon.apimgt.handler.server.feature
pom
- 3.0.244-SNAPSHOT
+ 3.1.6-SNAPSHOT
WSO2 Carbon - Device Management - APIM handler Server Feature
http://wso2.org
This feature contains the handler for the api authentications
diff --git a/features/apimgt-extensions/org.wso2.carbon.apimgt.handler.server.feature/src/main/resources/conf/iot-api-config.xml b/features/apimgt-extensions/org.wso2.carbon.apimgt.handler.server.feature/src/main/resources/conf/iot-api-config.xml
index ed61a4a115..bb8e00495d 100644
--- a/features/apimgt-extensions/org.wso2.carbon.apimgt.handler.server.feature/src/main/resources/conf/iot-api-config.xml
+++ b/features/apimgt-extensions/org.wso2.carbon.apimgt.handler.server.feature/src/main/resources/conf/iot-api-config.xml
@@ -29,7 +29,7 @@
admin
- https://${iot.keymanager.host}:${iot.keymanager.https.port}/client-registration/v0.11/register
+ https://${iot.keymanager.host}:${iot.keymanager.https.port}/client-registration/v0.12/register
https://${iot.keymanager.host}:${iot.keymanager.https.port}/oauth2/token
diff --git a/features/apimgt-extensions/org.wso2.carbon.apimgt.integration.client.feature/pom.xml b/features/apimgt-extensions/org.wso2.carbon.apimgt.integration.client.feature/pom.xml
index 3d233cd4ff..6d3515d48b 100644
--- a/features/apimgt-extensions/org.wso2.carbon.apimgt.integration.client.feature/pom.xml
+++ b/features/apimgt-extensions/org.wso2.carbon.apimgt.integration.client.feature/pom.xml
@@ -21,13 +21,13 @@
org.wso2.carbon.devicemgt
apimgt-extensions-feature
- 3.0.244-SNAPSHOT
+ 3.1.6-SNAPSHOT
../pom.xml
4.0.0
org.wso2.carbon.apimgt.integration.client.feature
- 3.0.244-SNAPSHOT
+ 3.1.6-SNAPSHOT
pom
WSO2 Carbon - APIM Integration Client Feature
http://wso2.org
diff --git a/features/apimgt-extensions/org.wso2.carbon.apimgt.integration.client.feature/src/main/resources/conf/apim-integration.xml b/features/apimgt-extensions/org.wso2.carbon.apimgt.integration.client.feature/src/main/resources/conf/apim-integration.xml
index dfabaf24f5..55ed6c0cfa 100644
--- a/features/apimgt-extensions/org.wso2.carbon.apimgt.integration.client.feature/src/main/resources/conf/apim-integration.xml
+++ b/features/apimgt-extensions/org.wso2.carbon.apimgt.integration.client.feature/src/main/resources/conf/apim-integration.xml
@@ -19,10 +19,10 @@
-->
- https://${iot.keymanager.host}:${iot.keymanager.https.port}/client-registration/v0.11/register
+ https://${iot.keymanager.host}:${iot.keymanager.https.port}/client-registration/v0.12/register
https://${iot.gateway.host}:${iot.gateway.https.port}/token
- https://${iot.apimpublisher.host}:${iot.apimpublisher.https.port}/api/am/publisher/v0.11
- https://${iot.apimstore.host}:${iot.apimstore.https.port}/api/am/store/v0.11
+ https://${iot.apimpublisher.host}:${iot.apimpublisher.https.port}/api/am/publisher/v0.12
+ https://${iot.apimstore.host}:${iot.apimstore.https.port}/api/am/store/v0.12
admin
admin
\ No newline at end of file
diff --git a/features/apimgt-extensions/org.wso2.carbon.apimgt.webapp.publisher.feature/pom.xml b/features/apimgt-extensions/org.wso2.carbon.apimgt.webapp.publisher.feature/pom.xml
index 0d258f4b40..40ff52d566 100644
--- a/features/apimgt-extensions/org.wso2.carbon.apimgt.webapp.publisher.feature/pom.xml
+++ b/features/apimgt-extensions/org.wso2.carbon.apimgt.webapp.publisher.feature/pom.xml
@@ -21,14 +21,14 @@
org.wso2.carbon.devicemgt
apimgt-extensions-feature
- 3.0.244-SNAPSHOT
+ 3.1.6-SNAPSHOT
../pom.xml
4.0.0
org.wso2.carbon.apimgt.webapp.publisher.feature
pom
- 3.0.244-SNAPSHOT
+ 3.1.6-SNAPSHOT
WSO2 Carbon - API Management Webapp Publisher Feature
http://wso2.org
This feature contains an implementation of a Tomcat lifecycle listener, which takes care of publishing
diff --git a/features/apimgt-extensions/pom.xml b/features/apimgt-extensions/pom.xml
index 23d795acca..96a143f8c9 100644
--- a/features/apimgt-extensions/pom.xml
+++ b/features/apimgt-extensions/pom.xml
@@ -22,14 +22,14 @@
org.wso2.carbon.devicemgt
carbon-devicemgt
- 3.0.244-SNAPSHOT
+ 3.1.6-SNAPSHOT
../../pom.xml
4.0.0
org.wso2.carbon.devicemgt
apimgt-extensions-feature
- 3.0.244-SNAPSHOT
+ 3.1.6-SNAPSHOT
pom
WSO2 Carbon - API Management Extensions Feature
http://wso2.org
diff --git a/features/certificate-mgt/org.wso2.carbon.certificate.mgt.api.feature/pom.xml b/features/certificate-mgt/org.wso2.carbon.certificate.mgt.api.feature/pom.xml
index 6eff66db11..d652538b0f 100644
--- a/features/certificate-mgt/org.wso2.carbon.certificate.mgt.api.feature/pom.xml
+++ b/features/certificate-mgt/org.wso2.carbon.certificate.mgt.api.feature/pom.xml
@@ -22,7 +22,7 @@
org.wso2.carbon.devicemgt
certificate-mgt-feature
- 3.0.244-SNAPSHOT
+ 3.1.6-SNAPSHOT
../pom.xml
diff --git a/features/certificate-mgt/org.wso2.carbon.certificate.mgt.cert.admin.api.feature/pom.xml b/features/certificate-mgt/org.wso2.carbon.certificate.mgt.cert.admin.api.feature/pom.xml
index 7b3f02d99e..42f2f22ef7 100644
--- a/features/certificate-mgt/org.wso2.carbon.certificate.mgt.cert.admin.api.feature/pom.xml
+++ b/features/certificate-mgt/org.wso2.carbon.certificate.mgt.cert.admin.api.feature/pom.xml
@@ -22,7 +22,7 @@
org.wso2.carbon.devicemgt
certificate-mgt-feature
- 3.0.244-SNAPSHOT
+ 3.1.6-SNAPSHOT
../pom.xml
diff --git a/features/certificate-mgt/org.wso2.carbon.certificate.mgt.server.feature/pom.xml b/features/certificate-mgt/org.wso2.carbon.certificate.mgt.server.feature/pom.xml
index 441b2a51c7..08c74a18c1 100644
--- a/features/certificate-mgt/org.wso2.carbon.certificate.mgt.server.feature/pom.xml
+++ b/features/certificate-mgt/org.wso2.carbon.certificate.mgt.server.feature/pom.xml
@@ -22,14 +22,14 @@
org.wso2.carbon.devicemgt
certificate-mgt-feature
- 3.0.244-SNAPSHOT
+ 3.1.6-SNAPSHOT
../pom.xml
4.0.0
org.wso2.carbon.certificate.mgt.server.feature
pom
- 3.0.244-SNAPSHOT
+ 3.1.6-SNAPSHOT
WSO2 Carbon - Certificate Management Server Feature
http://wso2.org
This feature contains the core bundles required for back-end Certificate Management functionality
diff --git a/features/certificate-mgt/pom.xml b/features/certificate-mgt/pom.xml
index 3023801b15..3578139c5f 100644
--- a/features/certificate-mgt/pom.xml
+++ b/features/certificate-mgt/pom.xml
@@ -22,14 +22,14 @@
org.wso2.carbon.devicemgt
carbon-devicemgt
- 3.0.244-SNAPSHOT
+ 3.1.6-SNAPSHOT
../../pom.xml
4.0.0
org.wso2.carbon.devicemgt
certificate-mgt-feature
- 3.0.244-SNAPSHOT
+ 3.1.6-SNAPSHOT
pom
WSO2 Carbon - Certificate Management Feature
http://wso2.org
diff --git a/features/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.device.type.deployer.feature/pom.xml b/features/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.device.type.deployer.feature/pom.xml
index b46f2f5322..f3eb189f1b 100644
--- a/features/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.device.type.deployer.feature/pom.xml
+++ b/features/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.device.type.deployer.feature/pom.xml
@@ -22,14 +22,14 @@
org.wso2.carbon.devicemgt
device-mgt-extensions-feature
- 3.0.244-SNAPSHOT
+ 3.1.6-SNAPSHOT
../pom.xml
4.0.0
org.wso2.carbon.device.mgt.extensions.device.type.deployer.feature
pom
- 3.0.244-SNAPSHOT
+ 3.1.6-SNAPSHOT
WSO2 Carbon - Device Type Deployer Feature
http://wso2.org
WSO2 Carbon - Device Type Deployer Feature
diff --git a/features/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.fcm.feature/pom.xml b/features/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.fcm.feature/pom.xml
index 73dff83cbb..2faea8c21a 100644
--- a/features/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.fcm.feature/pom.xml
+++ b/features/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.fcm.feature/pom.xml
@@ -22,14 +22,14 @@
org.wso2.carbon.devicemgt
device-mgt-extensions-feature
- 3.0.244-SNAPSHOT
+ 3.1.6-SNAPSHOT
../pom.xml
4.0.0
org.wso2.carbon.device.mgt.extensions.push.notification.provider.fcm.feature
pom
- 3.0.244-SNAPSHOT
+ 3.1.6-SNAPSHOT
WSO2 Carbon - FCM Based Push Notification Provider Feature
http://wso2.org
WSO2 Carbon - MQTT Based Push Notification Provider Feature
diff --git a/features/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.http.feature/pom.xml b/features/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.http.feature/pom.xml
index efa8eb5500..3b3a10d237 100644
--- a/features/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.http.feature/pom.xml
+++ b/features/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.http.feature/pom.xml
@@ -22,14 +22,14 @@
org.wso2.carbon.devicemgt
device-mgt-extensions-feature
- 3.0.244-SNAPSHOT
+ 3.1.6-SNAPSHOT
../pom.xml
4.0.0
org.wso2.carbon.device.mgt.extensions.push.notification.provider.http.feature
pom
- 3.0.244-SNAPSHOT
+ 3.1.6-SNAPSHOT
WSO2 Carbon - MQTT Based Push Notification Provider Feature
http://wso2.org
WSO2 Carbon - MQTT Based Push Notification Provider Feature
diff --git a/features/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.mqtt.feature/pom.xml b/features/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.mqtt.feature/pom.xml
index f94ad54a8e..e3aeec7d8d 100644
--- a/features/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.mqtt.feature/pom.xml
+++ b/features/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.mqtt.feature/pom.xml
@@ -22,14 +22,14 @@
org.wso2.carbon.devicemgt
device-mgt-extensions-feature
- 3.0.244-SNAPSHOT
+ 3.1.6-SNAPSHOT
../pom.xml
4.0.0
org.wso2.carbon.device.mgt.extensions.push.notification.provider.mqtt.feature
pom
- 3.0.244-SNAPSHOT
+ 3.1.6-SNAPSHOT
WSO2 Carbon - MQTT Based Push Notification Provider Feature
http://wso2.org
WSO2 Carbon - MQTT Based Push Notification Provider Feature
diff --git a/features/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.xmpp.feature/pom.xml b/features/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.xmpp.feature/pom.xml
index 52a8a063bf..ab7c784063 100644
--- a/features/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.xmpp.feature/pom.xml
+++ b/features/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.xmpp.feature/pom.xml
@@ -22,14 +22,14 @@
org.wso2.carbon.devicemgt
device-mgt-extensions-feature
- 3.0.244-SNAPSHOT
+ 3.1.6-SNAPSHOT
../pom.xml
4.0.0
org.wso2.carbon.device.mgt.extensions.push.notification.provider.xmpp.feature
pom
- 3.0.244-SNAPSHOT
+ 3.1.6-SNAPSHOT
WSO2 Carbon - XMPP Based Push Notification Provider Feature
http://wso2.org
WSO2 Carbon - XMPP Based Push Notification Provider Feature
diff --git a/features/device-mgt-extensions/pom.xml b/features/device-mgt-extensions/pom.xml
index 6fb79bd8df..063dfb6b6f 100644
--- a/features/device-mgt-extensions/pom.xml
+++ b/features/device-mgt-extensions/pom.xml
@@ -22,7 +22,7 @@
org.wso2.carbon.devicemgt
carbon-devicemgt
- 3.0.244-SNAPSHOT
+ 3.1.6-SNAPSHOT
../../pom.xml
diff --git a/features/device-mgt/org.wso2.carbon.device.mgt.analytics.data.publisher.feature/pom.xml b/features/device-mgt/org.wso2.carbon.device.mgt.analytics.data.publisher.feature/pom.xml
index 5b3519f7ac..1e0cd83708 100644
--- a/features/device-mgt/org.wso2.carbon.device.mgt.analytics.data.publisher.feature/pom.xml
+++ b/features/device-mgt/org.wso2.carbon.device.mgt.analytics.data.publisher.feature/pom.xml
@@ -22,14 +22,14 @@
org.wso2.carbon.devicemgt
device-mgt-feature
- 3.0.244-SNAPSHOT
+ 3.1.6-SNAPSHOT
../pom.xml
4.0.0
org.wso2.carbon.device.mgt.analytics.data.publisher.feature
pom
- 3.0.244-SNAPSHOT
+ 3.1.6-SNAPSHOT
WSO2 Carbon - Device Management Server Feature
http://wso2.org
This feature contains bundles related to device analytics data publisher
diff --git a/features/device-mgt/org.wso2.carbon.device.mgt.api.feature/pom.xml b/features/device-mgt/org.wso2.carbon.device.mgt.api.feature/pom.xml
index ab0627e174..2c72d6da2c 100644
--- a/features/device-mgt/org.wso2.carbon.device.mgt.api.feature/pom.xml
+++ b/features/device-mgt/org.wso2.carbon.device.mgt.api.feature/pom.xml
@@ -22,7 +22,7 @@
org.wso2.carbon.devicemgt
device-mgt-feature
- 3.0.244-SNAPSHOT
+ 3.1.6-SNAPSHOT
../pom.xml
diff --git a/features/device-mgt/org.wso2.carbon.device.mgt.basics.feature/pom.xml b/features/device-mgt/org.wso2.carbon.device.mgt.basics.feature/pom.xml
index 8919350ac4..64ea8fba8a 100644
--- a/features/device-mgt/org.wso2.carbon.device.mgt.basics.feature/pom.xml
+++ b/features/device-mgt/org.wso2.carbon.device.mgt.basics.feature/pom.xml
@@ -22,7 +22,7 @@
org.wso2.carbon.devicemgt
device-mgt-feature
- 3.0.244-SNAPSHOT
+ 3.1.6-SNAPSHOT
../pom.xml
diff --git a/features/device-mgt/org.wso2.carbon.device.mgt.basics.feature/src/main/resources/dbscripts/cdm/h2.sql b/features/device-mgt/org.wso2.carbon.device.mgt.basics.feature/src/main/resources/dbscripts/cdm/h2.sql
index 37998699b8..9601b77742 100644
--- a/features/device-mgt/org.wso2.carbon.device.mgt.basics.feature/src/main/resources/dbscripts/cdm/h2.sql
+++ b/features/device-mgt/org.wso2.carbon.device.mgt.basics.feature/src/main/resources/dbscripts/cdm/h2.sql
@@ -366,16 +366,28 @@ CREATE TABLE IF NOT EXISTS DM_APPLICATION (
CREATE TABLE IF NOT EXISTS DM_DEVICE_APPLICATION_MAPPING (
ID INTEGER AUTO_INCREMENT NOT NULL,
DEVICE_ID INTEGER NOT NULL,
+ ENROLMENT_ID INTEGER NOT NULL,
APPLICATION_ID INTEGER NOT NULL,
APP_PROPERTIES BLOB NULL,
MEMORY_USAGE INTEGER(10) NULL,
IS_ACTIVE BOOLEAN NOT NULL DEFAULT FALSE,
TENANT_ID INTEGER NOT NULL,
PRIMARY KEY (ID),
- CONSTRAINT fk_dm_device FOREIGN KEY (DEVICE_ID) REFERENCES
- DM_DEVICE (ID) ON DELETE NO ACTION ON UPDATE NO ACTION,
- CONSTRAINT fk_dm_application FOREIGN KEY (APPLICATION_ID) REFERENCES
- DM_APPLICATION (ID) ON DELETE NO ACTION ON UPDATE NO ACTION
+ CONSTRAINT fk_dm_device
+ FOREIGN KEY (DEVICE_ID)
+ REFERENCES DM_DEVICE (ID)
+ ON DELETE NO ACTION
+ ON UPDATE NO ACTION,
+ CONSTRAINT fk_dm_application
+ FOREIGN KEY (APPLICATION_ID)
+ REFERENCES DM_APPLICATION (ID)
+ ON DELETE NO ACTION
+ ON UPDATE NO ACTION,
+ CONSTRAINT FK_DM_APP_MAP_DM_ENROL
+ FOREIGN KEY (ENROLMENT_ID)
+ REFERENCES DM_ENROLMENT (ID)
+ ON DELETE NO ACTION
+ ON UPDATE NO ACTION
);
-- POLICY RELATED TABLES FINISHED --
@@ -400,6 +412,7 @@ CREATE TABLE IF NOT EXISTS DM_NOTIFICATION (
CREATE TABLE IF NOT EXISTS DM_DEVICE_INFO (
ID INTEGER AUTO_INCREMENT NOT NULL,
DEVICE_ID INT NULL,
+ ENROLMENT_ID INT NOT NULL,
KEY_FIELD VARCHAR(45) NULL,
VALUE_FIELD VARCHAR(100) NULL,
PRIMARY KEY (ID),
@@ -407,12 +420,18 @@ CREATE TABLE IF NOT EXISTS DM_DEVICE_INFO (
FOREIGN KEY (DEVICE_ID)
REFERENCES DM_DEVICE (ID)
ON DELETE NO ACTION
+ ON UPDATE NO ACTION,
+ CONSTRAINT DM_DEVICE_INFO_DEVICE_ENROLLMENT
+ FOREIGN KEY (ENROLMENT_ID)
+ REFERENCES DM_ENROLMENT (ID)
+ ON DELETE NO ACTION
ON UPDATE NO ACTION
);
CREATE TABLE IF NOT EXISTS DM_DEVICE_LOCATION (
ID INTEGER AUTO_INCREMENT NOT NULL,
DEVICE_ID INT NULL,
+ ENROLMENT_ID INT NOT NULL,
LATITUDE DOUBLE NULL,
LONGITUDE DOUBLE NULL,
STREET1 VARCHAR(255) NULL,
@@ -428,6 +447,11 @@ CREATE TABLE IF NOT EXISTS DM_DEVICE_LOCATION (
FOREIGN KEY (DEVICE_ID)
REFERENCES DM_DEVICE (ID)
ON DELETE NO ACTION
+ ON UPDATE NO ACTION,
+ CONSTRAINT DM_DEVICE_LOCATION_DM_ENROLLMENT
+ FOREIGN KEY (ENROLMENT_ID)
+ REFERENCES DM_ENROLMENT (ID)
+ ON DELETE NO ACTION
ON UPDATE NO ACTION
);
CREATE INDEX DM_DEVICE_LOCATION_GEO_hashx ON DM_DEVICE_LOCATION(GEO_HASH ASC);
@@ -435,6 +459,7 @@ CREATE INDEX DM_DEVICE_LOCATION_GEO_hashx ON DM_DEVICE_LOCATION(GEO_HASH ASC);
CREATE TABLE IF NOT EXISTS DM_DEVICE_DETAIL (
ID INT NOT NULL AUTO_INCREMENT,
DEVICE_ID INT NOT NULL,
+ ENROLMENT_ID INT NOT NULL,
DEVICE_MODEL VARCHAR(45) NULL,
VENDOR VARCHAR(45) NULL,
OS_VERSION VARCHAR(45) NULL,
@@ -456,6 +481,11 @@ CREATE TABLE IF NOT EXISTS DM_DEVICE_DETAIL (
FOREIGN KEY (DEVICE_ID)
REFERENCES DM_DEVICE (ID)
ON DELETE NO ACTION
+ ON UPDATE NO ACTION,
+ CONSTRAINT FK_DM_ENROLMENT_DEVICE_DETAILS
+ FOREIGN KEY (ENROLMENT_ID)
+ REFERENCES DM_ENROLMENT (ID)
+ ON DELETE NO ACTION
ON UPDATE NO ACTION
);
diff --git a/features/device-mgt/org.wso2.carbon.device.mgt.basics.feature/src/main/resources/dbscripts/cdm/mssql.sql b/features/device-mgt/org.wso2.carbon.device.mgt.basics.feature/src/main/resources/dbscripts/cdm/mssql.sql
index f96948323f..204fedd387 100644
--- a/features/device-mgt/org.wso2.carbon.device.mgt.basics.feature/src/main/resources/dbscripts/cdm/mssql.sql
+++ b/features/device-mgt/org.wso2.carbon.device.mgt.basics.feature/src/main/resources/dbscripts/cdm/mssql.sql
@@ -395,6 +395,7 @@ IF NOT EXISTS (SELECT * FROM SYS.OBJECTS WHERE OBJECT_ID = OBJECT_ID(N'[DBO].[D
CREATE TABLE DM_DEVICE_APPLICATION_MAPPING (
ID INTEGER IDENTITY(1,1) NOT NULL,
DEVICE_ID INTEGER NOT NULL,
+ ENROLMENT_ID INTEGER NOT NULL,
APPLICATION_ID INTEGER NOT NULL,
APP_PROPERTIES VARBINARY(MAX) NULL,
MEMORY_USAGE INTEGER NULL,
@@ -404,7 +405,9 @@ CREATE TABLE DM_DEVICE_APPLICATION_MAPPING (
CONSTRAINT FK_DM_DEVICE FOREIGN KEY (DEVICE_ID) REFERENCES
DM_DEVICE (ID) ON DELETE NO ACTION ON UPDATE NO ACTION,
CONSTRAINT FK_DM_APPLICATION FOREIGN KEY (APPLICATION_ID) REFERENCES
- DM_APPLICATION (ID) ON DELETE NO ACTION ON UPDATE NO ACTION
+ DM_APPLICATION (ID) ON DELETE NO ACTION ON UPDATE NO ACTION,
+ CONSTRAINT FK_DM_APP_MAP_DM_ENROL FOREIGN KEY (ENROLMENT_ID) REFERENCES
+ DM_ENROLMENT (ID) ON DELETE NO ACTION ON UPDATE NO ACTION
);
-- POLICY RELATED TABLES FINISHED --
@@ -453,18 +456,29 @@ IF NOT EXISTS (SELECT * FROM SYS.OBJECTS WHERE OBJECT_ID = OBJECT_ID(N'[DBO].[D
CREATE TABLE DM_DEVICE_INFO (
ID INTEGER IDENTITY(1,1) NOT NULL,
DEVICE_ID INTEGER NULL,
+ ENROLMENT_ID INTEGER NOT NULL,
KEY_FIELD VARCHAR(45) NULL,
VALUE_FIELD VARCHAR(100) NULL,
PRIMARY KEY (ID),
INDEX DM_DEVICE_INFO_DEVICE_idx (DEVICE_ID ASC),
- CONSTRAINT DM_DEVICE_INFO_DEVICE FOREIGN KEY (DEVICE_ID) REFERENCES DM_DEVICE (ID) ON DELETE NO ACTION
- ON UPDATE NO ACTION
+ INDEX DM_DEVICE_INFO_DEVICE_ENROLLMENT_idx (ENROLMENT_ID ASC)
+ CONSTRAINT DM_DEVICE_INFO_DEVICE
+ FOREIGN KEY (DEVICE_ID)
+ REFERENCES DM_DEVICE (ID)
+ ON DELETE NO ACTION
+ ON UPDATE NO ACTION,
+ CONSTRAINT DM_DEVICE_INFO_DEVICE_ENROLLMENT
+ FOREIGN KEY (ENROLMENT_ID)
+ REFERENCES DM_ENROLMENT (ID)
+ ON DELETE NO ACTION
+ ON UPDATE NO ACTION
);
IF NOT EXISTS (SELECT * FROM SYS.OBJECTS WHERE OBJECT_ID = OBJECT_ID(N'[DBO].[DM_DEVICE_LOCATION]') AND TYPE IN (N'U'))
CREATE TABLE DM_DEVICE_LOCATION (
ID INTEGER IDENTITY(1,1) NOT NULL,
DEVICE_ID INTEGER NULL,
+ ENROLMENT_ID INTEGER NOT NULL,
LATITUDE FLOAT NULL,
LONGITUDE FLOAT NULL,
STREET1 VARCHAR(255) NULL,
@@ -478,10 +492,16 @@ CREATE TABLE DM_DEVICE_LOCATION (
PRIMARY KEY (ID),
INDEX DM_DEVICE_LOCATION_DEVICE_idx (DEVICE_ID ASC),
INDEX DM_DEVICE_LOCATION_GEO_hashx (GEO_HASH ASC),
+ INDEX DM_DEVICE_LOCATION_DM_ENROLLMENT_idx (ENROLMENT_ID ASC),
CONSTRAINT DM_DEVICE_LOCATION_DEVICE
FOREIGN KEY (DEVICE_ID)
REFERENCES DM_DEVICE (ID)
ON DELETE NO ACTION
+ ON UPDATE NO ACTION,
+ CONSTRAINT DM_DEVICE_LOCATION_DM_ENROLLMENT
+ FOREIGN KEY (ENROLMENT_ID)
+ REFERENCES DM_ENROLMENT (ID)
+ ON DELETE NO ACTION
ON UPDATE NO ACTION
);
@@ -489,6 +509,7 @@ IF NOT EXISTS (SELECT * FROM SYS.OBJECTS WHERE OBJECT_ID = OBJECT_ID(N'[DBO].[D
CREATE TABLE DM_DEVICE_DETAIL (
ID INTEGER IDENTITY(1,1) NOT NULL,
DEVICE_ID INTEGER NOT NULL,
+ ENROLMENT_ID INTEGER NOT NULL,
DEVICE_MODEL VARCHAR(45) NULL,
VENDOR VARCHAR(45) NULL,
OS_VERSION VARCHAR(45) NULL,
@@ -507,11 +528,17 @@ CREATE TABLE DM_DEVICE_DETAIL (
UPDATE_TIMESTAMP BIGINT NOT NULL,
PRIMARY KEY (ID),
INDEX FK_DM_DEVICE_DETAILS_DEVICE_idx (DEVICE_ID ASC),
+ INDEX FK_DM_ENROLMENT_DEVICE_DETAILS_idx (ENROLMENT_ID ASC),
CONSTRAINT FK_DM_DEVICE_DETAILS_DEVICE
FOREIGN KEY (DEVICE_ID)
REFERENCES DM_DEVICE (ID)
ON DELETE NO ACTION
- ON UPDATE NO ACTION
+ ON UPDATE NO ACTION,
+ CONSTRAINT FK_DM_ENROLMENT_DEVICE_DETAILS
+ FOREIGN KEY (ENROLMENT_ID)
+ REFERENCES DM_ENROLMENT (ID)
+ ON DELETE NO ACTION
+ ON UPDATE NO ACTION
);
-- DASHBOARD RELATED VIEWS --
diff --git a/features/device-mgt/org.wso2.carbon.device.mgt.basics.feature/src/main/resources/dbscripts/cdm/mysql.sql b/features/device-mgt/org.wso2.carbon.device.mgt.basics.feature/src/main/resources/dbscripts/cdm/mysql.sql
index ad24ba247c..b79a23f79e 100644
--- a/features/device-mgt/org.wso2.carbon.device.mgt.basics.feature/src/main/resources/dbscripts/cdm/mysql.sql
+++ b/features/device-mgt/org.wso2.carbon.device.mgt.basics.feature/src/main/resources/dbscripts/cdm/mysql.sql
@@ -410,6 +410,7 @@ CREATE TABLE IF NOT EXISTS DM_APPLICATION (
CREATE TABLE IF NOT EXISTS DM_DEVICE_APPLICATION_MAPPING (
ID INTEGER AUTO_INCREMENT NOT NULL,
DEVICE_ID INTEGER NOT NULL,
+ ENROLMENT_ID INTEGER NOT NULL,
APPLICATION_ID INTEGER NOT NULL,
APP_PROPERTIES BLOB NULL,
MEMORY_USAGE INTEGER(10) NULL,
@@ -419,7 +420,9 @@ CREATE TABLE IF NOT EXISTS DM_DEVICE_APPLICATION_MAPPING (
CONSTRAINT fk_dm_device FOREIGN KEY (DEVICE_ID) REFERENCES
DM_DEVICE (ID) ON DELETE NO ACTION ON UPDATE NO ACTION,
CONSTRAINT fk_dm_application FOREIGN KEY (APPLICATION_ID) REFERENCES
- DM_APPLICATION (ID) ON DELETE NO ACTION ON UPDATE NO ACTION
+ DM_APPLICATION (ID) ON DELETE NO ACTION ON UPDATE NO ACTION,
+ CONSTRAINT FK_DM_APP_MAP_DM_ENROL FOREIGN KEY (ENROLMENT_ID) REFERENCES
+ DM_ENROLMENT (ID) ON DELETE NO ACTION ON UPDATE NO ACTION
)ENGINE = InnoDB;
-- END OF POLICY RELATED TABLES --
@@ -468,14 +471,21 @@ CREATE TABLE IF NOT EXISTS DM_NOTIFICATION (
CREATE TABLE IF NOT EXISTS DM_DEVICE_INFO (
ID INTEGER AUTO_INCREMENT NOT NULL,
DEVICE_ID INT NULL,
+ ENROLMENT_ID INT NOT NULL,
KEY_FIELD VARCHAR(45) NULL,
VALUE_FIELD VARCHAR(100) NULL,
PRIMARY KEY (ID),
INDEX DM_DEVICE_INFO_DEVICE_idx (DEVICE_ID ASC),
+ INDEX DM_DEVICE_INFO_DEVICE_ENROLLMENT_idx (ENROLMENT_ID ASC),
CONSTRAINT DM_DEVICE_INFO_DEVICE
FOREIGN KEY (DEVICE_ID)
REFERENCES DM_DEVICE (ID)
ON DELETE NO ACTION
+ ON UPDATE NO ACTION,
+ CONSTRAINT DM_DEVICE_INFO_DEVICE_ENROLLMENT
+ FOREIGN KEY (ENROLMENT_ID)
+ REFERENCES DM_ENROLMENT (ID)
+ ON DELETE NO ACTION
ON UPDATE NO ACTION
)
ENGINE = InnoDB;
@@ -483,6 +493,7 @@ ENGINE = InnoDB;
CREATE TABLE IF NOT EXISTS DM_DEVICE_LOCATION (
ID INTEGER AUTO_INCREMENT NOT NULL,
DEVICE_ID INT NULL,
+ ENROLMENT_ID INT NOT NULL,
LATITUDE DOUBLE NULL,
LONGITUDE DOUBLE NULL,
STREET1 VARCHAR(255) NULL,
@@ -496,10 +507,16 @@ CREATE TABLE IF NOT EXISTS DM_DEVICE_LOCATION (
PRIMARY KEY (ID),
INDEX DM_DEVICE_LOCATION_DEVICE_idx (DEVICE_ID ASC),
INDEX DM_DEVICE_LOCATION_GEO_hashx (GEO_HASH ASC),
+ INDEX DM_DEVICE_LOCATION_DM_ENROLLMENT_idx (ENROLMENT_ID ASC),
CONSTRAINT DM_DEVICE_LOCATION_DEVICE
FOREIGN KEY (DEVICE_ID)
REFERENCES DM_DEVICE (ID)
ON DELETE NO ACTION
+ ON UPDATE NO ACTION,
+ CONSTRAINT DM_DEVICE_LOCATION_DM_ENROLLMENT
+ FOREIGN KEY (ENROLMENT_ID)
+ REFERENCES DM_ENROLMENT (ID)
+ ON DELETE NO ACTION
ON UPDATE NO ACTION
)
ENGINE = InnoDB;
@@ -507,6 +524,7 @@ ENGINE = InnoDB;
CREATE TABLE IF NOT EXISTS DM_DEVICE_DETAIL (
ID INT NOT NULL AUTO_INCREMENT,
DEVICE_ID INT NOT NULL,
+ ENROLMENT_ID INT NOT NULL,
DEVICE_MODEL VARCHAR(45) NULL,
VENDOR VARCHAR(45) NULL,
OS_VERSION VARCHAR(45) NULL,
@@ -525,11 +543,18 @@ CREATE TABLE IF NOT EXISTS DM_DEVICE_DETAIL (
UPDATE_TIMESTAMP BIGINT(15) NOT NULL,
PRIMARY KEY (ID),
INDEX FK_DM_DEVICE_DETAILS_DEVICE_idx (DEVICE_ID ASC),
+ INDEX FK_DM_ENROLMENT_DEVICE_DETAILS_idx (ENROLMENT_ID ASC),
CONSTRAINT FK_DM_DEVICE_DETAILS_DEVICE
FOREIGN KEY (DEVICE_ID)
REFERENCES DM_DEVICE (ID)
ON DELETE NO ACTION
- ON UPDATE NO ACTION)
+ ON UPDATE NO ACTION,
+ CONSTRAINT FK_DM_ENROLMENT_DEVICE_DETAILS
+ FOREIGN KEY (ENROLMENT_ID)
+ REFERENCES DM_ENROLMENT (ID)
+ ON DELETE NO ACTION
+ ON UPDATE NO ACTION
+)
ENGINE = InnoDB;
-- DASHBOARD RELATED VIEWS --
diff --git a/features/device-mgt/org.wso2.carbon.device.mgt.basics.feature/src/main/resources/dbscripts/cdm/oracle.sql b/features/device-mgt/org.wso2.carbon.device.mgt.basics.feature/src/main/resources/dbscripts/cdm/oracle.sql
index 082ee73a50..cc89ec76f3 100644
--- a/features/device-mgt/org.wso2.carbon.device.mgt.basics.feature/src/main/resources/dbscripts/cdm/oracle.sql
+++ b/features/device-mgt/org.wso2.carbon.device.mgt.basics.feature/src/main/resources/dbscripts/cdm/oracle.sql
@@ -714,6 +714,7 @@ WHEN (NEW.ID IS NULL)
CREATE TABLE DM_DEVICE_APPLICATION_MAPPING (
ID NUMBER(10) NOT NULL,
DEVICE_ID NUMBER(10) NOT NULL,
+ ENROLMENT_ID NUMBER(10 NOT NULL,
APPLICATION_ID NUMBER(10) NOT NULL,
APP_PROPERTIES BLOB NULL,
MEMORY_USAGE NUMBER(10) NULL,
@@ -723,7 +724,9 @@ CREATE TABLE DM_DEVICE_APPLICATION_MAPPING (
CONSTRAINT fk_dm_device FOREIGN KEY (DEVICE_ID) REFERENCES
DM_DEVICE (ID),
CONSTRAINT fk_dm_application FOREIGN KEY (APPLICATION_ID) REFERENCES
- DM_APPLICATION (ID)
+ DM_APPLICATION (ID),
+ CONSTRAINT FK_DM_APP_MAP_DM_ENROL FOREIGN KEY (ENROLMENT_ID) REFERENCES
+ DM_ENROLMENT (ID)
)
/
-- Generate ID using sequence and trigger
@@ -786,14 +789,17 @@ END;
CREATE TABLE DM_DEVICE_INFO (
ID NUMBER(10) NOT NULL,
- DEVICE_ID NUMBER(10) NULL,
+ DEVICE_ID NUMBER(10) NOT NULL,
+ ENROLMENT_ID NUMBER(10) NOT NULL,
KEY_FIELD VARCHAR2(45) NULL,
VALUE_FIELD VARCHAR2(100) NULL,
- PRIMARY KEY (ID)
- ,
+ PRIMARY KEY (ID),
CONSTRAINT DM_DEVICE_INFO_DEVICE
FOREIGN KEY (DEVICE_ID)
- REFERENCES DM_DEVICE (ID)
+ REFERENCES DM_DEVICE (ID),
+ CONSTRAINT DM_DEVICE_INFO_DEVICE_ENROLLMENT
+ FOREIGN KEY (ENROLMENT_ID)
+ REFERENCES DM_ENROLMENT (ID)
)
/
@@ -810,7 +816,8 @@ WHEN (NEW.ID IS NULL)
CREATE TABLE DM_DEVICE_LOCATION (
ID NUMBER(10) NOT NULL,
- DEVICE_ID NUMBER(10) NULL,
+ DEVICE_ID NUMBER(10) NOT NULL,
+ ENROLMENT_ID NUMBER(10) NOT NULL,
LATITUDE BINARY_DOUBLE NULL,
LONGITUDE BINARY_DOUBLE NULL,
STREET1 VARCHAR2(255) NULL,
@@ -824,7 +831,10 @@ CREATE TABLE DM_DEVICE_LOCATION (
PRIMARY KEY (ID),
CONSTRAINT DM_DEVICE_LOCATION_DEVICE
FOREIGN KEY (DEVICE_ID)
- REFERENCES DM_DEVICE (ID)
+ REFERENCES DM_DEVICE (ID),
+ CONSTRAINT DM_DEVICE_LOCATION_DM_ENROLLMENT
+ FOREIGN KEY (ENROLMENT_ID)
+ REFERENCES DM_ENROLMENT (ID)
)
/
@@ -845,6 +855,7 @@ WHEN (NEW.ID IS NULL)
CREATE TABLE DM_DEVICE_DETAIL (
ID NUMBER(10) NOT NULL,
DEVICE_ID NUMBER(10) NOT NULL,
+ ENROLMENT_ID NUMBER(10) NOT NULL,
DEVICE_MODEL VARCHAR2(45) NULL,
VENDOR VARCHAR2(45) NULL,
OS_VERSION VARCHAR2(45) NULL,
@@ -864,7 +875,10 @@ CREATE TABLE DM_DEVICE_DETAIL (
PRIMARY KEY (ID),
CONSTRAINT FK_DM_DEVICE_DETAILS_DEVICE
FOREIGN KEY (DEVICE_ID)
- REFERENCES DM_DEVICE (ID)
+ REFERENCES DM_DEVICE (ID),
+ CONSTRAINT FK_DM_ENROLMENT_DEVICE_DETAILS
+ FOREIGN KEY (ENROLMENT_ID)
+ REFERENCES DM_ENROLMENT (ID)
)
/
-- Generate ID using sequence and trigger
diff --git a/features/device-mgt/org.wso2.carbon.device.mgt.basics.feature/src/main/resources/dbscripts/cdm/postgresql.sql b/features/device-mgt/org.wso2.carbon.device.mgt.basics.feature/src/main/resources/dbscripts/cdm/postgresql.sql
index 457fee723d..7f74ab5246 100644
--- a/features/device-mgt/org.wso2.carbon.device.mgt.basics.feature/src/main/resources/dbscripts/cdm/postgresql.sql
+++ b/features/device-mgt/org.wso2.carbon.device.mgt.basics.feature/src/main/resources/dbscripts/cdm/postgresql.sql
@@ -356,6 +356,7 @@ CREATE TABLE IF NOT EXISTS DM_APPLICATION (
CREATE TABLE IF NOT EXISTS DM_DEVICE_APPLICATION_MAPPING (
ID BIGSERIAL NOT NULL PRIMARY KEY,
DEVICE_ID INTEGER NOT NULL,
+ ENROLMENT_ID INTEGER NOT NULL,
APPLICATION_ID INTEGER NOT NULL,
APP_PROPERTIES BYTEA NULL,
MEMORY_USAGE INTEGER NULL,
@@ -364,7 +365,9 @@ CREATE TABLE IF NOT EXISTS DM_DEVICE_APPLICATION_MAPPING (
CONSTRAINT fk_dm_device FOREIGN KEY (DEVICE_ID) REFERENCES
DM_DEVICE (ID) ON DELETE NO ACTION ON UPDATE NO ACTION,
CONSTRAINT fk_dm_application FOREIGN KEY (APPLICATION_ID) REFERENCES
- DM_APPLICATION (ID) ON DELETE NO ACTION ON UPDATE NO ACTION
+ DM_APPLICATION (ID) ON DELETE NO ACTION ON UPDATE NO ACTION,
+ CONSTRAINT FK_DM_APP_MAP_DM_ENROL FOREIGN KEY (ENROLMENT_ID) REFERENCES
+ DM_ENROLMENT (ID) ON DELETE NO ACTION ON UPDATE NO ACTION
);
-- POLICY RELATED TABLES FINISHED --
@@ -412,20 +415,27 @@ CREATE TABLE IF NOT EXISTS DM_NOTIFICATION (
CREATE TABLE IF NOT EXISTS DM_DEVICE_INFO (
ID BIGSERIAL NOT NULL PRIMARY KEY,
- DEVICE_ID INT NULL,
+ DEVICE_ID INT NOT NULL,
+ ENROLMENT_ID INT NOT NULL,
KEY_FIELD VARCHAR(45) NULL,
VALUE_FIELD VARCHAR(100) NULL,
CONSTRAINT DM_DEVICE_INFO_DEVICE
FOREIGN KEY (DEVICE_ID)
REFERENCES DM_DEVICE (ID)
ON DELETE NO ACTION
+ ON UPDATE NO ACTION,
+ CONSTRAINT DM_DEVICE_INFO_DEVICE_ENROLLMENT
+ FOREIGN KEY (ENROLMENT_ID)
+ REFERENCES DM_ENROLMENT (ID)
+ ON DELETE NO ACTION
ON UPDATE NO ACTION
);
CREATE TABLE IF NOT EXISTS DM_DEVICE_LOCATION (
ID BIGSERIAL NOT NULL PRIMARY KEY,
- DEVICE_ID INT NULL,
+ DEVICE_ID INT NOT NULL,
+ ENROLMENT_ID INT NOT NULL,
LATITUDE DOUBLE PRECISION NULL,
LONGITUDE DOUBLE PRECISION NULL,
STREET1 VARCHAR(255) NULL,
@@ -440,6 +450,11 @@ CREATE TABLE IF NOT EXISTS DM_DEVICE_LOCATION (
FOREIGN KEY (DEVICE_ID)
REFERENCES DM_DEVICE (ID)
ON DELETE NO ACTION
+ ON UPDATE NO ACTION,
+ CONSTRAINT DM_DEVICE_LOCATION_DM_ENROLLMENT
+ FOREIGN KEY (ENROLMENT_ID)
+ REFERENCES DM_ENROLMENT (ID)
+ ON DELETE NO ACTION
ON UPDATE NO ACTION
);
@@ -448,6 +463,7 @@ CREATE INDEX DM_DEVICE_LOCATION_GEO_hashx ON DM_DEVICE_LOCATION(GEO_HASH ASC);
CREATE TABLE IF NOT EXISTS DM_DEVICE_DETAIL (
ID BIGSERIAL NOT NULL PRIMARY KEY,
DEVICE_ID INT NOT NULL,
+ ENROLMENT_ID INT NOT NULL,
DEVICE_MODEL VARCHAR(45) NULL,
VENDOR VARCHAR(45) NULL,
OS_VERSION VARCHAR(45) NULL,
@@ -468,6 +484,11 @@ CREATE TABLE IF NOT EXISTS DM_DEVICE_DETAIL (
FOREIGN KEY (DEVICE_ID)
REFERENCES DM_DEVICE (ID)
ON DELETE NO ACTION
+ ON UPDATE NO ACTION,
+ CONSTRAINT FK_DM_ENROLMENT_DEVICE_DETAILS
+ FOREIGN KEY (ENROLMENT_ID)
+ REFERENCES DM_ENROLMENT (ID)
+ ON DELETE NO ACTION
ON UPDATE NO ACTION
);
diff --git a/features/device-mgt/org.wso2.carbon.device.mgt.extensions.feature/pom.xml b/features/device-mgt/org.wso2.carbon.device.mgt.extensions.feature/pom.xml
index 859fdeb362..977a3b40d8 100644
--- a/features/device-mgt/org.wso2.carbon.device.mgt.extensions.feature/pom.xml
+++ b/features/device-mgt/org.wso2.carbon.device.mgt.extensions.feature/pom.xml
@@ -4,14 +4,14 @@
org.wso2.carbon.devicemgt
device-mgt-feature
- 3.0.244-SNAPSHOT
+ 3.1.6-SNAPSHOT
../pom.xml
4.0.0
org.wso2.carbon.device.mgt.extensions.feature
pom
- 3.0.244-SNAPSHOT
+ 3.1.6-SNAPSHOT
WSO2 Carbon - Device Management Extensions Feature
http://wso2.org
This feature contains common extensions used by key device management functionalities
diff --git a/features/device-mgt/org.wso2.carbon.device.mgt.feature/pom.xml b/features/device-mgt/org.wso2.carbon.device.mgt.feature/pom.xml
index 476cc0091f..f0a6ea1509 100644
--- a/features/device-mgt/org.wso2.carbon.device.mgt.feature/pom.xml
+++ b/features/device-mgt/org.wso2.carbon.device.mgt.feature/pom.xml
@@ -22,7 +22,7 @@
org.wso2.carbon.devicemgt
device-mgt-feature
- 3.0.244-SNAPSHOT
+ 3.1.6-SNAPSHOT
../pom.xml
diff --git a/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/pom.xml b/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/pom.xml
index 42ffde47ea..62008488d9 100644
--- a/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/pom.xml
+++ b/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/pom.xml
@@ -22,14 +22,14 @@
org.wso2.carbon.devicemgt
device-mgt-feature
- 3.0.244-SNAPSHOT
+ 3.1.6-SNAPSHOT
../pom.xml
4.0.0
org.wso2.carbon.device.mgt.server.feature
pom
- 3.0.244-SNAPSHOT
+ 3.1.6-SNAPSHOT
WSO2 Carbon - Device Management Server Feature
http://wso2.org
This feature contains the core bundles required for Back-end Device Management functionality
@@ -121,9 +121,6 @@
org.wso2.carbon.devicemgt:org.wso2.carbon.device.mgt.extensions.pull.notification:${carbon.device.mgt.version}
-
- org.wso2.carbon.identity.inbound.auth.oauth2:org.wso2.carbon.identity.oauth.stub:${identity.inbound.auth.oauth.version}
-
org.wso2.carbon.apimgt:org.wso2.carbon.apimgt.keymgt:${carbon.api.mgt.version}
diff --git a/features/device-mgt/org.wso2.carbon.device.mgt.ui.feature/pom.xml b/features/device-mgt/org.wso2.carbon.device.mgt.ui.feature/pom.xml
index 7f5194a131..643274f88e 100644
--- a/features/device-mgt/org.wso2.carbon.device.mgt.ui.feature/pom.xml
+++ b/features/device-mgt/org.wso2.carbon.device.mgt.ui.feature/pom.xml
@@ -22,7 +22,7 @@
org.wso2.carbon.devicemgt
device-mgt-feature
- 3.0.244-SNAPSHOT
+ 3.1.6-SNAPSHOT
../pom.xml
diff --git a/features/device-mgt/pom.xml b/features/device-mgt/pom.xml
index 5e34307382..a7fd0a2ae9 100644
--- a/features/device-mgt/pom.xml
+++ b/features/device-mgt/pom.xml
@@ -22,7 +22,7 @@
org.wso2.carbon.devicemgt
carbon-devicemgt
- 3.0.244-SNAPSHOT
+ 3.1.6-SNAPSHOT
../../pom.xml
@@ -42,4 +42,4 @@
org.wso2.carbon.device.mgt.analytics.data.publisher.feature
-
\ No newline at end of file
+
diff --git a/features/email-sender/org.wso2.carbon.email.sender.feature/pom.xml b/features/email-sender/org.wso2.carbon.email.sender.feature/pom.xml
index 570de6e9e7..1367d13dbf 100644
--- a/features/email-sender/org.wso2.carbon.email.sender.feature/pom.xml
+++ b/features/email-sender/org.wso2.carbon.email.sender.feature/pom.xml
@@ -22,14 +22,14 @@
org.wso2.carbon.devicemgt
email-sender-feature
- 3.0.244-SNAPSHOT
+ 3.1.6-SNAPSHOT
../pom.xml
4.0.0
org.wso2.carbon.email.sender.feature
pom
- 3.0.244-SNAPSHOT
+ 3.1.6-SNAPSHOT
WSO2 Carbon - Email Sender Feature
http://wso2.org
This feature contains the core bundles required for email sender related functionality
diff --git a/features/email-sender/pom.xml b/features/email-sender/pom.xml
index 5532565d01..cddadc3985 100644
--- a/features/email-sender/pom.xml
+++ b/features/email-sender/pom.xml
@@ -22,14 +22,14 @@
org.wso2.carbon.devicemgt
carbon-devicemgt
- 3.0.244-SNAPSHOT
+ 3.1.6-SNAPSHOT
../../pom.xml
4.0.0
org.wso2.carbon.devicemgt
email-sender-feature
- 3.0.244-SNAPSHOT
+ 3.1.6-SNAPSHOT
pom
WSO2 Carbon - Email Sender Feature
http://wso2.org
diff --git a/features/jwt-client/org.wso2.carbon.identity.jwt.client.extension.feature/pom.xml b/features/jwt-client/org.wso2.carbon.identity.jwt.client.extension.feature/pom.xml
index 56ebe365b3..6a90601b34 100644
--- a/features/jwt-client/org.wso2.carbon.identity.jwt.client.extension.feature/pom.xml
+++ b/features/jwt-client/org.wso2.carbon.identity.jwt.client.extension.feature/pom.xml
@@ -23,14 +23,14 @@
org.wso2.carbon.devicemgt
jwt-client-feature
- 3.0.244-SNAPSHOT
+ 3.1.6-SNAPSHOT
../pom.xml
4.0.0
org.wso2.carbon.identity.jwt.client.extension.feature
pom
- 3.0.244-SNAPSHOT
+ 3.1.6-SNAPSHOT
WSO2 Carbon - JWT Client Feature
http://wso2.org
This feature contains jwt client implementation from which we can get a access token using the jwt
diff --git a/features/jwt-client/pom.xml b/features/jwt-client/pom.xml
index 54ae227718..aada8090b1 100644
--- a/features/jwt-client/pom.xml
+++ b/features/jwt-client/pom.xml
@@ -23,13 +23,13 @@
org.wso2.carbon.devicemgt
carbon-devicemgt
- 3.0.244-SNAPSHOT
+ 3.1.6-SNAPSHOT
../../pom.xml
4.0.0
jwt-client-feature
- 3.0.244-SNAPSHOT
+ 3.1.6-SNAPSHOT
pom
WSO2 Carbon - JWT Client Extension Feature
http://wso2.org
diff --git a/features/oauth-extensions/org.wso2.carbon.device.mgt.oauth.extensions.feature/pom.xml b/features/oauth-extensions/org.wso2.carbon.device.mgt.oauth.extensions.feature/pom.xml
index 63af261380..d557ddaf71 100644
--- a/features/oauth-extensions/org.wso2.carbon.device.mgt.oauth.extensions.feature/pom.xml
+++ b/features/oauth-extensions/org.wso2.carbon.device.mgt.oauth.extensions.feature/pom.xml
@@ -23,14 +23,14 @@
org.wso2.carbon.devicemgt
oauth-extensions-feature
- 3.0.244-SNAPSHOT
+ 3.1.6-SNAPSHOT
../pom.xml
4.0.0
org.wso2.carbon.device.mgt.oauth.extensions.feature
pom
- 3.0.244-SNAPSHOT
+ 3.1.6-SNAPSHOT
WSO2 Carbon - Device Mgt OAuth Extensions Feature
http://wso2.org
This feature contains devicemgt related OAuth extensions
diff --git a/features/oauth-extensions/pom.xml b/features/oauth-extensions/pom.xml
index c20624d705..5f54761ebd 100644
--- a/features/oauth-extensions/pom.xml
+++ b/features/oauth-extensions/pom.xml
@@ -22,14 +22,14 @@
org.wso2.carbon.devicemgt
carbon-devicemgt
- 3.0.244-SNAPSHOT
+ 3.1.6-SNAPSHOT
../../pom.xml
4.0.0
org.wso2.carbon.devicemgt
oauth-extensions-feature
- 3.0.244-SNAPSHOT
+ 3.1.6-SNAPSHOT
pom
WSO2 Carbon - Device Management OAuth Extensions Feature
http://wso2.org
diff --git a/features/policy-mgt/org.wso2.carbon.policy.mgt.server.feature/pom.xml b/features/policy-mgt/org.wso2.carbon.policy.mgt.server.feature/pom.xml
index fc7f7f6f3b..c209ee0fa9 100644
--- a/features/policy-mgt/org.wso2.carbon.policy.mgt.server.feature/pom.xml
+++ b/features/policy-mgt/org.wso2.carbon.policy.mgt.server.feature/pom.xml
@@ -23,14 +23,14 @@
org.wso2.carbon.devicemgt
policy-mgt-feature
- 3.0.244-SNAPSHOT
+ 3.1.6-SNAPSHOT
../pom.xml
4.0.0
org.wso2.carbon.policy.mgt.server.feature
pom
- 3.0.244-SNAPSHOT
+ 3.1.6-SNAPSHOT
WSO2 Carbon - Policy Management Server Feature
http://wso2.org
This feature contains the core bundles required for Back-end Device Management functionality
diff --git a/features/policy-mgt/pom.xml b/features/policy-mgt/pom.xml
index bb5dbdcc21..a9c429e9dc 100644
--- a/features/policy-mgt/pom.xml
+++ b/features/policy-mgt/pom.xml
@@ -23,14 +23,14 @@
org.wso2.carbon.devicemgt
carbon-devicemgt
- 3.0.244-SNAPSHOT
+ 3.1.6-SNAPSHOT
../../pom.xml
4.0.0
org.wso2.carbon.devicemgt
policy-mgt-feature
- 3.0.244-SNAPSHOT
+ 3.1.6-SNAPSHOT
pom
WSO2 Carbon - Policy Management Feature
http://wso2.org
diff --git a/features/webapp-authenticator-framework/org.wso2.carbon.webapp.authenticator.framework.server.feature/pom.xml b/features/webapp-authenticator-framework/org.wso2.carbon.webapp.authenticator.framework.server.feature/pom.xml
index ba7163a292..4d914f1f0e 100644
--- a/features/webapp-authenticator-framework/org.wso2.carbon.webapp.authenticator.framework.server.feature/pom.xml
+++ b/features/webapp-authenticator-framework/org.wso2.carbon.webapp.authenticator.framework.server.feature/pom.xml
@@ -22,14 +22,14 @@
org.wso2.carbon.devicemgt
webapp-authenticator-framework-feature
- 3.0.244-SNAPSHOT
+ 3.1.6-SNAPSHOT
../pom.xml
4.0.0
org.wso2.carbon.webapp.authenticator.framework.server.feature
pom
- 3.0.244-SNAPSHOT
+ 3.1.6-SNAPSHOT
WSO2 Carbon - Webapp Authenticator Framework Server Feature
http://wso2.org
This feature contains the core bundles required for Back-end Device Management functionality
diff --git a/features/webapp-authenticator-framework/pom.xml b/features/webapp-authenticator-framework/pom.xml
index 8b3657c19a..59c2f2721b 100644
--- a/features/webapp-authenticator-framework/pom.xml
+++ b/features/webapp-authenticator-framework/pom.xml
@@ -22,14 +22,14 @@
org.wso2.carbon.devicemgt
carbon-devicemgt
- 3.0.244-SNAPSHOT
+ 3.1.6-SNAPSHOT
../../pom.xml
4.0.0
org.wso2.carbon.devicemgt
webapp-authenticator-framework-feature
- 3.0.244-SNAPSHOT
+ 3.1.6-SNAPSHOT
pom
WSO2 Carbon - Webapp Authenticator Framework Feature
http://wso2.org
diff --git a/pom.xml b/pom.xml
index 0e7e03645c..75fd1206a5 100644
--- a/pom.xml
+++ b/pom.xml
@@ -23,7 +23,7 @@
org.wso2.carbon.devicemgt
carbon-devicemgt
pom
- 3.0.244-SNAPSHOT
+ 3.1.6-SNAPSHOT
WSO2 Carbon - Device Management - Parent
http://wso2.org
WSO2 Connected Device Manager Components
@@ -401,6 +401,10 @@
org.wso2.securevault
org.wso2.securevault
+
+ org.mockito
+ mockito-core
+
@@ -884,6 +888,16 @@
org.wso2.carbon.identity.framework
org.wso2.carbon.identity.core
${carbon.identity.framework.version}
+
+
+ org.powermock
+ powermock-api-mockito
+
+
+ org.powermock
+ powermock-module-testng
+
+
org.wso2.carbon.identity.inbound.auth.oauth2
@@ -904,6 +918,24 @@
org.wso2.carbon.identity.inbound.auth.oauth2
org.wso2.carbon.identity.oauth
${identity.inbound.auth.oauth.version}
+
+
+ org.apache.tomcat
+ tomcat-coyote
+
+
+ org.wso2.carbon.consent.mgt
+ org.wso2.carbon.consent.mgt.core
+
+
+ org.wso2.carbon.identity.framework
+ org.wso2.carbon.identity.event
+
+
+ org.wso2.carbon.identity.framework
+ org.wso2.carbon.identity.testutil
+
+
org.wso2.carbon.identity.framework
@@ -914,11 +946,27 @@
org.wso2.carbon.identity.framework
org.wso2.carbon.user.mgt
${carbon.identity.framework.version}
+
+
+ org.slf4j
+ log4j-over-slf4j
+
+
org.wso2.carbon.identity.framework
org.wso2.carbon.identity.base
${carbon.identity.framework.version}
+
+
+ org.powermock
+ powermock-api-mockito
+
+
+ org.powermock
+ powermock-module-testng
+
+
@@ -1293,6 +1341,10 @@
org.wso2.carbon.identity
org.wso2.carbon.user.mgt
+
+ org.powermock
+ powermock-api-mockito
+
@@ -1808,8 +1860,7 @@
2.2.1
6.1.1
- 4.4.17
- 4.4.9
+ 4.4.25
[4.4.0, 5.0.0)
1.5.4
1.3
@@ -1849,13 +1900,13 @@
7.0.34.wso2v2
- 4.7.2
+ 4.7.10
- 5.7.0
+ 5.11.139
[5.0.0, 6.0.0)
- 5.3.1
- 5.3.0
+ 5.6.53
+ 5.4.4
1.0.2
[1.0.2, 2.0.0)
@@ -1864,10 +1915,10 @@
[5.1.0, 6.0.0)
- 4.6.1
+ 4.6.8
- 4.7.8
+ 4.7.23
1.2.11-wso2v10
@@ -1875,10 +1926,10 @@
1.2.11.wso2v10
- 3.0.244-SNAPSHOT
+ 3.1.6-SNAPSHOT
- 4.4.8
+ 4.6.21
1.4.0.wso2v1
[1.4.0,2.0.0)
2.4.0.wso2v1
@@ -1886,18 +1937,18 @@
[2.6.0,3.0.0)
- 6.1.109
+ 6.2.146
(6.0.0,7.0.0]
- 5.1.3
+ 5.1.33
[5.1.3,6.0.0)
1.3.3
[1.3.0,2.0.0)
2.1.10
- 4.6.8
+ 4.6.28
4.6.8
[4.4.8, 5.0.0)
@@ -1969,7 +2020,7 @@
2.5
- 1.0.2
+ 1.0.10
2.6.1.wso2v1
2.6.1.wso2v3
2.8.2.wso2v1
@@ -1985,7 +2036,7 @@
[1.0.0, 1.1.0)
- 1.6.1
+ 1.7.0
2.3.2
@@ -1998,7 +2049,7 @@
1.5.11.wso2v15
- 1.4.4
+ 1.5.1
9.3.1