From f5609cc8ff1128ea556e15ac56237cb348c44b92 Mon Sep 17 00:00:00 2001 From: mharindu Date: Thu, 11 Aug 2016 12:19:05 +0530 Subject: [PATCH 01/43] Adding carbon 4.4.7 migration changes --- .../APIManagementProviderServiceImpl.java | 16 ++------- .../mgt/oauth/extensions/OAuthExtUtils.java | 2 +- .../OAuthExtensionServiceComponent.java | 2 +- .../AuthenticationFrameworkUtil.java | 2 +- .../pom.xml | 2 +- pom.xml | 36 ++++++++++--------- 6 files changed, 26 insertions(+), 34 deletions(-) diff --git a/components/apimgt-extensions/org.wso2.carbon.apimgt.application.extension/src/main/java/org/wso2/carbon/apimgt/application/extension/APIManagementProviderServiceImpl.java b/components/apimgt-extensions/org.wso2.carbon.apimgt.application.extension/src/main/java/org/wso2/carbon/apimgt/application/extension/APIManagementProviderServiceImpl.java index 304cab7df0..51be025f2b 100644 --- a/components/apimgt-extensions/org.wso2.carbon.apimgt.application.extension/src/main/java/org/wso2/carbon/apimgt/application/extension/APIManagementProviderServiceImpl.java +++ b/components/apimgt-extensions/org.wso2.carbon.apimgt.application.extension/src/main/java/org/wso2/carbon/apimgt/application/extension/APIManagementProviderServiceImpl.java @@ -159,14 +159,8 @@ public class APIManagementProviderServiceImpl implements APIManagementProviderSe } } - String[] allowedDomains = new String[1]; - if (isAllowedAllDomains) { - allowedDomains[0] = ApiApplicationConstants.ALLOWED_DOMAINS; - } else { - allowedDomains[0] = APIManagerUtil.getTenantDomain(); - } apiConsumer.mapExistingOAuthClient(jsonString, username, clientId, applicationName, - ApiApplicationConstants.DEFAULT_TOKEN_TYPE, allowedDomains); + ApiApplicationConstants.DEFAULT_TOKEN_TYPE); if (tags != null && tags.length > 0) { createApplicationAndSubscribeToAPIs(applicationName, tags, username); } @@ -327,11 +321,7 @@ public class APIManagementProviderServiceImpl implements APIManagementProviderSe if (consumer != null) { synchronized (consumer) { if (consumer.getSubscriber(subscriberName) == null) { - Subscriber subscriber = new Subscriber(subscriberName); - subscriber.setSubscribedDate(new Date()); - subscriber.setEmail(subscriberEmail); - subscriber.setTenantId(tenantId); - consumer.addSubscriber(subscriber, groupId); + consumer.addSubscriber(subscriberName, groupId); if (log.isDebugEnabled()) { log.debug("Successfully created subscriber with name : " + subscriberName + " with groupID : " + groupId); @@ -365,7 +355,7 @@ public class APIManagementProviderServiceImpl implements APIManagementProviderSe Subscriber subscriber = apiConsumer.getSubscriber(username); Set userVisibleAPIs = null; for (String tag : tags) { - Set tagAPIs = apiConsumer.getAPIsWithTag(tag); + Set tagAPIs = apiConsumer.getAPIsWithTag(tag, APIManagerUtil.getTenantDomain()); if (userVisibleAPIs == null) { userVisibleAPIs = tagAPIs; } else { diff --git a/components/identity-extensions/org.wso2.carbon.device.mgt.oauth.extensions/src/main/java/org/wso2/carbon/device/mgt/oauth/extensions/OAuthExtUtils.java b/components/identity-extensions/org.wso2.carbon.device.mgt.oauth.extensions/src/main/java/org/wso2/carbon/device/mgt/oauth/extensions/OAuthExtUtils.java index b52d94b657..76e2dba416 100644 --- a/components/identity-extensions/org.wso2.carbon.device.mgt.oauth.extensions/src/main/java/org/wso2/carbon/device/mgt/oauth/extensions/OAuthExtUtils.java +++ b/components/identity-extensions/org.wso2.carbon.device.mgt.oauth.extensions/src/main/java/org/wso2/carbon/device/mgt/oauth/extensions/OAuthExtUtils.java @@ -109,7 +109,7 @@ public class OAuthExtUtils { try { Map appScopes; - ApiMgtDAO apiMgtDAO = new ApiMgtDAO(); + ApiMgtDAO apiMgtDAO = ApiMgtDAO.getInstance(); //Get all the scopes and permissions against the scopes defined for the APIs subscribed to the application. appScopes = apiMgtDAO.getScopeRolesOfApplication(consumerKey); diff --git a/components/identity-extensions/org.wso2.carbon.device.mgt.oauth.extensions/src/main/java/org/wso2/carbon/device/mgt/oauth/extensions/internal/OAuthExtensionServiceComponent.java b/components/identity-extensions/org.wso2.carbon.device.mgt.oauth.extensions/src/main/java/org/wso2/carbon/device/mgt/oauth/extensions/internal/OAuthExtensionServiceComponent.java index 8e483bd1a4..d43c86297f 100644 --- a/components/identity-extensions/org.wso2.carbon.device.mgt.oauth.extensions/src/main/java/org/wso2/carbon/device/mgt/oauth/extensions/internal/OAuthExtensionServiceComponent.java +++ b/components/identity-extensions/org.wso2.carbon.device.mgt.oauth.extensions/src/main/java/org/wso2/carbon/device/mgt/oauth/extensions/internal/OAuthExtensionServiceComponent.java @@ -96,7 +96,7 @@ public class OAuthExtensionServiceComponent { List whiteList; // Read scope whitelist from Configuration. - whiteList = configuration.getProperty(APIConstants.API_KEY_MANGER_SCOPE_WHITELIST); + whiteList = configuration.getProperty(APIConstants.WHITELISTED_SCOPES); // If whitelist is null, default scopes will be put. if (whiteList == null) { diff --git a/components/webapp-authenticator-framework/org.wso2.carbon.webapp.authenticator.framework/src/main/java/org/wso2/carbon/webapp/authenticator/framework/AuthenticationFrameworkUtil.java b/components/webapp-authenticator-framework/org.wso2.carbon.webapp.authenticator.framework/src/main/java/org/wso2/carbon/webapp/authenticator/framework/AuthenticationFrameworkUtil.java index 81629eedb5..8a44108ee8 100644 --- a/components/webapp-authenticator-framework/org.wso2.carbon.webapp.authenticator.framework/src/main/java/org/wso2/carbon/webapp/authenticator/framework/AuthenticationFrameworkUtil.java +++ b/components/webapp-authenticator-framework/org.wso2.carbon.webapp.authenticator.framework/src/main/java/org/wso2/carbon/webapp/authenticator/framework/AuthenticationFrameworkUtil.java @@ -57,7 +57,7 @@ public class AuthenticationFrameworkUtil { } APITokenValidator tokenValidator = new APITokenValidator(); APIKeyValidationInfoDTO apiKeyValidationDTO = tokenValidator.validateKey(context, version, accessToken, - requiredAuthenticationLevel, clientDomain); + requiredAuthenticationLevel); if (apiKeyValidationDTO.isAuthorized()) { String username = apiKeyValidationDTO.getEndUserName(); PrivilegedCarbonContext.getThreadLocalCarbonContext().setUsername(username); 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 daddc132a1..a0bc1141e8 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 @@ -118,7 +118,7 @@ - org.wso2.carbon.identity:org.wso2.carbon.identity.oauth.stub:${carbon.identity.version} + org.wso2.carbon.identity:org.wso2.carbon.identity.oauth.stub:${identity.inbound.auth.oauth.version} com.fasterxml.jackson.core:jackson-annotations:${jackson-annotations.version} diff --git a/pom.xml b/pom.xml index e3b11d02f7..25c06c75e5 100644 --- a/pom.xml +++ b/pom.xml @@ -1032,32 +1032,32 @@ org.wso2.carbon.identity org.wso2.carbon.identity.base - ${carbon.identity.version} + ${carbon.identity.framework.version} org.wso2.carbon.identity org.wso2.carbon.identity.core - ${carbon.identity.version} + ${carbon.identity.framework.version} org.wso2.carbon.identity org.wso2.carbon.identity.oauth.stub - ${carbon.identity.version} + ${identity.inbound.auth.oauth.version} org.wso2.carbon.identity org.wso2.carbon.identity.application.authentication.framework - ${carbon.identity.version} + ${carbon.identity.framework.version} org.wso2.carbon.identity org.wso2.carbon.identity.oauth - ${carbon.identity.version} + ${identity.inbound.auth.oauth.version} org.wso2.carbon.identity org.wso2.carbon.identity.application.common - ${carbon.identity.version} + ${carbon.identity.framework.version} org.wso2.carbon.identity @@ -1184,7 +1184,7 @@ org.wso2.carbon.identity org.wso2.carbon.identity.application.mgt - ${carbon.identity.version} + ${carbon.identity.framework.version} org.wso2.carbon.identity @@ -1243,7 +1243,7 @@ org.wso2.carbon.identity org.wso2.carbon.identity.sso.saml - ${carbon.identity.version} + ${identity.inbound.auth.saml.version} com.googlecode.json-simple.wso2 @@ -1450,7 +1450,7 @@ org.wso2.carbon.identity org.wso2.carbon.user.mgt - ${carbon.identity.version} + ${carbon.identity.framework.version} provided @@ -1735,7 +1735,7 @@ 6.1.1 - 4.4.3 + 4.4.7 [4.4.0, 5.0.0) 1.5.4 1.3 @@ -1775,16 +1775,18 @@ 7.0.34.wso2v2 - 4.6.0 + 4.7.0 - 5.0.7 + 5.2.0 + 5.1.2 + 5.1.1 - 4.5.0 + 4.6.0 - 4.5.8 + 4.6.4 1.2.11-wso2v11 @@ -1801,15 +1803,15 @@ 2.6.0.wso2v1 - 5.0.4 - (5.0.0,6.0.0] + 6.0.4 + (5.0.0,7.0.0] 5.0.11 [5.0.11,6.0.0) - 4.4.8 + 4.6.0 [4.4.8, 5.0.0) From 71c71402f8b2e5e50faa86045618ab42ab27fac7 Mon Sep 17 00:00:00 2001 From: mharindu Date: Fri, 12 Aug 2016 08:41:13 +0530 Subject: [PATCH 02/43] Fixed dependancy issues --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 25c06c75e5..33bd3c298a 100644 --- a/pom.xml +++ b/pom.xml @@ -1786,10 +1786,10 @@ 4.6.0 - 4.6.4 + 4.7.1 - 1.2.11-wso2v11 + 1.2.11-wso2v10 [1.2.11, 1.3.0) 1.2.11.wso2v5 From 24930b30425a9006dbacb4084d946d7dad29718d Mon Sep 17 00:00:00 2001 From: mharindu Date: Mon, 5 Sep 2016 16:37:09 +0530 Subject: [PATCH 03/43] Partial commit of migration --- .../pom.xml | 1 + .../pom.xml | 6 +++- .../internal/SCEPManagerServiceComponent.java | 17 ----------- .../mgt/core/scep/SCEPManagerImpl.java | 20 ++++++------- .../pom.xml | 4 +++ .../org.wso2.carbon.device.mgt.common/pom.xml | 2 +- .../org.wso2.carbon.device.mgt.core/pom.xml | 1 + .../app/mgt/ApplicationManagerFactory.java | 1 - ...ApplicationManagerProviderServiceImpl.java | 11 -------- .../DeviceManagementProviderService.java | 4 ++- .../DeviceManagementProviderServiceImpl.java | 24 ++++++++++++++++ .../pom.xml | 4 +-- .../pom.xml | 2 +- .../pom.xml | 7 +++++ .../pom.xml | 12 ++++++++ .../pom.xml | 2 +- .../pom.xml | 18 +++++++++--- .../pom.xml | 7 +++++ .../pom.xml | 12 ++++++++ .../pom.xml | 19 ++++++++++++- pom.xml | 28 ++++++++++++++++--- 21 files changed, 145 insertions(+), 57 deletions(-) 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 dac73f5d5d..78df37ab15 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 @@ -143,6 +143,7 @@ org.apache.commons.logging, javax.servlet, javax.xml.*, + javax.xml.parsers;version="${javax.xml.parsers.import.pkg.version}", com.google.gson.*, org.apache.catalina, org.apache.catalina.core, diff --git a/components/certificate-mgt/org.wso2.carbon.certificate.mgt.core/pom.xml b/components/certificate-mgt/org.wso2.carbon.certificate.mgt.core/pom.xml index 4a65525884..148edc58ad 100644 --- a/components/certificate-mgt/org.wso2.carbon.certificate.mgt.core/pom.xml +++ b/components/certificate-mgt/org.wso2.carbon.certificate.mgt.core/pom.xml @@ -89,6 +89,7 @@ org.wso2.carbon.device.mgt.common.*, io.swagger.annotations.*;resolution:=optional, org.wso2.carbon.device.mgt.core.*, + org.wso2.carbon.registry.indexing.*, @@ -179,7 +180,10 @@ org.wso2.carbon.user.core 4.4.3 + + org.wso2.carbon.registry + org.wso2.carbon.registry.indexing + - diff --git a/components/certificate-mgt/org.wso2.carbon.certificate.mgt.core/src/main/java/org/wso2/carbon/certificate/mgt/core/internal/SCEPManagerServiceComponent.java b/components/certificate-mgt/org.wso2.carbon.certificate.mgt.core/src/main/java/org/wso2/carbon/certificate/mgt/core/internal/SCEPManagerServiceComponent.java index 2f9fc8e22c..98b7a21f9f 100644 --- a/components/certificate-mgt/org.wso2.carbon.certificate.mgt.core/src/main/java/org/wso2/carbon/certificate/mgt/core/internal/SCEPManagerServiceComponent.java +++ b/components/certificate-mgt/org.wso2.carbon.certificate.mgt.core/src/main/java/org/wso2/carbon/certificate/mgt/core/internal/SCEPManagerServiceComponent.java @@ -6,16 +6,9 @@ import org.osgi.framework.BundleContext; import org.osgi.service.component.ComponentContext; import org.wso2.carbon.certificate.mgt.core.scep.SCEPManager; import org.wso2.carbon.certificate.mgt.core.scep.SCEPManagerImpl; -import org.wso2.carbon.device.mgt.core.app.mgt.ApplicationManagementProviderService; /** * @scr.component name="org.wso2.carbon.certificate.mgt.core.scep" immediate="true" - * @scr.reference name="app.mgt.service" - * interface="org.wso2.carbon.device.mgt.core.app.mgt.ApplicationManagementProviderService" - * cardinality="1..1" - * policy="dynamic" - * bind="setApplicationManagementProviderService" - * unbind="unsetApplicationManagementProviderService" */ public class SCEPManagerServiceComponent { @@ -47,14 +40,4 @@ public class SCEPManagerServiceComponent { } } - protected void unsetApplicationManagementProviderService(ApplicationManagementProviderService - applicationManagementProviderService) { - //do nothing - } - - protected void setApplicationManagementProviderService(ApplicationManagementProviderService - applicationManagementProviderService) { - //do nothing - } - } diff --git a/components/certificate-mgt/org.wso2.carbon.certificate.mgt.core/src/main/java/org/wso2/carbon/certificate/mgt/core/scep/SCEPManagerImpl.java b/components/certificate-mgt/org.wso2.carbon.certificate.mgt.core/src/main/java/org/wso2/carbon/certificate/mgt/core/scep/SCEPManagerImpl.java index 63bd2d2f60..dfcc05626e 100644 --- a/components/certificate-mgt/org.wso2.carbon.certificate.mgt.core/src/main/java/org/wso2/carbon/certificate/mgt/core/scep/SCEPManagerImpl.java +++ b/components/certificate-mgt/org.wso2.carbon.certificate.mgt.core/src/main/java/org/wso2/carbon/certificate/mgt/core/scep/SCEPManagerImpl.java @@ -19,12 +19,12 @@ package org.wso2.carbon.certificate.mgt.core.scep; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; +import org.wso2.carbon.certificate.mgt.core.internal.CertificateManagementDataHolder; import org.wso2.carbon.context.PrivilegedCarbonContext; import org.wso2.carbon.device.mgt.common.Device; import org.wso2.carbon.device.mgt.common.DeviceIdentifier; -import org.wso2.carbon.device.mgt.core.dao.DeviceDAO; -import org.wso2.carbon.device.mgt.core.dao.DeviceManagementDAOException; -import org.wso2.carbon.device.mgt.core.dao.DeviceManagementDAOFactory; +import org.wso2.carbon.device.mgt.common.DeviceManagementException; +import org.wso2.carbon.device.mgt.core.service.DeviceManagementProviderService; import org.wso2.carbon.user.api.UserStoreException; import org.wso2.carbon.user.core.service.RealmService; import org.wso2.carbon.utils.multitenancy.MultitenantConstants; @@ -33,19 +33,18 @@ import java.sql.SQLException; import java.util.HashMap; public class SCEPManagerImpl implements SCEPManager { - private DeviceDAO deviceDAO; private static final Log log = LogFactory.getLog(SCEPManagerImpl.class); + DeviceManagementProviderService dms; public SCEPManagerImpl() { - deviceDAO = DeviceManagementDAOFactory.getDeviceDAO(); + this.dms = CertificateManagementDataHolder.getInstance().getDeviceManagementService(); } @Override public TenantedDeviceWrapper getValidatedDevice(DeviceIdentifier deviceIdentifier) throws SCEPException { TenantedDeviceWrapper tenantedDeviceWrapper = new TenantedDeviceWrapper(); try { - DeviceManagementDAOFactory.openConnection(); - HashMap deviceHashMap = deviceDAO.getDevice(deviceIdentifier); + HashMap deviceHashMap = dms.getTenantedDevice(deviceIdentifier); Object[] keySet = deviceHashMap.keySet().toArray(); if (keySet == null || keySet.length == 0) { @@ -71,15 +70,12 @@ public class SCEPManagerImpl implements SCEPManager { String tenantDomain = realmService.getTenantManager().getDomain(tenantId); tenantedDeviceWrapper.setTenantDomain(tenantDomain); - } catch (SQLException e) { - throw new SCEPException("Error occurred while getting the datasource connection.", e); - } catch (DeviceManagementDAOException e) { - throw new SCEPException("Error occurred while reading the device dao.", e); } catch (UserStoreException e) { throw new SCEPException("Error occurred while getting the tenant domain.", e); + } catch (DeviceManagementException e) { + throw new SCEPException("Error occurred while getting device '" + deviceIdentifier + "'.", e); } finally { PrivilegedCarbonContext.endTenantFlow(); - DeviceManagementDAOFactory.closeConnection(); } return tenantedDeviceWrapper; } diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.analytics.data.publisher/pom.xml b/components/device-mgt/org.wso2.carbon.device.mgt.analytics.data.publisher/pom.xml index 9e7acda117..273e20db16 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.analytics.data.publisher/pom.xml +++ b/components/device-mgt/org.wso2.carbon.device.mgt.analytics.data.publisher/pom.xml @@ -82,6 +82,10 @@ org.wso2.carbon.registry org.wso2.carbon.registry.indexing + + org.wso2.carbon.registry + org.wso2.carbon.registry.common + org.json.wso2 json diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.common/pom.xml b/components/device-mgt/org.wso2.carbon.device.mgt.common/pom.xml index a83993ecba..c771e8dfb4 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.common/pom.xml +++ b/components/device-mgt/org.wso2.carbon.device.mgt.common/pom.xml @@ -50,7 +50,7 @@ javax.xml.bind.annotation, com.fasterxml.jackson.annotation, - org.wso2.carbon.apimgt.api.model, + org.wso2.carbon.apimgt.api.model.*;version="${carbon.api.mgt.version.range}", io.swagger.annotations.*;resolution:=optional diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/pom.xml b/components/device-mgt/org.wso2.carbon.device.mgt.core/pom.xml index ce3b8ff4e9..5c82dcda6b 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/pom.xml +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/pom.xml @@ -58,6 +58,7 @@ org.apache.commons.logging, javax.naming, javax.xml.*, + javax.xml.parsers;version="${javax.xml.parsers.import.pkg.version}", javax.servlet.*, org.xml.sax, javax.sql.*, diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/app/mgt/ApplicationManagerFactory.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/app/mgt/ApplicationManagerFactory.java index f0a11ad25d..9fb7509826 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/app/mgt/ApplicationManagerFactory.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/app/mgt/ApplicationManagerFactory.java @@ -19,7 +19,6 @@ package org.wso2.carbon.device.mgt.core.app.mgt; import org.wso2.carbon.device.mgt.common.app.mgt.ApplicationManager; -import org.wso2.carbon.device.mgt.core.DeviceManagementPluginRepository; import org.wso2.carbon.device.mgt.core.app.mgt.config.AppManagementConfig; public class ApplicationManagerFactory { diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/app/mgt/ApplicationManagerProviderServiceImpl.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/app/mgt/ApplicationManagerProviderServiceImpl.java index c1cbcc16e7..0bc04e6e61 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/app/mgt/ApplicationManagerProviderServiceImpl.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/app/mgt/ApplicationManagerProviderServiceImpl.java @@ -18,9 +18,6 @@ package org.wso2.carbon.device.mgt.core.app.mgt; -import org.apache.axis2.AxisFault; -import org.apache.axis2.context.ConfigurationContext; -import org.apache.axis2.context.ConfigurationContextFactory; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.wso2.carbon.context.CarbonContext; @@ -30,18 +27,10 @@ import org.wso2.carbon.device.mgt.common.app.mgt.ApplicationManagementException; import org.wso2.carbon.device.mgt.common.operation.mgt.Activity; import org.wso2.carbon.device.mgt.common.operation.mgt.Operation; import org.wso2.carbon.device.mgt.common.operation.mgt.OperationManagementException; -import org.wso2.carbon.device.mgt.core.DeviceManagementConstants; import org.wso2.carbon.device.mgt.core.app.mgt.config.AppManagementConfig; -import org.wso2.carbon.device.mgt.core.app.mgt.oauth.ServiceAuthenticator; -import org.wso2.carbon.device.mgt.core.config.DeviceConfigurationManager; -import org.wso2.carbon.device.mgt.core.config.identity.IdentityConfigurations; import org.wso2.carbon.device.mgt.core.dao.*; import org.wso2.carbon.device.mgt.core.internal.DeviceManagementDataHolder; -import org.wso2.carbon.identity.oauth.stub.OAuthAdminServiceException; -import org.wso2.carbon.identity.oauth.stub.OAuthAdminServiceStub; -import org.wso2.carbon.identity.oauth.stub.dto.OAuthConsumerAppDTO; -import java.rmi.RemoteException; import java.sql.SQLException; import java.util.ArrayList; import java.util.List; diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/service/DeviceManagementProviderService.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/service/DeviceManagementProviderService.java index 2dd8956a53..258aa3c22b 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/service/DeviceManagementProviderService.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/service/DeviceManagementProviderService.java @@ -23,8 +23,8 @@ import org.wso2.carbon.device.mgt.common.license.mgt.License; import org.wso2.carbon.device.mgt.common.operation.mgt.Activity; import org.wso2.carbon.device.mgt.common.operation.mgt.Operation; import org.wso2.carbon.device.mgt.common.operation.mgt.OperationManagementException; -import org.wso2.carbon.device.mgt.core.dto.DeviceType; +import java.util.HashMap; import java.util.List; /** @@ -205,6 +205,8 @@ public interface DeviceManagementProviderService { Device getDevice(DeviceIdentifier deviceId) throws DeviceManagementException; + HashMap getTenantedDevice(DeviceIdentifier deviceIdentifier) throws DeviceManagementException; + Device getDevice(DeviceIdentifier deviceId, EnrolmentInfo.Status status) throws DeviceManagementException; List getAvailableDeviceTypes() throws DeviceManagementException; diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/service/DeviceManagementProviderServiceImpl.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/service/DeviceManagementProviderServiceImpl.java index 41b4aed9d9..a18c5d6230 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/service/DeviceManagementProviderServiceImpl.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/service/DeviceManagementProviderServiceImpl.java @@ -757,6 +757,30 @@ public class DeviceManagementProviderServiceImpl implements DeviceManagementProv } } + @Override + public HashMap getTenantedDevice(DeviceIdentifier deviceIdentifier) throws DeviceManagementException { + HashMap deviceHashMap; + try { + DeviceManagementDAOFactory.openConnection(); + deviceHashMap = deviceDAO.getDevice(deviceIdentifier); + if (deviceHashMap == null) { + if (log.isDebugEnabled()) { + log.debug("No device is found upon the type '" + deviceIdentifier.getType() + "' and id '" + + deviceIdentifier.getId() + "'"); + } + return null; + } + } catch (DeviceManagementDAOException e) { + throw new DeviceManagementException("Error occurred while obtaining the device for id " + + "'" + deviceIdentifier.getId() + "'", e); + } catch (SQLException e) { + throw new DeviceManagementException("Error occurred while opening a connection to the data source", e); + } finally { + DeviceManagementDAOFactory.closeConnection(); + } + return deviceHashMap; + } + @Override public Device getDevice(DeviceIdentifier deviceId) throws DeviceManagementException { Device device; 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 5889dfd175..a4cf0a904d 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 @@ -125,7 +125,7 @@ org.wso2.carbon.device.mgt.core.*, javax.xml.bind, javax.xml.bind.annotation, - javax.xml.parsers, + javax.xml.parsers;version="${javax.xml.parsers.import.pkg.version}", org.w3c.dom, org.wso2.carbon.apimgt.keymgt, org.wso2.carbon.apimgt.keymgt.handlers, @@ -133,7 +133,7 @@ org.apache.commons.codec.binary, org.wso2.carbon.identity.application.authentication.framework.model, org.apache.oltu.oauth2.common, - org.wso2.carbon.base + org.wso2.carbon.base, 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 df22278f3a..015d1d904f 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 @@ -61,7 +61,7 @@ com.nimbusds.jwt, javax.xml.bind, javax.xml.bind.annotation, - javax.xml.parsers, + javax.xml.parsers;version="${javax.xml.parsers.import.pkg.version}", javax.xml.validation, org.apache.axiom.util.base64, org.apache.catalina, 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 cdbb0943e9..199e42c8c9 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 @@ -68,6 +68,10 @@ commons-codec.wso2 commons-codec + + org.wso2.carbon.registry + org.wso2.carbon.registry.indexing + @@ -146,6 +150,9 @@ org.wso2.carbon.core.server:${carbon.kernel.version} + + org.wso2.carbon.registry:org.wso2.carbon.registry.indexing:${carbon.registry.version} + 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 6ea9448aca..b96be157f9 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 @@ -39,6 +39,14 @@ org.wso2.carbon.devicemgt org.wso2.carbon.device.mgt.analytics.data.publisher + + org.wso2.carbon.registry + org.wso2.carbon.registry.indexing + + + org.wso2.carbon.registry + org.wso2.carbon.registry.common + @@ -96,6 +104,10 @@ org.wso2.carbon.core.server:${carbon.kernel.version} + + org.wso2.carbon.registry:org.wso2.carbon.registry.indexing:${carbon.registry.version} + org.wso2.carbon.registry:org.wso2.carbon.registry.common:${carbon.registry.version} + 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 fbee9b266b..25a6b1ce28 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 @@ -86,7 +86,7 @@ org.wso2.carbon.core.server:${carbon.kernel.version} - org.wso2.carbon.governance.metadata:${carbon.governance.version} + org.wso2.carbon.governance.metadata.server:${carbon.governance.version} 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 3cd0fd48c0..d4e7351a7f 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 @@ -49,10 +49,14 @@ org.wso2.carbon.device.mgt.api.feature zip - - - - + + org.wso2.orbit.org.apache.pdfbox + pdfbox + + + org.wso2.carbon.registry + org.wso2.carbon.registry.indexing + @@ -125,9 +129,15 @@ + + org.wso2.carbon.apimgt:org.wso2.carbon.apimgt.keymgt:${carbon.api.mgt.version} + org.wso2.orbit.org.apache.pdfbox:pdfbox:${orbit.version.pdfbox} + org.wso2.carbon.registry:org.wso2.carbon.registry.indexing:${carbon.registry.version} + org.wso2.carbon.core.server:${carbon.kernel.version} org.wso2.carbon.apimgt.core:${carbon.api.mgt.version} + org.wso2.carbon.device.mgt.extensions:${carbon.device.mgt.version} org.wso2.carbon.email.sender:${carbon.device.mgt.version} 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 81e2544311..40a092c9ad 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 @@ -48,6 +48,10 @@ org.wso2.carbon.devicemgt org.wso2.carbon.identity.authenticator.backend.oauth + + org.wso2.carbon.registry + org.wso2.carbon.registry.indexing + @@ -84,6 +88,9 @@ org.wso2.carbon.core.server:${carbon.kernel.version} + + org.wso2.carbon.registry:org.wso2.carbon.registry.indexing:${carbon.registry.version} + 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 02734f4d69..dfde8f0c3c 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 @@ -53,6 +53,14 @@ org.wso2.carbon.devicemgt org.wso2.carbon.policy.information.point + + org.wso2.carbon.apimgt + org.wso2.carbon.apimgt.keymgt.client + + + org.wso2.carbon.registry + org.wso2.carbon.registry.indexing + @@ -116,6 +124,10 @@ org.wso2.carbon.devicemgt:org.wso2.carbon.policy.information.point:${carbon.device.mgt.version} + + org.wso2.carbon.apimgt:org.wso2.carbon.apimgt.keymgt.client:${carbon.api.mgt.version} + org.wso2.carbon.registry:org.wso2.carbon.registry.indexing:${carbon.registry.version} + org.wso2.carbon.core.server:${carbon.kernel.version} 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 313584066d..7f5b87a1af 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 @@ -30,7 +30,7 @@ org.wso2.carbon.webapp.authenticator.framework.server.feature pom 1.1.3-SNAPSHOT - WSO2 Carbon - Device Management Server Feature + WSO2 Carbon - Webapp Authenticator Framework Server Feature http://wso2.org This feature contains the core bundles required for Back-end Device Management functionality @@ -40,6 +40,18 @@ org.wso2.carbon.devicemgt org.wso2.carbon.device.mgt.core + + org.wso2.carbon.apimgt + org.wso2.carbon.apimgt.core + + + org.wso2.carbon + org.wso2.carbon.throttle.core + + + org.apache.ws.commons.axiom.wso2 + axiom + @@ -97,6 +109,11 @@ org.wso2.carbon.core.server:${carbon.kernel.version} org.wso2.carbon.apimgt.core:${carbon.api.mgt.version} + + org.wso2.carbon.apimgt:org.wso2.carbon.apimgt.core:${carbon.api.mgt.version} + org.wso2.carbon:org.wso2.carbon.throttle.core:${carbon.throttle.module.version} + org.apache.ws.commons.axiom.wso2:axiom:${axiom.wso2.version} + diff --git a/pom.xml b/pom.xml index 0b9c1c7305..747024fef5 100644 --- a/pom.xml +++ b/pom.xml @@ -738,6 +738,11 @@ nimbus-jose-jwt ${nimbus.orbit.version} + + org.wso2.orbit.org.apache.pdfbox + pdfbox + ${orbit.version.pdfbox} + @@ -780,6 +785,11 @@ org.wso2.carbon.apimgt.keymgt.client ${carbon.api.mgt.version} + + org.wso2.carbon + org.wso2.carbon.throttle.core + ${carbon.throttle.module.version} + org.wso2.carbon.apimgt org.wso2.carbon.apimgt.keymgt @@ -1406,6 +1416,12 @@ ${carbon.registry.version} + + org.wso2.carbon.registry + org.wso2.carbon.registry.common + ${carbon.registry.version} + + org.wso2.orbit.org.scannotation scannotation @@ -1512,7 +1528,6 @@ hibernate-validator ${hibernate-validator.version} - @@ -1786,12 +1801,12 @@ 4.6.0 - 4.7.1 + 4.6.4 1.2.11-wso2v10 [1.2.11, 1.3.0) - 1.2.11.wso2v5 + 1.2.11.wso2v2 1.1.3-SNAPSHOT @@ -1811,7 +1826,7 @@ [5.0.11,6.0.0) - 4.6.0 + 4.5.6 [4.4.8, 5.0.0) @@ -1886,6 +1901,11 @@ 1.2.0.wso2v1 5.0.2.Final + [0.0.0, 1.0.0) + + + 1.8.10.wso2v2 + 4.2.1 From 1dfb8e22e1830b9edd980e30bf38e7b5b6b68fe7 Mon Sep 17 00:00:00 2001 From: Ace Date: Wed, 14 Sep 2016 17:23:09 +0530 Subject: [PATCH 04/43] Updating to latest appm/apim/identity dependencies --- .../pom.xml | 3 +- .../pom.xml | 4 +- .../apimgt/webapp/publisher/APIConfig.java | 11 +++++ .../webapp/publisher/APIPublisherUtil.java | 12 +++++ .../pom.xml | 14 ++++++ .../pom.xml | 6 +++ .../pom.xml | 7 +-- .../pom.xml | 4 +- .../pom.xml | 4 +- .../pom.xml | 4 +- .../pom.xml | 3 +- .../org.wso2.carbon.device.mgt.api/pom.xml | 22 +++++++++ .../org.wso2.carbon.device.mgt.core/pom.xml | 12 ++--- .../DeviceManagementServiceComponent.java | 4 ++ .../pom.xml | 4 +- .../org.wso2.carbon.email.sender.core/pom.xml | 1 + .../dynamic-client-web-proxy/pom.xml | 8 ++-- .../dynamic-client-web/pom.xml | 8 ++-- .../pom.xml | 2 +- .../pom.xml | 6 +-- .../org.wso2.carbon.policy.mgt.core/pom.xml | 1 + .../pom.xml | 15 +++---- .../pom.xml | 12 +---- .../pom.xml | 7 +++ .../pom.xml | 16 +++---- pom.xml | 45 +++++++++---------- 26 files changed, 147 insertions(+), 88 deletions(-) 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 b8deaa601e..a0eeea3e1e 100644 --- a/components/apimgt-extensions/org.wso2.carbon.apimgt.annotations/pom.xml +++ b/components/apimgt-extensions/org.wso2.carbon.apimgt.annotations/pom.xml @@ -78,6 +78,7 @@ org.apache.commons.logging, javax.servlet, javax.xml.*, + javax.xml.parsers;version="${javax.xml.parsers.import.pkg.version}";resolution:=optional, org.apache.commons.lang, @@ -89,4 +90,4 @@ - \ No newline at end of file + 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 78df37ab15..3679e3eed0 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 @@ -143,7 +143,7 @@ org.apache.commons.logging, javax.servlet, javax.xml.*, - javax.xml.parsers;version="${javax.xml.parsers.import.pkg.version}", + javax.xml.parsers;version="${javax.xml.parsers.import.pkg.version}";resolution:=optional, com.google.gson.*, org.apache.catalina, org.apache.catalina.core, @@ -169,4 +169,4 @@ - \ No newline at end of file + diff --git a/components/apimgt-extensions/org.wso2.carbon.apimgt.webapp.publisher/src/main/java/org/wso2/carbon/apimgt/webapp/publisher/APIConfig.java b/components/apimgt-extensions/org.wso2.carbon.apimgt.webapp.publisher/src/main/java/org/wso2/carbon/apimgt/webapp/publisher/APIConfig.java index c71a0cba5b..02200f1c76 100644 --- a/components/apimgt-extensions/org.wso2.carbon.apimgt.webapp.publisher/src/main/java/org/wso2/carbon/apimgt/webapp/publisher/APIConfig.java +++ b/components/apimgt-extensions/org.wso2.carbon.apimgt.webapp.publisher/src/main/java/org/wso2/carbon/apimgt/webapp/publisher/APIConfig.java @@ -56,6 +56,7 @@ public class APIConfig { private String contextTemplate; private String endpoint; private String version; + private String policy; private String transports; private APIProvider provider; private boolean isSecured; @@ -73,6 +74,16 @@ public class APIConfig { } } + @XmlElement(name = "Policy", required = true) + public String getPolicy() { + return policy; + } + + @SuppressWarnings("unused") + public void setPolicy(String policy) { + this.policy = policy; + } + @XmlElement(name = "ContextTemplate", required = true) public String getContextTemplate() { return contextTemplate; diff --git a/components/apimgt-extensions/org.wso2.carbon.apimgt.webapp.publisher/src/main/java/org/wso2/carbon/apimgt/webapp/publisher/APIPublisherUtil.java b/components/apimgt-extensions/org.wso2.carbon.apimgt.webapp.publisher/src/main/java/org/wso2/carbon/apimgt/webapp/publisher/APIPublisherUtil.java index 289037e58e..3e46d4182f 100644 --- a/components/apimgt-extensions/org.wso2.carbon.apimgt.webapp.publisher/src/main/java/org/wso2/carbon/apimgt/webapp/publisher/APIPublisherUtil.java +++ b/components/apimgt-extensions/org.wso2.carbon.apimgt.webapp.publisher/src/main/java/org/wso2/carbon/apimgt/webapp/publisher/APIPublisherUtil.java @@ -47,6 +47,7 @@ public class APIPublisherUtil { private static final String PARAM_MANAGED_API_ENDPOINT = "managed-api-endpoint"; private static final String PARAM_MANAGED_API_OWNER = "managed-api-owner"; private static final String PARAM_MANAGED_API_TRANSPORTS = "managed-api-transports"; + private static final String PARAM_MANAGED_API_POLICY = "managed-api-policy"; private static final String PARAM_MANAGED_API_IS_SECURED = "managed-api-isSecured"; private static final String PARAM_SHARED_WITH_ALL_TENANTS = "isSharedWithAllTenants"; private static final String PARAM_PROVIDER_TENANT_DOMAIN = "providerTenantDomain"; @@ -80,6 +81,7 @@ public class APIPublisherUtil { api.setEndpointSecured(true); api.setStatus(APIStatus.CREATED); api.setTransports(config.getTransports()); + api.setApiLevelPolicy(config.getPolicy()); api.setContextTemplate(config.getContextTemplate()); Set environments = new HashSet<>(); environments.add(API_PUBLISH_ENVIRONMENT); @@ -309,6 +311,16 @@ public class APIPublisherUtil { } apiConfig.setUriTemplates(uriTemplates); + String policy = servletContext.getInitParameter(PARAM_MANAGED_API_POLICY); + if (policy == null || policy.isEmpty()) { + if (log.isDebugEnabled()) { + log.debug("'managed-api-policy' attribute is not configured. Therefore using the default, " + + "which is 'null'"); + } + policy = null; + } + apiConfig.setPolicy(policy); + return apiConfig; } 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 7a3e7e0eba..c0b5483a3c 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 @@ -161,6 +161,10 @@ io.swagger swagger-core + + com.fasterxml.jackson.core + jackson-annotations + org.slf4j slf4j-api @@ -170,6 +174,16 @@ io.swagger swagger-jaxrs + + + com.fasterxml.jackson.module + jackson-module-jaxb-annotations + + + org.slf4j + slf4j-api + + javax.servlet 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 f946fc0b51..304a441d10 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 @@ -166,6 +166,12 @@ io.swagger swagger-jaxrs + + + org.slf4j + slf4j-api + + javax.servlet diff --git a/components/certificate-mgt/org.wso2.carbon.certificate.mgt.core/pom.xml b/components/certificate-mgt/org.wso2.carbon.certificate.mgt.core/pom.xml index 148edc58ad..6002517cef 100644 --- a/components/certificate-mgt/org.wso2.carbon.certificate.mgt.core/pom.xml +++ b/components/certificate-mgt/org.wso2.carbon.certificate.mgt.core/pom.xml @@ -57,6 +57,7 @@ org.apache.commons.logging, javax.security.auth.x500, javax.xml.*, + javax.xml.parsers;version="${javax.xml.parsers.import.pkg.version}";resolution:=optional, org.apache.commons.codec.binary, org.bouncycastle.asn1, org.bouncycastle.asn1.x500, @@ -135,17 +136,13 @@ org.wso2.carbon.logging - org.bouncycastle.wso2 + org.wso2.orbit.org.bouncycastle bcprov-jdk15on org.bouncycastle.wso2 bcpkix-jdk15on - - org.bouncycastle.wso2 - bcmail-jdk15on - com.google.code.jscep.wso2 jscep diff --git a/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.gcm/pom.xml b/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.gcm/pom.xml index e552a3f467..58435dcef6 100644 --- a/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.gcm/pom.xml +++ b/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.gcm/pom.xml @@ -55,8 +55,8 @@ org.wso2.carbon.device.mgt.core - org.apache.ws.commons.axiom - axiom-api + org.apache.ws.commons.axiom.wso2 + axiom org.wso2.carbon diff --git a/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.mqtt/pom.xml b/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.mqtt/pom.xml index bf10cd4e5e..cc905f6e9e 100644 --- a/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.mqtt/pom.xml +++ b/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.mqtt/pom.xml @@ -55,8 +55,8 @@ org.wso2.carbon.device.mgt.core - org.apache.ws.commons.axiom - axiom-api + org.apache.ws.commons.axiom.wso2 + axiom org.wso2.carbon diff --git a/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.xmpp/pom.xml b/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.xmpp/pom.xml index c2648cc861..f4e5494a30 100644 --- a/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.xmpp/pom.xml +++ b/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.xmpp/pom.xml @@ -55,8 +55,8 @@ org.wso2.carbon.device.mgt.core - org.apache.ws.commons.axiom - axiom-api + org.apache.ws.commons.axiom.wso2 + axiom org.wso2.carbon diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.analytics.data.publisher/pom.xml b/components/device-mgt/org.wso2.carbon.device.mgt.analytics.data.publisher/pom.xml index 273e20db16..9d0be0f5b1 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.analytics.data.publisher/pom.xml +++ b/components/device-mgt/org.wso2.carbon.device.mgt.analytics.data.publisher/pom.xml @@ -126,6 +126,7 @@ org.wso2.carbon.registry.indexing.*; version="${carbon.registry.imp.pkg.version.range}", org.json;version="${commons-json.version}", javax.xml.*, + javax.xml.parsers;version="${javax.xml.parsers.import.pkg.version}";resolution:=optional, org.w3c.dom, org.wso2.carbon.base @@ -135,4 +136,4 @@ - \ No newline at end of file + diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.api/pom.xml b/components/device-mgt/org.wso2.carbon.device.mgt.api/pom.xml index 360bbbc5d8..85072c4890 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.api/pom.xml +++ b/components/device-mgt/org.wso2.carbon.device.mgt.api/pom.xml @@ -222,15 +222,37 @@ io.swagger swagger-core + + com.fasterxml.jackson.module + jackson-module-jaxb-annotations + org.slf4j slf4j-api + + com.fasterxml.jackson.core + jackson-core + io.swagger swagger-jaxrs + + + com.fasterxml.jackson.module + jackson-module-jaxb-annotations + + + org.slf4j + slf4j-api + + + com.fasterxml.jackson.core + jackson-core + + javax.servlet diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/pom.xml b/components/device-mgt/org.wso2.carbon.device.mgt.core/pom.xml index 5c82dcda6b..603587d641 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/pom.xml +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/pom.xml @@ -58,7 +58,7 @@ org.apache.commons.logging, javax.naming, javax.xml.*, - javax.xml.parsers;version="${javax.xml.parsers.import.pkg.version}", + javax.xml.parsers;version="${javax.xml.parsers.import.pkg.version}";resolution:=optional, javax.servlet.*, org.xml.sax, javax.sql.*, @@ -186,17 +186,17 @@ axis2-transport-mail - org.apache.ws.commons.axiom - axiom-api + org.apache.ws.commons.axiom.wso2 + axiom - - org.apache.ws.commons.axiom + org.wso2.carbon.apimgt org.wso2.carbon.apimgt.api diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/internal/DeviceManagementServiceComponent.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/internal/DeviceManagementServiceComponent.java index 03a96ea520..cb53d96451 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/internal/DeviceManagementServiceComponent.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/internal/DeviceManagementServiceComponent.java @@ -263,6 +263,10 @@ public class DeviceManagementServiceComponent { } catch (ApplicationManagementException e) { log.error("Application management service not registered.", e); } + + /* Registering PermissionManager Service */ + PermissionManagerService permissionManagerService = PermissionManagerServiceImpl.getInstance(); + bundleContext.registerService(PermissionManagerService.class.getName(), permissionManagerService, null); } private void setupDeviceManagementSchema(DataSourceConfig config) throws DeviceManagementException { diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.extensions/pom.xml b/components/device-mgt/org.wso2.carbon.device.mgt.extensions/pom.xml index 3a404f6353..07f1fb0840 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.extensions/pom.xml +++ b/components/device-mgt/org.wso2.carbon.device.mgt.extensions/pom.xml @@ -55,8 +55,8 @@ org.wso2.carbon.device.mgt.core - org.apache.ws.commons.axiom - axiom-api + org.apache.ws.commons.axiom.wso2 + axiom org.wso2.carbon 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 4f312273e3..46f19d988f 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 @@ -57,6 +57,7 @@ org.osgi.service.component, org.apache.commons.logging, javax.xml.*, + javax.xml.parsers;version="${javax.xml.parsers.import.pkg.version}";resolution:=optional, org.wso2.carbon.context, org.wso2.carbon.utils.*, org.wso2.carbon.registry.api, diff --git a/components/identity-extensions/dynamic-client-registration/dynamic-client-web-proxy/pom.xml b/components/identity-extensions/dynamic-client-registration/dynamic-client-web-proxy/pom.xml index ac9cb5fb03..ecb84b40fe 100644 --- a/components/identity-extensions/dynamic-client-registration/dynamic-client-web-proxy/pom.xml +++ b/components/identity-extensions/dynamic-client-registration/dynamic-client-web-proxy/pom.xml @@ -55,16 +55,16 @@ org.wso2.carbon.utils provided - - org.apache.ws.commons.axiom + org.apache.ws.commons.axiom.wso2 axiom diff --git a/components/identity-extensions/dynamic-client-registration/dynamic-client-web/pom.xml b/components/identity-extensions/dynamic-client-registration/dynamic-client-web/pom.xml index ebbe891c31..49e4ab1392 100644 --- a/components/identity-extensions/dynamic-client-registration/dynamic-client-web/pom.xml +++ b/components/identity-extensions/dynamic-client-registration/dynamic-client-web/pom.xml @@ -60,16 +60,16 @@ - - org.apache.ws.commons.axiom + org.apache.ws.commons.axiom.wso2 axiom 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 a4cf0a904d..ca68d94e96 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 @@ -125,7 +125,7 @@ org.wso2.carbon.device.mgt.core.*, javax.xml.bind, javax.xml.bind.annotation, - javax.xml.parsers;version="${javax.xml.parsers.import.pkg.version}", + javax.xml.parsers;version="${javax.xml.parsers.import.pkg.version}";resolution:=optional, org.w3c.dom, org.wso2.carbon.apimgt.keymgt, org.wso2.carbon.apimgt.keymgt.handlers, 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 4563610081..42c5678321 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 @@ -51,8 +51,8 @@ org.wso2.carbon.device.mgt.common - org.apache.ws.commons.axiom - axiom-api + org.apache.ws.commons.axiom.wso2 + axiom org.wso2.carbon @@ -175,4 +175,4 @@ - \ No newline at end of file + 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 9b70beb9e5..9fd24d903d 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 @@ -61,6 +61,7 @@ javax.cache, javax.naming, javax.xml.*, + javax.xml.parsers;version="${javax.xml.parsers.import.pkg.version}";resolution:=optional, org.w3c.dom, org.wso2.carbon.policy.mgt.common.*, org.wso2.carbon.user.core.*, 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 015d1d904f..bc3a58a3a6 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 @@ -61,9 +61,8 @@ com.nimbusds.jwt, javax.xml.bind, javax.xml.bind.annotation, - javax.xml.parsers;version="${javax.xml.parsers.import.pkg.version}", + javax.xml.parsers;version="${javax.xml.parsers.import.pkg.version}";resolution:=optional, javax.xml.validation, - org.apache.axiom.util.base64, org.apache.catalina, org.apache.catalina.connector, org.apache.catalina.util, @@ -110,13 +109,9 @@ org.apache.commons.pool.impl, org.apache.http.conn, org.apache.http.impl.conn, - javax.xml.soap, + javax.xml.soap; version="${javax.xml.soap.imp.pkg.version}", javax.xml.stream, - org.apache.axiom.soap, - org.apache.axiom.soap.impl.builder, - org.apache.axiom.om, - org.apache.axiom.om.impl.builder, - org.apache.axiom.om.util, + org.apache.axiom.*; version="${axiom.osgi.version.range}", org.wso2.carbon.registry.core.*, org.wso2.carbon.registry.common.*;version="${carbon.registry.imp.pkg.version.range}", org.wso2.carbon.registry.indexing.*; version="${carbon.registry.imp.pkg.version.range}", @@ -166,10 +161,10 @@ org.wso2.carbon org.wso2.carbon.tomcat.ext - + org.wso2.carbon.identity org.wso2.carbon.identity.base 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 199e42c8c9..6b2b254dfb 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 @@ -41,17 +41,13 @@ org.wso2.carbon.certificate.mgt.core - org.bouncycastle.wso2 + org.wso2.orbit.org.bouncycastle bcprov-jdk15on org.bouncycastle.wso2 bcpkix-jdk15on - - org.bouncycastle.wso2 - bcmail-jdk15on - com.google.code.jscep.wso2 jscep @@ -125,15 +121,9 @@ org.wso2.carbon.devicemgt:org.wso2.carbon.certificate.mgt.core:${carbon.device.mgt.version} - - org.bouncycastle.wso2:bcprov-jdk15on:${bcprov.wso2.version} - org.bouncycastle.wso2:bcpkix-jdk15on:${bcpkix.wso2.version} - - org.bouncycastle.wso2:bcmail-jdk15on:${bcmail.wso2.version} - com.google.code.jscep.wso2:jscep:${jscep.version} 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 872f5652f2..38618c6884 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 @@ -44,6 +44,10 @@ org.wso2.carbon.device.mgt.ui.feature zip + + javax.servlet.jsp + javax.servlet.jsp-api + @@ -70,6 +74,9 @@ org.wso2.carbon.devicemgt:org.wso2.carbon.device.mgt.server.feature:${carbon.device.mgt.version} org.wso2.carbon.devicemgt:org.wso2.carbon.device.mgt.ui.feature:${carbon.device.mgt.version} + + javax.servlet.jsp:javax.servlet.jsp-api + 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 7f5b87a1af..2076c6b383 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 @@ -44,14 +44,14 @@ org.wso2.carbon.apimgt org.wso2.carbon.apimgt.core - - org.wso2.carbon - org.wso2.carbon.throttle.core - - + + + + + @@ -111,8 +111,8 @@ org.wso2.carbon.apimgt:org.wso2.carbon.apimgt.core:${carbon.api.mgt.version} - org.wso2.carbon:org.wso2.carbon.throttle.core:${carbon.throttle.module.version} - org.apache.ws.commons.axiom.wso2:axiom:${axiom.wso2.version} + + diff --git a/pom.xml b/pom.xml index 747024fef5..041b234416 100644 --- a/pom.xml +++ b/pom.xml @@ -747,12 +747,12 @@ - org.apache.ws.commons.axiom + org.apache.ws.commons.axiom.wso2 axiom-api ${axiom.version} - org.apache.ws.commons.axiom + org.apache.ws.commons.axiom.wso2 axiom-impl ${axiom.version} @@ -785,11 +785,11 @@ org.wso2.carbon.apimgt.keymgt.client ${carbon.api.mgt.version} - - org.wso2.carbon - org.wso2.carbon.throttle.core - ${carbon.throttle.module.version} - + + + + + org.wso2.carbon.apimgt org.wso2.carbon.apimgt.keymgt @@ -1284,7 +1284,7 @@ - org.bouncycastle.wso2 + org.wso2.orbit.org.bouncycastle bcprov-jdk15on ${bcprov.wso2.version} @@ -1293,11 +1293,6 @@ bcpkix-jdk15on ${bcpkix.wso2.version} - - org.bouncycastle.wso2 - bcmail-jdk15on - ${bcmail.wso2.version} - com.google.code.jscep.wso2 jscep @@ -1485,19 +1480,16 @@ swagger-jaxrs ${swagger.version} - javax.servlet servlet-api ${servlet-api.version} - org.wso2.carbon.analytics-common org.wso2.carbon.event.output.adapter.core ${carbon.analytics.common.version} - org.wso2.carbon.devicemgt org.wso2.carbon.device.mgt.extensions.push.notification.provider.gcm @@ -1528,6 +1520,11 @@ hibernate-validator ${hibernate-validator.version} + + javax.servlet.jsp + javax.servlet.jsp-api + ${servelet.jsp.version} + @@ -1749,8 +1746,9 @@ + 2.2.1 6.1.1 - 4.4.7 + 4.4.9 [4.4.0, 5.0.0) 1.5.4 1.3 @@ -1806,7 +1804,7 @@ 1.2.11-wso2v10 [1.2.11, 1.3.0) - 1.2.11.wso2v2 + 1.2.11.wso2v10 1.1.3-SNAPSHOT @@ -1836,11 +1834,9 @@ 1.9.0 - 1.49.wso2v1 - 1.49.wso2v1 - 1.49.wso2v1 - [1.40.wso2v1, 1.50.0) - 1.49.wso2v1 + 1.52.0.wso2v1 + 1.52.0.wso2v1 + [1.52.0,1.60.0) 2.0.2.wso2v2 @@ -1901,11 +1897,12 @@ 1.2.0.wso2v1 5.0.2.Final - [0.0.0, 1.0.0) + [0.0.0,1.0.0) 1.8.10.wso2v2 4.2.1 + [1.0.0, 1.1.0) From a00d6aafd4dd6c4c613746ab654d400ca498843a Mon Sep 17 00:00:00 2001 From: Chatura Dilan Perera Date: Mon, 19 Sep 2016 18:54:38 +0530 Subject: [PATCH 05/43] [maven-release-plugin] prepare release v1.2.1 --- .../org.wso2.carbon.apimgt.annotations/pom.xml | 4 ++-- .../pom.xml | 4 ++-- .../org.wso2.carbon.apimgt.application.extension/pom.xml | 4 ++-- .../org.wso2.carbon.apimgt.webapp.publisher/pom.xml | 4 ++-- components/apimgt-extensions/pom.xml | 4 ++-- .../org.wso2.carbon.certificate.mgt.api/pom.xml | 2 +- .../org.wso2.carbon.certificate.mgt.cert.admin.api/pom.xml | 2 +- .../org.wso2.carbon.certificate.mgt.core/pom.xml | 4 ++-- components/certificate-mgt/pom.xml | 4 ++-- .../pom.xml | 2 +- .../pom.xml | 2 +- .../pom.xml | 2 +- components/device-mgt-extensions/pom.xml | 2 +- .../org.wso2.carbon.device.mgt.analytics.dashboard/pom.xml | 2 +- .../pom.xml | 2 +- .../device-mgt/org.wso2.carbon.device.mgt.api/pom.xml | 2 +- .../device-mgt/org.wso2.carbon.device.mgt.common/pom.xml | 2 +- .../device-mgt/org.wso2.carbon.device.mgt.core/pom.xml | 2 +- .../org.wso2.carbon.device.mgt.extensions/pom.xml | 2 +- components/device-mgt/org.wso2.carbon.device.mgt.ui/pom.xml | 2 +- components/device-mgt/pom.xml | 2 +- .../email-sender/org.wso2.carbon.email.sender.core/pom.xml | 2 +- components/email-sender/pom.xml | 2 +- .../dynamic-client-web-proxy/pom.xml | 4 ++-- .../dynamic-client-registration/dynamic-client-web/pom.xml | 4 ++-- .../org.wso2.carbon.dynamic.client.registration/pom.xml | 4 ++-- .../pom.xml | 4 ++-- .../identity-extensions/dynamic-client-registration/pom.xml | 4 ++-- .../org.wso2.carbon.device.mgt.oauth.extensions/pom.xml | 4 ++-- .../pom.xml | 2 +- .../org.wso2.carbon.identity.jwt.client.extension/pom.xml | 2 +- components/identity-extensions/pom.xml | 2 +- .../org.wso2.carbon.complex.policy.decision.point/pom.xml | 4 ++-- .../org.wso2.carbon.policy.information.point/pom.xml | 4 ++-- .../policy-mgt/org.wso2.carbon.policy.mgt.common/pom.xml | 4 ++-- .../policy-mgt/org.wso2.carbon.policy.mgt.core/pom.xml | 4 ++-- .../org.wso2.carbon.simple.policy.decision.point/pom.xml | 4 ++-- components/policy-mgt/pom.xml | 4 ++-- .../org.wso2.carbon.webapp.authenticator.framework/pom.xml | 4 ++-- components/webapp-authenticator-framework/pom.xml | 4 ++-- .../pom.xml | 4 ++-- .../org.wso2.carbon.apimgt.webapp.publisher.feature/pom.xml | 4 ++-- features/apimgt-extensions/pom.xml | 4 ++-- .../org.wso2.carbon.certificate.mgt.api.feature/pom.xml | 2 +- .../pom.xml | 2 +- .../org.wso2.carbon.certificate.mgt.server.feature/pom.xml | 4 ++-- features/certificate-mgt/pom.xml | 4 ++-- .../pom.xml | 4 ++-- .../pom.xml | 4 ++-- .../pom.xml | 4 ++-- features/device-mgt-extensions/pom.xml | 2 +- .../pom.xml | 4 ++-- .../pom.xml | 4 ++-- .../org.wso2.carbon.device.mgt.api.feature/pom.xml | 2 +- .../org.wso2.carbon.device.mgt.extensions.feature/pom.xml | 4 ++-- .../device-mgt/org.wso2.carbon.device.mgt.feature/pom.xml | 2 +- .../org.wso2.carbon.device.mgt.server.feature/pom.xml | 4 ++-- .../org.wso2.carbon.device.mgt.ui.feature/pom.xml | 2 +- features/device-mgt/pom.xml | 2 +- .../pom.xml | 4 ++-- features/dynamic-client-registration/pom.xml | 4 ++-- .../org.wso2.carbon.email.sender.feature/pom.xml | 4 ++-- features/email-sender/pom.xml | 4 ++-- .../pom.xml | 4 ++-- features/jwt-client/pom.xml | 4 ++-- .../pom.xml | 4 ++-- features/oauth-extensions/pom.xml | 4 ++-- .../org.wso2.carbon.policy.mgt.server.feature/pom.xml | 4 ++-- features/policy-mgt/pom.xml | 4 ++-- .../pom.xml | 4 ++-- features/webapp-authenticator-framework/pom.xml | 4 ++-- pom.xml | 6 +++--- 72 files changed, 119 insertions(+), 119 deletions(-) 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 312fff8f02..2b4a28144b 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 - 1.2.1-SNAPSHOT + 1.2.1 ../pom.xml 4.0.0 org.wso2.carbon.apimgt.annotations - 1.2.1-SNAPSHOT + 1.2.1 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 e54a20da37..9b80d50cda 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 - 1.2.1-SNAPSHOT + 1.2.1 ../pom.xml 4.0.0 - 1.2.1-SNAPSHOT + 1.2.1 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 a7c934c407..9017663a13 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 - 1.2.1-SNAPSHOT + 1.2.1 ../pom.xml 4.0.0 - 1.2.1-SNAPSHOT + 1.2.1 org.wso2.carbon.apimgt.application.extension bundle WSO2 Carbon - API Application Management 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 6b176e2917..98cbcb9a78 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 - 1.2.1-SNAPSHOT + 1.2.1 ../pom.xml 4.0.0 org.wso2.carbon.apimgt.webapp.publisher - 1.2.1-SNAPSHOT + 1.2.1 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 33991cb99f..b4833d7a31 100644 --- a/components/apimgt-extensions/pom.xml +++ b/components/apimgt-extensions/pom.xml @@ -22,13 +22,13 @@ org.wso2.carbon.devicemgt carbon-devicemgt - 1.2.1-SNAPSHOT + 1.2.1 ../../pom.xml 4.0.0 apimgt-extensions - 1.2.1-SNAPSHOT + 1.2.1 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 ca150f268f..ffd1c5dee8 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 - 1.2.1-SNAPSHOT + 1.2.1 ../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 af08d447de..024522a9d1 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 - 1.2.1-SNAPSHOT + 1.2.1 ../pom.xml diff --git a/components/certificate-mgt/org.wso2.carbon.certificate.mgt.core/pom.xml b/components/certificate-mgt/org.wso2.carbon.certificate.mgt.core/pom.xml index 35ab0a5eee..c3c7f78c40 100644 --- a/components/certificate-mgt/org.wso2.carbon.certificate.mgt.core/pom.xml +++ b/components/certificate-mgt/org.wso2.carbon.certificate.mgt.core/pom.xml @@ -21,13 +21,13 @@ org.wso2.carbon.devicemgt certificate-mgt - 1.2.1-SNAPSHOT + 1.2.1 ../pom.xml 4.0.0 org.wso2.carbon.certificate.mgt.core - 1.2.1-SNAPSHOT + 1.2.1 bundle WSO2 Carbon - Certificate Management Core WSO2 Carbon - Certificate Management Core diff --git a/components/certificate-mgt/pom.xml b/components/certificate-mgt/pom.xml index 7530d6d0a4..83f7604ee2 100644 --- a/components/certificate-mgt/pom.xml +++ b/components/certificate-mgt/pom.xml @@ -22,14 +22,14 @@ org.wso2.carbon.devicemgt carbon-devicemgt - 1.2.1-SNAPSHOT + 1.2.1 ../../pom.xml 4.0.0 org.wso2.carbon.devicemgt certificate-mgt - 1.2.1-SNAPSHOT + 1.2.1 pom WSO2 Carbon - Certificate Management Component http://wso2.org diff --git a/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.gcm/pom.xml b/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.gcm/pom.xml index c32dd2fe96..fc0af89534 100644 --- a/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.gcm/pom.xml +++ b/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.gcm/pom.xml @@ -22,7 +22,7 @@ device-mgt-extensions org.wso2.carbon.devicemgt - 1.2.1-SNAPSHOT + 1.2.1 ../pom.xml diff --git a/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.mqtt/pom.xml b/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.mqtt/pom.xml index 1afaf24b85..a7d8c0ee24 100644 --- a/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.mqtt/pom.xml +++ b/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.mqtt/pom.xml @@ -22,7 +22,7 @@ device-mgt-extensions org.wso2.carbon.devicemgt - 1.2.1-SNAPSHOT + 1.2.1 ../pom.xml diff --git a/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.xmpp/pom.xml b/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.xmpp/pom.xml index 7d5bfd7248..41fcf7ae3c 100644 --- a/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.xmpp/pom.xml +++ b/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.xmpp/pom.xml @@ -22,7 +22,7 @@ device-mgt-extensions org.wso2.carbon.devicemgt - 1.2.1-SNAPSHOT + 1.2.1 ../pom.xml diff --git a/components/device-mgt-extensions/pom.xml b/components/device-mgt-extensions/pom.xml index c3eb5a0467..064a1ee7d1 100644 --- a/components/device-mgt-extensions/pom.xml +++ b/components/device-mgt-extensions/pom.xml @@ -22,7 +22,7 @@ carbon-devicemgt org.wso2.carbon.devicemgt - 1.2.1-SNAPSHOT + 1.2.1 ../../pom.xml diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.analytics.dashboard/pom.xml b/components/device-mgt/org.wso2.carbon.device.mgt.analytics.dashboard/pom.xml index f95d2a30c3..dc0690134b 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.analytics.dashboard/pom.xml +++ b/components/device-mgt/org.wso2.carbon.device.mgt.analytics.dashboard/pom.xml @@ -3,7 +3,7 @@ org.wso2.carbon.devicemgt device-mgt - 1.2.1-SNAPSHOT + 1.2.1 ../pom.xml diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.analytics.data.publisher/pom.xml b/components/device-mgt/org.wso2.carbon.device.mgt.analytics.data.publisher/pom.xml index 8712361d07..fbbe715fca 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.analytics.data.publisher/pom.xml +++ b/components/device-mgt/org.wso2.carbon.device.mgt.analytics.data.publisher/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt device-mgt - 1.2.1-SNAPSHOT + 1.2.1 ../pom.xml diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.api/pom.xml b/components/device-mgt/org.wso2.carbon.device.mgt.api/pom.xml index 7e92412d8e..6b85399ae0 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.api/pom.xml +++ b/components/device-mgt/org.wso2.carbon.device.mgt.api/pom.xml @@ -22,7 +22,7 @@ device-mgt org.wso2.carbon.devicemgt - 1.2.1-SNAPSHOT + 1.2.1 ../pom.xml diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.common/pom.xml b/components/device-mgt/org.wso2.carbon.device.mgt.common/pom.xml index 89dcb25986..c49648b841 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.common/pom.xml +++ b/components/device-mgt/org.wso2.carbon.device.mgt.common/pom.xml @@ -21,7 +21,7 @@ device-mgt org.wso2.carbon.devicemgt - 1.2.1-SNAPSHOT + 1.2.1 ../pom.xml diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/pom.xml b/components/device-mgt/org.wso2.carbon.device.mgt.core/pom.xml index e8ae46504f..b7a4e631c7 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/pom.xml +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt device-mgt - 1.2.1-SNAPSHOT + 1.2.1 ../pom.xml diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.extensions/pom.xml b/components/device-mgt/org.wso2.carbon.device.mgt.extensions/pom.xml index e553da4d80..3c5c442773 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.extensions/pom.xml +++ b/components/device-mgt/org.wso2.carbon.device.mgt.extensions/pom.xml @@ -22,7 +22,7 @@ device-mgt org.wso2.carbon.devicemgt - 1.2.1-SNAPSHOT + 1.2.1 ../pom.xml diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/pom.xml b/components/device-mgt/org.wso2.carbon.device.mgt.ui/pom.xml index a3105e9ef0..c506d8b141 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/pom.xml +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/pom.xml @@ -22,7 +22,7 @@ device-mgt org.wso2.carbon.devicemgt - 1.2.1-SNAPSHOT + 1.2.1 ../pom.xml diff --git a/components/device-mgt/pom.xml b/components/device-mgt/pom.xml index d38abdc798..332cee2c58 100644 --- a/components/device-mgt/pom.xml +++ b/components/device-mgt/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt carbon-devicemgt - 1.2.1-SNAPSHOT + 1.2.1 ../../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 2361096d7c..9bbb0fb0b5 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 - 1.2.1-SNAPSHOT + 1.2.1 ../pom.xml diff --git a/components/email-sender/pom.xml b/components/email-sender/pom.xml index ce1d33689b..773fb78b09 100644 --- a/components/email-sender/pom.xml +++ b/components/email-sender/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt carbon-devicemgt - 1.2.1-SNAPSHOT + 1.2.1 ../../pom.xml diff --git a/components/identity-extensions/dynamic-client-registration/dynamic-client-web-proxy/pom.xml b/components/identity-extensions/dynamic-client-registration/dynamic-client-web-proxy/pom.xml index 399bf76a12..7ac9df6cbb 100644 --- a/components/identity-extensions/dynamic-client-registration/dynamic-client-web-proxy/pom.xml +++ b/components/identity-extensions/dynamic-client-registration/dynamic-client-web-proxy/pom.xml @@ -21,14 +21,14 @@ dynamic-client-registration org.wso2.carbon.devicemgt - 1.2.1-SNAPSHOT + 1.2.1 ../pom.xml 4.0.0 org.wso2.mdm dynamic-client-web-proxy - 1.2.1-SNAPSHOT + 1.2.1 WSO2 Carbon - Proxy endpoint of Dynamic Client Registration Web Service WSO2 Carbon - Dynamic Client Registration Web Proxy war diff --git a/components/identity-extensions/dynamic-client-registration/dynamic-client-web/pom.xml b/components/identity-extensions/dynamic-client-registration/dynamic-client-web/pom.xml index 7e1ad16a0a..d7a22cb0e8 100644 --- a/components/identity-extensions/dynamic-client-registration/dynamic-client-web/pom.xml +++ b/components/identity-extensions/dynamic-client-registration/dynamic-client-web/pom.xml @@ -21,14 +21,14 @@ dynamic-client-registration org.wso2.carbon.devicemgt - 1.2.1-SNAPSHOT + 1.2.1 ../pom.xml 4.0.0 org.wso2.mdm dynamic-client-web - 1.2.1-SNAPSHOT + 1.2.1 WSO2 Carbon - Dynamic Client Registration Web Service WSO2 Carbon - Dynamic Client Registration Web war diff --git a/components/identity-extensions/dynamic-client-registration/org.wso2.carbon.dynamic.client.registration/pom.xml b/components/identity-extensions/dynamic-client-registration/org.wso2.carbon.dynamic.client.registration/pom.xml index 50d2943494..6860deadc8 100644 --- a/components/identity-extensions/dynamic-client-registration/org.wso2.carbon.dynamic.client.registration/pom.xml +++ b/components/identity-extensions/dynamic-client-registration/org.wso2.carbon.dynamic.client.registration/pom.xml @@ -21,13 +21,13 @@ dynamic-client-registration org.wso2.carbon.devicemgt - 1.2.1-SNAPSHOT + 1.2.1 ../pom.xml 4.0.0 org.wso2.carbon.dynamic.client.registration - 1.2.1-SNAPSHOT + 1.2.1 bundle WSO2 Carbon - Dynamic client registration service WSO2 Carbon - Dynamic Client Registration Service diff --git a/components/identity-extensions/dynamic-client-registration/org.wso2.carbon.dynamic.client.web.app.registration/pom.xml b/components/identity-extensions/dynamic-client-registration/org.wso2.carbon.dynamic.client.web.app.registration/pom.xml index 354b0b5657..925ba921c2 100644 --- a/components/identity-extensions/dynamic-client-registration/org.wso2.carbon.dynamic.client.web.app.registration/pom.xml +++ b/components/identity-extensions/dynamic-client-registration/org.wso2.carbon.dynamic.client.web.app.registration/pom.xml @@ -21,13 +21,13 @@ dynamic-client-registration org.wso2.carbon.devicemgt - 1.2.1-SNAPSHOT + 1.2.1 ../pom.xml 4.0.0 org.wso2.carbon.dynamic.client.web.app.registration - 1.2.1-SNAPSHOT + 1.2.1 bundle WSO2 Carbon - Dynamic client web app registration WSO2 Carbon - Dynamic Client Web-app Registration Service diff --git a/components/identity-extensions/dynamic-client-registration/pom.xml b/components/identity-extensions/dynamic-client-registration/pom.xml index 82d566085e..9fe982f553 100644 --- a/components/identity-extensions/dynamic-client-registration/pom.xml +++ b/components/identity-extensions/dynamic-client-registration/pom.xml @@ -22,14 +22,14 @@ org.wso2.carbon.devicemgt identity-extensions - 1.2.1-SNAPSHOT + 1.2.1 ../pom.xml 4.0.0 org.wso2.carbon.devicemgt dynamic-client-registration - 1.2.1-SNAPSHOT + 1.2.1 pom WSO2 Carbon - Dynamic client registration http://wso2.org 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 2b71d95288..4e43441dd5 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 - 1.2.1-SNAPSHOT + 1.2.1 ../pom.xml 4.0.0 org.wso2.carbon.device.mgt.oauth.extensions - 1.2.1-SNAPSHOT + 1.2.1 bundle WSO2 Carbon - OAuth Extensions http://wso2.org 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 b1d453d58c..7a45bb5b3e 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 - 1.2.1-SNAPSHOT + 1.2.1 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 82054f0415..2ac5165e3c 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 - 1.2.1-SNAPSHOT + 1.2.1 ../pom.xml diff --git a/components/identity-extensions/pom.xml b/components/identity-extensions/pom.xml index 4088a8f482..97c7bdbdc9 100644 --- a/components/identity-extensions/pom.xml +++ b/components/identity-extensions/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt carbon-devicemgt - 1.2.1-SNAPSHOT + 1.2.1 ../../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 f68d825c81..94e2f8d7a6 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 - 1.2.1-SNAPSHOT + 1.2.1 ../pom.xml 4.0.0 org.wso2.carbon.devicemgt org.wso2.carbon.complex.policy.decision.point - 1.2.1-SNAPSHOT + 1.2.1 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 56f18bbd1a..ffe4ccbe01 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 - 1.2.1-SNAPSHOT + 1.2.1 ../pom.xml @@ -11,7 +11,7 @@ 4.0.0 org.wso2.carbon.devicemgt org.wso2.carbon.policy.information.point - 1.2.1-SNAPSHOT + 1.2.1 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 ed5b2f7482..729622f034 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 - 1.2.1-SNAPSHOT + 1.2.1 ../pom.xml 4.0.0 org.wso2.carbon.devicemgt org.wso2.carbon.policy.mgt.common - 1.2.1-SNAPSHOT + 1.2.1 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 83a66b3c6a..b8fdf9b7d7 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 - 1.2.1-SNAPSHOT + 1.2.1 ../pom.xml 4.0.0 org.wso2.carbon.devicemgt org.wso2.carbon.policy.mgt.core - 1.2.1-SNAPSHOT + 1.2.1 bundle WSO2 Carbon - Policy Management Core WSO2 Carbon - Policy Management Core diff --git a/components/policy-mgt/org.wso2.carbon.simple.policy.decision.point/pom.xml b/components/policy-mgt/org.wso2.carbon.simple.policy.decision.point/pom.xml index 18cf8b67cb..e73d5a44c7 100644 --- a/components/policy-mgt/org.wso2.carbon.simple.policy.decision.point/pom.xml +++ b/components/policy-mgt/org.wso2.carbon.simple.policy.decision.point/pom.xml @@ -3,14 +3,14 @@ org.wso2.carbon.devicemgt policy-mgt - 1.2.1-SNAPSHOT + 1.2.1 ../pom.xml 4.0.0 org.wso2.carbon.devicemgt org.wso2.carbon.simple.policy.decision.point - 1.2.1-SNAPSHOT + 1.2.1 bundle WSO2 Carbon - Simple Policy Decision Point WSO2 Carbon - Simple Policy Decision Point diff --git a/components/policy-mgt/pom.xml b/components/policy-mgt/pom.xml index da76a91c00..b70959c374 100644 --- a/components/policy-mgt/pom.xml +++ b/components/policy-mgt/pom.xml @@ -23,13 +23,13 @@ org.wso2.carbon.devicemgt carbon-devicemgt - 1.2.1-SNAPSHOT + 1.2.1 ../../pom.xml 4.0.0 policy-mgt - 1.2.1-SNAPSHOT + 1.2.1 pom WSO2 Carbon - Policy Management Component http://wso2.org 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 bdbbab96a6..9551be16bf 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 - 1.2.1-SNAPSHOT + 1.2.1 ../pom.xml 4.0.0 org.wso2.carbon.devicemgt org.wso2.carbon.webapp.authenticator.framework - 1.2.1-SNAPSHOT + 1.2.1 bundle WSO2 Carbon - Web Application Authenticator Framework Bundle WSO2 Carbon - Web Application Authenticator Framework Bundle diff --git a/components/webapp-authenticator-framework/pom.xml b/components/webapp-authenticator-framework/pom.xml index fe467c4e10..7dcd1dd468 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 - 1.2.1-SNAPSHOT + 1.2.1 ../../pom.xml 4.0.0 org.wso2.carbon.devicemgt webapp-authenticator-framework - 1.2.1-SNAPSHOT + 1.2.1 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 c04f351523..355914d62a 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 - 1.2.1-SNAPSHOT + 1.2.1 ../pom.xml 4.0.0 org.wso2.carbon.apimgt.application.extension.feature pom - 1.2.1-SNAPSHOT + 1.2.1 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 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 5f0820469a..5d2b8e614e 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 - 1.2.1-SNAPSHOT + 1.2.1 ../pom.xml 4.0.0 org.wso2.carbon.apimgt.webapp.publisher.feature pom - 1.2.1-SNAPSHOT + 1.2.1 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 f95803db0c..7d7bec96d1 100644 --- a/features/apimgt-extensions/pom.xml +++ b/features/apimgt-extensions/pom.xml @@ -22,14 +22,14 @@ org.wso2.carbon.devicemgt carbon-devicemgt - 1.2.1-SNAPSHOT + 1.2.1 ../../pom.xml 4.0.0 org.wso2.carbon.devicemgt apimgt-extensions-feature - 1.2.1-SNAPSHOT + 1.2.1 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 e2e8e17282..1604fbf2c8 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 - 1.2.1-SNAPSHOT + 1.2.1 ../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 70671c3e30..008b3b6948 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 - 1.2.1-SNAPSHOT + 1.2.1 ../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 ee713b7dcf..e031779ffd 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 - 1.2.1-SNAPSHOT + 1.2.1 ../pom.xml 4.0.0 org.wso2.carbon.certificate.mgt.server.feature pom - 1.2.1-SNAPSHOT + 1.2.1 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 3783d656e6..2f44539fae 100644 --- a/features/certificate-mgt/pom.xml +++ b/features/certificate-mgt/pom.xml @@ -22,14 +22,14 @@ org.wso2.carbon.devicemgt carbon-devicemgt - 1.2.1-SNAPSHOT + 1.2.1 ../../pom.xml 4.0.0 org.wso2.carbon.devicemgt certificate-mgt-feature - 1.2.1-SNAPSHOT + 1.2.1 pom WSO2 Carbon - Certificate Management Feature http://wso2.org diff --git a/features/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.gcm.feature/pom.xml b/features/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.gcm.feature/pom.xml index 74a4e4e5b3..f7ea394f1a 100644 --- a/features/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.gcm.feature/pom.xml +++ b/features/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.gcm.feature/pom.xml @@ -22,14 +22,14 @@ org.wso2.carbon.devicemgt device-mgt-extensions-feature - 1.2.1-SNAPSHOT + 1.2.1 ../pom.xml 4.0.0 org.wso2.carbon.device.mgt.extensions.push.notification.provider.gcm.feature pom - 1.2.1-SNAPSHOT + 1.2.1 WSO2 Carbon - GCM 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 d919d3ada7..629d1c9bc9 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 - 1.2.1-SNAPSHOT + 1.2.1 ../pom.xml 4.0.0 org.wso2.carbon.device.mgt.extensions.push.notification.provider.mqtt.feature pom - 1.2.1-SNAPSHOT + 1.2.1 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 3d4c6b58ac..0caf080950 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 - 1.2.1-SNAPSHOT + 1.2.1 ../pom.xml 4.0.0 org.wso2.carbon.device.mgt.extensions.push.notification.provider.xmpp.feature pom - 1.2.1-SNAPSHOT + 1.2.1 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 c9bf2969a1..bb7c634f0e 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 - 1.2.1-SNAPSHOT + 1.2.1 ../../pom.xml diff --git a/features/device-mgt/org.wso2.carbon.device.mgt.analytics.dashboard.feature/pom.xml b/features/device-mgt/org.wso2.carbon.device.mgt.analytics.dashboard.feature/pom.xml index dbfe22ee3e..9887599d0b 100644 --- a/features/device-mgt/org.wso2.carbon.device.mgt.analytics.dashboard.feature/pom.xml +++ b/features/device-mgt/org.wso2.carbon.device.mgt.analytics.dashboard.feature/pom.xml @@ -3,13 +3,13 @@ org.wso2.carbon.devicemgt device-mgt-feature - 1.2.1-SNAPSHOT + 1.2.1 ../pom.xml 4.0.0 org.wso2.carbon.device.mgt.analytics.dashboard.feature - 1.2.1-SNAPSHOT + 1.2.1 pom WSO2 Carbon - Device Management Dashboard Analytics Feature WSO2 Carbon - Device Management Dashboard Analytics Feature 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 a359f514e2..61c4a0e318 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 - 1.2.1-SNAPSHOT + 1.2.1 ../pom.xml 4.0.0 org.wso2.carbon.device.mgt.analytics.data.publisher.feature pom - 1.2.1-SNAPSHOT + 1.2.1 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 0cedb9fb10..5503e5fa3a 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 - 1.2.1-SNAPSHOT + 1.2.1 ../pom.xml 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 8c32be8769..50d36daf29 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 - 1.2.1-SNAPSHOT + 1.2.1 ../pom.xml 4.0.0 org.wso2.carbon.device.mgt.extensions.feature pom - 1.2.1-SNAPSHOT + 1.2.1 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 f82f7973b7..e6b5b53bc4 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 - 1.2.1-SNAPSHOT + 1.2.1 ../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 b4f61a2392..587becaf1c 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 - 1.2.1-SNAPSHOT + 1.2.1 ../pom.xml 4.0.0 org.wso2.carbon.device.mgt.server.feature pom - 1.2.1-SNAPSHOT + 1.2.1 WSO2 Carbon - Device Management Server Feature http://wso2.org This feature contains the core bundles required for Back-end Device Management functionality 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 608352c394..76552ad311 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 - 1.2.1-SNAPSHOT + 1.2.1 ../pom.xml diff --git a/features/device-mgt/pom.xml b/features/device-mgt/pom.xml index 111a9a6d63..f30db740cb 100644 --- a/features/device-mgt/pom.xml +++ b/features/device-mgt/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt carbon-devicemgt - 1.2.1-SNAPSHOT + 1.2.1 ../../pom.xml diff --git a/features/dynamic-client-registration/org.wso2.carbon.dynamic.client.registration.server.feature/pom.xml b/features/dynamic-client-registration/org.wso2.carbon.dynamic.client.registration.server.feature/pom.xml index 866f784033..af65ce0efc 100644 --- a/features/dynamic-client-registration/org.wso2.carbon.dynamic.client.registration.server.feature/pom.xml +++ b/features/dynamic-client-registration/org.wso2.carbon.dynamic.client.registration.server.feature/pom.xml @@ -23,14 +23,14 @@ org.wso2.carbon.devicemgt dynamic-client-registration-feature - 1.2.1-SNAPSHOT + 1.2.1 ../pom.xml 4.0.0 org.wso2.carbon.dynamic.client.registration.server.feature pom - 1.2.1-SNAPSHOT + 1.2.1 WSO2 Carbon - Dynamic Client Registration Server Feature http://wso2.org This feature contains dynamic client registration features diff --git a/features/dynamic-client-registration/pom.xml b/features/dynamic-client-registration/pom.xml index b4e6c30e5a..2a6df74129 100644 --- a/features/dynamic-client-registration/pom.xml +++ b/features/dynamic-client-registration/pom.xml @@ -23,14 +23,14 @@ org.wso2.carbon.devicemgt carbon-devicemgt - 1.2.1-SNAPSHOT + 1.2.1 ../../pom.xml 4.0.0 org.wso2.carbon.devicemgt dynamic-client-registration-feature - 1.2.1-SNAPSHOT + 1.2.1 pom WSO2 Carbon - Dynamic Client Registration Feature http://wso2.org 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 896c5ac634..b91621c983 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 - 1.2.1-SNAPSHOT + 1.2.1 ../pom.xml 4.0.0 org.wso2.carbon.email.sender.feature pom - 1.2.1-SNAPSHOT + 1.2.1 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 9d2a22b1dd..b1bc07d1b5 100644 --- a/features/email-sender/pom.xml +++ b/features/email-sender/pom.xml @@ -22,14 +22,14 @@ org.wso2.carbon.devicemgt carbon-devicemgt - 1.2.1-SNAPSHOT + 1.2.1 ../../pom.xml 4.0.0 org.wso2.carbon.devicemgt email-sender-feature - 1.2.1-SNAPSHOT + 1.2.1 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 326d7ff698..833cc8d96d 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 - 1.2.1-SNAPSHOT + 1.2.1 ../pom.xml 4.0.0 org.wso2.carbon.identity.jwt.client.extension.feature pom - 1.2.1-SNAPSHOT + 1.2.1 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 be8510ff9d..cb2e9a0ce0 100644 --- a/features/jwt-client/pom.xml +++ b/features/jwt-client/pom.xml @@ -23,13 +23,13 @@ org.wso2.carbon.devicemgt carbon-devicemgt - 1.2.1-SNAPSHOT + 1.2.1 ../../pom.xml 4.0.0 jwt-client-feature - 1.2.1-SNAPSHOT + 1.2.1 pom WSO2 Carbon - Dynamic Client Registration 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 fd1ee01d69..7b0dcc586c 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 - 1.2.1-SNAPSHOT + 1.2.1 ../pom.xml 4.0.0 org.wso2.carbon.device.mgt.oauth.extensions.feature pom - 1.2.1-SNAPSHOT + 1.2.1 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 659f47d466..cdffb923db 100644 --- a/features/oauth-extensions/pom.xml +++ b/features/oauth-extensions/pom.xml @@ -22,14 +22,14 @@ org.wso2.carbon.devicemgt carbon-devicemgt - 1.2.1-SNAPSHOT + 1.2.1 ../../pom.xml 4.0.0 org.wso2.carbon.devicemgt oauth-extensions-feature - 1.2.1-SNAPSHOT + 1.2.1 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 0d4149c556..af4797ff67 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 - 1.2.1-SNAPSHOT + 1.2.1 ../pom.xml 4.0.0 org.wso2.carbon.policy.mgt.server.feature pom - 1.2.1-SNAPSHOT + 1.2.1 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 484be503fb..0a512a4409 100644 --- a/features/policy-mgt/pom.xml +++ b/features/policy-mgt/pom.xml @@ -23,14 +23,14 @@ org.wso2.carbon.devicemgt carbon-devicemgt - 1.2.1-SNAPSHOT + 1.2.1 ../../pom.xml 4.0.0 org.wso2.carbon.devicemgt policy-mgt-feature - 1.2.1-SNAPSHOT + 1.2.1 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 7644e9ec90..c109ba9842 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 - 1.2.1-SNAPSHOT + 1.2.1 ../pom.xml 4.0.0 org.wso2.carbon.webapp.authenticator.framework.server.feature pom - 1.2.1-SNAPSHOT + 1.2.1 WSO2 Carbon - Device Management 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 f6c2300337..8421e4b20f 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 - 1.2.1-SNAPSHOT + 1.2.1 ../../pom.xml 4.0.0 org.wso2.carbon.devicemgt webapp-authenticator-framework-feature - 1.2.1-SNAPSHOT + 1.2.1 pom WSO2 Carbon - Webapp Authenticator Framework Feature http://wso2.org diff --git a/pom.xml b/pom.xml index 1709158bda..25eb575057 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ org.wso2.carbon.devicemgt carbon-devicemgt pom - 1.2.1-SNAPSHOT + 1.2.1 WSO2 Carbon - Device Management - Parent http://wso2.org WSO2 Connected Device Manager Components @@ -1521,7 +1521,7 @@ https://github.com/wso2/carbon-device-mgt.git scm:git:https://github.com/wso2/carbon-device-mgt.git scm:git:https://github.com/wso2/carbon-device-mgt.git - HEAD + v1.2.1 @@ -1793,7 +1793,7 @@ 1.2.11.wso2v5 - 1.2.1-SNAPSHOT + 1.2.1 4.4.8 From 50d8885f8bd0c54ae36e2224dd027a8002e1d26d Mon Sep 17 00:00:00 2001 From: Chatura Dilan Perera Date: Mon, 19 Sep 2016 18:54:48 +0530 Subject: [PATCH 06/43] [maven-release-plugin] prepare for next development iteration --- .../org.wso2.carbon.apimgt.annotations/pom.xml | 4 ++-- .../pom.xml | 4 ++-- .../org.wso2.carbon.apimgt.application.extension/pom.xml | 4 ++-- .../org.wso2.carbon.apimgt.webapp.publisher/pom.xml | 4 ++-- components/apimgt-extensions/pom.xml | 4 ++-- .../org.wso2.carbon.certificate.mgt.api/pom.xml | 2 +- .../org.wso2.carbon.certificate.mgt.cert.admin.api/pom.xml | 2 +- .../org.wso2.carbon.certificate.mgt.core/pom.xml | 4 ++-- components/certificate-mgt/pom.xml | 4 ++-- .../pom.xml | 2 +- .../pom.xml | 2 +- .../pom.xml | 2 +- components/device-mgt-extensions/pom.xml | 2 +- .../org.wso2.carbon.device.mgt.analytics.dashboard/pom.xml | 2 +- .../pom.xml | 2 +- .../device-mgt/org.wso2.carbon.device.mgt.api/pom.xml | 2 +- .../device-mgt/org.wso2.carbon.device.mgt.common/pom.xml | 2 +- .../device-mgt/org.wso2.carbon.device.mgt.core/pom.xml | 2 +- .../org.wso2.carbon.device.mgt.extensions/pom.xml | 2 +- components/device-mgt/org.wso2.carbon.device.mgt.ui/pom.xml | 2 +- components/device-mgt/pom.xml | 2 +- .../email-sender/org.wso2.carbon.email.sender.core/pom.xml | 2 +- components/email-sender/pom.xml | 2 +- .../dynamic-client-web-proxy/pom.xml | 4 ++-- .../dynamic-client-registration/dynamic-client-web/pom.xml | 4 ++-- .../org.wso2.carbon.dynamic.client.registration/pom.xml | 4 ++-- .../pom.xml | 4 ++-- .../identity-extensions/dynamic-client-registration/pom.xml | 4 ++-- .../org.wso2.carbon.device.mgt.oauth.extensions/pom.xml | 4 ++-- .../pom.xml | 2 +- .../org.wso2.carbon.identity.jwt.client.extension/pom.xml | 2 +- components/identity-extensions/pom.xml | 2 +- .../org.wso2.carbon.complex.policy.decision.point/pom.xml | 4 ++-- .../org.wso2.carbon.policy.information.point/pom.xml | 4 ++-- .../policy-mgt/org.wso2.carbon.policy.mgt.common/pom.xml | 4 ++-- .../policy-mgt/org.wso2.carbon.policy.mgt.core/pom.xml | 4 ++-- .../org.wso2.carbon.simple.policy.decision.point/pom.xml | 4 ++-- components/policy-mgt/pom.xml | 4 ++-- .../org.wso2.carbon.webapp.authenticator.framework/pom.xml | 4 ++-- components/webapp-authenticator-framework/pom.xml | 4 ++-- .../pom.xml | 4 ++-- .../org.wso2.carbon.apimgt.webapp.publisher.feature/pom.xml | 4 ++-- features/apimgt-extensions/pom.xml | 4 ++-- .../org.wso2.carbon.certificate.mgt.api.feature/pom.xml | 2 +- .../pom.xml | 2 +- .../org.wso2.carbon.certificate.mgt.server.feature/pom.xml | 4 ++-- features/certificate-mgt/pom.xml | 4 ++-- .../pom.xml | 4 ++-- .../pom.xml | 4 ++-- .../pom.xml | 4 ++-- features/device-mgt-extensions/pom.xml | 2 +- .../pom.xml | 4 ++-- .../pom.xml | 4 ++-- .../org.wso2.carbon.device.mgt.api.feature/pom.xml | 2 +- .../org.wso2.carbon.device.mgt.extensions.feature/pom.xml | 4 ++-- .../device-mgt/org.wso2.carbon.device.mgt.feature/pom.xml | 2 +- .../org.wso2.carbon.device.mgt.server.feature/pom.xml | 4 ++-- .../org.wso2.carbon.device.mgt.ui.feature/pom.xml | 2 +- features/device-mgt/pom.xml | 2 +- .../pom.xml | 4 ++-- features/dynamic-client-registration/pom.xml | 4 ++-- .../org.wso2.carbon.email.sender.feature/pom.xml | 4 ++-- features/email-sender/pom.xml | 4 ++-- .../pom.xml | 4 ++-- features/jwt-client/pom.xml | 4 ++-- .../pom.xml | 4 ++-- features/oauth-extensions/pom.xml | 4 ++-- .../org.wso2.carbon.policy.mgt.server.feature/pom.xml | 4 ++-- features/policy-mgt/pom.xml | 4 ++-- .../pom.xml | 4 ++-- features/webapp-authenticator-framework/pom.xml | 4 ++-- pom.xml | 6 +++--- 72 files changed, 119 insertions(+), 119 deletions(-) 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 2b4a28144b..2dc4ed6d83 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 - 1.2.1 + 1.2.2-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.apimgt.annotations - 1.2.1 + 1.2.2-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 9b80d50cda..94914c3436 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 - 1.2.1 + 1.2.2-SNAPSHOT ../pom.xml 4.0.0 - 1.2.1 + 1.2.2-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 9017663a13..f5dcc64a25 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 - 1.2.1 + 1.2.2-SNAPSHOT ../pom.xml 4.0.0 - 1.2.1 + 1.2.2-SNAPSHOT org.wso2.carbon.apimgt.application.extension bundle WSO2 Carbon - API Application Management 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 98cbcb9a78..116a75a615 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 - 1.2.1 + 1.2.2-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.apimgt.webapp.publisher - 1.2.1 + 1.2.2-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 b4833d7a31..8f38ed4b2d 100644 --- a/components/apimgt-extensions/pom.xml +++ b/components/apimgt-extensions/pom.xml @@ -22,13 +22,13 @@ org.wso2.carbon.devicemgt carbon-devicemgt - 1.2.1 + 1.2.2-SNAPSHOT ../../pom.xml 4.0.0 apimgt-extensions - 1.2.1 + 1.2.2-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 ffd1c5dee8..915209c7d1 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 - 1.2.1 + 1.2.2-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 024522a9d1..6126bfd3d4 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 - 1.2.1 + 1.2.2-SNAPSHOT ../pom.xml diff --git a/components/certificate-mgt/org.wso2.carbon.certificate.mgt.core/pom.xml b/components/certificate-mgt/org.wso2.carbon.certificate.mgt.core/pom.xml index c3c7f78c40..cf3adbdcaf 100644 --- a/components/certificate-mgt/org.wso2.carbon.certificate.mgt.core/pom.xml +++ b/components/certificate-mgt/org.wso2.carbon.certificate.mgt.core/pom.xml @@ -21,13 +21,13 @@ org.wso2.carbon.devicemgt certificate-mgt - 1.2.1 + 1.2.2-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.certificate.mgt.core - 1.2.1 + 1.2.2-SNAPSHOT bundle WSO2 Carbon - Certificate Management Core WSO2 Carbon - Certificate Management Core diff --git a/components/certificate-mgt/pom.xml b/components/certificate-mgt/pom.xml index 83f7604ee2..1ef6cab841 100644 --- a/components/certificate-mgt/pom.xml +++ b/components/certificate-mgt/pom.xml @@ -22,14 +22,14 @@ org.wso2.carbon.devicemgt carbon-devicemgt - 1.2.1 + 1.2.2-SNAPSHOT ../../pom.xml 4.0.0 org.wso2.carbon.devicemgt certificate-mgt - 1.2.1 + 1.2.2-SNAPSHOT pom WSO2 Carbon - Certificate Management Component http://wso2.org diff --git a/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.gcm/pom.xml b/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.gcm/pom.xml index fc0af89534..8af1096ba7 100644 --- a/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.gcm/pom.xml +++ b/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.gcm/pom.xml @@ -22,7 +22,7 @@ device-mgt-extensions org.wso2.carbon.devicemgt - 1.2.1 + 1.2.2-SNAPSHOT ../pom.xml diff --git a/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.mqtt/pom.xml b/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.mqtt/pom.xml index a7d8c0ee24..54f056436e 100644 --- a/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.mqtt/pom.xml +++ b/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.mqtt/pom.xml @@ -22,7 +22,7 @@ device-mgt-extensions org.wso2.carbon.devicemgt - 1.2.1 + 1.2.2-SNAPSHOT ../pom.xml diff --git a/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.xmpp/pom.xml b/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.xmpp/pom.xml index 41fcf7ae3c..5c756fb848 100644 --- a/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.xmpp/pom.xml +++ b/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.xmpp/pom.xml @@ -22,7 +22,7 @@ device-mgt-extensions org.wso2.carbon.devicemgt - 1.2.1 + 1.2.2-SNAPSHOT ../pom.xml diff --git a/components/device-mgt-extensions/pom.xml b/components/device-mgt-extensions/pom.xml index 064a1ee7d1..44152d8ebd 100644 --- a/components/device-mgt-extensions/pom.xml +++ b/components/device-mgt-extensions/pom.xml @@ -22,7 +22,7 @@ carbon-devicemgt org.wso2.carbon.devicemgt - 1.2.1 + 1.2.2-SNAPSHOT ../../pom.xml diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.analytics.dashboard/pom.xml b/components/device-mgt/org.wso2.carbon.device.mgt.analytics.dashboard/pom.xml index dc0690134b..d92dceb939 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.analytics.dashboard/pom.xml +++ b/components/device-mgt/org.wso2.carbon.device.mgt.analytics.dashboard/pom.xml @@ -3,7 +3,7 @@ org.wso2.carbon.devicemgt device-mgt - 1.2.1 + 1.2.2-SNAPSHOT ../pom.xml diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.analytics.data.publisher/pom.xml b/components/device-mgt/org.wso2.carbon.device.mgt.analytics.data.publisher/pom.xml index fbbe715fca..607d58f2af 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.analytics.data.publisher/pom.xml +++ b/components/device-mgt/org.wso2.carbon.device.mgt.analytics.data.publisher/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt device-mgt - 1.2.1 + 1.2.2-SNAPSHOT ../pom.xml diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.api/pom.xml b/components/device-mgt/org.wso2.carbon.device.mgt.api/pom.xml index 6b85399ae0..142eb0cc5f 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.api/pom.xml +++ b/components/device-mgt/org.wso2.carbon.device.mgt.api/pom.xml @@ -22,7 +22,7 @@ device-mgt org.wso2.carbon.devicemgt - 1.2.1 + 1.2.2-SNAPSHOT ../pom.xml diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.common/pom.xml b/components/device-mgt/org.wso2.carbon.device.mgt.common/pom.xml index c49648b841..61a6f541ed 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.common/pom.xml +++ b/components/device-mgt/org.wso2.carbon.device.mgt.common/pom.xml @@ -21,7 +21,7 @@ device-mgt org.wso2.carbon.devicemgt - 1.2.1 + 1.2.2-SNAPSHOT ../pom.xml diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/pom.xml b/components/device-mgt/org.wso2.carbon.device.mgt.core/pom.xml index b7a4e631c7..5a00b996ed 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/pom.xml +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt device-mgt - 1.2.1 + 1.2.2-SNAPSHOT ../pom.xml diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.extensions/pom.xml b/components/device-mgt/org.wso2.carbon.device.mgt.extensions/pom.xml index 3c5c442773..8d96afdd2e 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.extensions/pom.xml +++ b/components/device-mgt/org.wso2.carbon.device.mgt.extensions/pom.xml @@ -22,7 +22,7 @@ device-mgt org.wso2.carbon.devicemgt - 1.2.1 + 1.2.2-SNAPSHOT ../pom.xml diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/pom.xml b/components/device-mgt/org.wso2.carbon.device.mgt.ui/pom.xml index c506d8b141..72501b0956 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/pom.xml +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/pom.xml @@ -22,7 +22,7 @@ device-mgt org.wso2.carbon.devicemgt - 1.2.1 + 1.2.2-SNAPSHOT ../pom.xml diff --git a/components/device-mgt/pom.xml b/components/device-mgt/pom.xml index 332cee2c58..32912e63bd 100644 --- a/components/device-mgt/pom.xml +++ b/components/device-mgt/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt carbon-devicemgt - 1.2.1 + 1.2.2-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 9bbb0fb0b5..7f935ae398 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 - 1.2.1 + 1.2.2-SNAPSHOT ../pom.xml diff --git a/components/email-sender/pom.xml b/components/email-sender/pom.xml index 773fb78b09..92debe0b62 100644 --- a/components/email-sender/pom.xml +++ b/components/email-sender/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt carbon-devicemgt - 1.2.1 + 1.2.2-SNAPSHOT ../../pom.xml diff --git a/components/identity-extensions/dynamic-client-registration/dynamic-client-web-proxy/pom.xml b/components/identity-extensions/dynamic-client-registration/dynamic-client-web-proxy/pom.xml index 7ac9df6cbb..2ed10951b6 100644 --- a/components/identity-extensions/dynamic-client-registration/dynamic-client-web-proxy/pom.xml +++ b/components/identity-extensions/dynamic-client-registration/dynamic-client-web-proxy/pom.xml @@ -21,14 +21,14 @@ dynamic-client-registration org.wso2.carbon.devicemgt - 1.2.1 + 1.2.2-SNAPSHOT ../pom.xml 4.0.0 org.wso2.mdm dynamic-client-web-proxy - 1.2.1 + 1.2.2-SNAPSHOT WSO2 Carbon - Proxy endpoint of Dynamic Client Registration Web Service WSO2 Carbon - Dynamic Client Registration Web Proxy war diff --git a/components/identity-extensions/dynamic-client-registration/dynamic-client-web/pom.xml b/components/identity-extensions/dynamic-client-registration/dynamic-client-web/pom.xml index d7a22cb0e8..aa19fec296 100644 --- a/components/identity-extensions/dynamic-client-registration/dynamic-client-web/pom.xml +++ b/components/identity-extensions/dynamic-client-registration/dynamic-client-web/pom.xml @@ -21,14 +21,14 @@ dynamic-client-registration org.wso2.carbon.devicemgt - 1.2.1 + 1.2.2-SNAPSHOT ../pom.xml 4.0.0 org.wso2.mdm dynamic-client-web - 1.2.1 + 1.2.2-SNAPSHOT WSO2 Carbon - Dynamic Client Registration Web Service WSO2 Carbon - Dynamic Client Registration Web war diff --git a/components/identity-extensions/dynamic-client-registration/org.wso2.carbon.dynamic.client.registration/pom.xml b/components/identity-extensions/dynamic-client-registration/org.wso2.carbon.dynamic.client.registration/pom.xml index 6860deadc8..e266284599 100644 --- a/components/identity-extensions/dynamic-client-registration/org.wso2.carbon.dynamic.client.registration/pom.xml +++ b/components/identity-extensions/dynamic-client-registration/org.wso2.carbon.dynamic.client.registration/pom.xml @@ -21,13 +21,13 @@ dynamic-client-registration org.wso2.carbon.devicemgt - 1.2.1 + 1.2.2-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.dynamic.client.registration - 1.2.1 + 1.2.2-SNAPSHOT bundle WSO2 Carbon - Dynamic client registration service WSO2 Carbon - Dynamic Client Registration Service diff --git a/components/identity-extensions/dynamic-client-registration/org.wso2.carbon.dynamic.client.web.app.registration/pom.xml b/components/identity-extensions/dynamic-client-registration/org.wso2.carbon.dynamic.client.web.app.registration/pom.xml index 925ba921c2..fb8e15f245 100644 --- a/components/identity-extensions/dynamic-client-registration/org.wso2.carbon.dynamic.client.web.app.registration/pom.xml +++ b/components/identity-extensions/dynamic-client-registration/org.wso2.carbon.dynamic.client.web.app.registration/pom.xml @@ -21,13 +21,13 @@ dynamic-client-registration org.wso2.carbon.devicemgt - 1.2.1 + 1.2.2-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.dynamic.client.web.app.registration - 1.2.1 + 1.2.2-SNAPSHOT bundle WSO2 Carbon - Dynamic client web app registration WSO2 Carbon - Dynamic Client Web-app Registration Service diff --git a/components/identity-extensions/dynamic-client-registration/pom.xml b/components/identity-extensions/dynamic-client-registration/pom.xml index 9fe982f553..46cbab6435 100644 --- a/components/identity-extensions/dynamic-client-registration/pom.xml +++ b/components/identity-extensions/dynamic-client-registration/pom.xml @@ -22,14 +22,14 @@ org.wso2.carbon.devicemgt identity-extensions - 1.2.1 + 1.2.2-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.devicemgt dynamic-client-registration - 1.2.1 + 1.2.2-SNAPSHOT pom WSO2 Carbon - Dynamic client registration http://wso2.org 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 4e43441dd5..36975e2b21 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 - 1.2.1 + 1.2.2-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.device.mgt.oauth.extensions - 1.2.1 + 1.2.2-SNAPSHOT bundle WSO2 Carbon - OAuth Extensions http://wso2.org 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 7a45bb5b3e..ca1ee59e59 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 - 1.2.1 + 1.2.2-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 2ac5165e3c..a445015ce8 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 - 1.2.1 + 1.2.2-SNAPSHOT ../pom.xml diff --git a/components/identity-extensions/pom.xml b/components/identity-extensions/pom.xml index 97c7bdbdc9..32f7aa98f1 100644 --- a/components/identity-extensions/pom.xml +++ b/components/identity-extensions/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt carbon-devicemgt - 1.2.1 + 1.2.2-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 94e2f8d7a6..2565af8bc9 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 - 1.2.1 + 1.2.2-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.devicemgt org.wso2.carbon.complex.policy.decision.point - 1.2.1 + 1.2.2-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 ffe4ccbe01..439f0ca977 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 - 1.2.1 + 1.2.2-SNAPSHOT ../pom.xml @@ -11,7 +11,7 @@ 4.0.0 org.wso2.carbon.devicemgt org.wso2.carbon.policy.information.point - 1.2.1 + 1.2.2-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 729622f034..0ff506d3a8 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 - 1.2.1 + 1.2.2-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.devicemgt org.wso2.carbon.policy.mgt.common - 1.2.1 + 1.2.2-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 b8fdf9b7d7..188401fa1c 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 - 1.2.1 + 1.2.2-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.devicemgt org.wso2.carbon.policy.mgt.core - 1.2.1 + 1.2.2-SNAPSHOT bundle WSO2 Carbon - Policy Management Core WSO2 Carbon - Policy Management Core diff --git a/components/policy-mgt/org.wso2.carbon.simple.policy.decision.point/pom.xml b/components/policy-mgt/org.wso2.carbon.simple.policy.decision.point/pom.xml index e73d5a44c7..a04072a41e 100644 --- a/components/policy-mgt/org.wso2.carbon.simple.policy.decision.point/pom.xml +++ b/components/policy-mgt/org.wso2.carbon.simple.policy.decision.point/pom.xml @@ -3,14 +3,14 @@ org.wso2.carbon.devicemgt policy-mgt - 1.2.1 + 1.2.2-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.devicemgt org.wso2.carbon.simple.policy.decision.point - 1.2.1 + 1.2.2-SNAPSHOT bundle WSO2 Carbon - Simple Policy Decision Point WSO2 Carbon - Simple Policy Decision Point diff --git a/components/policy-mgt/pom.xml b/components/policy-mgt/pom.xml index b70959c374..ead1e954c2 100644 --- a/components/policy-mgt/pom.xml +++ b/components/policy-mgt/pom.xml @@ -23,13 +23,13 @@ org.wso2.carbon.devicemgt carbon-devicemgt - 1.2.1 + 1.2.2-SNAPSHOT ../../pom.xml 4.0.0 policy-mgt - 1.2.1 + 1.2.2-SNAPSHOT pom WSO2 Carbon - Policy Management Component http://wso2.org 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 9551be16bf..eaad6cbdb0 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 - 1.2.1 + 1.2.2-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.devicemgt org.wso2.carbon.webapp.authenticator.framework - 1.2.1 + 1.2.2-SNAPSHOT bundle WSO2 Carbon - Web Application Authenticator Framework Bundle WSO2 Carbon - Web Application Authenticator Framework Bundle diff --git a/components/webapp-authenticator-framework/pom.xml b/components/webapp-authenticator-framework/pom.xml index 7dcd1dd468..d8a9d1d554 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 - 1.2.1 + 1.2.2-SNAPSHOT ../../pom.xml 4.0.0 org.wso2.carbon.devicemgt webapp-authenticator-framework - 1.2.1 + 1.2.2-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 355914d62a..f5b75220e7 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 - 1.2.1 + 1.2.2-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.apimgt.application.extension.feature pom - 1.2.1 + 1.2.2-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 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 5d2b8e614e..54bf525e4a 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 - 1.2.1 + 1.2.2-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.apimgt.webapp.publisher.feature pom - 1.2.1 + 1.2.2-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 7d7bec96d1..2775c2532b 100644 --- a/features/apimgt-extensions/pom.xml +++ b/features/apimgt-extensions/pom.xml @@ -22,14 +22,14 @@ org.wso2.carbon.devicemgt carbon-devicemgt - 1.2.1 + 1.2.2-SNAPSHOT ../../pom.xml 4.0.0 org.wso2.carbon.devicemgt apimgt-extensions-feature - 1.2.1 + 1.2.2-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 1604fbf2c8..07e50272b6 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 - 1.2.1 + 1.2.2-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 008b3b6948..786c1140e0 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 - 1.2.1 + 1.2.2-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 e031779ffd..b7f77ec3f2 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 - 1.2.1 + 1.2.2-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.certificate.mgt.server.feature pom - 1.2.1 + 1.2.2-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 2f44539fae..c0968aa754 100644 --- a/features/certificate-mgt/pom.xml +++ b/features/certificate-mgt/pom.xml @@ -22,14 +22,14 @@ org.wso2.carbon.devicemgt carbon-devicemgt - 1.2.1 + 1.2.2-SNAPSHOT ../../pom.xml 4.0.0 org.wso2.carbon.devicemgt certificate-mgt-feature - 1.2.1 + 1.2.2-SNAPSHOT pom WSO2 Carbon - Certificate Management Feature http://wso2.org diff --git a/features/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.gcm.feature/pom.xml b/features/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.gcm.feature/pom.xml index f7ea394f1a..ca4b374047 100644 --- a/features/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.gcm.feature/pom.xml +++ b/features/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.gcm.feature/pom.xml @@ -22,14 +22,14 @@ org.wso2.carbon.devicemgt device-mgt-extensions-feature - 1.2.1 + 1.2.2-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.device.mgt.extensions.push.notification.provider.gcm.feature pom - 1.2.1 + 1.2.2-SNAPSHOT WSO2 Carbon - GCM 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 629d1c9bc9..1959350727 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 - 1.2.1 + 1.2.2-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.device.mgt.extensions.push.notification.provider.mqtt.feature pom - 1.2.1 + 1.2.2-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 0caf080950..7321e5d89f 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 - 1.2.1 + 1.2.2-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.device.mgt.extensions.push.notification.provider.xmpp.feature pom - 1.2.1 + 1.2.2-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 bb7c634f0e..1c65ebb2a5 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 - 1.2.1 + 1.2.2-SNAPSHOT ../../pom.xml diff --git a/features/device-mgt/org.wso2.carbon.device.mgt.analytics.dashboard.feature/pom.xml b/features/device-mgt/org.wso2.carbon.device.mgt.analytics.dashboard.feature/pom.xml index 9887599d0b..5d6ff90a06 100644 --- a/features/device-mgt/org.wso2.carbon.device.mgt.analytics.dashboard.feature/pom.xml +++ b/features/device-mgt/org.wso2.carbon.device.mgt.analytics.dashboard.feature/pom.xml @@ -3,13 +3,13 @@ org.wso2.carbon.devicemgt device-mgt-feature - 1.2.1 + 1.2.2-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.device.mgt.analytics.dashboard.feature - 1.2.1 + 1.2.2-SNAPSHOT pom WSO2 Carbon - Device Management Dashboard Analytics Feature WSO2 Carbon - Device Management Dashboard Analytics Feature 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 61c4a0e318..495a2270da 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 - 1.2.1 + 1.2.2-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.device.mgt.analytics.data.publisher.feature pom - 1.2.1 + 1.2.2-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 5503e5fa3a..699e39e0e5 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 - 1.2.1 + 1.2.2-SNAPSHOT ../pom.xml 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 50d36daf29..2fa701b17f 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 - 1.2.1 + 1.2.2-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.device.mgt.extensions.feature pom - 1.2.1 + 1.2.2-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 e6b5b53bc4..eb742a5f81 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 - 1.2.1 + 1.2.2-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 587becaf1c..40a8e2760d 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 - 1.2.1 + 1.2.2-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.device.mgt.server.feature pom - 1.2.1 + 1.2.2-SNAPSHOT WSO2 Carbon - Device Management Server Feature http://wso2.org This feature contains the core bundles required for Back-end Device Management functionality 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 76552ad311..681d2beef7 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 - 1.2.1 + 1.2.2-SNAPSHOT ../pom.xml diff --git a/features/device-mgt/pom.xml b/features/device-mgt/pom.xml index f30db740cb..885bcac179 100644 --- a/features/device-mgt/pom.xml +++ b/features/device-mgt/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt carbon-devicemgt - 1.2.1 + 1.2.2-SNAPSHOT ../../pom.xml diff --git a/features/dynamic-client-registration/org.wso2.carbon.dynamic.client.registration.server.feature/pom.xml b/features/dynamic-client-registration/org.wso2.carbon.dynamic.client.registration.server.feature/pom.xml index af65ce0efc..af8834114b 100644 --- a/features/dynamic-client-registration/org.wso2.carbon.dynamic.client.registration.server.feature/pom.xml +++ b/features/dynamic-client-registration/org.wso2.carbon.dynamic.client.registration.server.feature/pom.xml @@ -23,14 +23,14 @@ org.wso2.carbon.devicemgt dynamic-client-registration-feature - 1.2.1 + 1.2.2-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.dynamic.client.registration.server.feature pom - 1.2.1 + 1.2.2-SNAPSHOT WSO2 Carbon - Dynamic Client Registration Server Feature http://wso2.org This feature contains dynamic client registration features diff --git a/features/dynamic-client-registration/pom.xml b/features/dynamic-client-registration/pom.xml index 2a6df74129..04a79e1884 100644 --- a/features/dynamic-client-registration/pom.xml +++ b/features/dynamic-client-registration/pom.xml @@ -23,14 +23,14 @@ org.wso2.carbon.devicemgt carbon-devicemgt - 1.2.1 + 1.2.2-SNAPSHOT ../../pom.xml 4.0.0 org.wso2.carbon.devicemgt dynamic-client-registration-feature - 1.2.1 + 1.2.2-SNAPSHOT pom WSO2 Carbon - Dynamic Client Registration Feature http://wso2.org 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 b91621c983..c6dbb22437 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 - 1.2.1 + 1.2.2-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.email.sender.feature pom - 1.2.1 + 1.2.2-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 b1bc07d1b5..39ce868c8a 100644 --- a/features/email-sender/pom.xml +++ b/features/email-sender/pom.xml @@ -22,14 +22,14 @@ org.wso2.carbon.devicemgt carbon-devicemgt - 1.2.1 + 1.2.2-SNAPSHOT ../../pom.xml 4.0.0 org.wso2.carbon.devicemgt email-sender-feature - 1.2.1 + 1.2.2-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 833cc8d96d..ca9323fbd7 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 - 1.2.1 + 1.2.2-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.identity.jwt.client.extension.feature pom - 1.2.1 + 1.2.2-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 cb2e9a0ce0..b8d3335e68 100644 --- a/features/jwt-client/pom.xml +++ b/features/jwt-client/pom.xml @@ -23,13 +23,13 @@ org.wso2.carbon.devicemgt carbon-devicemgt - 1.2.1 + 1.2.2-SNAPSHOT ../../pom.xml 4.0.0 jwt-client-feature - 1.2.1 + 1.2.2-SNAPSHOT pom WSO2 Carbon - Dynamic Client Registration 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 7b0dcc586c..7b790ba72f 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 - 1.2.1 + 1.2.2-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.device.mgt.oauth.extensions.feature pom - 1.2.1 + 1.2.2-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 cdffb923db..3e6d24c644 100644 --- a/features/oauth-extensions/pom.xml +++ b/features/oauth-extensions/pom.xml @@ -22,14 +22,14 @@ org.wso2.carbon.devicemgt carbon-devicemgt - 1.2.1 + 1.2.2-SNAPSHOT ../../pom.xml 4.0.0 org.wso2.carbon.devicemgt oauth-extensions-feature - 1.2.1 + 1.2.2-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 af4797ff67..bf656ef71e 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 - 1.2.1 + 1.2.2-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.policy.mgt.server.feature pom - 1.2.1 + 1.2.2-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 0a512a4409..fe10b8077a 100644 --- a/features/policy-mgt/pom.xml +++ b/features/policy-mgt/pom.xml @@ -23,14 +23,14 @@ org.wso2.carbon.devicemgt carbon-devicemgt - 1.2.1 + 1.2.2-SNAPSHOT ../../pom.xml 4.0.0 org.wso2.carbon.devicemgt policy-mgt-feature - 1.2.1 + 1.2.2-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 c109ba9842..9e7d027894 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 - 1.2.1 + 1.2.2-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.webapp.authenticator.framework.server.feature pom - 1.2.1 + 1.2.2-SNAPSHOT WSO2 Carbon - Device Management 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 8421e4b20f..caaeb3936c 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 - 1.2.1 + 1.2.2-SNAPSHOT ../../pom.xml 4.0.0 org.wso2.carbon.devicemgt webapp-authenticator-framework-feature - 1.2.1 + 1.2.2-SNAPSHOT pom WSO2 Carbon - Webapp Authenticator Framework Feature http://wso2.org diff --git a/pom.xml b/pom.xml index 25eb575057..4b353f8255 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ org.wso2.carbon.devicemgt carbon-devicemgt pom - 1.2.1 + 1.2.2-SNAPSHOT WSO2 Carbon - Device Management - Parent http://wso2.org WSO2 Connected Device Manager Components @@ -1521,7 +1521,7 @@ https://github.com/wso2/carbon-device-mgt.git scm:git:https://github.com/wso2/carbon-device-mgt.git scm:git:https://github.com/wso2/carbon-device-mgt.git - v1.2.1 + HEAD @@ -1793,7 +1793,7 @@ 1.2.11.wso2v5 - 1.2.1 + 1.2.2-SNAPSHOT 4.4.8 From 099ffd6a74b70a5a269f6f5ff772db68b4e92963 Mon Sep 17 00:00:00 2001 From: Ace Date: Tue, 20 Sep 2016 10:38:39 +0530 Subject: [PATCH 07/43] Updating velocity dependencies to OSGI enabled bundle version --- .../org.wso2.carbon.device.mgt.core/pom.xml | 6 ++++++ .../org.wso2.carbon.email.sender.core/pom.xml | 16 ++++++++-------- .../org.wso2.carbon.email.sender.feature/pom.xml | 7 +++++++ pom.xml | 4 ++-- 4 files changed, 23 insertions(+), 10 deletions(-) diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/pom.xml b/components/device-mgt/org.wso2.carbon.device.mgt.core/pom.xml index dcc2873242..d0342b2881 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/pom.xml +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/pom.xml @@ -143,6 +143,12 @@ org.wso2.carbon org.wso2.carbon.ndatasource.core + + + commons-lang + commons-lang + + com.h2database.wso2 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 81c7e06b5a..044bd2f923 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 @@ -57,17 +57,17 @@ org.osgi.service.component, org.apache.commons.logging, javax.xml.*, - javax.xml.parsers;version="${javax.xml.parsers.import.pkg.version}";resolution:=optional, + javax.xml.parsers;version="${javax.xml.parsers.import.pkg.version}";resolution:=optional, org.wso2.carbon.context, org.wso2.carbon.utils.*, org.wso2.carbon.registry.api, org.w3c.dom, - org.apache.velocity, - org.apache.velocity.app, - org.apache.velocity.context, - org.apache.velocity.exception, - org.apache.velocity.runtime.resource, - org.apache.velocity.runtime.resource.loader, + org.apache.velocity;version="${velocity.version}", + org.apache.velocity.app;version="${velocity.version}", + org.apache.velocity.context;version="${velocity.version}", + org.apache.velocity.exception;version="${velocity.version}", + org.apache.velocity.runtime.resource;version="${velocity.version}", + org.apache.velocity.runtime.resource.loader;version="${velocity.version}", org.apache.commons.io, org.apache.axis2.transport.mail, org.wso2.carbon.registry.core.service, @@ -130,7 +130,7 @@ axis2 - org.apache.velocity + org.wso2.orbit.org.apache.velocity velocity 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 896c5ac634..f764fb3da4 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 @@ -40,6 +40,10 @@ org.wso2.carbon.devicemgt org.wso2.carbon.email.sender.core + + org.wso2.orbit.org.apache.velocity + velocity + @@ -94,6 +98,9 @@ org.wso2.carbon.devicemgt:org.wso2.carbon.email.sender.core:${carbon.device.mgt.version} + + org.wso2.orbit.org.apache.velocity:velocity:${velocity.version} + org.wso2.carbon.core.server:${carbon.kernel.version} diff --git a/pom.xml b/pom.xml index 0469443014..02aab90e58 100644 --- a/pom.xml +++ b/pom.xml @@ -1343,7 +1343,7 @@ ${commons.httpclient.version} - org.apache.velocity + org.wso2.orbit.org.apache.velocity velocity ${velocity.version} @@ -1863,7 +1863,7 @@ 4.3.3.wso2v1 3.1.0.wso2v2 - 1.7 + 1.7.0.wso2v1 2.4.0.wso2v1 3.2.0.wso2v1 From b16f0fd592d26b5a172db27d6bcc95d5d7ee9737 Mon Sep 17 00:00:00 2001 From: dilanua Date: Tue, 20 Sep 2016 11:27:04 +0530 Subject: [PATCH 08/43] Refactoring change password modal - UI --- .../user-menu.hbs | 32 +++++++++++-------- 1 file changed, 19 insertions(+), 13 deletions(-) diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.ui.header.user-menu/user-menu.hbs b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.ui.header.user-menu/user-menu.hbs index c4fd938ae5..725b94f95c 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.ui.header.user-menu/user-menu.hbs +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.ui.header.user-menu/user-menu.hbs @@ -15,58 +15,64 @@ specific language governing permissions and limitations under the License. }} + {{#zone "userMenu-items"}}
  • Change password
  • + Sign out
  • +
    -
    @@ -83,5 +89,5 @@
    {{/zone}} {{#zone "bottomJs"}} - + {{js "/js/user-menu.js"}} {{/zone}} \ No newline at end of file From 87ad1e0e71a75638d9532146168b7bff95af6fad Mon Sep 17 00:00:00 2001 From: Ace Date: Tue, 20 Sep 2016 12:07:14 +0530 Subject: [PATCH 09/43] Fixing intermittent jackson bind issue --- components/device-mgt/org.wso2.carbon.device.mgt.api/pom.xml | 1 - components/device-mgt/org.wso2.carbon.device.mgt.common/pom.xml | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.api/pom.xml b/components/device-mgt/org.wso2.carbon.device.mgt.api/pom.xml index ca6c3f3342..0b35cfbf7d 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.api/pom.xml +++ b/components/device-mgt/org.wso2.carbon.device.mgt.api/pom.xml @@ -272,7 +272,6 @@ com.fasterxml.jackson.core jackson-annotations - provided org.hibernate diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.common/pom.xml b/components/device-mgt/org.wso2.carbon.device.mgt.common/pom.xml index 0e9682bb86..96422382cf 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.common/pom.xml +++ b/components/device-mgt/org.wso2.carbon.device.mgt.common/pom.xml @@ -49,7 +49,7 @@ javax.xml.bind.annotation, - com.fasterxml.jackson.annotation, + com.fasterxml.jackson.annotation;version="${jackson-annotations.version}", org.wso2.carbon.apimgt.api.model.*;version="${carbon.api.mgt.version.range}", io.swagger.annotations.*;resolution:=optional From 9a095fa670c293ab9262f3d82393ce9ff1dc7e4a Mon Sep 17 00:00:00 2001 From: dilanua Date: Tue, 20 Sep 2016 12:14:45 +0530 Subject: [PATCH 10/43] Refactoring change password modal - UI --- .../public/js/user-menu.js | 53 ++++++++++++------- .../user-menu.hbs | 17 +++--- .../user-menu.js | 18 +++++++ 3 files changed, 62 insertions(+), 26 deletions(-) diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.ui.header.user-menu/public/js/user-menu.js b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.ui.header.user-menu/public/js/user-menu.js index 34bb5c1ddd..1d13d169ee 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.ui.header.user-menu/public/js/user-menu.js +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.ui.header.user-menu/public/js/user-menu.js @@ -1,3 +1,21 @@ +/* + * Copyright (c) 2015, 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. + */ + /** * Checks if provided input is valid against RegEx input. * @@ -21,34 +39,33 @@ $(document).ready(function () { showPopup(); $("a#change-password-yes-link").click(function () { - var oldPassword = $("#old-password").val(); + var currentPassword = $("#current-password").val(); var newPassword = $("#new-password").val(); - var confirmedPassword = $("#confirmed-password").val(); + var retypedNewPassword = $("#retyped-new-password").val(); var user = $("#user").val(); - var errorMsgWrapper = "#notification-error-msg"; - var errorMsg = "#notification-error-msg span"; - if (!oldPassword) { - $(errorMsg).text("Old password is a required field. It cannot be empty."); + var errorMsgWrapper = "#change-password-error-msg"; + var errorMsg = "#change-password-error-msg span"; + if (!currentPassword) { + $(errorMsg).text("Typing your current password is required. It cannot be empty."); $(errorMsgWrapper).removeClass("hidden"); } else if (!newPassword) { - $(errorMsg).text("New password is a required field. It cannot be empty."); + $(errorMsg).text("Typing your new password is required. It cannot be empty."); $(errorMsgWrapper).removeClass("hidden"); - } else if (!confirmedPassword) { - $(errorMsg).text("Retyping the new password is required."); + } else if (!retypedNewPassword) { + $(errorMsg).text("Confirming your new password is required. It cannot be empty."); $(errorMsgWrapper).removeClass("hidden"); - } else if (confirmedPassword != newPassword) { - $(errorMsg).text("New password doesn't match the confirmation."); + } else if (retypedNewPassword != newPassword) { + $(errorMsg).text("Password confirmation failed. Please check."); $(errorMsgWrapper).removeClass("hidden"); - } else if (!inputIsValid(/^[\S]{5,30}$/, confirmedPassword)) { - $(errorMsg).text("Password should be minimum 5 characters long, should not include any whitespaces."); + } else if (!inputIsValid(/^[\S]{5,30}$/, newPassword)) { + $(errorMsg).text("Password should be minimum 5 characters long and " + + "should not include any whitespaces. Please check."); $(errorMsgWrapper).removeClass("hidden"); } else { var changePasswordFormData = {}; - //changePasswordFormData.username = user; - changePasswordFormData.newPassword = unescape((confirmedPassword)); - changePasswordFormData.oldPassword = unescape((oldPassword)); - + changePasswordFormData.currentPassword = unescape((currentPassword)); + changePasswordFormData.newPassword = unescape((newPassword)); var changePasswordAPI = "/api/device-mgt/v1.0/users/" + user + "/credentials"; @@ -64,7 +81,7 @@ $(document).ready(function () { } }, function (jqXHR) { if (jqXHR.status == 400) { - $(errorMsg).text("Old password does not match with the provided value."); + $(errorMsg).text("Your current password does not match with the provided value."); $(errorMsgWrapper).removeClass("hidden"); } else { $(errorMsg).text("An unexpected error occurred. Please try again later."); diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.ui.header.user-menu/user-menu.hbs b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.ui.header.user-menu/user-menu.hbs index 725b94f95c..207cc2623f 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.ui.header.user-menu/user-menu.hbs +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.ui.header.user-menu/user-menu.hbs @@ -43,28 +43,29 @@
    -
    -
    -
    -

    Password change is successful.

    -
    - Ok -
    -
    + +
    + +
    From 5f90587564d1a3f006c5047cc58f5de883b46aa3 Mon Sep 17 00:00:00 2001 From: Ace Date: Tue, 20 Sep 2016 18:13:53 +0530 Subject: [PATCH 15/43] Synching with master --- .../org.wso2.carbon.certificate.mgt.core/pom.xml | 5 +++++ .../mgt/core/service/DeviceManagementProviderService.java | 3 +++ pom.xml | 8 ++++++++ 3 files changed, 16 insertions(+) diff --git a/components/certificate-mgt/org.wso2.carbon.certificate.mgt.core/pom.xml b/components/certificate-mgt/org.wso2.carbon.certificate.mgt.core/pom.xml index 7fd3679c50..5e0f433144 100644 --- a/components/certificate-mgt/org.wso2.carbon.certificate.mgt.core/pom.xml +++ b/components/certificate-mgt/org.wso2.carbon.certificate.mgt.core/pom.xml @@ -181,6 +181,11 @@ org.wso2.carbon.registry org.wso2.carbon.registry.indexing + + org.slf4j + slf4j-simple + test + diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/service/DeviceManagementProviderService.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/service/DeviceManagementProviderService.java index 06ae1c875f..943634f1c5 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/service/DeviceManagementProviderService.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/service/DeviceManagementProviderService.java @@ -25,6 +25,7 @@ import org.wso2.carbon.device.mgt.common.operation.mgt.Operation; import org.wso2.carbon.device.mgt.common.operation.mgt.OperationManagementException; import org.wso2.carbon.device.mgt.core.dto.DeviceType; +import java.util.HashMap; import java.util.Date; import java.util.List; @@ -208,6 +209,8 @@ public interface DeviceManagementProviderService { Device getDevice(DeviceIdentifier deviceId, Date since) throws DeviceManagementException; + HashMap getTenantedDevice(DeviceIdentifier deviceIdentifier) throws DeviceManagementException; + Device getDevice(DeviceIdentifier deviceId, EnrolmentInfo.Status status) throws DeviceManagementException; List getAvailableDeviceTypes() throws DeviceManagementException; diff --git a/pom.xml b/pom.xml index 02aab90e58..112f715979 100644 --- a/pom.xml +++ b/pom.xml @@ -1520,6 +1520,11 @@ javax.servlet.jsp-api ${servelet.jsp.version} + + org.slf4j + slf4j-simple + ${slf4j.simple.version} + @@ -1898,6 +1903,9 @@ 1.8.10.wso2v2 4.2.1 [1.0.0, 1.1.0) + + + 1.6.1 From c967fc34d03989ab7232aa22fbe59a6cc6be1e1b Mon Sep 17 00:00:00 2001 From: harshanl Date: Tue, 20 Sep 2016 18:43:50 +0530 Subject: [PATCH 16/43] Fixed EMM-1513 --- .../mgt/core/service/DeviceManagementProviderService.java | 1 - .../policy/mgt/core/mgt/impl/MonitoringManagerImpl.java | 4 ++-- .../wso2/carbon/policy/mgt/core/task/MonitoringTask.java | 6 ++++-- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/service/DeviceManagementProviderService.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/service/DeviceManagementProviderService.java index 06ae1c875f..200291ce4c 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/service/DeviceManagementProviderService.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/service/DeviceManagementProviderService.java @@ -23,7 +23,6 @@ import org.wso2.carbon.device.mgt.common.license.mgt.License; import org.wso2.carbon.device.mgt.common.operation.mgt.Activity; import org.wso2.carbon.device.mgt.common.operation.mgt.Operation; import org.wso2.carbon.device.mgt.common.operation.mgt.OperationManagementException; -import org.wso2.carbon.device.mgt.core.dto.DeviceType; import java.util.Date; import java.util.List; diff --git a/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/main/java/org/wso2/carbon/policy/mgt/core/mgt/impl/MonitoringManagerImpl.java b/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/main/java/org/wso2/carbon/policy/mgt/core/mgt/impl/MonitoringManagerImpl.java index a80bd46219..adebb6ed38 100644 --- a/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/main/java/org/wso2/carbon/policy/mgt/core/mgt/impl/MonitoringManagerImpl.java +++ b/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/main/java/org/wso2/carbon/policy/mgt/core/mgt/impl/MonitoringManagerImpl.java @@ -399,7 +399,7 @@ public class MonitoringManagerImpl implements MonitoringManager { monitoringOperation.setCode(OPERATION_MONITOR); // CommandOperation infoOperation = new CommandOperation(); // infoOperation.setEnabled(true); -// infoOperation.setType(Operation.Type.COMMAND); +// infoOperation.setType(Operation.Type.COMMAND);\\ // infoOperation.setCode(OPERATION_INFO); // CommandOperation appListOperation = new CommandOperation(); // appListOperation.setEnabled(true); @@ -411,7 +411,7 @@ public class MonitoringManagerImpl implements MonitoringManager { if (deviceIdentifiers.size() > 0) { type = deviceIdentifiers.get(0).getType(); } - DeviceManagementProviderService service = new DeviceManagementProviderServiceImpl(); + DeviceManagementProviderService service = PolicyManagementDataHolder.getInstance().getDeviceManagementService(); service.addOperation(type, monitoringOperation, deviceIdentifiers); // service.addOperation(infoOperation, deviceIdentifiers); // service.addOperation(appListOperation, deviceIdentifiers); diff --git a/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/main/java/org/wso2/carbon/policy/mgt/core/task/MonitoringTask.java b/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/main/java/org/wso2/carbon/policy/mgt/core/task/MonitoringTask.java index cf803dec28..09987a5d19 100644 --- a/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/main/java/org/wso2/carbon/policy/mgt/core/task/MonitoringTask.java +++ b/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/main/java/org/wso2/carbon/policy/mgt/core/task/MonitoringTask.java @@ -117,8 +117,10 @@ public class MonitoringTask implements Task { log.debug(device.getDeviceIdentifier()); } } - monitoringManager.addMonitoringOperation(notifiableDevices); - monitoringService.notifyDevices(notifiableDevices); + if (!notifiableDevices.isEmpty()) { + monitoringManager.addMonitoringOperation(notifiableDevices); + monitoringService.notifyDevices(notifiableDevices); + } } } if (log.isDebugEnabled()) { From 9548bdc2639cc70a5262155ed24c93661b933003 Mon Sep 17 00:00:00 2001 From: Ace Date: Wed, 21 Sep 2016 12:56:40 +0530 Subject: [PATCH 17/43] Fixing dependency related issues --- .../org.wso2.carbon.certificate.mgt.core/pom.xml | 2 +- .../org.wso2.carbon.certificate.mgt.server.feature/pom.xml | 4 ++-- pom.xml | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/components/certificate-mgt/org.wso2.carbon.certificate.mgt.core/pom.xml b/components/certificate-mgt/org.wso2.carbon.certificate.mgt.core/pom.xml index 5e0f433144..2850739cb6 100644 --- a/components/certificate-mgt/org.wso2.carbon.certificate.mgt.core/pom.xml +++ b/components/certificate-mgt/org.wso2.carbon.certificate.mgt.core/pom.xml @@ -140,7 +140,7 @@ bcprov-jdk15on - org.bouncycastle.wso2 + org.wso2.orbit.org.bouncycastle bcpkix-jdk15on 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 77bd3321ff..b420ccf25b 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 @@ -45,7 +45,7 @@ bcprov-jdk15on - org.bouncycastle.wso2 + org.wso2.orbit.org.bouncycastle bcpkix-jdk15on @@ -122,7 +122,7 @@ org.wso2.carbon.devicemgt:org.wso2.carbon.certificate.mgt.core:${carbon.device.mgt.version} - org.bouncycastle.wso2:bcpkix-jdk15on:${bcpkix.wso2.version} + org.wso2.orbit.org.bouncycastle:bcpkix-jdk15on:${bcpkix.wso2.version} com.google.code.jscep.wso2:jscep:${jscep.version} diff --git a/pom.xml b/pom.xml index 112f715979..f1de16ce9c 100644 --- a/pom.xml +++ b/pom.xml @@ -1284,7 +1284,7 @@ ${bcprov.wso2.version} - org.bouncycastle.wso2 + org.wso2.orbit.org.bouncycastle bcpkix-jdk15on ${bcpkix.wso2.version} @@ -1816,7 +1816,7 @@ 2.6.0.wso2v1 - 6.0.4 + 6.0.5-SNAPSHOT (5.0.0,7.0.0] From 87f4939ba5e582339b4c5782fa7fe352852d3fa8 Mon Sep 17 00:00:00 2001 From: dilanua Date: Wed, 21 Sep 2016 15:05:45 +0530 Subject: [PATCH 18/43] Updating MSSQL script with dasboard analytics views --- .../main/resources/dbscripts/cdm/mssql.sql | 65 +++++++++++++++++++ 1 file changed, 65 insertions(+) diff --git a/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/src/main/resources/dbscripts/cdm/mssql.sql b/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/src/main/resources/dbscripts/cdm/mssql.sql index 1f62c3fccf..1ee37a2e90 100644 --- a/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/src/main/resources/dbscripts/cdm/mssql.sql +++ b/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/src/main/resources/dbscripts/cdm/mssql.sql @@ -435,3 +435,68 @@ CREATE TABLE DM_DEVICE_DETAIL ( ON DELETE NO ACTION ON UPDATE NO ACTION ); +GO + +-- DASHBOARD RELATED VIEWS -- + +CREATE VIEW POLICY_COMPLIANCE_INFO AS +SELECT TOP 100 PERCENT +DEVICE_INFO.DEVICE_ID, +DEVICE_INFO.DEVICE_IDENTIFICATION, +DEVICE_INFO.PLATFORM, +DEVICE_INFO.OWNERSHIP, +DEVICE_INFO.CONNECTIVITY_STATUS, +ISNULL(DEVICE_WITH_POLICY_INFO.POLICY_ID, -1) AS POLICY_ID, +ISNULL(DEVICE_WITH_POLICY_INFO.IS_COMPLIANT, -1) AS +IS_COMPLIANT, +DEVICE_INFO.TENANT_ID +FROM +(SELECT +DM_DEVICE.ID AS DEVICE_ID, +DM_DEVICE.DEVICE_IDENTIFICATION, +DM_DEVICE_TYPE.NAME AS PLATFORM, +DM_ENROLMENT.OWNERSHIP, +DM_ENROLMENT.STATUS AS CONNECTIVITY_STATUS, +DM_DEVICE.TENANT_ID +FROM DM_DEVICE, DM_DEVICE_TYPE, DM_ENROLMENT +WHERE DM_DEVICE.DEVICE_TYPE_ID = DM_DEVICE_TYPE.ID AND DM_DEVICE.ID = DM_ENROLMENT.DEVICE_ID) DEVICE_INFO +LEFT JOIN +(SELECT +DEVICE_ID, +POLICY_ID, +STATUS AS IS_COMPLIANT +FROM +DM_POLICY_COMPLIANCE_STATUS) DEVICE_WITH_POLICY_INFO +ON DEVICE_INFO.DEVICE_ID = DEVICE_WITH_POLICY_INFO.DEVICE_ID +ORDER BY DEVICE_INFO.DEVICE_ID; +GO + +CREATE VIEW FEATURE_NON_COMPLIANCE_INFO AS +SELECT TOP 100 PERCENT +DM_DEVICE.ID AS DEVICE_ID, +DM_DEVICE.DEVICE_IDENTIFICATION, +DM_DEVICE_DETAIL.DEVICE_MODEL, +DM_DEVICE_DETAIL.VENDOR, +DM_DEVICE_DETAIL.OS_VERSION, +DM_ENROLMENT.OWNERSHIP, +DM_ENROLMENT.OWNER, +DM_ENROLMENT.STATUS AS CONNECTIVITY_STATUS, +DM_POLICY_COMPLIANCE_STATUS.POLICY_ID, +DM_DEVICE_TYPE.NAME +AS PLATFORM, +DM_POLICY_COMPLIANCE_FEATURES.FEATURE_CODE, +DM_POLICY_COMPLIANCE_FEATURES.STATUS AS IS_COMPLAINT, +DM_DEVICE.TENANT_ID +FROM +DM_POLICY_COMPLIANCE_FEATURES, DM_POLICY_COMPLIANCE_STATUS, DM_ENROLMENT, DM_DEVICE, DM_DEVICE_TYPE, DM_DEVICE_DETAIL +WHERE +DM_POLICY_COMPLIANCE_FEATURES.COMPLIANCE_STATUS_ID = DM_POLICY_COMPLIANCE_STATUS.ID AND +DM_POLICY_COMPLIANCE_STATUS.ENROLMENT_ID = +DM_ENROLMENT.ID AND +DM_POLICY_COMPLIANCE_STATUS.DEVICE_ID = DM_DEVICE.ID AND +DM_DEVICE.DEVICE_TYPE_ID = DM_DEVICE_TYPE.ID AND +DM_DEVICE.ID = DM_DEVICE_DETAIL.DEVICE_ID +ORDER BY TENANT_ID, DEVICE_ID; +GO + +-- END OF DASHBOARD RELATED VIEWS -- From 108ea98677a4e67f5d7abd384e0be140c4e039e8 Mon Sep 17 00:00:00 2001 From: harshanl Date: Wed, 21 Sep 2016 19:44:46 +0530 Subject: [PATCH 19/43] Refactor policy mgt components and fixed add operations for invalid devices from task service --- .../dao/impl/AbstractNotificationDAOImpl.java | 8 +--- .../DeviceManagementProviderService.java | 15 ++++++++ .../core/task/impl/DeviceTaskManagerImpl.java | 37 +++++++++---------- .../mgt/core/util/DeviceManagerUtil.java | 21 +++++++++++ .../mgt/core/PolicyManagerServiceImpl.java | 2 + .../internal/PolicyManagementDataHolder.java | 20 ++++++++++ .../mgt/core/mgt/MonitoringManager.java | 3 +- .../core/mgt/impl/MonitoringManagerImpl.java | 29 ++++----------- .../mgt/core/mgt/impl/PolicyManagerImpl.java | 5 --- .../policy/mgt/core/task/MonitoringTask.java | 19 ++++------ .../mgt/core/util/PolicyManagerUtil.java | 1 + 11 files changed, 96 insertions(+), 64 deletions(-) diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/notification/mgt/dao/impl/AbstractNotificationDAOImpl.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/notification/mgt/dao/impl/AbstractNotificationDAOImpl.java index aa6ebe316a..abe94ea4b9 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/notification/mgt/dao/impl/AbstractNotificationDAOImpl.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/notification/mgt/dao/impl/AbstractNotificationDAOImpl.java @@ -18,12 +18,8 @@ package org.wso2.carbon.device.mgt.core.notification.mgt.dao.impl; -import org.wso2.carbon.device.mgt.common.PaginationRequest; -import org.wso2.carbon.device.mgt.common.PaginationResult; import org.wso2.carbon.device.mgt.common.notification.mgt.Notification; import org.wso2.carbon.device.mgt.common.notification.mgt.NotificationManagementException; -import org.wso2.carbon.device.mgt.core.dao.DeviceManagementDAOException; -import org.wso2.carbon.device.mgt.core.dao.util.DeviceManagementDAOUtil; import org.wso2.carbon.device.mgt.core.notification.mgt.dao.NotificationDAO; import org.wso2.carbon.device.mgt.core.notification.mgt.dao.NotificationManagementDAOFactory; import org.wso2.carbon.device.mgt.core.notification.mgt.dao.util.NotificationDAOUtil; @@ -79,8 +75,8 @@ public abstract class AbstractNotificationDAOImpl implements NotificationDAO { try { conn = NotificationManagementDAOFactory.getConnection(); String sql = - "SELECT NOTIFICATION_ID, OPERATION_ID, DESCRIPTION, STATUS FROM DM_NOTIFICATION WHERE " + - "TENANT_ID = ? AND NOTIFICATION_ID = ?"; + "SELECT NOTIFICATION_ID, OPERATION_ID, DESCRIPTION, STATUS, DEVICE_IDENTIFICATION, DEVICE_NAME, " + + "DEVICE TYPE FROM DM_NOTIFICATION WHERE TENANT_ID = ? AND NOTIFICATION_ID = ?"; stmt = conn.prepareStatement(sql); stmt.setInt(1, tenantId); stmt.setInt(2, notificationId); diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/service/DeviceManagementProviderService.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/service/DeviceManagementProviderService.java index 200291ce4c..83eae4cff4 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/service/DeviceManagementProviderService.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/service/DeviceManagementProviderService.java @@ -33,8 +33,23 @@ import java.util.List; */ public interface DeviceManagementProviderService { + /** + * Method to retrieve all the devices of a given device type. + * + * @param deviceType Device-type of the required devices + * @return List of devices of given device-type. + * @throws DeviceManagementException If some unusual behaviour is observed while fetching the + * devices. + */ List getAllDevices(String deviceType) throws DeviceManagementException; + /** + * Method to retrieve all the devices registered in the system. + * + * @return List of registered devices. + * @throws DeviceManagementException If some unusual behaviour is observed while fetching the + * devices. + */ List getAllDevices() throws DeviceManagementException; /** diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/task/impl/DeviceTaskManagerImpl.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/task/impl/DeviceTaskManagerImpl.java index 263237f7d5..5041f71a6c 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/task/impl/DeviceTaskManagerImpl.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/task/impl/DeviceTaskManagerImpl.java @@ -84,29 +84,28 @@ public class DeviceTaskManagerImpl implements DeviceTaskManager { @Override public void addOperations() throws DeviceMgtTaskException { - DeviceManagementProviderService deviceManagementProviderService = - DeviceManagementDataHolder.getInstance().getDeviceManagementProvider(); + DeviceManagementProviderService deviceManagementProviderService = DeviceManagementDataHolder.getInstance(). + getDeviceManagementProvider(); try { - List devices = deviceManagementProviderService.getAllDevices(); + List deviceTypes = deviceManagementProviderService.getAvailableDeviceTypes(); + List devices; List operations = this.getValidOperationNames(); - if (!devices.isEmpty()) { - for (String str : operations) { - CommandOperation operation = new CommandOperation(); - operation.setEnabled(true); - operation.setType(Operation.Type.COMMAND); - operation.setCode(str); - //TODO: Fix this properly later adding device type to be passed in when the task manage executes "addOperations()" - String type = null; - if (devices.size() > 0) { - type = devices.get(0).getType(); + for (String deviceType : deviceTypes) { + devices = deviceManagementProviderService.getAllDevices(deviceType); + if (!devices.isEmpty()) { + for (String str : operations) { + CommandOperation operation = new CommandOperation(); + operation.setEnabled(true); + operation.setType(Operation.Type.COMMAND); + operation.setCode(str); + deviceManagementProviderService.addOperation(deviceType, operation, + DeviceManagerUtil.getValidDeviceIdentifiers(devices)); + } + } else { + if (log.isDebugEnabled()) { + log.debug("No devices are available to perform the operations."); } - deviceManagementProviderService.addOperation(type, operation, - DeviceManagerUtil.convertDevices(devices)); - } - } else { - if (log.isDebugEnabled()) { - log.debug("No devices are available to perform the operations."); } } } catch (InvalidDeviceException e) { 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 17023a5a31..033e3fccca 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 @@ -184,6 +184,27 @@ public final class DeviceManagerUtil { return deviceIdentifiers; } + public static List getValidDeviceIdentifiers(List devices) { + List deviceIdentifiers = new ArrayList<>(); + for (Device device : devices) { + if (device.getEnrolmentInfo() != null) { + switch (device.getEnrolmentInfo().getStatus()) { + case BLOCKED: + case REMOVED: + case SUSPENDED: + break; + default: + DeviceIdentifier identifier = new DeviceIdentifier(); + identifier.setId(device.getDeviceIdentifier()); + identifier.setType(device.getType()); + deviceIdentifiers.add(identifier); + } + } + } + return deviceIdentifiers; + } + + public static String getServerBaseHttpsUrl() { String hostName = "localhost"; try { diff --git a/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/main/java/org/wso2/carbon/policy/mgt/core/PolicyManagerServiceImpl.java b/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/main/java/org/wso2/carbon/policy/mgt/core/PolicyManagerServiceImpl.java index 26d896886a..28ab6040c7 100644 --- a/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/main/java/org/wso2/carbon/policy/mgt/core/PolicyManagerServiceImpl.java +++ b/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/main/java/org/wso2/carbon/policy/mgt/core/PolicyManagerServiceImpl.java @@ -54,6 +54,8 @@ public class PolicyManagerServiceImpl implements PolicyManagerService { policyAdministratorPoint = new PolicyAdministratorPointImpl(); monitoringManager = new MonitoringManagerImpl(); policyManager = new PolicyManagerImpl(); + PolicyManagementDataHolder.getInstance().setMonitoringManager(monitoringManager); + PolicyManagementDataHolder.getInstance().setPolicyManager(policyManager); } @Override diff --git a/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/main/java/org/wso2/carbon/policy/mgt/core/internal/PolicyManagementDataHolder.java b/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/main/java/org/wso2/carbon/policy/mgt/core/internal/PolicyManagementDataHolder.java index dd4519eb5b..584bd2ec08 100644 --- a/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/main/java/org/wso2/carbon/policy/mgt/core/internal/PolicyManagementDataHolder.java +++ b/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/main/java/org/wso2/carbon/policy/mgt/core/internal/PolicyManagementDataHolder.java @@ -23,6 +23,8 @@ import org.wso2.carbon.ntask.core.service.TaskService; import org.wso2.carbon.policy.mgt.common.PolicyEvaluationPoint; import org.wso2.carbon.policy.mgt.common.PolicyInformationPoint; import org.wso2.carbon.policy.mgt.common.spi.PolicyMonitoringService; +import org.wso2.carbon.policy.mgt.core.mgt.MonitoringManager; +import org.wso2.carbon.policy.mgt.core.mgt.PolicyManager; import org.wso2.carbon.user.core.service.RealmService; import org.wso2.carbon.user.core.tenant.TenantManager; @@ -36,6 +38,8 @@ public class PolicyManagementDataHolder { private PolicyEvaluationPoint policyEvaluationPoint; private PolicyInformationPoint policyInformationPoint; private DeviceManagementProviderService deviceManagementService; + private MonitoringManager monitoringManager; + private PolicyManager policyManager; private Map policyMonitoringServiceMap = new HashMap<>(); private TaskService taskService; @@ -47,6 +51,22 @@ public class PolicyManagementDataHolder { return thisInstance; } + public PolicyManager getPolicyManager() { + return policyManager; + } + + public void setPolicyManager(PolicyManager policyManager) { + this.policyManager = policyManager; + } + + public MonitoringManager getMonitoringManager() { + return monitoringManager; + } + + public void setMonitoringManager(MonitoringManager monitoringManager) { + this.monitoringManager = monitoringManager; + } + public RealmService getRealmService() { return realmService; } diff --git a/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/main/java/org/wso2/carbon/policy/mgt/core/mgt/MonitoringManager.java b/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/main/java/org/wso2/carbon/policy/mgt/core/mgt/MonitoringManager.java index 883d49237d..2b6e7d5eae 100644 --- a/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/main/java/org/wso2/carbon/policy/mgt/core/mgt/MonitoringManager.java +++ b/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/main/java/org/wso2/carbon/policy/mgt/core/mgt/MonitoringManager.java @@ -21,7 +21,6 @@ package org.wso2.carbon.policy.mgt.core.mgt; import org.wso2.carbon.device.mgt.common.Device; import org.wso2.carbon.device.mgt.common.DeviceIdentifier; -import org.wso2.carbon.device.mgt.core.dto.DeviceType; import org.wso2.carbon.policy.mgt.common.monitor.ComplianceData; import org.wso2.carbon.policy.mgt.common.monitor.ComplianceFeature; import org.wso2.carbon.policy.mgt.common.monitor.PolicyComplianceException; @@ -40,6 +39,6 @@ public interface MonitoringManager { void addMonitoringOperation(List devices) throws PolicyComplianceException; - List getDeviceTypes() throws PolicyComplianceException; + List getDeviceTypes() throws PolicyComplianceException; } diff --git a/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/main/java/org/wso2/carbon/policy/mgt/core/mgt/impl/MonitoringManagerImpl.java b/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/main/java/org/wso2/carbon/policy/mgt/core/mgt/impl/MonitoringManagerImpl.java index adebb6ed38..ece94829de 100644 --- a/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/main/java/org/wso2/carbon/policy/mgt/core/mgt/impl/MonitoringManagerImpl.java +++ b/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/main/java/org/wso2/carbon/policy/mgt/core/mgt/impl/MonitoringManagerImpl.java @@ -21,7 +21,6 @@ package org.wso2.carbon.policy.mgt.core.mgt.impl; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; -import org.wso2.carbon.context.PrivilegedCarbonContext; import org.wso2.carbon.device.mgt.common.Device; import org.wso2.carbon.device.mgt.common.DeviceIdentifier; import org.wso2.carbon.device.mgt.common.DeviceManagementException; @@ -30,12 +29,8 @@ import org.wso2.carbon.device.mgt.common.operation.mgt.Operation; import org.wso2.carbon.device.mgt.common.operation.mgt.OperationManagementException; import org.wso2.carbon.device.mgt.core.config.DeviceConfigurationManager; import org.wso2.carbon.device.mgt.core.config.policy.PolicyConfiguration; -import org.wso2.carbon.device.mgt.core.dao.DeviceManagementDAOFactory; -import org.wso2.carbon.device.mgt.core.dao.DeviceTypeDAO; -import org.wso2.carbon.device.mgt.core.dto.DeviceType; import org.wso2.carbon.device.mgt.core.operation.mgt.CommandOperation; import org.wso2.carbon.device.mgt.core.service.DeviceManagementProviderService; -import org.wso2.carbon.device.mgt.core.service.DeviceManagementProviderServiceImpl; import org.wso2.carbon.policy.mgt.common.Policy; import org.wso2.carbon.policy.mgt.common.PolicyManagementException; import org.wso2.carbon.policy.mgt.common.ProfileFeature; @@ -56,8 +51,6 @@ import java.util.Map; public class MonitoringManagerImpl implements MonitoringManager { private PolicyDAO policyDAO; - // private DeviceDAO deviceDAO; - private DeviceTypeDAO deviceTypeDAO; private MonitoringDAO monitoringDAO; private ComplianceDecisionPoint complianceDecisionPoint; private PolicyConfiguration policyConfiguration; @@ -69,8 +62,6 @@ public class MonitoringManagerImpl implements MonitoringManager { public MonitoringManagerImpl() { this.policyDAO = PolicyManagementDAOFactory.getPolicyDAO(); -// this.deviceDAO = DeviceManagementDAOFactory.getDeviceDAO(); - this.deviceTypeDAO = DeviceManagementDAOFactory.getDeviceTypeDAO(); this.monitoringDAO = PolicyManagementDAOFactory.getMonitoringDAO(); this.complianceDecisionPoint = new ComplianceDecisionPointImpl(); this.policyConfiguration = @@ -84,7 +75,7 @@ public class MonitoringManagerImpl implements MonitoringManager { List complianceFeatures = new ArrayList<>(); try { - DeviceManagementProviderService service = new DeviceManagementProviderServiceImpl(); + DeviceManagementProviderService service = PolicyManagementDataHolder.getInstance().getDeviceManagementService(); PolicyManager manager = new PolicyManagerImpl(); Device device = service.getDevice(deviceIdentifier); Policy policy = manager.getAppliedPolicyToDevice(deviceIdentifier); @@ -179,7 +170,7 @@ public class MonitoringManagerImpl implements MonitoringManager { @Override public boolean isCompliance(DeviceIdentifier deviceIdentifier) throws PolicyComplianceException { try { - DeviceManagementProviderService service = new DeviceManagementProviderServiceImpl(); + DeviceManagementProviderService service = PolicyManagementDataHolder.getInstance().getDeviceManagementService(); Device device = service.getDevice(deviceIdentifier); PolicyManagementDAOFactory.openConnection(); ComplianceData complianceData = monitoringDAO.getCompliance(device.getId(), device.getEnrolmentInfo() @@ -209,7 +200,7 @@ public class MonitoringManagerImpl implements MonitoringManager { ComplianceData complianceData; try { PolicyManagementDAOFactory.openConnection(); - DeviceManagementProviderService service = new DeviceManagementProviderServiceImpl(); + DeviceManagementProviderService service = PolicyManagementDataHolder.getInstance().getDeviceManagementService(); Device device = service.getDevice(deviceIdentifier); complianceData = monitoringDAO.getCompliance(device.getId(), device.getEnrolmentInfo().getId()); List complianceFeatures = @@ -374,17 +365,13 @@ public class MonitoringManagerImpl implements MonitoringManager { } @Override - public List getDeviceTypes() throws PolicyComplianceException { + public List getDeviceTypes() throws PolicyComplianceException { - List deviceTypes = new ArrayList<>(); + List deviceTypes = new ArrayList<>(); try { - DeviceManagementDAOFactory.openConnection(); - int tenantId = PrivilegedCarbonContext.getThreadLocalCarbonContext().getTenantId(); - deviceTypes = deviceTypeDAO.getDeviceTypes(tenantId); - } catch (Exception e) { - log.error("Error occurred while getting the device types.", e); - } finally { - DeviceManagementDAOFactory.closeConnection(); + deviceTypes = PolicyManagementDataHolder.getInstance().getDeviceManagementService().getAvailableDeviceTypes(); + } catch (DeviceManagementException e) { + throw new PolicyComplianceException("Error occurred while getting the device types.", e); } return deviceTypes; } diff --git a/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/main/java/org/wso2/carbon/policy/mgt/core/mgt/impl/PolicyManagerImpl.java b/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/main/java/org/wso2/carbon/policy/mgt/core/mgt/impl/PolicyManagerImpl.java index a8e8250c56..3c390780e6 100644 --- a/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/main/java/org/wso2/carbon/policy/mgt/core/mgt/impl/PolicyManagerImpl.java +++ b/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/main/java/org/wso2/carbon/policy/mgt/core/mgt/impl/PolicyManagerImpl.java @@ -26,9 +26,6 @@ import org.wso2.carbon.device.mgt.common.DeviceIdentifier; import org.wso2.carbon.device.mgt.common.DeviceManagementException; import org.wso2.carbon.device.mgt.common.group.mgt.DeviceGroup; import org.wso2.carbon.device.mgt.common.group.mgt.GroupManagementException; -import org.wso2.carbon.device.mgt.core.dao.DeviceDAO; -import org.wso2.carbon.device.mgt.core.dao.DeviceManagementDAOFactory; -import org.wso2.carbon.device.mgt.core.dto.DeviceType; import org.wso2.carbon.device.mgt.core.service.DeviceManagementProviderService; import org.wso2.carbon.device.mgt.core.service.DeviceManagementProviderServiceImpl; import org.wso2.carbon.device.mgt.core.service.GroupManagementProviderService; @@ -50,14 +47,12 @@ public class PolicyManagerImpl implements PolicyManager { private ProfileDAO profileDAO; private FeatureDAO featureDAO; private ProfileManager profileManager; - private DeviceDAO deviceDAO; private static Log log = LogFactory.getLog(PolicyManagerImpl.class); public PolicyManagerImpl() { this.policyDAO = PolicyManagementDAOFactory.getPolicyDAO(); this.profileDAO = PolicyManagementDAOFactory.getProfileDAO(); this.featureDAO = PolicyManagementDAOFactory.getFeatureDAO(); - this.deviceDAO = DeviceManagementDAOFactory.getDeviceDAO(); this.profileManager = new ProfileManagerImpl(); } diff --git a/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/main/java/org/wso2/carbon/policy/mgt/core/task/MonitoringTask.java b/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/main/java/org/wso2/carbon/policy/mgt/core/task/MonitoringTask.java index 09987a5d19..d579cd746d 100644 --- a/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/main/java/org/wso2/carbon/policy/mgt/core/task/MonitoringTask.java +++ b/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/main/java/org/wso2/carbon/policy/mgt/core/task/MonitoringTask.java @@ -40,7 +40,6 @@ import java.util.Map; public class MonitoringTask implements Task { - private DeviceTypeDAO deviceTypeDAO; private static Log log = LogFactory.getLog(MonitoringTask.class); Map properties; @@ -53,7 +52,6 @@ public class MonitoringTask implements Task { @Override public void init() { - deviceTypeDAO = DeviceManagementDAOFactory.getDeviceTypeDAO(); } @Override @@ -63,9 +61,9 @@ public class MonitoringTask implements Task { log.debug("Monitoring task started to run."); } - MonitoringManager monitoringManager = new MonitoringManagerImpl(); + MonitoringManager monitoringManager = PolicyManagementDataHolder.getInstance().getMonitoringManager(); - List deviceTypes = new ArrayList<>(); + List deviceTypes = new ArrayList<>(); try { deviceTypes = monitoringManager.getDeviceTypes(); } catch (PolicyComplianceException e) { @@ -79,15 +77,15 @@ public class MonitoringTask implements Task { DeviceManagementProviderService deviceManagementProviderService = PolicyManagementDataHolder.getInstance().getDeviceManagementService(); - for (DeviceType deviceType : deviceTypes) { + for (String deviceType : deviceTypes) { if (log.isDebugEnabled()) { - log.debug("Running task for device type : " + deviceType.getName()); + log.debug("Running task for device type : " + deviceType); } PolicyMonitoringService monitoringService = - PolicyManagementDataHolder.getInstance().getPolicyMonitoringService(deviceType.getName()); - List devices = deviceManagementProviderService.getAllDevices(deviceType.getName()); + PolicyManagementDataHolder.getInstance().getPolicyMonitoringService(deviceType); + List devices = deviceManagementProviderService.getAllDevices(deviceType); if (monitoringService != null && !devices.isEmpty()) { @@ -95,7 +93,7 @@ public class MonitoringTask implements Task { if (log.isDebugEnabled()) { log.debug("Removing inactive and blocked devices from the list for the device type : " + - deviceType.getName()); + deviceType); } for (Device device : devices) { EnrolmentInfo.Status status = device.getEnrolmentInfo().getStatus(); @@ -111,8 +109,7 @@ public class MonitoringTask implements Task { } } if (log.isDebugEnabled()) { - log.debug("Following devices selected to send the notification for " + - deviceType.getName()); + log.debug("Following devices selected to send the notification for " + deviceType); for (Device device : notifiableDevices) { log.debug(device.getDeviceIdentifier()); } diff --git a/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/main/java/org/wso2/carbon/policy/mgt/core/util/PolicyManagerUtil.java b/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/main/java/org/wso2/carbon/policy/mgt/core/util/PolicyManagerUtil.java index d0d9fce352..e5c983ed6f 100644 --- a/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/main/java/org/wso2/carbon/policy/mgt/core/util/PolicyManagerUtil.java +++ b/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/main/java/org/wso2/carbon/policy/mgt/core/util/PolicyManagerUtil.java @@ -22,6 +22,7 @@ import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.w3c.dom.Document; import org.wso2.carbon.device.mgt.common.Device; +import org.wso2.carbon.device.mgt.common.DeviceIdentifier; import org.wso2.carbon.device.mgt.common.configuration.mgt.ConfigurationEntry; import org.wso2.carbon.device.mgt.common.configuration.mgt.ConfigurationManagementException; import org.wso2.carbon.device.mgt.common.configuration.mgt.PlatformConfiguration; From f4d6eb6898f1c0ed2ee27738980c44640766caa8 Mon Sep 17 00:00:00 2001 From: Ace Date: Thu, 22 Sep 2016 08:24:58 +0530 Subject: [PATCH 20/43] Upgrading jscep and other fixes --- .../pom.xml | 2 +- ...CertificateManagementServiceComponent.java | 5 +++ .../internal/SCEPManagerServiceComponent.java | 43 ------------------- .../pom.xml | 4 +- pom.xml | 4 +- 5 files changed, 10 insertions(+), 48 deletions(-) delete mode 100644 components/certificate-mgt/org.wso2.carbon.certificate.mgt.core/src/main/java/org/wso2/carbon/certificate/mgt/core/internal/SCEPManagerServiceComponent.java diff --git a/components/certificate-mgt/org.wso2.carbon.certificate.mgt.core/pom.xml b/components/certificate-mgt/org.wso2.carbon.certificate.mgt.core/pom.xml index 2850739cb6..17a217ed57 100644 --- a/components/certificate-mgt/org.wso2.carbon.certificate.mgt.core/pom.xml +++ b/components/certificate-mgt/org.wso2.carbon.certificate.mgt.core/pom.xml @@ -144,7 +144,7 @@ bcpkix-jdk15on - com.google.code.jscep.wso2 + org.wso2.orbit.com.google.code.jscep jscep diff --git a/components/certificate-mgt/org.wso2.carbon.certificate.mgt.core/src/main/java/org/wso2/carbon/certificate/mgt/core/internal/CertificateManagementServiceComponent.java b/components/certificate-mgt/org.wso2.carbon.certificate.mgt.core/src/main/java/org/wso2/carbon/certificate/mgt/core/internal/CertificateManagementServiceComponent.java index 82582e1b40..80198c9560 100644 --- a/components/certificate-mgt/org.wso2.carbon.certificate.mgt.core/src/main/java/org/wso2/carbon/certificate/mgt/core/internal/CertificateManagementServiceComponent.java +++ b/components/certificate-mgt/org.wso2.carbon.certificate.mgt.core/src/main/java/org/wso2/carbon/certificate/mgt/core/internal/CertificateManagementServiceComponent.java @@ -27,6 +27,8 @@ import org.wso2.carbon.certificate.mgt.core.config.CertificateManagementConfig; import org.wso2.carbon.certificate.mgt.core.config.datasource.DataSourceConfig; import org.wso2.carbon.certificate.mgt.core.dao.CertificateManagementDAOFactory; import org.wso2.carbon.certificate.mgt.core.exception.CertificateManagementException; +import org.wso2.carbon.certificate.mgt.core.scep.SCEPManager; +import org.wso2.carbon.certificate.mgt.core.scep.SCEPManagerImpl; import org.wso2.carbon.certificate.mgt.core.service.CertificateManagementService; import org.wso2.carbon.certificate.mgt.core.service.CertificateManagementServiceImpl; import org.wso2.carbon.certificate.mgt.core.util.CertificateManagementConstants; @@ -72,6 +74,9 @@ public class CertificateManagementServiceComponent { bundleContext.registerService(CertificateManagementService.class.getName(), CertificateManagementServiceImpl.getInstance(), null); + bundleContext.registerService(SCEPManager.class.getName(), + new SCEPManagerImpl(), null); + if (log.isDebugEnabled()) { log.debug("Certificate management core bundle has been successfully initialized"); } diff --git a/components/certificate-mgt/org.wso2.carbon.certificate.mgt.core/src/main/java/org/wso2/carbon/certificate/mgt/core/internal/SCEPManagerServiceComponent.java b/components/certificate-mgt/org.wso2.carbon.certificate.mgt.core/src/main/java/org/wso2/carbon/certificate/mgt/core/internal/SCEPManagerServiceComponent.java deleted file mode 100644 index 98b7a21f9f..0000000000 --- a/components/certificate-mgt/org.wso2.carbon.certificate.mgt.core/src/main/java/org/wso2/carbon/certificate/mgt/core/internal/SCEPManagerServiceComponent.java +++ /dev/null @@ -1,43 +0,0 @@ -package org.wso2.carbon.certificate.mgt.core.internal; - -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; -import org.osgi.framework.BundleContext; -import org.osgi.service.component.ComponentContext; -import org.wso2.carbon.certificate.mgt.core.scep.SCEPManager; -import org.wso2.carbon.certificate.mgt.core.scep.SCEPManagerImpl; - -/** - * @scr.component name="org.wso2.carbon.certificate.mgt.core.scep" immediate="true" - */ -public class SCEPManagerServiceComponent { - - private static final Log log = LogFactory.getLog(SCEPManagerServiceComponent.class); - - protected void activate(ComponentContext componentContext) { - - try { - if (log.isDebugEnabled()) { - log.debug("Initializing SCEP core bundle"); - } - - BundleContext bundleContext = componentContext.getBundleContext(); - bundleContext.registerService(SCEPManager.class.getName(), - new SCEPManagerImpl(), null); - - if (log.isDebugEnabled()) { - log.debug("SCEP core bundle has been successfully initialized"); - } - } catch (Throwable e) { - String msg = "Error occurred while initializing SCEP core bundle"; - log.error(msg, e); - } - } - - protected void deactivate(ComponentContext ctx) { - if (log.isDebugEnabled()) { - log.debug("Deactivating SCEP core bundle"); - } - } - -} 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 b420ccf25b..9082e9cc11 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 @@ -49,7 +49,7 @@ bcpkix-jdk15on - com.google.code.jscep.wso2 + org.wso2.orbit.com.google.code.jscep jscep @@ -125,7 +125,7 @@ org.wso2.orbit.org.bouncycastle:bcpkix-jdk15on:${bcpkix.wso2.version} - com.google.code.jscep.wso2:jscep:${jscep.version} + org.wso2.orbit.com.google.code.jscep:jscep:${jscep.version} commons-io.wso2:commons-io:${version.commons.io} diff --git a/pom.xml b/pom.xml index f1de16ce9c..8512d92c6a 100644 --- a/pom.xml +++ b/pom.xml @@ -1289,7 +1289,7 @@ ${bcpkix.wso2.version} - com.google.code.jscep.wso2 + org.wso2.orbit.com.google.code.jscep jscep ${jscep.version} @@ -1839,7 +1839,7 @@ [1.52.0,1.60.0) - 2.0.2.wso2v2 + 2.3.0.wso2v1 2.26.1.wso2v3 From 9148c3baeaf8c74963cfa99db665e847afe9de71 Mon Sep 17 00:00:00 2001 From: Rasika Perera Date: Thu, 22 Sep 2016 08:54:40 +0530 Subject: [PATCH 21/43] Fixing dashboard styling issues --- .../pages/cdmf.page.dashboard/dashboard.hbs | 129 ++++++++---------- .../pages/cdmf.page.dashboard/dashboard.js | 18 +-- 2 files changed, 65 insertions(+), 82 deletions(-) diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.dashboard/dashboard.hbs b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.dashboard/dashboard.hbs index 02be4f0a7e..199e362a46 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.dashboard/dashboard.hbs +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.dashboard/dashboard.hbs @@ -26,25 +26,26 @@ {{/zone}} {{#zone "content"}} -
    +
    {{#if permissions.VIEW_DASHBOARD}} -
    -
    -
    -
    Devices
    -
    -
    -
    - {{device_count}} +
    +
    +
    Devices
    +
    +
    +
    + {{deviceCount}} - - - - - - View - + {{#if deviceCount}} + + + + + + View + + {{/if}} @@ -54,20 +55,19 @@ Add -
    -
    -
    -
    -
    Groups
    -
    -
    -
    - {{group_count}} +
    +
    +
    Groups
    +
    +
    +
    + {{groupCount}} + {{#if groupCount}} @@ -76,6 +76,7 @@ View + {{/if}} @@ -85,20 +86,19 @@ Add -
    -
    -
    -
    -
    Users
    -
    -
    -
    - {{user_count}} +
    +
    +
    Users
    +
    +
    +
    + {{userCount}} + {{#if userCount}} @@ -107,6 +107,7 @@ View + {{/if}} @@ -116,20 +117,19 @@ Add -
    -
    -
    -
    -
    Policies
    -
    -
    -
    - {{policy_count}} +
    +
    +
    Policies
    +
    +
    +
    + {{policyCount}} + {{#if policyCount}} @@ -138,6 +138,7 @@ View + {{/if}} @@ -147,20 +148,19 @@ Add -
    -
    -
    -
    -
    Roles
    -
    -
    -
    - {{role_count}} +
    +
    +
    Roles
    +
    +
    +
    + {{roleCount}} + {{#if roleCount}} @@ -169,6 +169,7 @@ View + {{/if}} @@ -178,32 +179,14 @@ Add -
    {{else}} - Permission denied +

    + Permitted None +

    {{/if}}
    - {{/zone}} \ No newline at end of file diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.dashboard/dashboard.js b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.dashboard/dashboard.js index c5682c0c5b..c848b86f6e 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.dashboard/dashboard.js +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.dashboard/dashboard.js @@ -32,16 +32,16 @@ function onRequest() { return; } - var page = {}; - page.permissions = permissions; - page.enrollmentURL = devicemgtProps.enrollmentURL; - page.device_count = deviceModule.getDevicesCount(); + var viewModel = {}; + viewModel.permissions = permissions; + viewModel.enrollmentURL = devicemgtProps.enrollmentURL; + viewModel.deviceCount = deviceModule.getDevicesCount(); //TODO: Enable Group Management Service API on CDMF //page.group_count = groupModule.getGroupCount(); - page.group_count = -1; - page.user_count = userModule.getUsersCount(); - page.policy_count = policyModule.getPoliciesCount(); - page.role_count = userModule.getRolesCount(); + viewModel.groupCount = -1; + viewModel.userCount = userModule.getUsersCount(); + viewModel.policyCount = policyModule.getPoliciesCount(); + viewModel.roleCount = userModule.getRolesCount(); - return page; + return viewModel; } \ No newline at end of file From 0fb87f3aa273922a570dc1b7d58fc21b84fa834e Mon Sep 17 00:00:00 2001 From: Rasika Perera Date: Thu, 22 Sep 2016 08:56:12 +0530 Subject: [PATCH 22/43] Fixing device types not shown issue --- .../cdmf.unit.device.types.listing/listing.js | 32 +++++++++---------- 1 file changed, 15 insertions(+), 17 deletions(-) diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.types.listing/listing.js b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.types.listing/listing.js index e9c68c6452..62ca011b0b 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.types.listing/listing.js +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.types.listing/listing.js @@ -27,12 +27,12 @@ function onRequest(context) { var utility = require("/app/modules/utility.js").utility; var typesListResponse = deviceModule.getDeviceTypes(); if (typesListResponse["status"] == "success") { - var deviceTypes = typesListResponse["content"]; + var deviceTypes = typesListResponse.content.deviceTypes; if (deviceTypes) { var deviceTypesList = [], virtualDeviceTypesList = []; for (var i = 0; i < deviceTypes.length; i++) { - - var deviceTypeLabel = deviceTypes[i].name; + var deviceType = deviceTypes[i]; + var deviceTypeLabel = deviceType; var configs = utility.getDeviceTypeConfig(deviceTypeLabel); var deviceCategory = "device"; if (configs) { @@ -45,22 +45,20 @@ function onRequest(context) { } if (deviceCategory == 'virtual') { virtualDeviceTypesList.push({ - "hasCustTemplate": false, - "deviceTypeLabel": deviceTypeLabel, - "deviceTypeName": deviceTypes[i].name, - "deviceCategory": deviceCategory, - "deviceTypeId": deviceTypes[i].id, - "thumb": utility.getDeviceThumb(deviceTypes[i].name) - }); + "hasCustTemplate": false, + "deviceTypeLabel": deviceTypeLabel, + "deviceTypeName": deviceType, + "deviceCategory": deviceCategory, + "thumb": utility.getDeviceThumb(deviceType) + }); } else { deviceTypesList.push({ - "hasCustTemplate": false, - "deviceTypeLabel": deviceTypeLabel, - "deviceTypeName": deviceTypes[i].name, - "deviceCategory": deviceCategory, - "deviceTypeId": deviceTypes[i].id, - "thumb": utility.getDeviceThumb(deviceTypes[i].name) - }); + "hasCustTemplate": false, + "deviceTypeLabel": deviceTypeLabel, + "deviceTypeName": deviceType, + "deviceCategory": deviceCategory, + "thumb": utility.getDeviceThumb(deviceType) + }); } } if (virtualDeviceTypesList.length > 0) { From 513015c1b5f752215f79c78b89261f071190e0ed Mon Sep 17 00:00:00 2001 From: Rasika Perera Date: Thu, 22 Sep 2016 08:56:41 +0530 Subject: [PATCH 23/43] Changing context path /emm into /devicemgt on cdmf base app --- .../main/resources/jaggeryapps/devicemgt/app/conf/config.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/conf/config.json b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/conf/config.json index cf19f5ec5b..9625762d80 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/conf/config.json +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/conf/config.json @@ -1,5 +1,5 @@ { - "appContext": "/emm/", + "appContext": "/devicemgt/", "webAgentContext" : "/emm-web-agent/", "apiContext": "api", "httpsURL" : "%https.ip%", From e71d3947cba6eb7dc369481b8920f304f15cba4f Mon Sep 17 00:00:00 2001 From: Rasika Perera Date: Thu, 22 Sep 2016 08:57:34 +0530 Subject: [PATCH 24/43] Adding intuitive error when specified notification provider is not found --- .../DeviceManagementPluginRepository.java | 23 +++++++++++++------ 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/DeviceManagementPluginRepository.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/DeviceManagementPluginRepository.java index 504d29d5f1..8246c7e283 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/DeviceManagementPluginRepository.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/DeviceManagementPluginRepository.java @@ -26,6 +26,7 @@ import org.wso2.carbon.device.mgt.common.ProvisioningConfig; import org.wso2.carbon.device.mgt.common.operation.mgt.OperationManager; import org.wso2.carbon.device.mgt.common.push.notification.NotificationStrategy; import org.wso2.carbon.device.mgt.common.push.notification.PushNotificationConfig; +import org.wso2.carbon.device.mgt.common.push.notification.PushNotificationProvider; import org.wso2.carbon.device.mgt.common.spi.DeviceManagementService; import org.wso2.carbon.device.mgt.core.internal.DeviceManagementDataHolder; import org.wso2.carbon.device.mgt.core.internal.DeviceManagementServiceComponent; @@ -74,7 +75,7 @@ public class DeviceManagementPluginRepository implements DeviceManagerStartupLis } } catch (DeviceManagementException e) { throw new DeviceManagementException("Error occurred while adding device management provider '" + - deviceType + "'", e); + deviceType + "'", e); } if (isSharedWithAllTenants) { DeviceTypeIdentifier deviceTypeIdentifier = new DeviceTypeIdentifier(deviceType); @@ -137,10 +138,16 @@ public class DeviceManagementPluginRepository implements DeviceManagerStartupLis int tenantId = PrivilegedCarbonContext.getThreadLocalCarbonContext().getTenantId(); deviceTypeIdentifier = new DeviceTypeIdentifier(deviceManagementService.getType(), tenantId); } + if (pushNoteConfig != null) { - NotificationStrategy notificationStrategy = - DeviceManagementDataHolder.getInstance().getPushNotificationProviderRepository().getProvider( - pushNoteConfig.getType()).getNotificationStrategy(pushNoteConfig); + PushNotificationProvider provider = DeviceManagementDataHolder.getInstance() + .getPushNotificationProviderRepository().getProvider(pushNoteConfig.getType()); + if (provider == null) { + throw new DeviceManagementException( + "No registered push notification provider found for the type: '" + + pushNoteConfig.getType() + "'."); + } + NotificationStrategy notificationStrategy = provider.getNotificationStrategy(pushNoteConfig); operationManagerRepository.addOperationManager(deviceTypeIdentifier, new OperationManagerImpl( notificationStrategy)); } else { @@ -172,7 +179,8 @@ public class DeviceManagementPluginRepository implements DeviceManagerStartupLis deviceTypeName = provider.getType().toLowerCase(); ProvisioningConfig provisioningConfig = provider.getProvisioningConfig(); int tenantId = DeviceManagerUtil.getTenantId(provisioningConfig.getProviderTenantDomain()); - DeviceManagerUtil.registerDeviceType(deviceTypeName, tenantId, provisioningConfig.isSharedWithAllTenants()); + DeviceManagerUtil.registerDeviceType(deviceTypeName, tenantId, + provisioningConfig.isSharedWithAllTenants()); registerPushNotificationStrategy(provider); //TODO: //This is a temporory fix. @@ -180,12 +188,13 @@ public class DeviceManagementPluginRepository implements DeviceManagerStartupLis //until fix that, use following variable to enable and disable of checking user authorization. DeviceManagementDataHolder.getInstance().setRequireDeviceAuthorization(provider.getType(), - provider.getDeviceManager().requireDeviceAuthorization()); + provider.getDeviceManager() + .requireDeviceAuthorization()); } catch (Throwable e) { /* Throwable is caught intentionally as failure of one plugin - due to invalid start up parameters, etc - should not block the initialization of other device management providers */ log.error("Error occurred while initializing device management provider '" + - provider.getType() + "'", e); + provider.getType() + "'", e); } } this.isInited = true; From 1d3f5f39a7c38b2c741c679db8a0bdbb1ad8a239 Mon Sep 17 00:00:00 2001 From: Rasika Perera Date: Thu, 22 Sep 2016 14:33:53 +0530 Subject: [PATCH 25/43] Adding custom headers support to invoker util --- .../oauth/token-protected-service-invokers.js | 77 ++++++++++++------- 1 file changed, 50 insertions(+), 27 deletions(-) diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/modules/oauth/token-protected-service-invokers.js b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/modules/oauth/token-protected-service-invokers.js index 6520a819b5..a743acaae1 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/modules/oauth/token-protected-service-invokers.js +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/modules/oauth/token-protected-service-invokers.js @@ -66,11 +66,15 @@ var invokers = function () { * @param endpoint Backend REST API url. * @param responseCallback a function to be called with response retrieved. * @param count a counter which hold the number of recursive execution + * @param headers a list of name value pairs for additional http headers */ - privateMethods["execute"] = function (httpMethod, requestPayload, endpoint, responseCallback, count) { + privateMethods["execute"] = function (httpMethod, requestPayload, endpoint, responseCallback, count, headers) { var xmlHttpRequest = new XMLHttpRequest(); xmlHttpRequest.open(httpMethod, endpoint); + for(var i in headers){ + xmlHttpRequest.setRequestHeader(headers[i].name, headers[i].value); + } xmlHttpRequest.setRequestHeader(constants["CONTENT_TYPE_IDENTIFIER"], constants["APPLICATION_JSON"]); xmlHttpRequest.setRequestHeader(constants["ACCEPT_IDENTIFIER"], constants["APPLICATION_JSON"]); @@ -82,7 +86,7 @@ var invokers = function () { }); } else { xmlHttpRequest.setRequestHeader(constants["AUTHORIZATION_HEADER"], - constants["BEARER_PREFIX"] + accessToken); + constants["BEARER_PREFIX"] + accessToken); } } @@ -98,9 +102,9 @@ var invokers = function () { log.debug("Response payload if any : " + xmlHttpRequest.responseText); if (xmlHttpRequest.status == 401 && (xmlHttpRequest.responseText == TOKEN_EXPIRED || - xmlHttpRequest.responseText == TOKEN_INVALID ) && count < 5) { + xmlHttpRequest.responseText == TOKEN_INVALID ) && count < 5) { tokenUtil.refreshTokenPair(); - return privateMethods.execute(httpMethod, requestPayload, endpoint, responseCallback, ++count); + return privateMethods.execute(httpMethod, requestPayload, endpoint, responseCallback, ++count, headers); } else { return responseCallback(xmlHttpRequest); } @@ -113,8 +117,8 @@ var invokers = function () { * @param endpoint Backend REST API url. * @param responseCallback a function to be called with response retrieved. */ - privateMethods["initiateXMLHTTPRequest"] = function (httpMethod, requestPayload, endpoint, responseCallback) { - return privateMethods.execute(httpMethod, requestPayload, endpoint, responseCallback, 0); + privateMethods["initiateXMLHTTPRequest"] = function (httpMethod, requestPayload, endpoint, responseCallback, headers) { + return privateMethods.execute(httpMethod, requestPayload, endpoint, responseCallback, 0, headers); }; /** @@ -122,9 +126,9 @@ var invokers = function () { * @param endpoint Backend REST API url. * @param responseCallback a function to be called with response retrieved. */ - publicXMLHTTPInvokers["get"] = function (endpoint, responseCallback) { + publicXMLHTTPInvokers["get"] = function (endpoint, responseCallback, headers) { var requestPayload = null; - return privateMethods.initiateXMLHTTPRequest(constants["HTTP_GET"], requestPayload, endpoint, responseCallback); + return privateMethods.initiateXMLHTTPRequest(constants["HTTP_GET"], requestPayload, endpoint, responseCallback, headers); }; /** @@ -133,8 +137,8 @@ var invokers = function () { * @param requestPayload payload/data if exists which is needed to be send. * @param responseCallback a function to be called with response retrieved. */ - publicXMLHTTPInvokers["post"] = function (endpoint, requestPayload, responseCallback) { - return privateMethods.initiateXMLHTTPRequest(constants["HTTP_POST"], requestPayload, endpoint, responseCallback); + publicXMLHTTPInvokers["post"] = function (endpoint, requestPayload, responseCallback, headers) { + return privateMethods.initiateXMLHTTPRequest(constants["HTTP_POST"], requestPayload, endpoint, responseCallback, headers); }; /** @@ -143,8 +147,8 @@ var invokers = function () { * @param requestPayload payload/data if exists which is needed to be send. * @param responseCallback a function to be called with response retrieved. */ - publicXMLHTTPInvokers["put"] = function (endpoint, requestPayload, responseCallback) { - return privateMethods.initiateXMLHTTPRequest(constants["HTTP_PUT"], requestPayload, endpoint, responseCallback); + publicXMLHTTPInvokers["put"] = function (endpoint, requestPayload, responseCallback, headers) { + return privateMethods.initiateXMLHTTPRequest(constants["HTTP_PUT"], requestPayload, endpoint, responseCallback, headers); }; /** @@ -152,9 +156,9 @@ var invokers = function () { * @param endpoint Backend REST API url. * @param responseCallback a function to be called with response retrieved. */ - publicXMLHTTPInvokers["delete"] = function (endpoint, responseCallback) { + publicXMLHTTPInvokers["delete"] = function (endpoint, responseCallback, headers) { var requestPayload = null; - return privateMethods.initiateXMLHTTPRequest(constants["HTTP_DELETE"], requestPayload, endpoint, responseCallback); + return privateMethods.initiateXMLHTTPRequest(constants["HTTP_DELETE"], requestPayload, endpoint, responseCallback, headers); }; /** @@ -239,8 +243,9 @@ var invokers = function () { * @param payload payload/data which need to be send. * @param successCallback a function to be called if the respond if successful. * @param errorCallback a function to be called if en error is reserved. + * @param headers a list of name value pairs for additional http headers. */ - privateMethods["initiateHTTPClientRequest"] = function (method, url, successCallback, errorCallback, payload) { + privateMethods["initiateHTTPClientRequest"] = function (method, url, successCallback, errorCallback, payload, headers) { //noinspection JSUnresolvedVariable var HttpClient = Packages.org.apache.commons.httpclient.HttpClient; var httpMethodObject; @@ -269,6 +274,14 @@ var invokers = function () { //noinspection JSUnresolvedFunction throw new IllegalArgumentException("Invalid HTTP request method: " + method); } + + for(var i in headers){ + var header = new Header(); + header.setName(headers[i].name); + header.setValue(headers[i].value); + httpMethodObject.addRequestHeader(header); + } + //noinspection JSUnresolvedVariable var Header = Packages.org.apache.commons.httpclient.Header; var header = new Header(); @@ -295,15 +308,19 @@ var invokers = function () { } } //noinspection JSUnresolvedFunction - var stringRequestEntity = new StringRequestEntity(stringify(payload)); - //noinspection JSUnresolvedFunction - httpMethodObject.setRequestEntity(stringRequestEntity); + if (payload != null) { + var StringRequestEntity = Packages.org.apache.commons.httpclient.methods.StringRequestEntity; + var stringRequestEntity = new StringRequestEntity(stringify(payload)); + //noinspection JSUnresolvedFunction + httpMethodObject.setRequestEntity(stringRequestEntity); + } var client = new HttpClient(); try { //noinspection JSUnresolvedFunction client.executeMethod(httpMethodObject); //noinspection JSUnresolvedFunction var status = httpMethodObject.getStatusCode(); + new Log().error(status); if (status == 200) { //noinspection JSUnresolvedFunction return successCallback(httpMethodObject.getResponseBody()); @@ -315,7 +332,9 @@ var invokers = function () { return errorCallback(response); } finally { //noinspection JSUnresolvedFunction - method.releaseConnection(); + if (method != constants["HTTP_GET"]) { + method.releaseConnection(); + } } }; @@ -324,11 +343,12 @@ var invokers = function () { * @param url target url. * @param successCallback a function to be called if the respond if successful. * @param errorCallback a function to be called if en error is reserved. + * @param headers a list of name value pairs for additional http headers. */ - publicHTTPClientInvokers["get"] = function (url, successCallback, errorCallback) { + publicHTTPClientInvokers["get"] = function (url, successCallback, errorCallback, headers) { var requestPayload = null; return privateMethods. - initiateHTTPClientRequest(constants["HTTP_GET"], url, successCallback, errorCallback, requestPayload); + initiateHTTPClientRequest(constants["HTTP_GET"], url, successCallback, errorCallback, requestPayload, headers); }; /** @@ -337,10 +357,11 @@ var invokers = function () { * @param payload payload/data which need to be send. * @param successCallback a function to be called if the respond if successful. * @param errorCallback a function to be called if en error is reserved. + * @param headers a list of name value pairs for additional http headers. */ - publicHTTPClientInvokers["post"] = function (url, payload, successCallback, errorCallback) { + publicHTTPClientInvokers["post"] = function (url, payload, successCallback, errorCallback, headers) { return privateMethods. - initiateHTTPClientRequest(constants["HTTP_POST"], url, successCallback, errorCallback, payload); + initiateHTTPClientRequest(constants["HTTP_POST"], url, successCallback, errorCallback, payload, headers); }; /** @@ -349,10 +370,11 @@ var invokers = function () { * @param payload payload/data which need to be send. * @param successCallback a function to be called if the respond if successful. * @param errorCallback a function to be called if en error is reserved. + * @param headers a list of name value pairs for additional http headers. */ - publicHTTPClientInvokers["put"] = function (url, payload, successCallback, errorCallback) { + publicHTTPClientInvokers["put"] = function (url, payload, successCallback, errorCallback, headers) { return privateMethods. - initiateHTTPClientRequest(constants["HTTP_PUT"], url, successCallback, errorCallback, payload); + initiateHTTPClientRequest(constants["HTTP_PUT"], url, successCallback, errorCallback, payload, headers); }; /** @@ -360,11 +382,12 @@ var invokers = function () { * @param url target url. * @param successCallback a function to be called if the respond if successful. * @param errorCallback a function to be called if en error is reserved. + * @param headers a list of name value pairs for additional http headers. */ - publicHTTPClientInvokers["delete"] = function (url, successCallback, errorCallback) { + publicHTTPClientInvokers["delete"] = function (url, successCallback, errorCallback, headers) { var requestPayload = null; return privateMethods. - initiateHTTPClientRequest(constants["HTTP_DELETE"], url, successCallback, errorCallback, requestPayload); + initiateHTTPClientRequest(constants["HTTP_DELETE"], url, successCallback, errorCallback, requestPayload, headers); }; var publicMethods = {}; From c6c555abc6a270a1ba812981a430f37c894ad97e Mon Sep 17 00:00:00 2001 From: Rasika Perera Date: Thu, 22 Sep 2016 14:34:25 +0530 Subject: [PATCH 26/43] Fixing null pointer issue on mqtt notification strategy implementation --- .../provider/mqtt/MQTTNotificationStrategy.java | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.mqtt/src/main/java/org/wso2/carbon/device/mgt/extensions/push/notification/provider/mqtt/MQTTNotificationStrategy.java b/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.mqtt/src/main/java/org/wso2/carbon/device/mgt/extensions/push/notification/provider/mqtt/MQTTNotificationStrategy.java index ee4105922d..24d43a6ac3 100644 --- a/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.mqtt/src/main/java/org/wso2/carbon/device/mgt/extensions/push/notification/provider/mqtt/MQTTNotificationStrategy.java +++ b/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.mqtt/src/main/java/org/wso2/carbon/device/mgt/extensions/push/notification/provider/mqtt/MQTTNotificationStrategy.java @@ -20,6 +20,8 @@ package org.wso2.carbon.device.mgt.extensions.push.notification.provider.mqtt; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; +import org.wso2.carbon.context.PrivilegedCarbonContext; +import org.wso2.carbon.device.mgt.common.operation.mgt.Operation; import org.wso2.carbon.device.mgt.common.push.notification.NotificationContext; import org.wso2.carbon.device.mgt.common.push.notification.NotificationStrategy; import org.wso2.carbon.device.mgt.common.push.notification.PushNotificationConfig; @@ -32,6 +34,7 @@ import org.wso2.carbon.event.output.adapter.core.exception.OutputEventAdapterExc import java.util.HashMap; import java.util.Map; +import java.util.Properties; public class MQTTNotificationStrategy implements NotificationStrategy { @@ -75,7 +78,16 @@ public class MQTTNotificationStrategy implements NotificationStrategy { @Override public void execute(NotificationContext ctx) throws PushNotificationExecutionFailedException { Map dynamicProperties = new HashMap<>(); - dynamicProperties.put("topic", (String) ctx.getOperation().getProperties().get(MQTT_ADAPTER_TOPIC)); + Properties properties = ctx.getOperation().getProperties(); + if (properties != null && properties.get(MQTT_ADAPTER_TOPIC) != null) { + dynamicProperties.put("topic", (String) properties.get(MQTT_ADAPTER_TOPIC)); + } else { + Operation operation = ctx.getOperation(); + String topic = PrivilegedCarbonContext.getThreadLocalCarbonContext().getTenantDomain(true) + "/" + + ctx.getDeviceId().getType() + "/" + ctx.getDeviceId().getId() + "/" + operation.getType(); + dynamicProperties.put("topic", topic); + } + MQTTDataHolder.getInstance().getOutputEventAdapterService().publish(mqttAdapterName, dynamicProperties, ctx.getOperation().getPayLoad()); } From 4691bedbc525d5e60609f38474e99a2dfb762a3f Mon Sep 17 00:00:00 2001 From: Rasika Perera Date: Thu, 22 Sep 2016 14:35:17 +0530 Subject: [PATCH 27/43] Fixes to devices listing --- .../app/pages/cdmf.page.devices/devices.js | 34 +++++++++---------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.devices/devices.js b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.devices/devices.js index d7a19da36b..ae506f4b07 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.devices/devices.js +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.devices/devices.js @@ -24,22 +24,22 @@ function onRequest(context) { var groupName = request.getParameter("groupName"); var groupOwner = request.getParameter("groupOwner"); - var page = {}; + var viewModel = {}; var title = "Devices"; if (groupName) { title = groupName + " " + title; - page.groupName = groupName; + viewModel.groupName = groupName; } - page.title = title; + viewModel.title = title; var currentUser = session.get(constants.USER_SESSION_KEY); if (currentUser) { - page.permissions = {}; + viewModel.permissions = {}; var uiPermissions = userModule.getUIPermissions(); - page.permissions.list = stringify(uiPermissions); + viewModel.permissions.list = stringify(uiPermissions); if (uiPermissions.ADD_DEVICE) { - page.permissions.enroll = true; + viewModel.permissions.enroll = true; } - page.currentUser = currentUser; + viewModel.currentUser = currentUser; var deviceCount = 0; if (groupName && groupOwner) { var groupModule = require("/app/modules/business-controllers/group.js")["groupModule"]; @@ -48,30 +48,30 @@ function onRequest(context) { deviceCount = deviceModule.getDevicesCount(); } if (deviceCount > 0) { - page.deviceCount = deviceCount; + viewModel.deviceCount = deviceCount; var utility = require("/app/modules/utility.js").utility; var typesListResponse = deviceModule.getDeviceTypes(); var deviceTypes = []; if (typesListResponse["status"] == "success") { - var data = typesListResponse["content"]; + var data = typesListResponse.content.deviceTypes; if (data) { for (var i = 0; i < data.length; i++) { - var config = utility.getDeviceTypeConfig(data[i].name); + var config = utility.getDeviceTypeConfig(data[i]); if (!config) { continue; } var deviceType = config.deviceType; deviceTypes.push({ - "type": data[i].name, - "category": deviceType.category, - "label": deviceType.label, - "thumb": utility.getDeviceThumb(data[i].name) - }); + "type": data[i], + "category": deviceType.category, + "label": deviceType.label, + "thumb": utility.getDeviceThumb(data[i]) + }); } } } - page.deviceTypes = stringify(deviceTypes); + viewModel.deviceTypes = stringify(deviceTypes); } } - return page; + return viewModel; } From 728307defda4856abd8219b0e04c84ee5bd4b368 Mon Sep 17 00:00:00 2001 From: Rasika Perera Date: Thu, 22 Sep 2016 14:57:00 +0530 Subject: [PATCH 28/43] Adding bundle import --- .../pom.xml | 1 + .../notification/provider/mqtt/MQTTNotificationStrategy.java | 4 +--- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.mqtt/pom.xml b/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.mqtt/pom.xml index 54f056436e..4402eacd05 100644 --- a/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.mqtt/pom.xml +++ b/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.mqtt/pom.xml @@ -139,6 +139,7 @@ org.wso2.carbon.context, org.wso2.carbon.device.mgt.common.operation.mgt, org.wso2.carbon.device.mgt.common.push.notification, + org.wso2.carbon.device.mgt.common, org.wso2.carbon.device.mgt.core.service, org.wso2.carbon.event.output.adapter.core, org.wso2.carbon.event.output.adapter.core.exception, diff --git a/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.mqtt/src/main/java/org/wso2/carbon/device/mgt/extensions/push/notification/provider/mqtt/MQTTNotificationStrategy.java b/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.mqtt/src/main/java/org/wso2/carbon/device/mgt/extensions/push/notification/provider/mqtt/MQTTNotificationStrategy.java index 24d43a6ac3..29d623b349 100644 --- a/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.mqtt/src/main/java/org/wso2/carbon/device/mgt/extensions/push/notification/provider/mqtt/MQTTNotificationStrategy.java +++ b/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.mqtt/src/main/java/org/wso2/carbon/device/mgt/extensions/push/notification/provider/mqtt/MQTTNotificationStrategy.java @@ -21,7 +21,6 @@ package org.wso2.carbon.device.mgt.extensions.push.notification.provider.mqtt; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.wso2.carbon.context.PrivilegedCarbonContext; -import org.wso2.carbon.device.mgt.common.operation.mgt.Operation; import org.wso2.carbon.device.mgt.common.push.notification.NotificationContext; import org.wso2.carbon.device.mgt.common.push.notification.NotificationStrategy; import org.wso2.carbon.device.mgt.common.push.notification.PushNotificationConfig; @@ -82,9 +81,8 @@ public class MQTTNotificationStrategy implements NotificationStrategy { if (properties != null && properties.get(MQTT_ADAPTER_TOPIC) != null) { dynamicProperties.put("topic", (String) properties.get(MQTT_ADAPTER_TOPIC)); } else { - Operation operation = ctx.getOperation(); String topic = PrivilegedCarbonContext.getThreadLocalCarbonContext().getTenantDomain(true) + "/" - + ctx.getDeviceId().getType() + "/" + ctx.getDeviceId().getId() + "/" + operation.getType(); + + ctx.getDeviceId().getType() + "/" + ctx.getDeviceId().getId() + "/" + ctx.getOperation().getType(); dynamicProperties.put("topic", topic); } From eb5a36ef4234400f037424ff3172bb312ab9be9f Mon Sep 17 00:00:00 2001 From: Rasika Perera Date: Thu, 22 Sep 2016 15:52:52 +0530 Subject: [PATCH 29/43] Supporting stream download on service invoker --- .../oauth/token-protected-service-invokers.js | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/modules/oauth/token-protected-service-invokers.js b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/modules/oauth/token-protected-service-invokers.js index a743acaae1..d4fdbc3e89 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/modules/oauth/token-protected-service-invokers.js +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/modules/oauth/token-protected-service-invokers.js @@ -275,6 +275,8 @@ var invokers = function () { throw new IllegalArgumentException("Invalid HTTP request method: " + method); } + //noinspection JSUnresolvedVariable + var Header = Packages.org.apache.commons.httpclient.Header; for(var i in headers){ var header = new Header(); header.setName(headers[i].name); @@ -282,8 +284,6 @@ var invokers = function () { httpMethodObject.addRequestHeader(header); } - //noinspection JSUnresolvedVariable - var Header = Packages.org.apache.commons.httpclient.Header; var header = new Header(); header.setName(constants["CONTENT_TYPE_IDENTIFIER"]); header.setValue(constants["APPLICATION_JSON"]); @@ -320,12 +320,14 @@ var invokers = function () { client.executeMethod(httpMethodObject); //noinspection JSUnresolvedFunction var status = httpMethodObject.getStatusCode(); - new Log().error(status); if (status == 200) { - //noinspection JSUnresolvedFunction - return successCallback(httpMethodObject.getResponseBody()); + var responseContentDispositionHeader = httpMethodObject.getResponseHeader(constants["CONTENT_DISPOSITION_IDENTIFIER"]); + if (responseContentDispositionHeader) { + return successCallback(httpMethodObject.getResponseBodyAsStream(), httpMethodObject.getResponseHeaders()); + } else { + return successCallback(httpMethodObject.getResponseBody()); + } } else { - //noinspection JSUnresolvedFunction return errorCallback(httpMethodObject.getResponseBody()); } } catch (e) { From 98ab29fe94f480de1af72ad7e78bd3d156e5b31c Mon Sep 17 00:00:00 2001 From: Rasika Perera Date: Thu, 22 Sep 2016 15:53:16 +0530 Subject: [PATCH 30/43] Fixing virtual firealarm device agent download --- .../jaggeryapps/devicemgt/api/device-api.jag | 55 ++++++++++--------- 1 file changed, 28 insertions(+), 27 deletions(-) diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/api/device-api.jag b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/api/device-api.jag index d0fc9c4f70..3e4c75a337 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/api/device-api.jag +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/api/device-api.jag @@ -48,27 +48,28 @@ if (!user) { var deviceType = request.getParameter("deviceType"); // need a better solution here deviceTypeConfig = utility.getDeviceTypeConfig(deviceType); if (deviceTypeConfig && deviceTypeConfig.deviceType.downloadAgentUri) { + hearders = [{"name": constants["ACCEPT_IDENTIFIER"], "value": constants["APPLICATION_ZIP"]}]; sketchDownloadEndPoint = devicemgtProps["httpsURL"] + "/" + deviceTypeConfig.deviceType.downloadAgentUri; serviceInvokers.HttpClient.get(sketchDownloadEndPoint + queryString, function (responsePayload, responseHeaders) { - if (responseHeaders) { - for (var i = 0; i < responseHeaders.length; i++) { - var header = responseHeaders[i] - var headerName = String(header.getName()); - var headerValue = String(header.getValue()); - response.addHeader(headerName, headerValue); - } - var streamObject = new Stream(responsePayload); - print(streamObject); - } else { - return responsePayload; - } - }, function (responsePayload) { - log.error(responsePayload) - var response = {}; - response["status"] = "error"; - return response; - } - ); + if (responseHeaders) { + for (var i = 0; i < responseHeaders.length; i++) { + var header = responseHeaders[i]; + var headerName = String(header.getName()); + var headerValue = String(header.getValue()); + response.addHeader(headerName, headerValue); + } + var streamObject = new Stream(responsePayload); + print(streamObject); + } else { + return responsePayload; + } + }, function (responsePayload) { + log.error(responsePayload); + var response = {}; + response["status"] = "error"; + return response; + } + , hearders); } else { result = 400; } @@ -143,14 +144,14 @@ if (!user) { } serviceInvokers.XMLHttp.get( - targetURL, function (responsePayload) { - response.status = 200; - result = responsePayload; - }, - function (responsePayload) { - response.status = responsePayload.status; - result = responsePayload.responseText; - }); + targetURL, function (responsePayload) { + response.status = 200; + result = responsePayload; + }, + function (responsePayload) { + response.status = responsePayload.status; + result = responsePayload.responseText; + }); } else if (uriMatcher.match("/{context}/api/devices/")) { if (userModule.isAuthorized("/permission/admin/device-mgt/devices/list")) { result = deviceModule.listDevices(); From f7a38b2313397ac9671c8240a1ba34a116d7fb1e Mon Sep 17 00:00:00 2001 From: dilanua Date: Thu, 22 Sep 2016 19:53:18 +0530 Subject: [PATCH 31/43] Fix for JIRA: https://wso2.org/jira/browse/EMM-1612 --- .../modules/business-controllers/device.js | 187 +----------------- 1 file changed, 7 insertions(+), 180 deletions(-) diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/modules/business-controllers/device.js b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/modules/business-controllers/device.js index 6c7dbcc174..48a101bda1 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/modules/business-controllers/device.js +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/modules/business-controllers/device.js @@ -20,26 +20,14 @@ var deviceModule; deviceModule = function () { var log = new Log("/app/modules/business-controllers/device.js"); - var utility = require('/app/modules/utility.js').utility; + var utility = require('/app/modules/utility.js')["utility"]; var constants = require('/app/modules/constants.js'); var devicemgtProps = require("/app/modules/conf-reader/main.js")["conf"]; var serviceInvokers = require("/app/modules/oauth/token-protected-service-invokers.js")["invokers"]; -// var ArrayList = Packages.java.util.ArrayList; -// var Properties = Packages.java.util.Properties; -// var DeviceIdentifier = Packages.org.wso2.carbon.device.mgt.common.DeviceIdentifier; -// var DeviceManagerUtil = Packages.org.wso2.carbon.device.mgt.core.util.DeviceManagerUtil; -// var SimpleOperation = Packages.org.wso2.carbon.device.mgt.core.operation.mgt.SimpleOperation; -// var ConfigOperation = Packages.org.wso2.carbon.device.mgt.core.operation.mgt.ConfigOperation; -// var CommandOperation = Packages.org.wso2.carbon.device.mgt.core.operation.mgt.CommandOperation; - - var deviceManagementService = utility.getDeviceManagementService(); - var publicMethods = {}; var privateMethods = {}; -// var deviceCloudService = devicemgtProps["httpsURL"] + "/common/device_manager"; - /** * Only GET method is implemented for now since there are no other type of methods used this method. * @param url - URL to call the backend without the host @@ -67,170 +55,9 @@ deviceModule = function () { }; privateMethods.validateAndReturn = function (value) { - return (value == undefined || value == null) ? constants.UNSPECIFIED : value; + return (value == undefined || value == null) ? constants["UNSPECIFIED"] : value; }; - /* - @Deprecated - */ -// publicMethods.listDevices = function () { -// var carbonUser = session.get(constants.USER_SESSION_KEY); -// var utility = require('/app/modules/utility.js').utility; -// if (!carbonUser) { -// log.error("User object was not found in the session"); -// throw constants.ERRORS.USER_NOT_FOUND; -// } -// try { -// utility.startTenantFlow(carbonUser); -// var deviceManagementService = utility.getDeviceManagementService(); -// var devices = deviceManagementService.getAllDevices(); -// var deviceList = []; -// var i, device, propertiesList, deviceObject; -// for (i = 0; i < devices.size(); i++) { -// device = devices.get(i); -// propertiesList = DeviceManagerUtil.convertDevicePropertiesToMap(device.getProperties()); -// -// deviceObject = {}; -// deviceObject[constants.DEVICE_IDENTIFIER] = -// privateMethods.validateAndReturn(device.getDeviceIdentifier()); -// deviceObject[constants.DEVICE_NAME] = -// privateMethods.validateAndReturn(device.getName()); -// deviceObject[constants.DEVICE_OWNERSHIP] = -// privateMethods.validateAndReturn(device.getEnrolmentInfo().getOwnership()); -// deviceObject[constants.DEVICE_OWNER] = -// privateMethods.validateAndReturn(device.getEnrolmentInfo().getOwner()); -// deviceObject[constants.DEVICE_TYPE] = -// privateMethods.validateAndReturn(device.getType()); -// deviceObject[constants.DEVICE_PROPERTIES] = {}; -// if (device.getType() == constants.PLATFORM_IOS) { -// deviceObject[constants.DEVICE_PROPERTIES][constants.DEVICE_MODEL] = -// privateMethods.validateAndReturn(propertiesList.get(constants.DEVICE_PRODUCT)); -// deviceObject[constants.DEVICE_PROPERTIES][constants.DEVICE_VENDOR] = constants.VENDOR_APPLE; -// } else { -// deviceObject[constants.DEVICE_PROPERTIES][constants.DEVICE_MODEL] = -// privateMethods.validateAndReturn(propertiesList.get(constants.DEVICE_MODEL)); -// deviceObject[constants.DEVICE_PROPERTIES][constants.DEVICE_VENDOR] = -// privateMethods.validateAndReturn(propertiesList.get(constants.DEVICE_VENDOR)); -// } -// deviceObject[constants.DEVICE_PROPERTIES][constants.DEVICE_OS_VERSION] = -// privateMethods.validateAndReturn(propertiesList.get(constants.DEVICE_OS_VERSION)); -// -// deviceList.push(deviceObject); -// } -// return deviceList; -// } catch (e) { -// throw e; -// } finally { -// utility.endTenantFlow(); -// } -// }; - - /* - @Deprecated - */ - /* - Get the supported features by the device type - */ -// publicMethods.getFeatures = function (deviceType) { -// var carbonUser = session.get(constants.USER_SESSION_KEY); -// var utility = require('/app/modules/utility.js').utility; -// if (!carbonUser) { -// log.error("User object was not found in the session"); -// throw constants.ERRORS.USER_NOT_FOUND; -// } -// try { -// utility.startTenantFlow(carbonUser); -// var deviceManagementService = utility.getDeviceManagementService(); -// var features = deviceManagementService.getFeatureManager(deviceType).getFeatures(); -// var featuresConverted = {}; -// if (features) { -// var i, feature, featureObject; -// for (i = 0; i < features.size(); i++) { -// feature = features.get(i); -// featureObject = {}; -// featureObject[constants.FEATURE_NAME] = feature.getName(); -// featureObject[constants.FEATURE_DESCRIPTION] = feature.getDescription(); -// featuresConverted[feature.getName()] = featureObject; -// } -// } -// return featuresConverted; -// } catch (e) { -// throw e; -// } finally { -// utility.endTenantFlow(); -// } -// }; - - /* - @Deprecated - */ -// publicMethods.performOperation = function (devices, operation) { -// var carbonUser = session.get(constants.USER_SESSION_KEY); -// var utility = require('/app/modules/utility.js').utility; -// if (!carbonUser) { -// log.error("User object was not found in the session"); -// throw constants.ERRORS.USER_NOT_FOUND; -// } -// try { -// utility.startTenantFlow(carbonUser); -// var deviceManagementService = utility.getDeviceManagementService(); -// var operationInstance; -// if (operation.type == "COMMAND") { -// operationInstance = new CommandOperation(); -// } else if (operation.type == "CONFIG") { -// operationInstance = new ConfigOperation(); -// } else { -// operationInstance = new SimpleOperation(); -// } -// operationInstance.setCode(operation.featureName); -// var props = new Properties(); -// var i, object; -// for (i = 0; i < operation.properties.length; i++) { -// object = properties[i]; -// props.setProperty(object.key, object.value); -// } -// operationInstance.setProperties(props); -// var deviceList = new ArrayList(); -// var j, device, deviceIdentifier; -// for (j = 0; j < devices.length; i++) { -// device = devices[j]; -// deviceIdentifier = new DeviceIdentifier(); -// deviceIdentifier.setId(device.id); -// deviceIdentifier.setType(device.type); -// deviceList.add(deviceIdentifier); -// } -// deviceManagementService.addOperation(operationInstance, deviceList); -// } catch (e) { -// throw e; -// } finally { -// utility.endTenantFlow(); -// } -// }; - - /* - @Deprecated - */ -// privateMethods.getDevice = function (type, deviceId) { -// var carbonUser = session.get(constants.USER_SESSION_KEY); -// var utility = require('/app/modules/utility.js').utility; -// if (!carbonUser) { -// log.error("User object was not found in the session"); -// throw constants.ERRORS.USER_NOT_FOUND; -// } -// try { -// utility.startTenantFlow(carbonUser); -// var deviceManagementService = utility.getDeviceManagementService(); -// var deviceIdentifier = new DeviceIdentifier(); -// deviceIdentifier.setType(type); -// deviceIdentifier.setId(deviceId); -// return deviceManagementService.getDevice(deviceIdentifier); -// } catch (e) { -// throw e; -// } finally { -// utility.endTenantFlow(); -// } -// }; - /* @Updated */ @@ -243,7 +70,6 @@ deviceModule = function () { var utility = require('/app/modules/utility.js')["utility"]; try { utility.startTenantFlow(carbonUser); - //var url = mdmProps["httpsURL"] + "/mdm-admin/devices/view?type=" + deviceType + "&id=" + deviceId; var url = devicemgtProps["httpsURL"] + "/api/device-mgt/v1.0/devices/" + deviceType + "/" + deviceId; return serviceInvokers.XMLHttp.get( url, @@ -276,6 +102,9 @@ deviceModule = function () { } else if (backendResponse.status == 401) { response["status"] = "unauthorized"; return response; + } else if (backendResponse.status == 404) { + response["status"] = "notFound"; + return response; } else { response["status"] = "error"; return response; @@ -298,10 +127,10 @@ deviceModule = function () { var url; if (uiPermissions.LIST_DEVICES) { url = devicemgtProps["httpsURL"] + - devicemgtProps["backendRestEndpoints"]["deviceMgt"] + "/devices?offset=0&limit=1"; + devicemgtProps["backendRestEndpoints"]["deviceMgt"] + "/devices?offset=0&limit=1"; } else if (uiPermissions.LIST_OWN_DEVICES) { url = devicemgtProps["httpsURL"] + devicemgtProps["backendRestEndpoints"]["deviceMgt"] + - "/devices?offset=0&limit=1&user=" + carbonUser.username; + "/devices?offset=0&limit=1&user=" + carbonUser.username; } else { log.error("Access denied for user: " + carbonUser.username); return -1; @@ -330,8 +159,6 @@ deviceModule = function () { return response; }; - //Old methods - //TODO: make sure these methods are updated /* @Updated */ From 1b6c7ea50257a542ea04bde001f513dba3960061 Mon Sep 17 00:00:00 2001 From: harshanl Date: Thu, 22 Sep 2016 20:30:18 +0530 Subject: [PATCH 32/43] Refactored PolcyMgt component --- .../carbon/policy/mgt/core/mgt/impl/MonitoringManagerImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/main/java/org/wso2/carbon/policy/mgt/core/mgt/impl/MonitoringManagerImpl.java b/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/main/java/org/wso2/carbon/policy/mgt/core/mgt/impl/MonitoringManagerImpl.java index ece94829de..b83839e587 100644 --- a/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/main/java/org/wso2/carbon/policy/mgt/core/mgt/impl/MonitoringManagerImpl.java +++ b/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/main/java/org/wso2/carbon/policy/mgt/core/mgt/impl/MonitoringManagerImpl.java @@ -76,7 +76,7 @@ public class MonitoringManagerImpl implements MonitoringManager { List complianceFeatures = new ArrayList<>(); try { DeviceManagementProviderService service = PolicyManagementDataHolder.getInstance().getDeviceManagementService(); - PolicyManager manager = new PolicyManagerImpl(); + PolicyManager manager = PolicyManagementDataHolder.getInstance().getPolicyManager(); Device device = service.getDevice(deviceIdentifier); Policy policy = manager.getAppliedPolicyToDevice(deviceIdentifier); if (policy != null) { From a6ee98cb7f1cf81d631e9f263303c87f9bd9bd3c Mon Sep 17 00:00:00 2001 From: harshanl Date: Thu, 22 Sep 2016 20:31:09 +0530 Subject: [PATCH 33/43] Increased notification description column size --- .../src/main/resources/dbscripts/cdm/h2.sql | 2 +- .../src/main/resources/dbscripts/cdm/mssql.sql | 2 +- .../src/main/resources/dbscripts/cdm/mysql.sql | 2 +- .../src/main/resources/dbscripts/cdm/oracle.sql | 2 +- .../src/main/resources/dbscripts/cdm/postgresql.sql | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/src/main/resources/dbscripts/cdm/h2.sql b/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/src/main/resources/dbscripts/cdm/h2.sql index 4684ec127c..d561d89e88 100644 --- a/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/src/main/resources/dbscripts/cdm/h2.sql +++ b/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/src/main/resources/dbscripts/cdm/h2.sql @@ -370,7 +370,7 @@ CREATE TABLE IF NOT EXISTS DM_NOTIFICATION ( OPERATION_ID INTEGER NOT NULL, TENANT_ID INTEGER NOT NULL, STATUS VARCHAR(10) NULL, - DESCRIPTION VARCHAR(100) NULL, + DESCRIPTION VARCHAR(1000) NULL, PRIMARY KEY (NOTIFICATION_ID), CONSTRAINT fk_dm_device_notification FOREIGN KEY (DEVICE_ID) REFERENCES DM_DEVICE (ID) ON DELETE NO ACTION ON UPDATE NO ACTION, diff --git a/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/src/main/resources/dbscripts/cdm/mssql.sql b/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/src/main/resources/dbscripts/cdm/mssql.sql index 1f62c3fccf..78efa1e4bd 100644 --- a/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/src/main/resources/dbscripts/cdm/mssql.sql +++ b/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/src/main/resources/dbscripts/cdm/mssql.sql @@ -367,7 +367,7 @@ CREATE TABLE DM_NOTIFICATION ( OPERATION_ID INTEGER NOT NULL, TENANT_ID INTEGER NOT NULL, STATUS VARCHAR(10) NULL, - DESCRIPTION VARCHAR(100) NULL, + DESCRIPTION VARCHAR(1000) NULL, PRIMARY KEY (NOTIFICATION_ID), CONSTRAINT FL_DM_NOTIFICATION FOREIGN KEY (DEVICE_ID) REFERENCES DM_DEVICE (ID) ON DELETE NO ACTION ON UPDATE NO ACTION, diff --git a/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/src/main/resources/dbscripts/cdm/mysql.sql b/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/src/main/resources/dbscripts/cdm/mysql.sql index e8cb6f4f27..0bb2700f76 100644 --- a/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/src/main/resources/dbscripts/cdm/mysql.sql +++ b/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/src/main/resources/dbscripts/cdm/mysql.sql @@ -428,7 +428,7 @@ CREATE TABLE IF NOT EXISTS DM_NOTIFICATION ( OPERATION_ID INTEGER NOT NULL, TENANT_ID INTEGER NOT NULL, STATUS VARCHAR(10) NULL, - DESCRIPTION VARCHAR(100) NULL, + DESCRIPTION VARCHAR(1000) NULL, PRIMARY KEY (NOTIFICATION_ID), CONSTRAINT fk_dm_device_notification FOREIGN KEY (DEVICE_ID) REFERENCES DM_DEVICE (ID) ON DELETE NO ACTION ON UPDATE NO ACTION, diff --git a/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/src/main/resources/dbscripts/cdm/oracle.sql b/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/src/main/resources/dbscripts/cdm/oracle.sql index c49d530140..e889251f93 100644 --- a/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/src/main/resources/dbscripts/cdm/oracle.sql +++ b/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/src/main/resources/dbscripts/cdm/oracle.sql @@ -706,7 +706,7 @@ CREATE TABLE DM_NOTIFICATION ( OPERATION_ID NUMBER(10) NOT NULL, TENANT_ID NUMBER(10) NOT NULL, STATUS VARCHAR2(10) NULL, - DESCRIPTION VARCHAR2(100) NULL, + DESCRIPTION VARCHAR2(1000) NULL, CONSTRAINT PK_DM_NOTIFICATION PRIMARY KEY (NOTIFICATION_ID), CONSTRAINT FK_DM_DEVICE_NOTIFICATION FOREIGN KEY (DEVICE_ID) REFERENCES DM_DEVICE (ID), diff --git a/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/src/main/resources/dbscripts/cdm/postgresql.sql b/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/src/main/resources/dbscripts/cdm/postgresql.sql index 828eca58cb..c124b0d496 100644 --- a/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/src/main/resources/dbscripts/cdm/postgresql.sql +++ b/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/src/main/resources/dbscripts/cdm/postgresql.sql @@ -409,7 +409,7 @@ CREATE TABLE IF NOT EXISTS DM_NOTIFICATION ( OPERATION_ID INTEGER NOT NULL, TENANT_ID INTEGER NOT NULL, STATUS VARCHAR(10) NULL, - DESCRIPTION VARCHAR(100) NULL, + DESCRIPTION VARCHAR(1000) NULL, CONSTRAINT fk_dm_device_notification FOREIGN KEY (DEVICE_ID) REFERENCES DM_DEVICE (ID) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT fk_dm_operation_notification FOREIGN KEY (OPERATION_ID) REFERENCES From a4b39f92e5b78d3cbf44cd095d739544d189747e Mon Sep 17 00:00:00 2001 From: dilanua Date: Thu, 22 Sep 2016 22:15:55 +0530 Subject: [PATCH 34/43] Fix for JIRA: https://wso2.org/jira/browse/EMM-1593 --- .../public/js/operation-mod.js | 53 +++++++++++-------- 1 file changed, 31 insertions(+), 22 deletions(-) diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.operation-mod/public/js/operation-mod.js b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.operation-mod/public/js/operation-mod.js index 98b3e2ad9f..0ea06a2ab0 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.operation-mod/public/js/operation-mod.js +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.operation-mod/public/js/operation-mod.js @@ -107,7 +107,6 @@ var operationModule = function () { "NOTIFICATION_OPERATION_CODE": "NOTIFICATION", "CALENDAR_SUBSCRIPTION_OPERATION_CODE": "CALENDAR_SUBSCRIPTION", "APN_OPERATION_CODE": "APN", - "DOMAIN_CODE": "DOMAIN", "CELLULAR_OPERATION_CODE": "CELLULAR", "PER_APP_VPN_OPERATION_CODE": "PER_APP_VPN", "APP_TO_PER_APP_VPN_MAPPING_OPERATION_CODE": "APP_TO_PER_APP_VPN_MAPPING" @@ -116,20 +115,10 @@ var operationModule = function () { publicMethods.getIOSServiceEndpoint = function (operationCode) { var featureMap = { "DEVICE_LOCK": "lock", - "VPN": "vpn", - "PER_APP_VPN": "per-app-vpn", - "APP_TO_PER_APP_VPN_MAPPING": "app-to-per-app-vpn-mapping", - "RING": "ring", "LOCATION": "location", + "ENTERPRISE_WIPE": "enterprise-wipe", "NOTIFICATION": "notification", - "AIR_PLAY": "airplay", - "RESTRICTION": "restriction", - "CELLULAR": "cellular", - "WIFI": "wifi", - "INSTALL_STORE_APPLICATION": "store-application", - "INSTALL_ENTERPRISE_APPLICATION": "enterprise-application", - "REMOVE_APPLICATION": "remove-application", - "ENTERPRISE_WIPE": "enterprise-wipe" + "RING": "ring" }; return "/api/device-mgt/ios/v1.0/admin/devices/" + featureMap[operationCode]; }; @@ -851,6 +840,24 @@ var operationModule = function () { "restrictedApplications": operationPayload["restricted-applications"] }; break; + case androidOperationConstants["SYSTEM_UPDATE_POLICY_CODE"]: + if (operationPayload["type"] != "window") { + payload = { + "cosuSystemUpdatePolicyType": operationPayload["type"] + }; + } else { + payload = { + "cosuSystemUpdatePolicyType": operationPayload["type"], + "cosuSystemUpdatePolicyWindowStartTime": operationPayload["startTime"], + "cosuSystemUpdatePolicyWindowEndTime": operationPayload["endTime"] + }; + } + break; + case androidOperationConstants["KIOSK_APPS_CODE"]: + payload = { + "cosuWhitelistedApplications": operationPayload["whitelistedApplications"] + }; + break; } return payload; }; @@ -1187,12 +1194,13 @@ var operationModule = function () { publicMethods.getWindowsServiceEndpoint = function (operationCode) { var featureMap = { "DEVICE_LOCK": "lock-devices", + "DISENROLL": "disenroll", "DEVICE_RING": "ring-devices", "LOCK_RESET": "lock-reset-devices", "WIPE_DATA": "wipe-devices" }; //return "/mdm-windows-agent/services/windows/operation/" + featureMap[operationCode]; - return "/api/device-mgt/windows/v1.0/admin/devices/" + featureMap[operationCode]; + return "/api/device-mgt/windows/v1.0/services/windows/admin/devices/" + featureMap[operationCode]; }; /** * Get the icon for the featureCode @@ -1203,16 +1211,16 @@ var operationModule = function () { var featureMap = { "DEVICE_LOCK": "fw-lock", "DEVICE_LOCATION": "fw-map-location", - "CLEAR_PASSWORD": "fw-key", - "ENTERPRISE_WIPE": "fw-clear", - "WIPE_DATA": "fw-database", + "CLEAR_PASSWORD": "fw-clear", + "ENTERPRISE_WIPE": "fw-block", + "WIPE_DATA": "fw-delete", "DEVICE_RING": "fw-dial-up", "DEVICE_REBOOT": "fw-refresh", - "UPGRADE_FIRMWARE": "fw-up-arrow", + "UPGRADE_FIRMWARE": "fw-hardware", "DEVICE_MUTE": "fw-mute", "NOTIFICATION": "fw-message", "CHANGE_LOCK_CODE": "fw-security", - "DEVICE_UNLOCK": "fw-lock" + "DEVICE_UNLOCK": "fw-key" }; return featureMap[operationCode]; }; @@ -1226,8 +1234,9 @@ var operationModule = function () { var featureMap = { "DEVICE_LOCK": "fw-lock", "DEVICE_RING": "fw-dial-up", + "DISENROLL": "fw-export", "LOCK_RESET": "fw-key", - "WIPE_DATA": "fw-clear" + "WIPE_DATA": "fw-delete" }; return featureMap[operationCode]; }; @@ -1241,7 +1250,7 @@ var operationModule = function () { var featureMap = { "DEVICE_LOCK": "fw-lock", "LOCATION": "fw-map-location", - "ENTERPRISE_WIPE": "fw-clear", + "ENTERPRISE_WIPE": "fw-block", "NOTIFICATION": "fw-message", "RING": "fw-dial-up" }; @@ -1576,7 +1585,7 @@ var operationModule = function () { var operationCode = operationCodes[i]; var payload = publicMethods.generatePayload(platformType, operationCode, null); - if(platformType == platformTypeConstants["ANDROID"] && + if (platformType == platformTypeConstants["ANDROID"] && operationCodes[i] == androidOperationConstants["CAMERA_OPERATION_CODE"]){ var operations = payload["operation"]; for (var key in operations){ From 71424c4bb7e622eadae5fa9f85421bbc79e31f95 Mon Sep 17 00:00:00 2001 From: dilanua Date: Thu, 22 Sep 2016 22:47:18 +0530 Subject: [PATCH 35/43] Fix for JIRA: https://wso2.org/jira/browse/EMM-1613 --- .../devicemgt/app/modules/business-controllers/device.js | 1 + 1 file changed, 1 insertion(+) diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/modules/business-controllers/device.js b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/modules/business-controllers/device.js index 48a101bda1..1273e7344a 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/modules/business-controllers/device.js +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/modules/business-controllers/device.js @@ -97,6 +97,7 @@ deviceModule = function () { properties[constants["DEVICE_VENDOR"]] = constants["VENDOR_APPLE"]; } deviceObject[constants["DEVICE_PROPERTIES"]] = properties; + deviceObject[constants["DEVICE_INFO"]] = device["deviceInfo"]; response["content"] = deviceObject; return response; } else if (backendResponse.status == 401) { From 87a03e831280e51f737ebe5769ec5958eed1c79b Mon Sep 17 00:00:00 2001 From: dilanua Date: Fri, 23 Sep 2016 11:15:12 +0530 Subject: [PATCH 36/43] Fix for jira: https://wso2.org/jira/browse/EMM-1617 --- .../devicemgt/app/modules/business-controllers/device.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/modules/business-controllers/device.js b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/modules/business-controllers/device.js index 1273e7344a..d743797ba3 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/modules/business-controllers/device.js +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/modules/business-controllers/device.js @@ -97,7 +97,10 @@ deviceModule = function () { properties[constants["DEVICE_VENDOR"]] = constants["VENDOR_APPLE"]; } deviceObject[constants["DEVICE_PROPERTIES"]] = properties; - deviceObject[constants["DEVICE_INFO"]] = device["deviceInfo"]; + if (device["deviceInfo"]) { + deviceObject[constants["DEVICE_INFO"]] = device["deviceInfo"]; + } + response["content"] = deviceObject; return response; } else if (backendResponse.status == 401) { From 6aad76eff1d28f951c8d5e5422a03106438347c4 Mon Sep 17 00:00:00 2001 From: Ace Date: Fri, 23 Sep 2016 11:24:49 +0530 Subject: [PATCH 37/43] Synching with master and updating jscep and bcpkix dependencies --- .../org.wso2.carbon.certificate.mgt.core/pom.xml | 6 +++--- pom.xml | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/components/certificate-mgt/org.wso2.carbon.certificate.mgt.core/pom.xml b/components/certificate-mgt/org.wso2.carbon.certificate.mgt.core/pom.xml index c21ead60d2..c1ee115741 100644 --- a/components/certificate-mgt/org.wso2.carbon.certificate.mgt.core/pom.xml +++ b/components/certificate-mgt/org.wso2.carbon.certificate.mgt.core/pom.xml @@ -57,14 +57,14 @@ org.apache.commons.logging, javax.security.auth.x500, javax.xml.*, - javax.xml.parsers;version="${javax.xml.parsers.import.pkg.version}";resolution:=optional, + javax.xml.parsers;version="${javax.xml.parsers.import.pkg.version}";resolution:=optional, org.apache.commons.codec.binary, org.bouncycastle.asn1, org.bouncycastle.asn1.x500, org.bouncycastle.asn1.x509, org.bouncycastle.asn1.pkcs, - org.bouncycastle.cert, - org.bouncycastle.cert.jcajce, + org.bouncycastle.cert; version="${bcprov.wso2.version.range}", + org.bouncycastle.cert.jcajce; version="${bcprov.wso2.version.range}", org.bouncycastle.cms, org.bouncycastle.jce.provider, org.bouncycastle.operator, diff --git a/pom.xml b/pom.xml index 40a7491b42..ba1fec5a24 100644 --- a/pom.xml +++ b/pom.xml @@ -1711,7 +1711,7 @@ by default) and nothing else. We had troubles with other repositories in the past. Therefore configuring additional repositories here should be considered very carefully. --> - + wso2-nexus WSO2 internal Repository http://maven.wso2.org/nexus/content/groups/wso2-public/ @@ -1816,7 +1816,7 @@ 2.6.0.wso2v1 - 6.0.5-SNAPSHOT + 6.0.5 (5.0.0,7.0.0] @@ -1835,11 +1835,11 @@ 1.52.0.wso2v1 - 1.52.0.wso2v1 + 1.52.0.wso2v2 [1.52.0,1.60.0) - 2.3.0.wso2v1 + 2.3.0.wso2v2 2.26.1.wso2v3 From 9b6973226c6e4b4c9575fd58434e1a6b2da96498 Mon Sep 17 00:00:00 2001 From: harshanl Date: Fri, 23 Sep 2016 11:29:58 +0530 Subject: [PATCH 38/43] EMM-1609 : Changed postgres and oracle db scripts to support boolean data --- .../src/main/resources/dbscripts/cdm/oracle.sql | 2 +- .../src/main/resources/dbscripts/cdm/postgresql.sql | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/src/main/resources/dbscripts/cdm/oracle.sql b/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/src/main/resources/dbscripts/cdm/oracle.sql index e889251f93..39785fc532 100644 --- a/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/src/main/resources/dbscripts/cdm/oracle.sql +++ b/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/src/main/resources/dbscripts/cdm/oracle.sql @@ -436,7 +436,7 @@ CREATE TABLE DM_DEVICE_POLICY_APPLIED ( POLICY_ID NUMBER(10) NOT NULL , POLICY_CONTENT BLOB NULL , TENANT_ID NUMBER(10) NOT NULL, - APPLIED NUMBER(3) NULL , + APPLIED BOOLEAN NULL , CREATED_TIME TIMESTAMP(0) NULL , UPDATED_TIME TIMESTAMP(0) NULL , APPLIED_TIME TIMESTAMP(0) NULL , diff --git a/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/src/main/resources/dbscripts/cdm/postgresql.sql b/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/src/main/resources/dbscripts/cdm/postgresql.sql index c124b0d496..54489b8157 100644 --- a/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/src/main/resources/dbscripts/cdm/postgresql.sql +++ b/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/src/main/resources/dbscripts/cdm/postgresql.sql @@ -222,11 +222,11 @@ CREATE TABLE IF NOT EXISTS DM_DEVICE_POLICY_APPLIED ( POLICY_ID INTEGER NOT NULL , POLICY_CONTENT BYTEA NULL , TENANT_ID INTEGER NOT NULL, - APPLIED INTEGER[1] NULL , + APPLIED BOOLEAN NULL , CREATED_TIME TIMESTAMP NULL , UPDATED_TIME TIMESTAMP NULL , APPLIED_TIME TIMESTAMP NULL , - CONSTRAINT FK_DM_POLICY_DEVCIE_APPLIED + CONSTRAINT FK_DM_POLICY_DEVICE_APPLIED FOREIGN KEY (DEVICE_ID ) REFERENCES DM_DEVICE (ID ) ON DELETE NO ACTION From ebead1249cf06234224b677a8709305d272ee8c4 Mon Sep 17 00:00:00 2001 From: dilanua Date: Fri, 23 Sep 2016 11:38:40 +0530 Subject: [PATCH 39/43] Fix for jira: https://wso2.org/jira/browse/EMM-1617 --- .../resources/jaggeryapps/devicemgt/app/modules/constants.js | 1 + 1 file changed, 1 insertion(+) diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/modules/constants.js b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/modules/constants.js index 5cafff394d..b79f0160c8 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/modules/constants.js +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/modules/constants.js @@ -34,6 +34,7 @@ var DEVICE_OS_BUILD_DATE = "osBuildDate"; var DEVICE_PROPERTIES = "properties"; var DEVICE_ENROLLMENT_INFO = "enrolmentInfo"; var DEVICE_STATUS = "status"; +var DEVICE_INFO = "deviceInfo"; var FEATURE_NAME = "featureName"; var FEATURE_DESCRIPTION = "featureDescription"; From dd03d0b740c7faf2a8741250788ebf4fe6d1fedd Mon Sep 17 00:00:00 2001 From: harshanl Date: Fri, 23 Sep 2016 21:17:37 +0530 Subject: [PATCH 40/43] Added device status change upon inactivity mechanism --- .../operation/mgt/OperationManagerImpl.java | 83 +++++++++- .../core/operation/mgt/dao/OperationDAO.java | 2 + .../mgt/dao/impl/GenericOperationDAOImpl.java | 26 ++++ .../DeviceManagementProviderService.java | 10 ++ .../DeviceManagementProviderServiceImpl.java | 74 +++++++++ .../monitor/ComplianceDecisionPoint.java | 2 + .../mgt/core/PolicyManagerServiceImpl.java | 2 +- .../policy/mgt/core/dao/MonitoringDAO.java | 5 +- .../mgt/core/dao/impl/MonitoringDAOImpl.java | 5 +- .../impl/ComplianceDecisionPointImpl.java | 16 ++ .../core/mgt/impl/MonitoringManagerImpl.java | 104 +++++++------ .../core/service/PolicyManagementService.java | 146 ------------------ .../policy/mgt/core/task/MonitoringTask.java | 3 +- 13 files changed, 273 insertions(+), 205 deletions(-) delete mode 100644 components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/main/java/org/wso2/carbon/policy/mgt/core/service/PolicyManagementService.java diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/operation/mgt/OperationManagerImpl.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/operation/mgt/OperationManagerImpl.java index bd2b6d6f52..6944d60511 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/operation/mgt/OperationManagerImpl.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/operation/mgt/OperationManagerImpl.java @@ -120,8 +120,8 @@ public class OperationManagerImpl implements OperationManager { boolean isNotRepeated = false; boolean hasExistingTaskOperation; int enrolmentId; - if (operationDto.getControl() == - org.wso2.carbon.device.mgt.core.dto.operation.mgt.Operation.Control.NO_REPEAT) { + if (org.wso2.carbon.device.mgt.core.dto.operation.mgt.Operation.Control.NO_REPEAT == operationDto. + getControl()) { isNotRepeated = true; } @@ -357,12 +357,25 @@ public class OperationManagerImpl implements OperationManager { deviceId.getId() + "'"); } - int enrolmentId = this.getEnrolmentByStatus(deviceId, EnrolmentInfo.Status.ACTIVE); - if (enrolmentId < 0) { + // + EnrolmentInfo enrolmentInfo = this.getEnrolmentInfo(deviceId); + if (enrolmentInfo == null) { throw new OperationManagementException("Device not found for the given device Identifier:" + deviceId.getId() + " and given type:" + deviceId.getType()); } + int enrolmentId = enrolmentInfo.getId(); + //Changing the enrollment status & attempt count if the device is marked as inactive or unreachable + switch (enrolmentInfo.getStatus()) { + case ACTIVE: + this.resetAttemptCount(enrolmentId); + break; + case INACTIVE: + case UNREACHABLE: + this.resetAttemptCount(enrolmentId); + this.setEnrolmentStatus(deviceId, EnrolmentInfo.Status.ACTIVE); + break; + } try { OperationManagementDAOFactory.openConnection(); @@ -886,6 +899,65 @@ public class OperationManagerImpl implements OperationManager { return enrolmentId; } + private EnrolmentInfo getEnrolmentInfo(DeviceIdentifier deviceId) throws OperationManagementException { + EnrolmentInfo enrolmentInfo; + try { + DeviceManagementDAOFactory.openConnection(); + int tenantId = CarbonContext.getThreadLocalCarbonContext().getTenantId(); + String user = this.getUser(); + enrolmentInfo = deviceDAO.getEnrolment(deviceId, user, tenantId); + } catch (DeviceManagementDAOException e) { + throw new OperationManagementException("Error occurred while retrieving enrollment data of '" + + deviceId.getType() + "' device carrying the identifier '" + + deviceId.getId() + "'", e); + } catch (SQLException e) { + throw new OperationManagementException( + "Error occurred while opening a connection to the data source", e); + } finally { + DeviceManagementDAOFactory.closeConnection(); + } + return enrolmentInfo; + } + + private boolean setEnrolmentStatus(DeviceIdentifier deviceId, EnrolmentInfo.Status status) throws OperationManagementException { + boolean updateStatus; + try { + DeviceManagementDAOFactory.beginTransaction(); + int tenantId = CarbonContext.getThreadLocalCarbonContext().getTenantId(); + String user = this.getUser(); + updateStatus = deviceDAO.setEnrolmentStatus(deviceId, user, status, tenantId); + DeviceManagementDAOFactory.commitTransaction(); + } catch (DeviceManagementDAOException e) { + DeviceManagementDAOFactory.rollbackTransaction(); + throw new OperationManagementException("Error occurred while updating enrollment status of '" + + deviceId.getType() + "' device carrying the identifier '" + + deviceId.getId() + "'", e); + } catch (TransactionManagementException e) { + throw new OperationManagementException("Error occurred while initiating a transaction", e); + } finally { + DeviceManagementDAOFactory.closeConnection(); + } + return updateStatus; + } + + private boolean resetAttemptCount(int enrolmentId) throws OperationManagementException { + boolean resetStatus; + try { + OperationManagementDAOFactory.beginTransaction(); + resetStatus = operationDAO.resetAttemptCount(enrolmentId); + OperationManagementDAOFactory.commitTransaction(); + } catch (OperationManagementDAOException e) { + OperationManagementDAOFactory.rollbackTransaction(); + throw new OperationManagementException("Error occurred while resetting attempt count of device id : '" + + enrolmentId + "'", e); + } catch (TransactionManagementException e) { + throw new OperationManagementException("Error occurred while initiating a transaction", e); + } finally { + OperationManagementDAOFactory.closeConnection(); + } + return resetStatus; + } + private boolean isTaskScheduledOperation(Operation operation) { TaskConfiguration taskConfiguration = DeviceConfigurationManager.getInstance().getDeviceManagementConfig(). getTaskConfiguration(); @@ -896,5 +968,4 @@ public class OperationManagerImpl implements OperationManager { } return false; } - -} +} \ No newline at end of file diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/operation/mgt/dao/OperationDAO.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/operation/mgt/dao/OperationDAO.java index e07d251319..99c71a5ba1 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/operation/mgt/dao/OperationDAO.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/operation/mgt/dao/OperationDAO.java @@ -79,4 +79,6 @@ public interface OperationDAO { int getActivityCountUpdatedAfter(long timestamp) throws OperationManagementDAOException; + boolean resetAttemptCount(int enrolmentId) throws OperationManagementDAOException; + } \ No newline at end of file diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/operation/mgt/dao/impl/GenericOperationDAOImpl.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/operation/mgt/dao/impl/GenericOperationDAOImpl.java index 8a16220032..760a2f6e75 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/operation/mgt/dao/impl/GenericOperationDAOImpl.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/operation/mgt/dao/impl/GenericOperationDAOImpl.java @@ -37,6 +37,7 @@ import org.wso2.carbon.device.mgt.core.operation.mgt.dao.util.OperationDAOUtil; import java.io.*; import java.sql.*; import java.util.ArrayList; +import java.util.Calendar; import java.util.Date; import java.util.List; @@ -1072,4 +1073,29 @@ public class GenericOperationDAOImpl implements OperationDAO { } return operations; } + + @Override + public boolean resetAttemptCount(int enrolmentId) throws OperationManagementDAOException { + boolean status = false; + Connection conn; + PreparedStatement stmt = null; + Timestamp currentTimestamp = new Timestamp(Calendar.getInstance().getTime().getTime()); + int tenantId = PrivilegedCarbonContext.getThreadLocalCarbonContext().getTenantId(); + try { + conn = OperationManagementDAOFactory.getConnection(); + String query = "UPDATE DM_POLICY_COMPLIANCE_STATUS SET ATTEMPTS = 0, LAST_REQUESTED_TIME = ? " + + "WHERE ENROLMENT_ID = ? AND TENANT_ID = ?"; + stmt = conn.prepareStatement(query); + stmt.setTimestamp(1, currentTimestamp); + stmt.setInt(2, enrolmentId); + stmt.setInt(3, tenantId); + stmt.executeUpdate(); + status = true; + } catch (SQLException e) { + throw new OperationManagementDAOException("Unable to reset the attempt count in database.", e); + } finally { + OperationManagementDAOUtil.cleanupResources(stmt, null); + } + return status; + } } diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/service/DeviceManagementProviderService.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/service/DeviceManagementProviderService.java index 83eae4cff4..42de5bba3c 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/service/DeviceManagementProviderService.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/service/DeviceManagementProviderService.java @@ -43,6 +43,16 @@ public interface DeviceManagementProviderService { */ List getAllDevices(String deviceType) throws DeviceManagementException; + /** + * Method to retrieve all the devices of a given device type without other device information. + * + * @param deviceType Device-type of the required devices + * @return List of devices of given device-type. + * @throws DeviceManagementException If some unusual behaviour is observed while fetching the + * devices. + */ + List getAllDevicesWithoutInfo(String deviceType) throws DeviceManagementException; + /** * Method to retrieve all the devices registered in the system. * diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/service/DeviceManagementProviderServiceImpl.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/service/DeviceManagementProviderServiceImpl.java index 1e308f508c..ccbb524820 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/service/DeviceManagementProviderServiceImpl.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/service/DeviceManagementProviderServiceImpl.java @@ -713,6 +713,80 @@ public class DeviceManagementProviderServiceImpl implements DeviceManagementProv return devices; } + @Override + public List getAllDevicesWithoutInfo(String deviceType) throws DeviceManagementException { + List devices = new ArrayList<>(); + List allDevices; + try { + DeviceManagementDAOFactory.openConnection(); + allDevices = deviceDAO.getDevices(deviceType, this.getTenantId()); + if (allDevices == null) { + if (log.isDebugEnabled()) { + log.debug("No device is found upon the type '" + deviceType + "'"); + } + return null; + } + } catch (DeviceManagementDAOException e) { + throw new DeviceManagementException("Error occurred while retrieving all devices of type '" + + deviceType + "' that are being managed within the scope of current tenant", e); + } catch (SQLException e) { + throw new DeviceManagementException("Error occurred while opening a connection to the data source", e); + } finally { + DeviceManagementDAOFactory.closeConnection(); + } + + for (Device device : allDevices) { + DeviceInfo info = null; + try { + DeviceManagementDAOFactory.openConnection(); + info = deviceInfoDAO.getDeviceInformation(device.getId()); + DeviceLocation location = deviceInfoDAO.getDeviceLocation(device.getId()); + if (info != null) { + info.setLocation(location); + } + } catch (DeviceDetailsMgtDAOException e) { + log.error("Error occurred while retrieving advance info of '" + device.getType() + + "' that carries the id '" + device.getDeviceIdentifier() + "'"); + } catch (SQLException e) { + log.error("Error occurred while opening a connection to the data source", e); + } finally { + DeviceManagementDAOFactory.closeConnection(); + } + device.setDeviceInfo(info); + + try { + DeviceManagementDAOFactory.openConnection(); + List applications = applicationDAO.getInstalledApplications(device.getId()); + device.setApplications(applications); + } catch (DeviceManagementDAOException e) { + log.error("Error occurred while retrieving the application list of '" + device.getType() + "', " + + "which carries the id '" + device.getId() + "'", e); + } catch (SQLException e) { + log.error("Error occurred while opening a connection to the data source", e); + } finally { + DeviceManagementDAOFactory.closeConnection(); + } + + DeviceManager deviceManager = this.getDeviceManager(deviceType); + if (deviceManager == null) { + if (log.isDebugEnabled()) { + log.debug("Device Manager associated with the device type '" + deviceType + "' is null. " + + "Therefore, not attempting method 'isEnrolled'"); + } + devices.add(device); + continue; + } + Device dmsDevice = + deviceManager.getDevice(new DeviceIdentifier(device.getDeviceIdentifier(), device.getType())); + if (dmsDevice != null) { + device.setFeatures(dmsDevice.getFeatures()); + device.setProperties(dmsDevice.getProperties()); + } + devices.add(device); + } + return devices; + } + @Override public void sendEnrolmentInvitation(EmailMetaInfo metaInfo) throws DeviceManagementException { Map, Object>> params = new HashMap<>(); diff --git a/components/policy-mgt/org.wso2.carbon.policy.mgt.common/src/main/java/org/wso2/carbon/policy/mgt/common/monitor/ComplianceDecisionPoint.java b/components/policy-mgt/org.wso2.carbon.policy.mgt.common/src/main/java/org/wso2/carbon/policy/mgt/common/monitor/ComplianceDecisionPoint.java index 8799653fe3..57f52e8fc0 100644 --- a/components/policy-mgt/org.wso2.carbon.policy.mgt.common/src/main/java/org/wso2/carbon/policy/mgt/common/monitor/ComplianceDecisionPoint.java +++ b/components/policy-mgt/org.wso2.carbon.policy.mgt.common/src/main/java/org/wso2/carbon/policy/mgt/common/monitor/ComplianceDecisionPoint.java @@ -32,6 +32,8 @@ public interface ComplianceDecisionPoint { void setDevicesAsUnreachable(List deviceIdentifiers) throws PolicyComplianceException; + void setDevicesAsInactive(List deviceIdentifiers) throws PolicyComplianceException; + void setDevicesAsUnreachableWith(List devices) throws PolicyComplianceException; void setDeviceAsReachable(DeviceIdentifier deviceIdentifier) throws PolicyComplianceException; diff --git a/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/main/java/org/wso2/carbon/policy/mgt/core/PolicyManagerServiceImpl.java b/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/main/java/org/wso2/carbon/policy/mgt/core/PolicyManagerServiceImpl.java index 28ab6040c7..a3079fcb4c 100644 --- a/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/main/java/org/wso2/carbon/policy/mgt/core/PolicyManagerServiceImpl.java +++ b/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/main/java/org/wso2/carbon/policy/mgt/core/PolicyManagerServiceImpl.java @@ -204,4 +204,4 @@ public class PolicyManagerServiceImpl implements PolicyManagerService { public boolean isCompliance(DeviceIdentifier deviceIdentifier) throws PolicyComplianceException { return monitoringManager.isCompliance(deviceIdentifier); } -} +} \ No newline at end of file diff --git a/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/main/java/org/wso2/carbon/policy/mgt/core/dao/MonitoringDAO.java b/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/main/java/org/wso2/carbon/policy/mgt/core/dao/MonitoringDAO.java index a7f42df06c..c097494d2a 100644 --- a/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/main/java/org/wso2/carbon/policy/mgt/core/dao/MonitoringDAO.java +++ b/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/main/java/org/wso2/carbon/policy/mgt/core/dao/MonitoringDAO.java @@ -60,9 +60,8 @@ public interface MonitoringDAO { void deleteNoneComplianceData(int policyComplianceStatusId) throws MonitoringDAOException; - void updateAttempts(int deviceId, boolean reset) throws MonitoringDAOException; + boolean updateAttempts(int deviceId, boolean reset) throws MonitoringDAOException; void updateAttempts(List deviceId, boolean reset) throws MonitoringDAOException; - -} +} \ No newline at end of file diff --git a/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/main/java/org/wso2/carbon/policy/mgt/core/dao/impl/MonitoringDAOImpl.java b/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/main/java/org/wso2/carbon/policy/mgt/core/dao/impl/MonitoringDAOImpl.java index 20dac46f78..4a5d0e0bb9 100644 --- a/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/main/java/org/wso2/carbon/policy/mgt/core/dao/impl/MonitoringDAOImpl.java +++ b/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/main/java/org/wso2/carbon/policy/mgt/core/dao/impl/MonitoringDAOImpl.java @@ -400,7 +400,8 @@ public class MonitoringDAOImpl implements MonitoringDAO { } @Override - public void updateAttempts(int deviceId, boolean reset) throws MonitoringDAOException { + public boolean updateAttempts(int deviceId, boolean reset) throws MonitoringDAOException { + boolean status = false; Connection conn; PreparedStatement stmt = null; Timestamp currentTimestamp = new Timestamp(Calendar.getInstance().getTime().getTime()); @@ -420,11 +421,13 @@ public class MonitoringDAOImpl implements MonitoringDAO { stmt.setInt(2, deviceId); stmt.setInt(3, tenantId); stmt.executeUpdate(); + status = true; } catch (SQLException e) { throw new MonitoringDAOException("Unable to update the attempts data in database.", e); } finally { PolicyManagementDAOUtil.cleanupResources(stmt, null); } + return status; } @Override diff --git a/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/main/java/org/wso2/carbon/policy/mgt/core/impl/ComplianceDecisionPointImpl.java b/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/main/java/org/wso2/carbon/policy/mgt/core/impl/ComplianceDecisionPointImpl.java index 77c00033d4..7baf29bf79 100644 --- a/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/main/java/org/wso2/carbon/policy/mgt/core/impl/ComplianceDecisionPointImpl.java +++ b/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/main/java/org/wso2/carbon/policy/mgt/core/impl/ComplianceDecisionPointImpl.java @@ -66,6 +66,22 @@ public class ComplianceDecisionPointImpl implements ComplianceDecisionPoint { } + @Override + public void setDevicesAsInactive(List deviceIdentifiers) throws PolicyComplianceException { + try { + DeviceManagementProviderService service = this.getDeviceManagementProviderService(); + for (DeviceIdentifier deviceIdentifier : deviceIdentifiers) { + Device device = service.getDevice(deviceIdentifier); + service.setStatus(deviceIdentifier, device.getEnrolmentInfo().getOwner(), + EnrolmentInfo.Status.INACTIVE); + } + } catch (DeviceManagementException e) { + String msg = "Error occurred while setting the device as inactive"; + log.error(msg, e); + throw new PolicyComplianceException(msg, e); + } + } + @Override public void setDevicesAsUnreachableWith(List devices) throws PolicyComplianceException { try { diff --git a/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/main/java/org/wso2/carbon/policy/mgt/core/mgt/impl/MonitoringManagerImpl.java b/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/main/java/org/wso2/carbon/policy/mgt/core/mgt/impl/MonitoringManagerImpl.java index b83839e587..91d16cb01a 100644 --- a/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/main/java/org/wso2/carbon/policy/mgt/core/mgt/impl/MonitoringManagerImpl.java +++ b/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/main/java/org/wso2/carbon/policy/mgt/core/mgt/impl/MonitoringManagerImpl.java @@ -16,7 +16,6 @@ * under the License. */ - package org.wso2.carbon.policy.mgt.core.mgt.impl; import org.apache.commons.logging.Log; @@ -75,7 +74,8 @@ public class MonitoringManagerImpl implements MonitoringManager { List complianceFeatures = new ArrayList<>(); try { - DeviceManagementProviderService service = PolicyManagementDataHolder.getInstance().getDeviceManagementService(); + DeviceManagementProviderService service = + PolicyManagementDataHolder.getInstance().getDeviceManagementService(); PolicyManager manager = PolicyManagementDataHolder.getInstance().getPolicyManager(); Device device = service.getDevice(deviceIdentifier); Policy policy = manager.getAppliedPolicyToDevice(deviceIdentifier); @@ -90,7 +90,7 @@ public class MonitoringManagerImpl implements MonitoringManager { PolicyManagementDAOFactory.openConnection(); ComplianceData cmd = monitoringDAO.getCompliance(device.getId(), device.getEnrolmentInfo().getId()); complianceData = monitoringService.checkPolicyCompliance(deviceIdentifier, - policy, deviceResponse); + policy, deviceResponse); complianceData.setId(cmd.getId()); complianceData.setPolicy(policy); @@ -100,8 +100,9 @@ public class MonitoringManagerImpl implements MonitoringManager { } catch (SQLException e) { throw new PolicyComplianceException("Error occurred while opening a data source connection", e); } catch (MonitoringDAOException e) { - throw new PolicyComplianceException("Unable to add the none compliance features to database for device " + - deviceIdentifier.getId() + " - " + deviceIdentifier.getType(), e); + throw new PolicyComplianceException( + "Unable to add the none compliance features to database for device " + + deviceIdentifier.getId() + " - " + deviceIdentifier.getType(), e); } finally { PolicyManagementDAOFactory.closeConnection(); } @@ -112,19 +113,20 @@ public class MonitoringManagerImpl implements MonitoringManager { try { PolicyManagementDAOFactory.beginTransaction(); monitoringDAO.setDeviceAsNoneCompliance(device.getId(), device.getEnrolmentInfo().getId(), - policy.getId()); + policy.getId()); if (log.isDebugEnabled()) { log.debug("Compliance status primary key " + complianceData.getId()); } monitoringDAO.deleteNoneComplianceData(complianceData.getId()); monitoringDAO.addNonComplianceFeatures(complianceData.getId(), device.getId(), - complianceFeatures); + complianceFeatures); PolicyManagementDAOFactory.commitTransaction(); } catch (MonitoringDAOException e) { PolicyManagementDAOFactory.rollbackTransaction(); - throw new PolicyComplianceException("Unable to add the none compliance features to database for device " + - deviceIdentifier.getId() + " - " + deviceIdentifier.getType(), e); + throw new PolicyComplianceException( + "Unable to add the none compliance features to database for device " + + deviceIdentifier.getId() + " - " + deviceIdentifier.getType(), e); } finally { PolicyManagementDAOFactory.closeConnection(); } @@ -146,8 +148,9 @@ public class MonitoringManagerImpl implements MonitoringManager { PolicyManagementDAOFactory.commitTransaction(); } catch (MonitoringDAOException e) { PolicyManagementDAOFactory.rollbackTransaction(); - throw new PolicyComplianceException("Unable to remove the none compliance features from database for device " + - deviceIdentifier.getId() + " - " + deviceIdentifier.getType(), e); + throw new PolicyComplianceException( + "Unable to remove the none compliance features from database for device " + + deviceIdentifier.getId() + " - " + deviceIdentifier.getType(), e); } finally { PolicyManagementDAOFactory.closeConnection(); } @@ -159,10 +162,10 @@ public class MonitoringManagerImpl implements MonitoringManager { } } catch (DeviceManagementException e) { throw new PolicyComplianceException("Unable tor retrieve device data from DB for " + - deviceIdentifier.getId() + " - " + deviceIdentifier.getType(), e); + deviceIdentifier.getId() + " - " + deviceIdentifier.getType(), e); } catch (PolicyManagerDAOException | PolicyManagementException e) { throw new PolicyComplianceException("Unable tor retrieve policy data from DB for device " + - deviceIdentifier.getId() + " - " + deviceIdentifier.getType(), e); + deviceIdentifier.getId() + " - " + deviceIdentifier.getType(), e); } return complianceFeatures; } @@ -170,21 +173,22 @@ public class MonitoringManagerImpl implements MonitoringManager { @Override public boolean isCompliance(DeviceIdentifier deviceIdentifier) throws PolicyComplianceException { try { - DeviceManagementProviderService service = PolicyManagementDataHolder.getInstance().getDeviceManagementService(); + DeviceManagementProviderService service = + PolicyManagementDataHolder.getInstance().getDeviceManagementService(); Device device = service.getDevice(deviceIdentifier); PolicyManagementDAOFactory.openConnection(); ComplianceData complianceData = monitoringDAO.getCompliance(device.getId(), device.getEnrolmentInfo() - .getId()); + .getId()); if (complianceData == null || !complianceData.isStatus()) { return false; } } catch (DeviceManagementException e) { throw new PolicyComplianceException("Unable to retrieve device data for " + deviceIdentifier.getId() + - " - " + deviceIdentifier.getType(), e); + " - " + deviceIdentifier.getType(), e); } catch (MonitoringDAOException e) { throw new PolicyComplianceException("Unable to retrieve compliance status for " + deviceIdentifier.getId() + - " - " + deviceIdentifier.getType(), e); + " - " + deviceIdentifier.getType(), e); } catch (SQLException e) { throw new PolicyComplianceException("Error occurred while opening a connection to the data source", e); } finally { @@ -195,12 +199,12 @@ public class MonitoringManagerImpl implements MonitoringManager { @Override public ComplianceData getDevicePolicyCompliance(DeviceIdentifier deviceIdentifier) throws - PolicyComplianceException { - + PolicyComplianceException { ComplianceData complianceData; try { PolicyManagementDAOFactory.openConnection(); - DeviceManagementProviderService service = PolicyManagementDataHolder.getInstance().getDeviceManagementService(); + DeviceManagementProviderService service = + PolicyManagementDataHolder.getInstance().getDeviceManagementService(); Device device = service.getDevice(deviceIdentifier); complianceData = monitoringDAO.getCompliance(device.getId(), device.getEnrolmentInfo().getId()); List complianceFeatures = @@ -209,11 +213,11 @@ public class MonitoringManagerImpl implements MonitoringManager { } catch (DeviceManagementException e) { throw new PolicyComplianceException("Unable to retrieve device data for " + deviceIdentifier.getId() + - " - " + deviceIdentifier.getType(), e); + " - " + deviceIdentifier.getType(), e); } catch (MonitoringDAOException e) { throw new PolicyComplianceException("Unable to retrieve compliance data for " + deviceIdentifier.getId() + - " - " + deviceIdentifier.getType(), e); + " - " + deviceIdentifier.getType(), e); } catch (SQLException e) { throw new PolicyComplianceException("Error occurred while opening a connection to the data source", e); } finally { @@ -232,6 +236,7 @@ public class MonitoringManagerImpl implements MonitoringManager { try { PolicyManagementDAOFactory.openConnection(); + //TODO: Return a map from getCompliance to reduce O(n^2) -> O(n) List cd = monitoringDAO.getCompliance(); for (Device device : devices) { @@ -266,7 +271,7 @@ public class MonitoringManagerImpl implements MonitoringManager { Map deviceIdsToAddOperation = new HashMap<>(); Map deviceIdsWithExistingOperation = new HashMap<>(); Map inactiveDeviceIds = new HashMap<>(); - Map deviceToMarkUnreachable = new HashMap<>(); + Map devicesToMarkUnreachable = new HashMap<>(); //Map firstTimeDeviceIdsWithPolicyIds = new HashMap<>(); List firstTimeDevices = new ArrayList<>(); @@ -281,18 +286,18 @@ public class MonitoringManagerImpl implements MonitoringManager { if (complianceData.getAttempts() == 0) { deviceIdsToAddOperation.put(complianceData.getDeviceId(), - deviceIds.get(complianceData.getDeviceId())); + deviceIds.get(complianceData.getDeviceId())); } else { deviceIdsWithExistingOperation.put(complianceData.getDeviceId(), - deviceIds.get(complianceData.getDeviceId())); + deviceIds.get(complianceData.getDeviceId())); if (complianceData.getAttempts() >= policyConfiguration.getMinRetriesToMarkUnreachable()) { - deviceToMarkUnreachable.put(complianceData.getDeviceId(), - deviceIds.get(complianceData.getDeviceId())); + devicesToMarkUnreachable.put(complianceData.getDeviceId(), + deviceIds.get(complianceData.getDeviceId())); } } if (complianceData.getAttempts() >= policyConfiguration.getMinRetriesToMarkInactive()) { inactiveDeviceIds.put(complianceData.getDeviceId(), - deviceIds.get(complianceData.getDeviceId())); + deviceIds.get(complianceData.getDeviceId())); } } } @@ -316,14 +321,14 @@ public class MonitoringManagerImpl implements MonitoringManager { log.debug("These devices are in the system for the first time"); for (PolicyDeviceWrapper wrapper : firstTimeDevices) { log.debug("First time device primary key : " + wrapper.getDeviceId() + " & policy id " + - wrapper.getPolicyId()); + wrapper.getPolicyId()); } } PolicyManagementDAOFactory.beginTransaction(); if (!deviceIdsToAddOperation.isEmpty()) { -// monitoringDAO.addComplianceDetails(firstTimeDeviceIdsWithPolicyIds); + // monitoringDAO.addComplianceDetails(firstTimeDeviceIdsWithPolicyIds); monitoringDAO.addComplianceDetails(firstTimeDevices); monitoringDAO.updateAttempts(new ArrayList<>(deviceIdsToAddOperation.keySet()), false); } @@ -356,11 +361,17 @@ public class MonitoringManagerImpl implements MonitoringManager { // TODO : This should be uncommented, this is to mark the device as unreachable, But given the current // implementation we are not able to do so. -// if(!deviceToMarkUnreachable.isEmpty()) { -// ComplianceDecisionPoint decisionPoint = new ComplianceDecisionPointImpl(); -// decisionPoint.setDevicesAsUnreachable(this.getDeviceIdentifiersFromDevices( -// new ArrayList<>(deviceToMarkUnreachable.values()))); -// } + if (!devicesToMarkUnreachable.isEmpty()) { + ComplianceDecisionPoint decisionPoint = new ComplianceDecisionPointImpl(); + decisionPoint.setDevicesAsUnreachable(this.getDeviceIdentifiersFromDevices( + new ArrayList<>(devicesToMarkUnreachable.values()))); + } + + if (!inactiveDeviceIds.isEmpty()) { + ComplianceDecisionPoint decisionPoint = new ComplianceDecisionPointImpl(); + decisionPoint.setDevicesAsInactive(this.getDeviceIdentifiersFromDevices( + new ArrayList<>(inactiveDeviceIds.values()))); + } } @@ -369,7 +380,8 @@ public class MonitoringManagerImpl implements MonitoringManager { List deviceTypes = new ArrayList<>(); try { - deviceTypes = PolicyManagementDataHolder.getInstance().getDeviceManagementService().getAvailableDeviceTypes(); + deviceTypes = + PolicyManagementDataHolder.getInstance().getDeviceManagementService().getAvailableDeviceTypes(); } catch (DeviceManagementException e) { throw new PolicyComplianceException("Error occurred while getting the device types.", e); } @@ -384,14 +396,14 @@ public class MonitoringManagerImpl implements MonitoringManager { monitoringOperation.setEnabled(true); monitoringOperation.setType(Operation.Type.COMMAND); monitoringOperation.setCode(OPERATION_MONITOR); -// CommandOperation infoOperation = new CommandOperation(); -// infoOperation.setEnabled(true); -// infoOperation.setType(Operation.Type.COMMAND);\\ -// infoOperation.setCode(OPERATION_INFO); -// CommandOperation appListOperation = new CommandOperation(); -// appListOperation.setEnabled(true); -// appListOperation.setType(Operation.Type.COMMAND); -// appListOperation.setCode(OPERATION_APP_LIST); + // CommandOperation infoOperation = new CommandOperation(); + // infoOperation.setEnabled(true); + // infoOperation.setType(Operation.Type.COMMAND);\\ + // infoOperation.setCode(OPERATION_INFO); + // CommandOperation appListOperation = new CommandOperation(); + // appListOperation.setEnabled(true); + // appListOperation.setType(Operation.Type.COMMAND); + // appListOperation.setCode(OPERATION_APP_LIST); //TODO: Fix this properly later adding device type to be passed in when the task manage executes "addOperations()" String type = null; @@ -400,8 +412,8 @@ public class MonitoringManagerImpl implements MonitoringManager { } DeviceManagementProviderService service = PolicyManagementDataHolder.getInstance().getDeviceManagementService(); service.addOperation(type, monitoringOperation, deviceIdentifiers); -// service.addOperation(infoOperation, deviceIdentifiers); -// service.addOperation(appListOperation, deviceIdentifiers); + // service.addOperation(infoOperation, deviceIdentifiers); + // service.addOperation(appListOperation, deviceIdentifiers); } private List getDeviceIdentifiersFromDevices(List devices) { diff --git a/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/main/java/org/wso2/carbon/policy/mgt/core/service/PolicyManagementService.java b/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/main/java/org/wso2/carbon/policy/mgt/core/service/PolicyManagementService.java deleted file mode 100644 index 5ed2bf0f65..0000000000 --- a/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/main/java/org/wso2/carbon/policy/mgt/core/service/PolicyManagementService.java +++ /dev/null @@ -1,146 +0,0 @@ -/* -* Copyright (c) 2015 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.policy.mgt.core.service; - -import org.wso2.carbon.device.mgt.common.DeviceIdentifier; -import org.wso2.carbon.device.mgt.common.Feature; -import org.wso2.carbon.policy.mgt.common.*; -import org.wso2.carbon.policy.mgt.common.monitor.ComplianceData; -import org.wso2.carbon.policy.mgt.common.monitor.ComplianceFeature; -import org.wso2.carbon.policy.mgt.common.monitor.PolicyComplianceException; -import org.wso2.carbon.policy.mgt.core.PolicyManagerService; -import org.wso2.carbon.policy.mgt.core.PolicyManagerServiceImpl; -import org.wso2.carbon.policy.mgt.core.task.TaskScheduleService; - -import java.util.List; - -public class PolicyManagementService implements PolicyManagerService { - - - PolicyManagerService policyManagerService; - - public PolicyManagementService() { - policyManagerService = new PolicyManagerServiceImpl(); - } - - - @Override - public Profile addProfile(Profile profile) throws PolicyManagementException { - return policyManagerService.addProfile(profile); - } - - @Override - public Profile updateProfile(Profile profile) throws PolicyManagementException { - return policyManagerService.updateProfile(profile); - } - - @Override - public Policy addPolicy(Policy policy) throws PolicyManagementException { - return policyManagerService.addPolicy(policy); - } - - @Override - public Policy updatePolicy(Policy policy) throws PolicyManagementException { - return policyManagerService.updatePolicy(policy); - } - - @Override - public boolean deletePolicy(Policy policy) throws PolicyManagementException { - return policyManagerService.deletePolicy(policy); - } - - @Override - public boolean deletePolicy(int policyId) throws PolicyManagementException { - return policyManagerService.deletePolicy(policyId); - } - - @Override - public Policy getEffectivePolicy(DeviceIdentifier deviceIdentifier) throws PolicyManagementException { - return policyManagerService.getEffectivePolicy(deviceIdentifier); - } - - @Override - public List getEffectiveFeatures(DeviceIdentifier deviceIdentifier) throws - FeatureManagementException { - return policyManagerService.getEffectiveFeatures(deviceIdentifier); - } - - @Override - public List getPolicies(String deviceType) throws PolicyManagementException { - return policyManagerService.getPolicies(deviceType); - } - - @Override - public List getFeatures() throws FeatureManagementException { - return policyManagerService.getFeatures(); - } - - @Override - public PolicyAdministratorPoint getPAP() throws PolicyManagementException { - return policyManagerService.getPAP(); - } - - @Override - public PolicyInformationPoint getPIP() throws PolicyManagementException { - return policyManagerService.getPIP(); - } - - @Override - public PolicyEvaluationPoint getPEP() throws PolicyManagementException { - return policyManagerService.getPEP(); - } - - @Override - public TaskScheduleService getTaskScheduleService() throws PolicyMonitoringTaskException { - return policyManagerService.getTaskScheduleService(); - } - - @Override - public int getPolicyCount() throws PolicyManagementException { - return policyManagerService.getPolicyCount(); - } - - @Override - public Policy getAppliedPolicyToDevice( - DeviceIdentifier deviceIdentifier) throws PolicyManagementException { - return policyManagerService.getAppliedPolicyToDevice(deviceIdentifier); - } - - @Override - public List checkPolicyCompliance(DeviceIdentifier deviceIdentifier, Object - deviceResponse) throws PolicyComplianceException { - return policyManagerService.checkPolicyCompliance(deviceIdentifier, deviceResponse); - } - - @Override - public boolean checkCompliance(DeviceIdentifier deviceIdentifier, Object response) throws - PolicyComplianceException { - return policyManagerService.checkCompliance(deviceIdentifier, response); - } - - @Override - public ComplianceData getDeviceCompliance(DeviceIdentifier deviceIdentifier) throws PolicyComplianceException { - return policyManagerService.getDeviceCompliance(deviceIdentifier); - } - - @Override - public boolean isCompliance(DeviceIdentifier deviceIdentifier) throws PolicyComplianceException { - return policyManagerService.isCompliance(deviceIdentifier); - } -} diff --git a/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/main/java/org/wso2/carbon/policy/mgt/core/task/MonitoringTask.java b/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/main/java/org/wso2/carbon/policy/mgt/core/task/MonitoringTask.java index d579cd746d..492e771acd 100644 --- a/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/main/java/org/wso2/carbon/policy/mgt/core/task/MonitoringTask.java +++ b/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/main/java/org/wso2/carbon/policy/mgt/core/task/MonitoringTask.java @@ -97,8 +97,7 @@ public class MonitoringTask implements Task { } for (Device device : devices) { EnrolmentInfo.Status status = device.getEnrolmentInfo().getStatus(); - if (status.equals(EnrolmentInfo.Status.INACTIVE) || - status.equals(EnrolmentInfo.Status.BLOCKED) || + if (status.equals(EnrolmentInfo.Status.BLOCKED) || status.equals(EnrolmentInfo.Status.REMOVED) || status.equals(EnrolmentInfo.Status.UNCLAIMED) || status.equals(EnrolmentInfo.Status.DISENROLLMENT_REQUESTED) || From 27a9eeb69212cb4c98431b32edd7a9c52f3cd6a1 Mon Sep 17 00:00:00 2001 From: harshanl Date: Fri, 23 Sep 2016 23:22:58 +0530 Subject: [PATCH 41/43] Removed unnecessary DM service --- .../DeviceManagementProviderService.java | 10 --- .../DeviceManagementProviderServiceImpl.java | 74 ------------------- 2 files changed, 84 deletions(-) diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/service/DeviceManagementProviderService.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/service/DeviceManagementProviderService.java index 2d3320e1c9..17732fea86 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/service/DeviceManagementProviderService.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/service/DeviceManagementProviderService.java @@ -44,16 +44,6 @@ public interface DeviceManagementProviderService { */ List getAllDevices(String deviceType) throws DeviceManagementException; - /** - * Method to retrieve all the devices of a given device type without other device information. - * - * @param deviceType Device-type of the required devices - * @return List of devices of given device-type. - * @throws DeviceManagementException If some unusual behaviour is observed while fetching the - * devices. - */ - List getAllDevicesWithoutInfo(String deviceType) throws DeviceManagementException; - /** * Method to retrieve all the devices registered in the system. * diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/service/DeviceManagementProviderServiceImpl.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/service/DeviceManagementProviderServiceImpl.java index b7f508cb22..dda2caf592 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/service/DeviceManagementProviderServiceImpl.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/service/DeviceManagementProviderServiceImpl.java @@ -713,80 +713,6 @@ public class DeviceManagementProviderServiceImpl implements DeviceManagementProv return devices; } - @Override - public List getAllDevicesWithoutInfo(String deviceType) throws DeviceManagementException { - List devices = new ArrayList<>(); - List allDevices; - try { - DeviceManagementDAOFactory.openConnection(); - allDevices = deviceDAO.getDevices(deviceType, this.getTenantId()); - if (allDevices == null) { - if (log.isDebugEnabled()) { - log.debug("No device is found upon the type '" + deviceType + "'"); - } - return null; - } - } catch (DeviceManagementDAOException e) { - throw new DeviceManagementException("Error occurred while retrieving all devices of type '" + - deviceType + "' that are being managed within the scope of current tenant", e); - } catch (SQLException e) { - throw new DeviceManagementException("Error occurred while opening a connection to the data source", e); - } finally { - DeviceManagementDAOFactory.closeConnection(); - } - - for (Device device : allDevices) { - DeviceInfo info = null; - try { - DeviceManagementDAOFactory.openConnection(); - info = deviceInfoDAO.getDeviceInformation(device.getId()); - DeviceLocation location = deviceInfoDAO.getDeviceLocation(device.getId()); - if (info != null) { - info.setLocation(location); - } - } catch (DeviceDetailsMgtDAOException e) { - log.error("Error occurred while retrieving advance info of '" + device.getType() + - "' that carries the id '" + device.getDeviceIdentifier() + "'"); - } catch (SQLException e) { - log.error("Error occurred while opening a connection to the data source", e); - } finally { - DeviceManagementDAOFactory.closeConnection(); - } - device.setDeviceInfo(info); - - try { - DeviceManagementDAOFactory.openConnection(); - List applications = applicationDAO.getInstalledApplications(device.getId()); - device.setApplications(applications); - } catch (DeviceManagementDAOException e) { - log.error("Error occurred while retrieving the application list of '" + device.getType() + "', " + - "which carries the id '" + device.getId() + "'", e); - } catch (SQLException e) { - log.error("Error occurred while opening a connection to the data source", e); - } finally { - DeviceManagementDAOFactory.closeConnection(); - } - - DeviceManager deviceManager = this.getDeviceManager(deviceType); - if (deviceManager == null) { - if (log.isDebugEnabled()) { - log.debug("Device Manager associated with the device type '" + deviceType + "' is null. " + - "Therefore, not attempting method 'isEnrolled'"); - } - devices.add(device); - continue; - } - Device dmsDevice = - deviceManager.getDevice(new DeviceIdentifier(device.getDeviceIdentifier(), device.getType())); - if (dmsDevice != null) { - device.setFeatures(dmsDevice.getFeatures()); - device.setProperties(dmsDevice.getProperties()); - } - devices.add(device); - } - return devices; - } - @Override public void sendEnrolmentInvitation(EmailMetaInfo metaInfo) throws DeviceManagementException { Map, Object>> params = new HashMap<>(); From 1a12838b7cf893283fc2b5ebbda65faf9efec175 Mon Sep 17 00:00:00 2001 From: harshanl Date: Mon, 26 Sep 2016 17:16:27 +0530 Subject: [PATCH 42/43] Fixed issue in NotificationDAO due to invalid column name --- .../mgt/dao/impl/AbstractNotificationDAOImpl.java | 8 ++++---- .../notification/mgt/dao/util/NotificationDAOUtil.java | 9 +++++++++ 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/notification/mgt/dao/impl/AbstractNotificationDAOImpl.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/notification/mgt/dao/impl/AbstractNotificationDAOImpl.java index abe94ea4b9..bf80177509 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/notification/mgt/dao/impl/AbstractNotificationDAOImpl.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/notification/mgt/dao/impl/AbstractNotificationDAOImpl.java @@ -75,8 +75,8 @@ public abstract class AbstractNotificationDAOImpl implements NotificationDAO { try { conn = NotificationManagementDAOFactory.getConnection(); String sql = - "SELECT NOTIFICATION_ID, OPERATION_ID, DESCRIPTION, STATUS, DEVICE_IDENTIFICATION, DEVICE_NAME, " + - "DEVICE TYPE FROM DM_NOTIFICATION WHERE TENANT_ID = ? AND NOTIFICATION_ID = ?"; + "SELECT NOTIFICATION_ID, OPERATION_ID, DESCRIPTION, STATUS FROM DM_NOTIFICATION WHERE " + + "TENANT_ID = ? AND NOTIFICATION_ID = ?"; stmt = conn.prepareStatement(sql); stmt.setInt(1, tenantId); stmt.setInt(2, notificationId); @@ -161,7 +161,7 @@ public abstract class AbstractNotificationDAOImpl implements NotificationDAO { rs = stmt.executeQuery(); notifications = new ArrayList<>(); while (rs.next()) { - notifications.add(NotificationDAOUtil.getNotification(rs)); + notifications.add(NotificationDAOUtil.getNotificationWithDeviceInfo(rs)); } } catch (SQLException e) { throw new NotificationManagementException( @@ -234,7 +234,7 @@ public abstract class AbstractNotificationDAOImpl implements NotificationDAO { rs = stmt.executeQuery(); notifications = new ArrayList<>(); while (rs.next()) { - notifications.add(NotificationDAOUtil.getNotification(rs)); + notifications.add(NotificationDAOUtil.getNotificationWithDeviceInfo(rs)); } } catch (SQLException e) { throw new NotificationManagementException( diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/notification/mgt/dao/util/NotificationDAOUtil.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/notification/mgt/dao/util/NotificationDAOUtil.java index abfddf13ee..68519f0742 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/notification/mgt/dao/util/NotificationDAOUtil.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/notification/mgt/dao/util/NotificationDAOUtil.java @@ -126,6 +126,15 @@ public class NotificationDAOUtil { } public static Notification getNotification(ResultSet rs) throws SQLException { + Notification notification = new Notification(); + notification.setNotificationId(rs.getInt("NOTIFICATION_ID")); + notification.setOperationId(rs.getInt("OPERATION_ID")); + notification.setDescription(rs.getString("DESCRIPTION")); + notification.setStatus(rs.getString("STATUS")); + return notification; + } + + public static Notification getNotificationWithDeviceInfo(ResultSet rs) throws SQLException { Notification notification = new Notification(); notification.setNotificationId(rs.getInt("NOTIFICATION_ID")); notification.setOperationId(rs.getInt("OPERATION_ID")); From 378dd4084ccb0b1b0c3dc31675435fb95f0aac45 Mon Sep 17 00:00:00 2001 From: dilanua Date: Mon, 26 Sep 2016 17:27:57 +0530 Subject: [PATCH 43/43] FIX for JIRAS: https://wso2.org/jira/browse/EMM-1591,EMM-1590,EMM-1585 --- .../dataTables.extended.serversidepaging.js | 26 +++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.data-tables-extended/public/js/dataTables.extended.serversidepaging.js b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.data-tables-extended/public/js/dataTables.extended.serversidepaging.js index 3b2fddb195..9ca860900b 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.data-tables-extended/public/js/dataTables.extended.serversidepaging.js +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.data-tables-extended/public/js/dataTables.extended.serversidepaging.js @@ -37,6 +37,10 @@ $.fn.datatables_extended_serverside_paging = function (settings , url, dataFilte if (InitiateViewOption) { $(".viewEnabledIcon").bind("click", InitiateViewOption); } + + var deviceType; + var ownership; + //--- End of EMM related codes $(elem).DataTable( @@ -108,14 +112,32 @@ $.fn.datatables_extended_serverside_paging = function (settings , url, dataFilte .draw(); if (filterColumn.eq(column.index()).hasClass('data-platform')) { - if (!val) { + deviceType = val; + if (!deviceType || !ownership) { $("#operation-bar").addClass("hidden"); $("#operation-guide").removeClass("hidden"); } else { $("#operation-guide").addClass("hidden"); $("#operation-bar").removeClass("hidden"); //noinspection JSUnresolvedFunction - loadOperationBar(val); + if (deviceType && ownership) { + loadOperationBar(deviceType, ownership); + } + } + } + + if (filterColumn.eq(column.index()).hasClass('data-ownership')) { + ownership = val; + if (!deviceType || !ownership) { + $("#operation-bar").addClass("hidden"); + $("#operation-guide").removeClass("hidden"); + } else { + $("#operation-guide").addClass("hidden"); + $("#operation-bar").removeClass("hidden"); + //noinspection JSUnresolvedFunction + if (deviceType && ownership) { + loadOperationBar(deviceType, ownership); + } } } });