diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/api/Configuration.java b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/api/Configuration.java index b15c4427866..e422e07c39c 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/api/Configuration.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/api/Configuration.java @@ -20,7 +20,7 @@ package org.wso2.carbon.device.mgt.jaxrs.api; import io.swagger.annotations.*; import org.wso2.carbon.apimgt.annotations.api.*; -import org.wso2.carbon.device.mgt.common.configuration.mgt.TenantConfiguration; +import org.wso2.carbon.device.mgt.common.configuration.mgt.PlatformConfiguration; import javax.ws.rs.*; import javax.ws.rs.core.MediaType; @@ -55,7 +55,7 @@ public interface Configuration { @Permission(scope = "configuration-modify", permissions = {"/permission/admin/device-mgt/admin/platform-configs/modify"}) Response saveTenantConfiguration(@ApiParam(name = "configuration", value = "The required properties to " + "update the platform configurations the as the value", - required = true) TenantConfiguration configuration); + required = true) PlatformConfiguration configuration); @GET @ApiOperation( @@ -64,7 +64,7 @@ public interface Configuration { httpMethod = "GET", value = "Getting General Platform Configurations", notes = "Get the general platform level configuration details using this REST API", - response = TenantConfiguration.class) + response = PlatformConfiguration.class) @ApiResponses(value = { @ApiResponse(code = 200, message = "OK"), @ApiResponse(code = 500, message = "Error occurred while retrieving the tenant configuration") @@ -86,6 +86,6 @@ public interface Configuration { @Permission(scope = "configuration-modify", permissions = {"/permission/admin/device-mgt/admin/platform-configs/modify"}) Response updateConfiguration(@ApiParam(name = "configuration", value = "The required properties to update" + " the platform configurations the as the value", - required = true) TenantConfiguration configuration); + required = true) PlatformConfiguration configuration); } diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/api/impl/ConfigurationImpl.java b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/api/impl/ConfigurationImpl.java index 1d48daf31dc..a31b9d68bb1 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/api/impl/ConfigurationImpl.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/api/impl/ConfigurationImpl.java @@ -23,7 +23,7 @@ import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.wso2.carbon.device.mgt.common.configuration.mgt.ConfigurationEntry; import org.wso2.carbon.device.mgt.common.configuration.mgt.ConfigurationManagementException; -import org.wso2.carbon.device.mgt.common.configuration.mgt.TenantConfiguration; +import org.wso2.carbon.device.mgt.common.configuration.mgt.PlatformConfiguration; import org.wso2.carbon.device.mgt.jaxrs.api.Configuration; import org.wso2.carbon.device.mgt.jaxrs.api.util.DeviceMgtAPIUtils; import org.wso2.carbon.device.mgt.jaxrs.api.util.MDMAppConstants; @@ -51,7 +51,7 @@ public class ConfigurationImpl implements Configuration{ private static Log log = LogFactory.getLog(ConfigurationImpl.class); @POST - public Response saveTenantConfiguration(TenantConfiguration configuration) { + public Response saveTenantConfiguration(PlatformConfiguration configuration) { ResponsePayload responseMsg = new ResponsePayload(); try { DeviceMgtAPIUtils.getTenantConfigurationManagementService().saveConfiguration(configuration, @@ -72,7 +72,7 @@ public class ConfigurationImpl implements Configuration{ public Response getConfiguration() { String msg; try { - TenantConfiguration tenantConfiguration = DeviceMgtAPIUtils.getTenantConfigurationManagementService(). + PlatformConfiguration tenantConfiguration = DeviceMgtAPIUtils.getTenantConfigurationManagementService(). getConfiguration(MDMAppConstants.RegistryConstants.GENERAL_CONFIG_RESOURCE_PATH); ConfigurationEntry configurationEntry = new ConfigurationEntry(); configurationEntry.setContentType("text"); @@ -93,7 +93,7 @@ public class ConfigurationImpl implements Configuration{ } @PUT - public Response updateConfiguration(TenantConfiguration configuration) { + public Response updateConfiguration(PlatformConfiguration configuration) { ResponsePayload responseMsg = new ResponsePayload(); try { DeviceMgtAPIUtils.getTenantConfigurationManagementService().saveConfiguration(configuration, diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/api/util/DeviceMgtAPIUtils.java b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/api/util/DeviceMgtAPIUtils.java index 393be316762..3af317d08c1 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/api/util/DeviceMgtAPIUtils.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/api/util/DeviceMgtAPIUtils.java @@ -24,12 +24,12 @@ import org.wso2.carbon.certificate.mgt.core.service.CertificateManagementService import org.wso2.carbon.context.CarbonContext; import org.wso2.carbon.context.PrivilegedCarbonContext; import org.wso2.carbon.device.mgt.analytics.dashboard.GadgetDataService; +import org.wso2.carbon.device.mgt.common.configuration.mgt.PlatformConfiguration; +import org.wso2.carbon.device.mgt.common.configuration.mgt.PlatformConfigurationManagementService; import org.wso2.carbon.device.mgt.jaxrs.api.common.MDMAPIException; import org.wso2.carbon.device.mgt.common.DeviceIdentifier; import org.wso2.carbon.device.mgt.common.PaginationResult; import org.wso2.carbon.device.mgt.common.configuration.mgt.ConfigurationEntry; -import org.wso2.carbon.device.mgt.common.configuration.mgt.TenantConfiguration; -import org.wso2.carbon.device.mgt.common.configuration.mgt.TenantConfigurationManagementService; import org.wso2.carbon.device.mgt.common.notification.mgt.NotificationManagementService; import org.wso2.carbon.device.mgt.core.app.mgt.ApplicationManagementProviderService; import org.wso2.carbon.device.mgt.core.device.details.mgt.DeviceInformationManager; @@ -57,7 +57,7 @@ public class DeviceMgtAPIUtils { private static final String NOTIFIER_FREQUENCY = "notifierFrequency"; private static Log log = LogFactory.getLog(DeviceMgtAPIUtils.class); - public static int getNotifierFrequency(TenantConfiguration tenantConfiguration) { + public static int getNotifierFrequency(PlatformConfiguration tenantConfiguration) { List configEntryList = tenantConfiguration.getConfiguration(); if (configEntryList != null && !configEntryList.isEmpty()) { for(ConfigurationEntry entry : configEntryList) { @@ -234,10 +234,10 @@ public class DeviceMgtAPIUtils { return policyManagementService; } - public static TenantConfigurationManagementService getTenantConfigurationManagementService() { + public static PlatformConfigurationManagementService getTenantConfigurationManagementService() { PrivilegedCarbonContext ctx = PrivilegedCarbonContext.getThreadLocalCarbonContext(); - TenantConfigurationManagementService tenantConfigurationManagementService = - (TenantConfigurationManagementService) ctx.getOSGiService(TenantConfigurationManagementService.class, null); + PlatformConfigurationManagementService tenantConfigurationManagementService = + (PlatformConfigurationManagementService) ctx.getOSGiService(PlatformConfigurationManagementService.class, null); if (tenantConfigurationManagementService == null) { String msg = "Tenant configuration Management service not initialized."; log.error(msg); diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/DeviceManager.java b/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/DeviceManager.java index c0192767684..060865c726c 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/DeviceManager.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/DeviceManager.java @@ -17,7 +17,7 @@ */ package org.wso2.carbon.device.mgt.common; -import org.wso2.carbon.device.mgt.common.configuration.mgt.TenantConfiguration; +import org.wso2.carbon.device.mgt.common.configuration.mgt.PlatformConfiguration; import org.wso2.carbon.device.mgt.common.license.mgt.License; import org.wso2.carbon.device.mgt.common.license.mgt.LicenseManagementException; @@ -40,14 +40,14 @@ public interface DeviceManager { * * @return Returns the status of the operation */ - boolean saveConfiguration(TenantConfiguration configuration) throws DeviceManagementException; + boolean saveConfiguration(PlatformConfiguration configuration) throws DeviceManagementException; /** * Method to get platform specific Configuration. * * @return Returns the platform specific tenant configurations */ - TenantConfiguration getConfiguration() throws DeviceManagementException; + PlatformConfiguration getConfiguration() throws DeviceManagementException; /** * Method to enrolling a particular device of type mobile, IoT, etc within CDM. diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/configuration/mgt/TenantConfiguration.java b/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/configuration/mgt/PlatformConfiguration.java similarity index 92% rename from components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/configuration/mgt/TenantConfiguration.java rename to components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/configuration/mgt/PlatformConfiguration.java index df19ddf1dc2..b7e8a0fd02f 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/configuration/mgt/TenantConfiguration.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/configuration/mgt/PlatformConfiguration.java @@ -31,12 +31,12 @@ import java.util.List; /** * Represents the tenant configuration for a device platform. */ -@XmlRootElement(name = "tenantConfiguration") +@XmlRootElement(name = "PlatformConfiguration") @XmlAccessorType(XmlAccessType.NONE) -@ApiModel(value = "TenantConfiguration", +@ApiModel(value = "PlatformConfiguration", description = "This class carries all information related to a Tenant configuration") -public class TenantConfiguration implements Serializable { +public class PlatformConfiguration implements Serializable { @XmlElement(name = "type") @ApiModelProperty(name = "type", value = "type of device", required = true) diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/configuration/mgt/TenantConfigurationManagementService.java b/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/configuration/mgt/PlatformConfigurationManagementService.java similarity index 86% rename from components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/configuration/mgt/TenantConfigurationManagementService.java rename to components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/configuration/mgt/PlatformConfigurationManagementService.java index 58e8d60be10..101bf4bcc51 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/configuration/mgt/TenantConfigurationManagementService.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/configuration/mgt/PlatformConfigurationManagementService.java @@ -21,7 +21,7 @@ package org.wso2.carbon.device.mgt.common.configuration.mgt; * This represents the tenant configuration management functionality which should be implemented by * the device type plugins. */ -public interface TenantConfigurationManagementService { +public interface PlatformConfigurationManagementService { /** * Method to add a operation to a device or a set of devices. @@ -31,7 +31,7 @@ public interface TenantConfigurationManagementService { * @throws org.wso2.carbon.device.mgt.common.configuration.mgt.ConfigurationManagementException If some unusual behaviour is observed while adding the * configuration. */ - boolean saveConfiguration(TenantConfiguration tenantConfiguration, String resourcePath) throws + boolean saveConfiguration(PlatformConfiguration tenantConfiguration, String resourcePath) throws ConfigurationManagementException; /** @@ -41,6 +41,6 @@ public interface TenantConfigurationManagementService { * @throws org.wso2.carbon.device.mgt.common.configuration.mgt.ConfigurationManagementException If some unusual behaviour is observed while fetching the * operation list. */ - TenantConfiguration getConfiguration(String resourcePath) throws ConfigurationManagementException; + PlatformConfiguration getConfiguration(String resourcePath) throws ConfigurationManagementException; } diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/config/tenant/TenantConfigurationManagementServiceImpl.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/config/tenant/TenantConfigurationManagementServiceImpl.java index 61bf277094b..68f611cd08a 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/config/tenant/TenantConfigurationManagementServiceImpl.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/config/tenant/TenantConfigurationManagementServiceImpl.java @@ -20,8 +20,8 @@ package org.wso2.carbon.device.mgt.core.config.tenant; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.wso2.carbon.device.mgt.common.configuration.mgt.ConfigurationManagementException; -import org.wso2.carbon.device.mgt.common.configuration.mgt.TenantConfiguration; -import org.wso2.carbon.device.mgt.common.configuration.mgt.TenantConfigurationManagementService; +import org.wso2.carbon.device.mgt.common.configuration.mgt.PlatformConfiguration; +import org.wso2.carbon.device.mgt.common.configuration.mgt.PlatformConfigurationManagementService; import org.wso2.carbon.device.mgt.core.config.ConfigurationManagerConstants; import org.wso2.carbon.device.mgt.core.config.util.ConfigurationManagerUtil; import org.wso2.carbon.registry.api.Resource; @@ -36,17 +36,17 @@ import java.io.StringWriter; import java.nio.charset.Charset; /** - * This class implements all the functionality exposed as part of the TenantConfigurationManagementService. + * This class implements all the functionality exposed as part of the PlatformConfigurationManagementService. * Main usage of this module is saving/retrieving tenant configurations to the registry. * */ public class TenantConfigurationManagementServiceImpl - implements TenantConfigurationManagementService { + implements PlatformConfigurationManagementService { private static final Log log = LogFactory.getLog(TenantConfigurationManagementServiceImpl.class); @Override - public boolean saveConfiguration(TenantConfiguration tenantConfiguration, String resourcePath) + public boolean saveConfiguration(PlatformConfiguration tenantConfiguration, String resourcePath) throws ConfigurationManagementException { boolean status; try { @@ -54,7 +54,7 @@ public class TenantConfigurationManagementServiceImpl log.debug("Persisting tenant configurations in Registry"); } StringWriter writer = new StringWriter(); - JAXBContext context = JAXBContext.newInstance(TenantConfiguration.class); + JAXBContext context = JAXBContext.newInstance(PlatformConfiguration.class); Marshaller marshaller = context.createMarshaller(); marshaller.marshal(tenantConfiguration, writer); @@ -74,19 +74,19 @@ public class TenantConfigurationManagementServiceImpl } @Override - public TenantConfiguration getConfiguration(String resourcePath) + public PlatformConfiguration getConfiguration(String resourcePath) throws ConfigurationManagementException { Resource resource; try { resource = ConfigurationManagerUtil.getRegistryResource(resourcePath); if(resource != null){ - JAXBContext context = JAXBContext.newInstance(TenantConfiguration.class); + JAXBContext context = JAXBContext.newInstance(PlatformConfiguration.class); Unmarshaller unmarshaller = context.createUnmarshaller(); - return (TenantConfiguration) unmarshaller.unmarshal( + return (PlatformConfiguration) unmarshaller.unmarshal( new StringReader(new String((byte[]) resource.getContent(), Charset .forName(ConfigurationManagerConstants.CharSets.CHARSET_UTF8)))); } - return new TenantConfiguration(); + return new PlatformConfiguration(); } catch (JAXBException e) { throw new ConfigurationManagementException( "Error occurred while parsing the Tenant configuration : " + e.getMessage(), e); 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 eee04e06dac..7cc222708a7 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 @@ -25,13 +25,11 @@ import org.wso2.carbon.apimgt.impl.APIManagerConfigurationService; import org.wso2.carbon.device.mgt.common.DeviceManagementException; import org.wso2.carbon.device.mgt.common.app.mgt.ApplicationManagementException; import org.wso2.carbon.device.mgt.common.authorization.DeviceAccessAuthorizationService; -import org.wso2.carbon.device.mgt.common.configuration.mgt.TenantConfigurationManagementService; +import org.wso2.carbon.device.mgt.common.configuration.mgt.PlatformConfigurationManagementService; import org.wso2.carbon.device.mgt.common.notification.mgt.NotificationManagementService; 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.permission.mgt.PermissionManagerService; -import org.wso2.carbon.device.mgt.common.push.notification.PushNotificationConfig; -import org.wso2.carbon.device.mgt.common.push.notification.PushNotificationProvider; import org.wso2.carbon.device.mgt.common.spi.DeviceManagementService; import org.wso2.carbon.device.mgt.core.DeviceManagementConstants; import org.wso2.carbon.device.mgt.core.DeviceManagementPluginRepository; @@ -51,7 +49,6 @@ import org.wso2.carbon.device.mgt.core.notification.mgt.dao.NotificationManageme import org.wso2.carbon.device.mgt.core.operation.mgt.OperationManagerImpl; import org.wso2.carbon.device.mgt.core.operation.mgt.dao.OperationManagementDAOFactory; import org.wso2.carbon.device.mgt.core.permission.mgt.PermissionManagerServiceImpl; -import org.wso2.carbon.device.mgt.core.push.notification.mgt.PushNotificationConfigRepository; import org.wso2.carbon.device.mgt.core.push.notification.mgt.PushNotificationProviderRepository; import org.wso2.carbon.device.mgt.core.service.DeviceManagementProviderService; import org.wso2.carbon.device.mgt.core.service.DeviceManagementProviderServiceImpl; @@ -221,9 +218,9 @@ public class DeviceManagementServiceComponent { bundleContext.registerService(GroupManagementProviderService.class.getName(), groupManagementProvider, null); /* Registering Tenant Configuration Management Service */ - TenantConfigurationManagementService + PlatformConfigurationManagementService tenantConfiguration = new TenantConfigurationManagementServiceImpl(); - bundleContext.registerService(TenantConfigurationManagementService.class.getName(), tenantConfiguration, null); + bundleContext.registerService(PlatformConfigurationManagementService.class.getName(), tenantConfiguration, null); /* Registering Notification Service */ NotificationManagementService notificationManagementService 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 9d407108bb7..e5a096fb1eb 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 @@ -24,12 +24,11 @@ import org.wso2.carbon.device.mgt.common.EnrolmentInfo; import org.wso2.carbon.device.mgt.common.FeatureManager; import org.wso2.carbon.device.mgt.common.PaginationRequest; import org.wso2.carbon.device.mgt.common.PaginationResult; -import org.wso2.carbon.device.mgt.common.configuration.mgt.TenantConfiguration; +import org.wso2.carbon.device.mgt.common.configuration.mgt.PlatformConfiguration; 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.common.operation.mgt.OperationManager; import org.wso2.carbon.device.mgt.core.dto.DeviceType; import java.util.List; @@ -78,7 +77,7 @@ public interface DeviceManagementProviderService { * @throws DeviceManagementException If some unusual behaviour is observed while fetching the * configuration. */ - TenantConfiguration getConfiguration(String deviceType) throws DeviceManagementException; + PlatformConfiguration getConfiguration(String deviceType) throws DeviceManagementException; /** * Method to get the list of devices owned by an user with paging information. @@ -187,9 +186,9 @@ public interface DeviceManagementProviderService { boolean enrollDevice(Device device) throws DeviceManagementException; - TenantConfiguration getConfiguration() throws DeviceManagementException; + PlatformConfiguration getConfiguration() throws DeviceManagementException; - boolean saveConfiguration(TenantConfiguration configuration) throws DeviceManagementException; + boolean saveConfiguration(PlatformConfiguration configuration) throws DeviceManagementException; boolean disenrollDevice(DeviceIdentifier deviceId) 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 0ec30d848a7..4c10e1bee7f 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 @@ -30,7 +30,7 @@ import org.wso2.carbon.device.mgt.common.FeatureManager; import org.wso2.carbon.device.mgt.common.PaginationRequest; import org.wso2.carbon.device.mgt.common.PaginationResult; import org.wso2.carbon.device.mgt.common.TransactionManagementException; -import org.wso2.carbon.device.mgt.common.configuration.mgt.TenantConfiguration; +import org.wso2.carbon.device.mgt.common.configuration.mgt.PlatformConfiguration; import org.wso2.carbon.device.mgt.common.license.mgt.License; import org.wso2.carbon.device.mgt.common.license.mgt.LicenseManagementException; import org.wso2.carbon.device.mgt.common.operation.mgt.Activity; @@ -93,7 +93,7 @@ public class DeviceManagementProviderServiceImpl implements DeviceManagementProv } @Override - public boolean saveConfiguration(TenantConfiguration configuration) throws DeviceManagementException { + public boolean saveConfiguration(PlatformConfiguration configuration) throws DeviceManagementException { DeviceManager dms = pluginRepository.getDeviceManagementService(configuration.getType(), this.getTenantId()).getDeviceManager(); @@ -101,12 +101,12 @@ public class DeviceManagementProviderServiceImpl implements DeviceManagementProv } @Override - public TenantConfiguration getConfiguration() throws DeviceManagementException { + public PlatformConfiguration getConfiguration() throws DeviceManagementException { return null; } @Override - public TenantConfiguration getConfiguration(String deviceType) throws DeviceManagementException { + public PlatformConfiguration getConfiguration(String deviceType) throws DeviceManagementException { DeviceManager dms = pluginRepository.getDeviceManagementService(deviceType, this.getTenantId()).getDeviceManager(); if (dms == null) { diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/java/org/wso2/carbon/device/mgt/core/TestDeviceManager.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/java/org/wso2/carbon/device/mgt/core/TestDeviceManager.java index d8ed7a6dc64..a1a17b47e38 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/java/org/wso2/carbon/device/mgt/core/TestDeviceManager.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/java/org/wso2/carbon/device/mgt/core/TestDeviceManager.java @@ -16,7 +16,7 @@ package org.wso2.carbon.device.mgt.core; import org.wso2.carbon.device.mgt.common.*; -import org.wso2.carbon.device.mgt.common.configuration.mgt.TenantConfiguration; +import org.wso2.carbon.device.mgt.common.configuration.mgt.PlatformConfiguration; import org.wso2.carbon.device.mgt.common.license.mgt.License; import org.wso2.carbon.device.mgt.common.license.mgt.LicenseManagementException; @@ -34,12 +34,12 @@ public class TestDeviceManager implements DeviceManager { } @Override - public boolean saveConfiguration(TenantConfiguration configuration) + public boolean saveConfiguration(PlatformConfiguration configuration) throws DeviceManagementException { return false; } - @Override public TenantConfiguration getConfiguration() throws DeviceManagementException { + @Override public PlatformConfiguration getConfiguration() throws DeviceManagementException { return null; } 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 48d63ee4d2c..c047c8cb920 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 @@ -24,8 +24,8 @@ import org.w3c.dom.Document; import org.wso2.carbon.device.mgt.common.Device; import org.wso2.carbon.device.mgt.common.configuration.mgt.ConfigurationEntry; import org.wso2.carbon.device.mgt.common.configuration.mgt.ConfigurationManagementException; -import org.wso2.carbon.device.mgt.common.configuration.mgt.TenantConfiguration; -import org.wso2.carbon.device.mgt.common.configuration.mgt.TenantConfigurationManagementService; +import org.wso2.carbon.device.mgt.common.configuration.mgt.PlatformConfiguration; +import org.wso2.carbon.device.mgt.common.configuration.mgt.PlatformConfigurationManagementService; import org.wso2.carbon.device.mgt.common.group.mgt.DeviceGroup; import org.wso2.carbon.device.mgt.common.operation.mgt.Operation; import org.wso2.carbon.device.mgt.core.config.DeviceConfigurationManager; @@ -198,8 +198,8 @@ public class PolicyManagerUtil { public static int getMonitoringFequency() { - TenantConfigurationManagementService configMgtService = new TenantConfigurationManagementServiceImpl(); - TenantConfiguration tenantConfiguration = null; + PlatformConfigurationManagementService configMgtService = new TenantConfigurationManagementServiceImpl(); + PlatformConfiguration tenantConfiguration = null; int monitoringFrequency = 0; try { tenantConfiguration = configMgtService.getConfiguration(GENERAL_CONFIG_RESOURCE_PATH);