From f5609cc8ff1128ea556e15ac56237cb348c44b92 Mon Sep 17 00:00:00 2001 From: mharindu Date: Thu, 11 Aug 2016 12:19:05 +0530 Subject: [PATCH 01/10] 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 304cab7df0f..51be025f2b0 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 b52d94b657a..76e2dba4169 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 8e483bd1a44..d43c86297f4 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 81629eedb5a..8a44108ee8e 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 daddc132a19..a0bc1141e84 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 e3b11d02f7d..25c06c75e52 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/10] Fixed dependancy issues --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 25c06c75e52..33bd3c298a3 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/10] 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 dac73f5d5d9..78df37ab156 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 4a655258847..148edc58adb 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 2f9fc8e22c3..98b7a21f9fa 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 63bd2d2f60f..dfcc05626e4 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 9e7acda1172..273e20db16c 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 a83993ecbaa..c771e8dfb43 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 ce3b8ff4e99..5c82dcda6b7 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 f0a11ad25dc..9fb75098262 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 c1cbcc16e75..0bc04e6e61f 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 2dd8956a533..258aa3c22ba 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 41b4aed9d92..a18c5d6230d 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 5889dfd1757..a4cf0a904dc 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 df22278f3a9..015d1d904fe 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 cdbb0943e9d..199e42c8c99 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 6ea9448acab..b96be157f92 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 fbee9b266ba..25a6b1ce289 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 3cd0fd48c0e..d4e7351a7f7 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 81e2544311f..40a092c9ad4 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 02734f4d693..dfde8f0c3c8 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 313584066d8..7f5b87a1afc 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 0b9c1c73055..747024fef56 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/10] 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 b8deaa601e3..a0eeea3e1e2 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 78df37ab156..3679e3eed03 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 c71a0cba5b7..02200f1c763 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 289037e58ed..3e46d4182f8 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 7a3e7e0eba5..c0b5483a3c3 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 f946fc0b516..304a441d10e 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 148edc58adb..6002517cef0 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 e552a3f4670..58435dcef64 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 bf10cd4e5ec..cc905f6e9e8 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 c2648cc861c..f4e5494a30f 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 273e20db16c..9d0be0f5b18 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 360bbbc5d85..85072c4890f 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 5c82dcda6b7..603587d641d 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 03a96ea520a..cb53d964516 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 3a404f6353a..07f1fb08409 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 4f312273e3b..46f19d988f0 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 ac9cb5fb037..ecb84b40feb 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 ebbe891c31a..49e4ab1392a 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 a4cf0a904dc..ca68d94e965 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 45636100814..42c5678321c 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 9b70beb9e5f..9fd24d903d8 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 015d1d904fe..bc3a58a3a67 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 199e42c8c99..6b2b254dfb4 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 872f5652f23..38618c68849 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 7f5b87a1afc..2076c6b383d 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 747024fef56..041b2344163 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 099ffd6a74b70a5a269f6f5ff772db68b4e92963 Mon Sep 17 00:00:00 2001 From: Ace Date: Tue, 20 Sep 2016 10:38:39 +0530 Subject: [PATCH 05/10] 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 dcc2873242f..d0342b2881c 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 81c7e06b5a4..044bd2f9237 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 896c5ac634c..f764fb3da44 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 0469443014f..02aab90e581 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 87ad1e0e71a75638d9532146168b7bff95af6fad Mon Sep 17 00:00:00 2001 From: Ace Date: Tue, 20 Sep 2016 12:07:14 +0530 Subject: [PATCH 06/10] 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 ca6c3f3342d..0b35cfbf7db 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 0e9682bb860..96422382cfe 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 5f90587564d1a3f006c5047cc58f5de883b46aa3 Mon Sep 17 00:00:00 2001 From: Ace Date: Tue, 20 Sep 2016 18:13:53 +0530 Subject: [PATCH 07/10] 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 7fd3679c504..5e0f4331446 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 06ae1c875f0..943634f1c57 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 02aab90e581..112f7159796 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 9548bdc2639cc70a5262155ed24c93661b933003 Mon Sep 17 00:00:00 2001 From: Ace Date: Wed, 21 Sep 2016 12:56:40 +0530 Subject: [PATCH 08/10] 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 5e0f4331446..2850739cb68 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 77bd3321ff7..b420ccf25b2 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 112f7159796..f1de16ce9c6 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 f4d6eb6898f1c0ed2ee27738980c44640766caa8 Mon Sep 17 00:00:00 2001 From: Ace Date: Thu, 22 Sep 2016 08:24:58 +0530 Subject: [PATCH 09/10] 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 2850739cb68..17a217ed571 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 82582e1b403..80198c95609 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 98b7a21f9fa..00000000000 --- 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 b420ccf25b2..9082e9cc117 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 f1de16ce9c6..8512d92c6a5 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 6aad76eff1d28f951c8d5e5422a03106438347c4 Mon Sep 17 00:00:00 2001 From: Ace Date: Fri, 23 Sep 2016 11:24:49 +0530 Subject: [PATCH 10/10] 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 c21ead60d25..c1ee115741c 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 40a7491b426..ba1fec5a241 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