diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/app/mgt/ApplicationManager.java b/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/app/mgt/ApplicationManager.java index a341768d17f..bf660566f82 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/app/mgt/ApplicationManager.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/app/mgt/ApplicationManager.java @@ -66,8 +66,12 @@ public interface ApplicationManager { throws ApplicationManagementException; - void installApplication(Operation operation, List deviceIdentifiers) + void installApplicationForDevices(Operation operation, List deviceIdentifiers) throws ApplicationManagementException; + void installApplicationForUsers(Operation operation, List userNameList) + throws ApplicationManagementException; + void installApplicationForUserRoles(Operation operation, List userRoleList) + throws ApplicationManagementException; } diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/spi/DeviceManagementService.java b/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/spi/DeviceManagementService.java index 053de06aed1..bf2e44f3d83 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/spi/DeviceManagementService.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/spi/DeviceManagementService.java @@ -18,9 +18,13 @@ */ package org.wso2.carbon.device.mgt.common.spi; +import org.wso2.carbon.device.mgt.common.DeviceIdentifier; import org.wso2.carbon.device.mgt.common.DeviceManagementException; import org.wso2.carbon.device.mgt.common.DeviceManager; import org.wso2.carbon.device.mgt.common.app.mgt.ApplicationManager; +import org.wso2.carbon.device.mgt.common.operation.mgt.Operation; + +import java.util.List; /** * Composite interface that acts as the SPI exposing all device management as well as application management @@ -41,4 +45,6 @@ public interface DeviceManagementService extends ApplicationManager { ApplicationManager getApplicationManager(); + void notifyOperationToDevices(Operation operation, List deviceIds) throws DeviceManagementException; + } diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/app/mgt/ApplicationManagementProviderService.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/app/mgt/ApplicationManagementProviderService.java index e13f0cbfbf5..0ea859a1406 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/app/mgt/ApplicationManagementProviderService.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/app/mgt/ApplicationManagementProviderService.java @@ -22,7 +22,7 @@ import org.wso2.carbon.device.mgt.common.app.mgt.ApplicationManager; import java.util.List; -public interface ApplicationManagementProviderService extends ApplicationManager { +public interface ApplicationManagementProviderService extends ApplicationManager{ void updateApplicationListInstalledInDevice(DeviceIdentifier deviceIdentifier, List applications) throws ApplicationManagementException; 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 e89563622e5..f0a11ad25dc 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 @@ -24,14 +24,8 @@ import org.wso2.carbon.device.mgt.core.app.mgt.config.AppManagementConfig; public class ApplicationManagerFactory { - private static DeviceManagementPluginRepository pluginRepository = new DeviceManagementPluginRepository(); - - public DeviceManagementPluginRepository getPluginRepository() { - return pluginRepository; - } - public static ApplicationManager getConnector(AppManagementConfig config) { - return new ApplicationManagerProviderServiceImpl(config, pluginRepository); + return new ApplicationManagerProviderServiceImpl(config); } } 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 ea0ce55365d..c0a8318af1a 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 @@ -31,6 +31,7 @@ import org.wso2.carbon.device.mgt.common.TransactionManagementException; import org.wso2.carbon.device.mgt.common.app.mgt.Application; import org.wso2.carbon.device.mgt.common.app.mgt.ApplicationManagementException; 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.common.spi.DeviceManagementService; import org.wso2.carbon.device.mgt.core.DeviceManagementConstants; import org.wso2.carbon.device.mgt.core.DeviceManagementPluginRepository; @@ -39,6 +40,7 @@ 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.device.mgt.core.internal.PluginInitializationListener; import org.wso2.carbon.identity.oauth.stub.OAuthAdminServiceException; import org.wso2.carbon.identity.oauth.stub.OAuthAdminServiceStub; @@ -52,13 +54,11 @@ import java.util.List; /** * Implements Application Manager interface */ -public class ApplicationManagerProviderServiceImpl implements ApplicationManagementProviderService, - PluginInitializationListener { +public class ApplicationManagerProviderServiceImpl implements ApplicationManagementProviderService { private ConfigurationContext configCtx; private ServiceAuthenticator authenticator; private String oAuthAdminServiceUrl; - private DeviceManagementPluginRepository pluginRepository; private DeviceDAO deviceDAO; private ApplicationDAO applicationDAO; private ApplicationMappingDAO applicationMappingDAO; @@ -66,8 +66,7 @@ public class ApplicationManagerProviderServiceImpl implements ApplicationManagem private static final String GET_APP_LIST_URL = "store/apis/assets/mobileapp?domain=carbon.super&page=1"; private static final Log log = LogFactory.getLog(ApplicationManagerProviderServiceImpl.class); - public ApplicationManagerProviderServiceImpl(AppManagementConfig appManagementConfig, - DeviceManagementPluginRepository pluginRepository) { + public ApplicationManagerProviderServiceImpl(AppManagementConfig appManagementConfig) { IdentityConfigurations identityConfig = DeviceConfigurationManager.getInstance().getDeviceManagementConfig(). getDeviceManagementConfigRepository().getIdentityConfigurations(); @@ -81,14 +80,12 @@ public class ApplicationManagerProviderServiceImpl implements ApplicationManagem throw new IllegalArgumentException("Error occurred while initializing Axis2 Configuration Context. " + "Please check if an appropriate axis2.xml is provided", e); } - this.pluginRepository = pluginRepository; this.deviceDAO = DeviceManagementDAOFactory.getDeviceDAO(); this.applicationDAO = DeviceManagementDAOFactory.getApplicationDAO(); this.applicationMappingDAO = DeviceManagementDAOFactory.getApplicationMappingDAO(); } - ApplicationManagerProviderServiceImpl(DeviceManagementPluginRepository pluginRepository) { - this.pluginRepository = pluginRepository; + ApplicationManagerProviderServiceImpl() { this.deviceDAO = DeviceManagementDAOFactory.getDeviceDAO(); this.applicationDAO = DeviceManagementDAOFactory.getApplicationDAO(); this.applicationMappingDAO = DeviceManagementDAOFactory.getApplicationMappingDAO(); @@ -102,24 +99,111 @@ public class ApplicationManagerProviderServiceImpl implements ApplicationManagem @Override public void updateApplicationStatus(DeviceIdentifier deviceId, Application application, - String status) throws ApplicationManagementException { + String status) throws ApplicationManagementException { } @Override public String getApplicationStatus(DeviceIdentifier deviceId, - Application application) throws ApplicationManagementException { + Application application) throws ApplicationManagementException { return null; } @Override - public void installApplication(Operation operation, List deviceIds) + public void installApplicationForDevices(Operation operation, List deviceIds) throws ApplicationManagementException { - for (DeviceIdentifier deviceId : deviceIds) { - DeviceManagementService dms = - this.getPluginRepository().getDeviceManagementService(deviceId.getType()); - dms.installApplication(operation, deviceIds); + try { + DeviceManagementDataHolder.getInstance().getDeviceManagementProvider().addOperation(operation, deviceIds); + DeviceManagementDataHolder.getInstance().getDeviceManagementProvider().notifyOperationToDevices + (operation, deviceIds); + } catch (OperationManagementException opeEx) { + String errorMsg = "Error in add operation at app installation:" + opeEx.getErrorMessage(); + log.error(errorMsg, opeEx); + throw new ApplicationManagementException(errorMsg, opeEx); + }catch (DeviceManagementException deviceEx){ + String errorMsg = "Error in notify operation at app installation:" + deviceEx.getErrorMessage(); + log.error(errorMsg, deviceEx); + throw new ApplicationManagementException(errorMsg, deviceEx); + } + } + + @Override + public void installApplicationForUsers(Operation operation, List userNameList) + throws ApplicationManagementException { + + String userName = null; + try { + List deviceList; + List deviceIdentifierList = new ArrayList<>(); + DeviceIdentifier deviceIdentifier; + + + + for (String user : userNameList) { + userName = user; + deviceList = DeviceManagementDataHolder.getInstance().getDeviceManagementProvider().getDevicesOfUser + (user); + for (Device device : deviceList) { + deviceIdentifier = new DeviceIdentifier(); + deviceIdentifier.setId(Integer.toString(device.getId())); + deviceIdentifier.setType(device.getType()); + + deviceIdentifierList.add(deviceIdentifier); + } + } + DeviceManagementDataHolder.getInstance().getDeviceManagementProvider() + .addOperation(operation, deviceIdentifierList); + + } catch (DeviceManagementException devEx) { + String errorMsg = "Error in get devices for user: "+userName+ " in app installation:" + devEx.getErrorMessage(); + log.error(errorMsg, devEx); + throw new ApplicationManagementException(errorMsg, devEx); + + } catch (OperationManagementException opeEx) { + String errorMsg = "Error in add operation at app installation:" + opeEx.getErrorMessage(); + log.error(errorMsg, opeEx); + throw new ApplicationManagementException(errorMsg, opeEx); + + } + } + + @Override + public void installApplicationForUserRoles(Operation operation, List userRoleList) + throws ApplicationManagementException { + + String userRole = null; + try { + List deviceList; + List deviceIdentifierList = new ArrayList<>(); + DeviceIdentifier deviceIdentifier; + + for (String role : userRoleList) { + userRole = role; + deviceList = DeviceManagementDataHolder.getInstance().getDeviceManagementProvider() + .getAllDevicesOfRole(userRole); + for (Device device : deviceList) { + deviceIdentifier = new DeviceIdentifier(); + deviceIdentifier.setId(Integer.toString(device.getId())); + deviceIdentifier.setType(device.getType()); + + deviceIdentifierList.add(deviceIdentifier); + } + } + DeviceManagementDataHolder.getInstance().getDeviceManagementProvider() + .addOperation(operation, deviceIdentifierList); + + } catch (DeviceManagementException devEx) { + String errorMsg = "Error in get devices for user role "+userRole+ " in app installation:" + + devEx.getErrorMessage(); + log.error(errorMsg, devEx); + throw new ApplicationManagementException(errorMsg, devEx); + + } catch (OperationManagementException opeEx) { + String errorMsg = "Error in add operation at app installation:" + opeEx.getErrorMessage(); + log.error(errorMsg, opeEx); + throw new ApplicationManagementException(errorMsg, opeEx); + } } @@ -167,10 +251,6 @@ public class ApplicationManagerProviderServiceImpl implements ApplicationManagem throw new ApplicationManagementException(msg, e); } - public DeviceManagementPluginRepository getPluginRepository() { - return pluginRepository; - } - @Override public void updateApplicationListInstalledInDevice( DeviceIdentifier deviceIdentifier, List applications) throws ApplicationManagementException { @@ -256,24 +336,4 @@ public class ApplicationManagerProviderServiceImpl implements ApplicationManagem } } - @Override - public void registerDeviceManagementService(DeviceManagementService deviceManagementService) { - try { - pluginRepository.addDeviceManagementProvider(deviceManagementService); - } catch (DeviceManagementException e) { - log.error("Error occurred while registering device management plugin '" + - deviceManagementService.getType() + "'", e); - } - } - - @Override - public void unregisterDeviceManagementService(DeviceManagementService deviceManagementService) { - try { - pluginRepository.removeDeviceManagementProvider(deviceManagementService); - } catch (DeviceManagementException e) { - log.error("Error occurred while un-registering device management plugin '" + - deviceManagementService.getType() + "'", e); - } - } - } diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/app/mgt/config/AppManagementConfigurationManager.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/app/mgt/config/AppManagementConfigurationManager.java index 4fd12ca2dad..7ec4dc69a24 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/app/mgt/config/AppManagementConfigurationManager.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/app/mgt/config/AppManagementConfigurationManager.java @@ -32,7 +32,7 @@ public class AppManagementConfigurationManager { private AppManagementConfig appManagementConfig; private static AppManagementConfigurationManager appManagementConfigManager; - private static final String APP_MANAGER_CONFIG_FILE = "app-management-config.xml"; + private static final String APP_MANAGER_CONFIG_FILE = "remote-appmanager-config.xml"; private static final String APP_MANAGER_CONFIG_PATH = CarbonUtils.getEtcCarbonConfigDirPath() + File.separator + APP_MANAGER_CONFIG_FILE; diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/authorization/DeviceAccessAuthorizationServiceImpl.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/authorization/DeviceAccessAuthorizationServiceImpl.java index 47f1a8024e9..857f0f63e94 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/authorization/DeviceAccessAuthorizationServiceImpl.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/authorization/DeviceAccessAuthorizationServiceImpl.java @@ -31,6 +31,7 @@ import org.wso2.carbon.device.mgt.core.internal.DeviceManagementDataHolder; import org.wso2.carbon.device.mgt.core.permission.mgt.PermissionUtils; import org.wso2.carbon.user.api.UserRealm; import org.wso2.carbon.user.api.UserStoreException; +import org.wso2.carbon.user.api.UserStoreManager; import java.util.HashMap; import java.util.List; @@ -215,7 +216,7 @@ public class DeviceAccessAuthorizationServiceImpl implements DeviceAccessAuthori UserRealm userRealm = DeviceManagementDataHolder.getInstance().getRealmService().getTenantUserRealm(tenantId); if (userRealm != null && userRealm.getAuthorizationManager() != null) { return userRealm.getAuthorizationManager() - .isUserAuthorized(username, PermissionUtils.getAbsolutePermissionPath(EMM_ADMIN_PERMISSION), + .isUserAuthorized(removeTenantDomain(username), PermissionUtils.getAbsolutePermissionPath(EMM_ADMIN_PERMISSION), PermissionMethod.UI_EXECUTE); } return false; @@ -224,15 +225,19 @@ public class DeviceAccessAuthorizationServiceImpl implements DeviceAccessAuthori private String getUserName() { String username = CarbonContext.getThreadLocalCarbonContext().getUsername(); if (username != null && !username.isEmpty()) { - String tenantDomain = CarbonContext.getThreadLocalCarbonContext().getTenantDomain(); - if (username.endsWith(tenantDomain)) { - return username.substring(0, username.lastIndexOf("@")); - } - return username; + return removeTenantDomain(username); } return null; } + private String removeTenantDomain(String username) { + String tenantDomain = CarbonContext.getThreadLocalCarbonContext().getTenantDomain(); + if (username.endsWith(tenantDomain)) { + return username.substring(0, username.lastIndexOf("@")); + } + return username; + } + private int getTenantId() { return CarbonContext.getThreadLocalCarbonContext().getTenantId(); } 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 646ca8b7965..89cbf660cb1 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 @@ -101,12 +101,12 @@ import java.util.List; public class DeviceManagementServiceComponent { private static Log log = LogFactory.getLog(DeviceManagementServiceComponent.class); - private DeviceManagementPluginRepository pluginRepository = new DeviceManagementPluginRepository(); private static final Object LOCK = new Object(); private static List listeners = new ArrayList<>(); private static List deviceManagers = new ArrayList<>(); private static List startupListeners = new ArrayList<>(); + private DeviceManagementPluginRepository pluginRepository = new DeviceManagementPluginRepository(); @SuppressWarnings("unused") protected void activate(ComponentContext componentContext) { @@ -208,7 +208,7 @@ public class DeviceManagementServiceComponent { AppManagementConfig appConfig = AppManagementConfigurationManager.getInstance().getAppManagementConfig(); bundleContext.registerService(ApplicationManagementProviderService.class.getName(), - new ApplicationManagerProviderServiceImpl(appConfig, pluginRepository), null); + new ApplicationManagerProviderServiceImpl(appConfig), null); } catch (ApplicationManagementException e) { log.error("Application management service not registered.", e); } @@ -309,10 +309,6 @@ public class DeviceManagementServiceComponent { DeviceManagementDataHolder.getInstance().setRegistryService(null); } - private DeviceManagementPluginRepository getPluginRepository() { - return pluginRepository; - } - protected void setAPIManagerConfigurationService(APIManagerConfigurationService service) { //do nothing } 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 3238fcdb322..58cb057153c 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 @@ -28,6 +28,7 @@ import org.wso2.carbon.device.mgt.common.authorization.DeviceAccessAuthorization 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.common.operation.mgt.OperationManager; +import org.wso2.carbon.device.mgt.common.spi.DeviceManagementService; import org.wso2.carbon.device.mgt.core.DeviceManagementConstants; import org.wso2.carbon.device.mgt.core.dao.DeviceDAO; import org.wso2.carbon.device.mgt.core.dao.DeviceManagementDAOException; 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/CommandOperationDAOImpl.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/operation/mgt/dao/impl/CommandOperationDAOImpl.java index e5663b38445..8fdd35591a7 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/operation/mgt/dao/impl/CommandOperationDAOImpl.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/operation/mgt/dao/impl/CommandOperationDAOImpl.java @@ -134,7 +134,8 @@ public class CommandOperationDAOImpl extends OperationDAOImpl { while (rs.next()) { commandOperation = new CommandOperation(); commandOperation.setId(rs.getInt("ID")); - commandOperation.setEnabled(rs.getInt("ENABLED") != 0); + //commandOperation.setEnabled(rs.getInt("ENABLED") != 0); + commandOperation.setEnabled(rs.getBoolean("ENABLED") != false); commandOperation.setStatus(Operation.Status.valueOf(rs.getString("STATUS"))); commandOperation.setType(Operation.Type.valueOf(rs.getString("TYPE"))); commandOperation.setCreatedTimeStamp(rs.getString("CREATED_TIMESTAMP")); 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 5592be55b27..4ab5651cffd 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,6 +23,7 @@ import org.wso2.carbon.device.mgt.common.app.mgt.Application; import org.wso2.carbon.device.mgt.common.configuration.mgt.TenantConfiguration; import org.wso2.carbon.device.mgt.common.license.mgt.License; import org.wso2.carbon.device.mgt.common.license.mgt.LicenseManager; +import org.wso2.carbon.device.mgt.common.operation.mgt.Operation; import org.wso2.carbon.device.mgt.common.operation.mgt.OperationManager; import org.wso2.carbon.device.mgt.core.dto.DeviceType; @@ -161,6 +162,6 @@ public interface DeviceManagementProviderService extends OperationManager { boolean setStatus(DeviceIdentifier deviceId, String currentOwner, EnrolmentInfo.Status status) throws DeviceManagementException; - + void notifyOperationToDevices(Operation operation, List deviceIds)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 6a49235aef3..5e211a48848 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 @@ -21,6 +21,7 @@ import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.wso2.carbon.context.CarbonContext; import org.wso2.carbon.device.mgt.common.*; +import org.wso2.carbon.device.mgt.common.app.mgt.ApplicationManagementException; import org.wso2.carbon.device.mgt.common.configuration.mgt.TenantConfiguration; import org.wso2.carbon.device.mgt.common.license.mgt.License; import org.wso2.carbon.device.mgt.common.license.mgt.LicenseManagementException; @@ -792,6 +793,24 @@ public class DeviceManagementProviderServiceImpl implements DeviceManagementProv } } + @Override + public void notifyOperationToDevices(Operation operation, List deviceIds) + throws DeviceManagementException { + + try { + for (DeviceIdentifier deviceId : deviceIds) { + DeviceManagementService dms = + getPluginRepository().getDeviceManagementService(deviceId.getType()); + dms.notifyOperationToDevices(operation, deviceIds); + } + } catch (DeviceManagementException deviceMgtEx) { + String errorMsg = "Error in notify operations to plugins for app installation:" + deviceMgtEx.getErrorMessage(); + log.error(errorMsg, deviceMgtEx); + throw new DeviceManagementException(errorMsg, deviceMgtEx); + } + + } + @Override public License getLicense(String deviceType, String languageCode) throws DeviceManagementException { DeviceManager deviceManager = this.getDeviceManager(deviceType); diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/java/org/wso2/carbon/device/mgt/core/TestDeviceManagementService.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/java/org/wso2/carbon/device/mgt/core/TestDeviceManagementService.java index 0c3386fddf1..63128cbbdda 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/java/org/wso2/carbon/device/mgt/core/TestDeviceManagementService.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/java/org/wso2/carbon/device/mgt/core/TestDeviceManagementService.java @@ -58,6 +58,12 @@ public class TestDeviceManagementService implements DeviceManagementService { return null; } + @Override + public void notifyOperationToDevices(Operation operation, List deviceIds) + throws DeviceManagementException { + + } + @Override public Application[] getApplications(String domain, int pageNumber, int size) throws ApplicationManagementException { @@ -77,7 +83,19 @@ public class TestDeviceManagementService implements DeviceManagementService { } @Override - public void installApplication(Operation operation, List deviceIdentifiers) + public void installApplicationForDevices(Operation operation, List deviceIdentifiers) + throws ApplicationManagementException { + + } + + @Override + public void installApplicationForUsers(Operation operation, List userNameList) + throws ApplicationManagementException { + + } + + @Override + public void installApplicationForUserRoles(Operation operation, List userRoleList) throws ApplicationManagementException { } diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/java/org/wso2/carbon/device/mgt/core/app/mgt/ApplicationManagementProviderServiceTest.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/java/org/wso2/carbon/device/mgt/core/app/mgt/ApplicationManagementProviderServiceTest.java index c5b69b3a176..b98745f8a2e 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/java/org/wso2/carbon/device/mgt/core/app/mgt/ApplicationManagementProviderServiceTest.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/java/org/wso2/carbon/device/mgt/core/app/mgt/ApplicationManagementProviderServiceTest.java @@ -83,7 +83,7 @@ public class ApplicationManagementProviderServiceTest { deviceId.setType(device.getType()); AppManagementConfig appManagementConfig = new AppManagementConfig(); - appMgtProvider = new ApplicationManagerProviderServiceImpl(deviceManagementPluginRepository); + appMgtProvider = new ApplicationManagerProviderServiceImpl(); try { appMgtProvider.updateApplicationListInstalledInDevice(deviceId, applications); diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/resources/config/malformed-app-management-config-no-client-key-secret.xml b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/resources/config/malformed-app-management-config-no-client-key-secret.xml index ef7a146cdd1..44b57d20d18 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/resources/config/malformed-app-management-config-no-client-key-secret.xml +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/resources/config/malformed-app-management-config-no-client-key-secret.xml @@ -17,7 +17,7 @@ ~ under the License. --> - - true - http:/www.google.com - + + true + http:/www.google.com + diff --git a/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/main/java/org/wso2/carbon/policy/mgt/core/dao/FeatureDAO.java b/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/main/java/org/wso2/carbon/policy/mgt/core/dao/FeatureDAO.java index 3b8ecec20c0..b299fdd1210 100644 --- a/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/main/java/org/wso2/carbon/policy/mgt/core/dao/FeatureDAO.java +++ b/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/main/java/org/wso2/carbon/policy/mgt/core/dao/FeatureDAO.java @@ -123,4 +123,6 @@ public interface FeatureDAO { */ boolean deleteFeaturesOfProfile(int profileId) throws FeatureManagerDAOException; + boolean deleteProfileFeatures(int featureId) throws FeatureManagerDAOException; + } diff --git a/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/main/java/org/wso2/carbon/policy/mgt/core/dao/impl/FeatureDAOImpl.java b/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/main/java/org/wso2/carbon/policy/mgt/core/dao/impl/FeatureDAOImpl.java index 0af516ac70a..196001c041d 100644 --- a/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/main/java/org/wso2/carbon/policy/mgt/core/dao/impl/FeatureDAOImpl.java +++ b/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/main/java/org/wso2/carbon/policy/mgt/core/dao/impl/FeatureDAOImpl.java @@ -20,7 +20,6 @@ package org.wso2.carbon.policy.mgt.core.dao.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.Feature; import org.wso2.carbon.policy.mgt.common.Profile; @@ -28,14 +27,16 @@ import org.wso2.carbon.policy.mgt.common.ProfileFeature; import org.wso2.carbon.policy.mgt.core.dao.FeatureDAO; import org.wso2.carbon.policy.mgt.core.dao.FeatureManagerDAOException; import org.wso2.carbon.policy.mgt.core.dao.PolicyManagementDAOFactory; -import org.wso2.carbon.policy.mgt.core.dao.PolicyManagerDAOException; import org.wso2.carbon.policy.mgt.core.dao.util.PolicyManagementDAOUtil; import org.wso2.carbon.policy.mgt.core.util.PolicyManagerUtil; import java.io.ByteArrayInputStream; import java.io.IOException; import java.io.ObjectInputStream; -import java.sql.*; +import java.sql.Connection; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; import java.util.ArrayList; import java.util.List; @@ -177,6 +178,29 @@ public class FeatureDAOImpl implements FeatureDAO { } } + + @Override + public boolean deleteProfileFeatures(int featureId) throws FeatureManagerDAOException { + Connection conn; + PreparedStatement stmt = null; + int tenantId = PrivilegedCarbonContext.getThreadLocalCarbonContext().getTenantId(); + try { + conn = this.getConnection(); + String query = "DELETE FROM DM_PROFILE_FEATURES WHERE ID = ? AND TENANT_ID = ?"; + stmt = conn.prepareStatement(query); + stmt.setInt(1, featureId); + stmt.setInt(2, tenantId); + if (stmt.executeUpdate() > 0) { + return true; + } + return false; + } catch (SQLException e) { + throw new FeatureManagerDAOException("Error occurred while deleting the feature related to a profile.", e); + } finally { + PolicyManagementDAOUtil.cleanupResources(stmt, null); + } + } + @Override public List getAllProfileFeatures() throws FeatureManagerDAOException { Connection conn; 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 06b71d071a2..5c280c0baf4 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 @@ -134,7 +134,7 @@ public class PolicyManagerImpl implements PolicyManager { public Policy updatePolicy(Policy policy) throws PolicyManagementException { try { - // Previous policy needs to be obtained before begining the transaction + // Previous policy needs to be obtained before beginning the transaction Policy previousPolicy = this.getPolicy(policy.getId()); PolicyManagementDAOFactory.beginTransaction(); @@ -144,7 +144,9 @@ public class PolicyManagerImpl implements PolicyManager { List existingFeaturesList = new ArrayList<>(); List newFeaturesList = new ArrayList<>(); + List feturesToDelete = new ArrayList<>(); List temp = new ArrayList<>(); + List updateDFes = new ArrayList<>(); List updatedFeatureList = policy.getProfile().getProfileFeaturesList(); @@ -158,6 +160,14 @@ public class PolicyManagerImpl implements PolicyManager { temp.add(feature.getFeatureCode()); } } + updateDFes.add(feature.getFeatureCode()); + } + + // Check for the features to delete + for(ProfileFeature feature : existingProfileFeaturesList) { + if(!updateDFes.contains(feature.getFeatureCode())){ + feturesToDelete.add(feature); + } } // Checks for the new features @@ -180,6 +190,12 @@ public class PolicyManagerImpl implements PolicyManager { if (!newFeaturesList.isEmpty()) { featureDAO.addProfileFeatures(newFeaturesList, profileId); } + + if(!feturesToDelete.isEmpty()){ + for (ProfileFeature pf : feturesToDelete) + featureDAO.deleteProfileFeatures(pf.getId()); + } + policyDAO.deleteCriteriaAndDeviceRelatedConfigs(policy.getId()); 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 990cb24875d..26fd3db790e 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 @@ -207,7 +207,7 @@ public class PolicyManagerUtil { if (configuration != null && !configuration.isEmpty()) { for (ConfigurationEntry cEntry : configuration) { if (cEntry.getName().equalsIgnoreCase(MONITORING_FREQUENCY)) { - monitoringFrequency = (int) cEntry.getValue(); + monitoringFrequency = Integer.parseInt((String)cEntry.getValue()); } } } diff --git a/components/webapp-authenticator-framework/org.wso2.carbon.webapp.authenticator.framework/src/main/java/org/wso2/carbon/webapp/authenticator/framework/WebappAuthenticationValve.java b/components/webapp-authenticator-framework/org.wso2.carbon.webapp.authenticator.framework/src/main/java/org/wso2/carbon/webapp/authenticator/framework/WebappAuthenticationValve.java index 25ef4165065..da8b4cfabc9 100644 --- a/components/webapp-authenticator-framework/org.wso2.carbon.webapp.authenticator.framework/src/main/java/org/wso2/carbon/webapp/authenticator/framework/WebappAuthenticationValve.java +++ b/components/webapp-authenticator-framework/org.wso2.carbon.webapp.authenticator.framework/src/main/java/org/wso2/carbon/webapp/authenticator/framework/WebappAuthenticationValve.java @@ -139,7 +139,7 @@ public class WebappAuthenticationValve extends CarbonTomcatValve { msg = authenticationInfo.getMessage(); response.setHeader("WWW-Authenticate", msg); } - log.error(msg); + log.error(msg + " , API : " + request.getRequestURI()); AuthenticationFrameworkUtil .handleResponse(request, response, HttpServletResponse.SC_UNAUTHORIZED, msg); diff --git a/components/webapp-authenticator-framework/org.wso2.carbon.webapp.authenticator.framework/src/main/java/org/wso2/carbon/webapp/authenticator/framework/authenticator/OAuthAuthenticator.java b/components/webapp-authenticator-framework/org.wso2.carbon.webapp.authenticator.framework/src/main/java/org/wso2/carbon/webapp/authenticator/framework/authenticator/OAuthAuthenticator.java index adc31a9c143..ca8eb6c7002 100644 --- a/components/webapp-authenticator-framework/org.wso2.carbon.webapp.authenticator.framework/src/main/java/org/wso2/carbon/webapp/authenticator/framework/authenticator/OAuthAuthenticator.java +++ b/components/webapp-authenticator-framework/org.wso2.carbon.webapp.authenticator.framework/src/main/java/org/wso2/carbon/webapp/authenticator/framework/authenticator/OAuthAuthenticator.java @@ -112,9 +112,9 @@ public class OAuthAuthenticator implements WebappAuthenticator { if (oAuth2TokenValidationResponseDTO.isValid()) { String username = oAuth2TokenValidationResponseDTO.getAuthorizedUser(); //Remove the userstore domain from username - if (username.contains("/")) { + /*if (username.contains("/")) { username = username.substring(username.indexOf('/') + 1); - } + }*/ authenticationInfo.setUsername(username); authenticationInfo.setTenantDomain(MultitenantUtils.getTenantDomain(username)); authenticationInfo.setTenantId(Utils.getTenantIdOFUser(username)); diff --git a/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/src/main/resources/conf/app-management-config.xml b/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/src/main/resources/conf/remote-appmanager-config.xml similarity index 88% rename from features/device-mgt/org.wso2.carbon.device.mgt.server.feature/src/main/resources/conf/app-management-config.xml rename to features/device-mgt/org.wso2.carbon.device.mgt.server.feature/src/main/resources/conf/remote-appmanager-config.xml index ef7a146cdd1..0297d0fca0d 100644 --- a/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/src/main/resources/conf/app-management-config.xml +++ b/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/src/main/resources/conf/remote-appmanager-config.xml @@ -20,4 +20,6 @@ true http:/www.google.com + http:/www.google.com + http:/www.google.com 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 f812b1575d7..447a99f1426 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 @@ -305,7 +305,6 @@ CREATE TABLE DM_POLICY_COMPLIANCE_STATUS ( LAST_FAILED_TIME DATETIME2(0) NULL, ATTEMPTS INT NULL, PRIMARY KEY (ID), - CONSTRAINT DEVICE_ID_UNIQUE UNIQUE (DEVICE_ID ASC), CONSTRAINT FK_POLICY_COMPLIANCE_STATUS_POLICY FOREIGN KEY (POLICY_ID) REFERENCES DM_POLICY (ID) 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 cdb2d3c0194..e340450d4cf 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 @@ -297,7 +297,6 @@ CREATE TABLE IF NOT EXISTS DM_POLICY_COMPLIANCE_STATUS ( LAST_FAILED_TIME TIMESTAMP NULL, ATTEMPTS INT NULL, PRIMARY KEY (ID), - UNIQUE INDEX DEVICE_ID_UNIQUE (DEVICE_ID ASC), CONSTRAINT FK_POLICY_COMPLIANCE_STATUS_POLICY FOREIGN KEY (POLICY_ID) REFERENCES DM_POLICY (ID) 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 2b33f64118e..229556c1104 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 @@ -486,7 +486,6 @@ CREATE TABLE DM_POLICY_COMPLIANCE_STATUS ( LAST_FAILED_TIME TIMESTAMP(0) NULL, ATTEMPTS NUMBER(10) NULL, CONSTRAINT PK_DM_POLICY_COMP_STATUS PRIMARY KEY (ID), - CONSTRAINT DEVICE_ID_UNIQUE UNIQUE (DEVICE_ID), CONSTRAINT FK_POLICY_COMP_STATUS_POLICY FOREIGN KEY (POLICY_ID) REFERENCES DM_POLICY (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 1740e5d551b..e86d97eff91 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 @@ -267,7 +267,6 @@ CREATE TABLE IF NOT EXISTS DM_POLICY_COMPLIANCE_STATUS ( ON DELETE NO ACTION ON UPDATE NO ACTION ); -CREATE UNIQUE INDEX DEVICE_ID_UNIQUE ON DM_POLICY_COMPLIANCE_STATUS (DEVICE_ID ASC); CREATE TABLE IF NOT EXISTS DM_POLICY_CHANGE_MGT ( ID BIGSERIAL NOT NULL PRIMARY KEY, @@ -316,6 +315,17 @@ CREATE TABLE IF NOT EXISTS DM_APPLICATION ( TENANT_ID INTEGER NOT NULL ); +CREATE TABLE IF NOT EXISTS DM_DEVICE_APPLICATION_MAPPING ( + ID BIGSERIAL NOT NULL PRIMARY KEY, + DEVICE_ID INTEGER NOT NULL, + APPLICATION_ID INTEGER NOT NULL, + TENANT_ID INTEGER NOT NULL, + CONSTRAINT fk_dm_device FOREIGN KEY (DEVICE_ID) REFERENCES + DM_DEVICE (ID) ON DELETE NO ACTION ON UPDATE NO ACTION, + CONSTRAINT fk_dm_application FOREIGN KEY (APPLICATION_ID) REFERENCES + DM_APPLICATION (ID) ON DELETE NO ACTION ON UPDATE NO ACTION +); + -- POLICY RELATED TABLES FINISHED -- -- NOTIFICATION TABLE -- diff --git a/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/src/main/resources/p2.inf b/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/src/main/resources/p2.inf index 8da383c571c..3d7d4ba5b66 100644 --- a/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/src/main/resources/p2.inf +++ b/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/src/main/resources/p2.inf @@ -2,6 +2,6 @@ instructions.configure = \ org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.server_${feature.version}/conf/cdm-config.xml,target:${installFolder}/../../conf/cdm-config.xml,overwrite:true);\ org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.server_${feature.version}/conf/notification-messages.xml,target:${installFolder}/../../conf/notification-messages.xml,overwrite:true);\ org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.server_${feature.version}/conf/license-config.xml,target:${installFolder}/../../conf/etc/license-config.xml,overwrite:true);\ -org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.server_${feature.version}/conf/app-management-config.xml,target:${installFolder}/../../conf/etc/app-management-config.xml,overwrite:true);\ +org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.server_${feature.version}/conf/remote-appmanager-config.xml,target:${installFolder}/../../conf/etc/remote-appmanager-config.xml,overwrite:true);\ org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.server_${feature.version}/dbscripts/cdm,target:${installFolder}/../../../dbscripts/cdm,overwrite:true);\ org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.server_${feature.version}/rxts/license.rxt,target:${installFolder}/../../../repository/resources/rxts/license.rxt,overwrite:true);\ \ No newline at end of file diff --git a/pom.xml b/pom.xml index fd4032a8a6d..b85ea094895 100644 --- a/pom.xml +++ b/pom.xml @@ -1542,6 +1542,9 @@ 2.3.1 1.1.1 1.2 + + + github-scm