From 5e612ceaf27c06e88615aef327f58a7a7a904bcf Mon Sep 17 00:00:00 2001 From: Arshana Date: Wed, 23 Nov 2022 00:00:52 +0530 Subject: [PATCH 01/10] Add capability to send a notification when device rename --- .../impl/DeviceManagementServiceImpl.java | 33 +++++++++++++++++- .../DeviceManagementProviderService.java | 2 ++ .../DeviceManagementProviderServiceImpl.java | 34 +++++++++++++++++++ 3 files changed, 68 insertions(+), 1 deletion(-) diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/DeviceManagementServiceImpl.java b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/DeviceManagementServiceImpl.java index b8c626cb415..821a47319f3 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/DeviceManagementServiceImpl.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/DeviceManagementServiceImpl.java @@ -715,8 +715,35 @@ public class DeviceManagementServiceImpl implements DeviceManagementService { Device persistedDevice = deviceManagementProviderService.getDevice(new DeviceIdentifier (deviceId, deviceType), true); persistedDevice.setName(device.getName()); - boolean response = deviceManagementProviderService.modifyEnrollment(persistedDevice); + System.out.println("This is rename device"); + boolean responseOfmodifyEnrollment = deviceManagementProviderService.modifyEnrollment(persistedDevice); + boolean responseOfDeviceNameChanged = deviceManagementProviderService.SendDeviceNameChangedNotification(persistedDevice); + +// boolean response = responseOfmodifyEnrollment || responseOfDeviceNameChanged; + + +// ProfileOperation operation = new ProfileOperation(); +// operation.setCode("SEND_USERNAME"); +// operation.setType(Operation.Type.PROFILE); +// operation.setPayLoad(device.getName()); +// +// DeviceIdentifier deviceIdentifier = new DeviceIdentifier(); +// deviceIdentifier.setId(persistedDevice.getDeviceIdentifier()); +// deviceIdentifier.setType(persistedDevice.getType()); +// +// List deviceIdentifiers = new ArrayList<>(); +// deviceIdentifiers.add(deviceIdentifier); +// +//// Activity activity; +// Activity activity = deviceManagementProviderService.addOperation(persistedDevice.getType(), operation, deviceIdentifiers); +// ; +// boolean responseOfDeviceNameChanged = activity != null; + + boolean response = responseOfmodifyEnrollment || responseOfDeviceNameChanged; + + return Response.status(Response.Status.CREATED).entity(response).build(); +// return Response.status(Response.Status.CREATED).entity(responseOfmodifyEnrollment).build(); } catch (DeviceManagementException e) { log.error("Error encountered while updating device of type : " + deviceType + " and " + @@ -724,6 +751,10 @@ public class DeviceManagementServiceImpl implements DeviceManagementService { return Response.status(Response.Status.BAD_REQUEST).entity( new ErrorResponse.ErrorResponseBuilder().setMessage("Error while updating " + "device of type " + deviceType + " and ID : " + deviceId).build()).build(); +// } catch (OperationManagementException e) { +// throw new RuntimeException(e); +// } catch (InvalidDeviceException e) { +// throw new RuntimeException(e); } } 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 a84deb88944..cbf57941d2f 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 @@ -1042,4 +1042,6 @@ public interface DeviceManagementProviderService { */ PaginationResult getDevicesDetails(PaginationRequest request, List devicesIds, String groupName) throws DeviceManagementException; + + Boolean SendDeviceNameChangedNotification(Device device) 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 2f0439f8ca7..786bbc9b050 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 @@ -143,6 +143,7 @@ import org.wso2.carbon.device.mgt.core.internal.PluginInitializationListener; import org.wso2.carbon.device.mgt.core.metadata.mgt.dao.MetadataDAO; import org.wso2.carbon.device.mgt.core.metadata.mgt.dao.MetadataManagementDAOFactory; import org.wso2.carbon.device.mgt.core.operation.mgt.CommandOperation; +import org.wso2.carbon.device.mgt.core.operation.mgt.ProfileOperation; import org.wso2.carbon.device.mgt.core.util.DeviceManagerUtil; import org.wso2.carbon.device.mgt.core.util.HttpReportingUtil; import org.wso2.carbon.email.sender.core.ContentProviderInfo; @@ -4860,4 +4861,37 @@ public class DeviceManagementProviderServiceImpl implements DeviceManagementProv paginationResult.setData(populateAllDeviceInfo(subscribedDeviceDetails)); return paginationResult; } + + @Override + public Boolean SendDeviceNameChangedNotification(Device device) throws DeviceManagementException { + + try { + ProfileOperation operation = new ProfileOperation(); + operation.setCode("SEND_USERNAME"); + operation.setType(Operation.Type.PROFILE); + operation.setPayLoad(device.getName()); + + DeviceIdentifier deviceIdentifier = new DeviceIdentifier(); + deviceIdentifier.setId(device.getDeviceIdentifier()); + deviceIdentifier.setType(device.getType()); + + List deviceIdentifiers = new ArrayList<>(); + deviceIdentifiers.add(deviceIdentifier); + + Activity activity; + activity = addOperation(device.getType(), operation, deviceIdentifiers); + + return activity != null; + + } catch (OperationManagementException e) { + String msg = "Error occurred while sending operation" ; + log.error(msg, e); + throw new DeviceManagementException(msg, e); + } catch (InvalidDeviceException e) { + String msg = "Invalid Device exception occurred"; + log.error(msg, e); + throw new DeviceManagementException(msg, e); + } + + } } From 777940b896bb2aab3389c5a68a1744a17b2d776a Mon Sep 17 00:00:00 2001 From: Arshana Date: Thu, 24 Nov 2022 13:23:46 +0530 Subject: [PATCH 02/10] Fix SendDeviceNameChangedNotification --- .../impl/DeviceManagementServiceImpl.java | 33 ++----------------- .../device/mgt/core/common/Constants.java | 2 ++ .../DeviceManagementProviderServiceImpl.java | 8 ++--- 3 files changed, 8 insertions(+), 35 deletions(-) diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/DeviceManagementServiceImpl.java b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/DeviceManagementServiceImpl.java index 821a47319f3..464da3a89f0 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/DeviceManagementServiceImpl.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/DeviceManagementServiceImpl.java @@ -717,44 +717,17 @@ public class DeviceManagementServiceImpl implements DeviceManagementService { persistedDevice.setName(device.getName()); System.out.println("This is rename device"); boolean responseOfmodifyEnrollment = deviceManagementProviderService.modifyEnrollment(persistedDevice); - boolean responseOfDeviceNameChanged = deviceManagementProviderService.SendDeviceNameChangedNotification(persistedDevice); - -// boolean response = responseOfmodifyEnrollment || responseOfDeviceNameChanged; - - -// ProfileOperation operation = new ProfileOperation(); -// operation.setCode("SEND_USERNAME"); -// operation.setType(Operation.Type.PROFILE); -// operation.setPayLoad(device.getName()); -// -// DeviceIdentifier deviceIdentifier = new DeviceIdentifier(); -// deviceIdentifier.setId(persistedDevice.getDeviceIdentifier()); -// deviceIdentifier.setType(persistedDevice.getType()); -// -// List deviceIdentifiers = new ArrayList<>(); -// deviceIdentifiers.add(deviceIdentifier); -// -//// Activity activity; -// Activity activity = deviceManagementProviderService.addOperation(persistedDevice.getType(), operation, deviceIdentifiers); -// ; -// boolean responseOfDeviceNameChanged = activity != null; - - boolean response = responseOfmodifyEnrollment || responseOfDeviceNameChanged; - + boolean responseOfDeviceNameChanged = deviceManagementProviderService.SendDeviceNameChangedNotification( + persistedDevice); + boolean response = responseOfmodifyEnrollment && responseOfDeviceNameChanged; return Response.status(Response.Status.CREATED).entity(response).build(); -// return Response.status(Response.Status.CREATED).entity(responseOfmodifyEnrollment).build(); - } catch (DeviceManagementException e) { log.error("Error encountered while updating device of type : " + deviceType + " and " + "ID : " + deviceId); return Response.status(Response.Status.BAD_REQUEST).entity( new ErrorResponse.ErrorResponseBuilder().setMessage("Error while updating " + "device of type " + deviceType + " and ID : " + deviceId).build()).build(); -// } catch (OperationManagementException e) { -// throw new RuntimeException(e); -// } catch (InvalidDeviceException e) { -// throw new RuntimeException(e); } } diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/common/Constants.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/common/Constants.java index 0db16ff4518..7d7c3ba8536 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/common/Constants.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/common/Constants.java @@ -24,4 +24,6 @@ public class Constants { public static final String URI_SEPARATOR = "/"; public static final String BASIC_AUTH_HEADER_PREFIX = "Basic "; public static final String BEARER = "Bearer "; + public static final String SEND_USERNAME = "SEND_USERNAME"; + } 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 786bbc9b050..74700125cdf 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 @@ -120,6 +120,7 @@ import org.wso2.carbon.device.mgt.core.DeviceManagementConstants; import org.wso2.carbon.device.mgt.core.DeviceManagementPluginRepository; import org.wso2.carbon.device.mgt.core.cache.DeviceCacheKey; import org.wso2.carbon.device.mgt.core.cache.impl.DeviceCacheManagerImpl; +import org.wso2.carbon.device.mgt.core.common.Constants; import org.wso2.carbon.device.mgt.core.config.DeviceConfigurationManager; import org.wso2.carbon.device.mgt.core.config.DeviceManagementConfig; import org.wso2.carbon.device.mgt.core.dao.ApplicationDAO; @@ -4867,7 +4868,7 @@ public class DeviceManagementProviderServiceImpl implements DeviceManagementProv try { ProfileOperation operation = new ProfileOperation(); - operation.setCode("SEND_USERNAME"); + operation.setCode(Constants.SEND_USERNAME); operation.setType(Operation.Type.PROFILE); operation.setPayLoad(device.getName()); @@ -4877,14 +4878,12 @@ public class DeviceManagementProviderServiceImpl implements DeviceManagementProv List deviceIdentifiers = new ArrayList<>(); deviceIdentifiers.add(deviceIdentifier); - Activity activity; activity = addOperation(device.getType(), operation, deviceIdentifiers); return activity != null; - } catch (OperationManagementException e) { - String msg = "Error occurred while sending operation" ; + String msg = "Error occurred while sending operation"; log.error(msg, e); throw new DeviceManagementException(msg, e); } catch (InvalidDeviceException e) { @@ -4892,6 +4891,5 @@ public class DeviceManagementProviderServiceImpl implements DeviceManagementProv log.error(msg, e); throw new DeviceManagementException(msg, e); } - } } From df6a8e20a38812507bf73562b4e6f7b1b38e8172 Mon Sep 17 00:00:00 2001 From: prathabanKavin Date: Tue, 24 Jan 2023 11:46:57 +0530 Subject: [PATCH 03/10] Change the device status and see the device status lifecycle history --- .../jaxrs/beans/LifecycleStateDeviceList.java | 47 +++++ .../admin/DeviceManagementAdminService.java | 146 +++++++++++++++ .../DeviceManagementAdminServiceImpl.java | 107 +++++++++++ .../device/mgt/jaxrs/util/Constants.java | 1 + .../mgt/jaxrs/util/DeviceMgtAPIUtils.java | 13 ++ .../mgt/common/DeviceManagementConstants.java | 1 + .../mgt/common/LifecycleStateDevice.java | 96 ++++++++++ .../mgt/DeviceLifecycleState.java | 80 ++++++++ .../exceptions/DeviceStatusException.java | 30 +++ .../exceptions/InvalidStatusException.java | 28 +++ .../config/DeviceConfigurationManager.java | 1 + .../lifecycleState/DeviceLifecycleConfig.java | 46 +++++ .../DeviceLifecycleConfigManager.java | 89 +++++++++ .../mgt/core/dao/DeviceLifecycleDAO.java | 72 ++++++++ .../core/dao/DeviceManagementDAOFactory.java | 4 + .../core/dao/impl/DeviceLifecycleDAOImpl.java | 174 ++++++++++++++++++ .../mgt/core/dao/impl/EnrollmentDAOImpl.java | 19 +- .../internal/DeviceManagementDataHolder.java | 10 + .../DeviceManagementServiceComponent.java | 18 ++ .../DeviceLifecycleStateManager.java | 79 ++++++++ .../DeviceManagementProviderServiceImpl.java | 5 +- .../service/DeviceStateManagementService.java | 72 ++++++++ .../DeviceStateManagementServiceImpl.java | 136 ++++++++++++++ .../src/test/resources/sql/h2.sql | 2 + .../main/resources/conf/lifecycle-states.xml | 116 ++++++++++++ .../src/main/resources/dbscripts/cdm/h2.sql | 3 + .../main/resources/dbscripts/cdm/mysql.sql | 1 + 27 files changed, 1390 insertions(+), 6 deletions(-) create mode 100644 components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/beans/LifecycleStateDeviceList.java create mode 100644 components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/LifecycleStateDevice.java create mode 100644 components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/configuration/mgt/DeviceLifecycleState.java create mode 100644 components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/exceptions/DeviceStatusException.java create mode 100644 components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/exceptions/InvalidStatusException.java create mode 100644 components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/config/lifecycleState/DeviceLifecycleConfig.java create mode 100644 components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/config/lifecycleState/DeviceLifecycleConfigManager.java create mode 100644 components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/dao/DeviceLifecycleDAO.java create mode 100644 components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/dao/impl/DeviceLifecycleDAOImpl.java create mode 100644 components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/lifeCycle/DeviceLifecycleStateManager.java create mode 100644 components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/service/DeviceStateManagementService.java create mode 100644 components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/service/DeviceStateManagementServiceImpl.java create mode 100644 features/device-mgt/org.wso2.carbon.device.mgt.basics.feature/src/main/resources/conf/lifecycle-states.xml diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/beans/LifecycleStateDeviceList.java b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/beans/LifecycleStateDeviceList.java new file mode 100644 index 00000000000..d53db399d00 --- /dev/null +++ b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/beans/LifecycleStateDeviceList.java @@ -0,0 +1,47 @@ +/* + * Copyright (c) 2022, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. + * + * WSO2 Inc. licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * + */ + +package org.wso2.carbon.device.mgt.jaxrs.beans; + +import io.swagger.annotations.ApiModelProperty; +import org.wso2.carbon.device.mgt.common.LifecycleStateDevice; + +import java.util.ArrayList; +import java.util.List; + +public class LifecycleStateDeviceList extends BasePaginatedResult { + + private List lifecycleStates = new ArrayList<>(); + + @ApiModelProperty(value = "List of lifecycleStates history returned") + public List getLifecycleStates() { + return lifecycleStates; + } + + public void setLifecycleStates(List lifecycleStates) { + this.lifecycleStates = lifecycleStates; + } + + @Override + public String toString() { + return "LifecycleStateDeviceList{" + + "lifecycleStates=" + lifecycleStates + + '}'; + } +} diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/admin/DeviceManagementAdminService.java b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/admin/DeviceManagementAdminService.java index b0c850de950..17136a7e516 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/admin/DeviceManagementAdminService.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/admin/DeviceManagementAdminService.java @@ -34,6 +34,7 @@ */ package org.wso2.carbon.device.mgt.jaxrs.service.api.admin; +import io.entgra.application.mgt.common.dto.ApplicationDTO; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiParam; @@ -49,6 +50,8 @@ import org.apache.axis2.transport.http.HTTPConstants; import org.wso2.carbon.apimgt.annotations.api.Scope; import org.wso2.carbon.apimgt.annotations.api.Scopes; import org.wso2.carbon.device.mgt.common.Device; +import org.wso2.carbon.device.mgt.common.EnrolmentInfo; +import org.wso2.carbon.device.mgt.common.exceptions.DeviceManagementException; import org.wso2.carbon.device.mgt.jaxrs.beans.DeviceList; import org.wso2.carbon.device.mgt.jaxrs.beans.ErrorResponse; import org.wso2.carbon.device.mgt.jaxrs.util.Constants; @@ -119,6 +122,13 @@ import java.util.List; roles = {"Internal/devicemgt-admin"}, permissions = {"/device-mgt/admin/devices/usage/view"} ), + @Scope( + name = "Change device status.", + description = "Change device status.", + key = "perm:admin:devices:change-status", + roles = {"Internal/devicemgt-admin"}, + permissions = {"/device-mgt/admin/devices/change-status"} + ), } ) public interface DeviceManagementAdminService { @@ -505,4 +515,140 @@ public interface DeviceManagementAdminService { @QueryParam("endDate") Timestamp endDate); + @POST + @Produces(MediaType.APPLICATION_JSON) + @Consumes(MediaType.APPLICATION_JSON) + @Path("/status") + @ApiOperation( + produces = MediaType.APPLICATION_JSON, + consumes = MediaType.APPLICATION_JSON, + httpMethod = "POST", + value = "Update and post device's State", + notes = "Use this API to change the state of the device", + tags = "Device Management Administrative Service", + extensions = { + @Extension(properties = { + @ExtensionProperty(name = Constants.SCOPE, value = "perm:admin:devices:change-status") + }) + } + ) + @ApiResponses( + value = { + @ApiResponse( + code = 201, + message = "OK. \n Successfully added a lifecycle state.", + response = ApplicationDTO.class), + @ApiResponse( + code = 400, + message = "Bad Request. \n " + + "Lifecycle State changing request contains unacceptable or vulnerable data"), + @ApiResponse( + code = 403, + message = "Don't have permission to change the lifecycle state of a lifecycle state."), + @ApiResponse( + code = 404, + message = "NOT FOUND. \n Error occurred while adding new lifecycle state.", + response = io.entgra.application.mgt.common.ErrorResponse.class), + @ApiResponse( + code = 500, + message = "Internal Server Error. \n Error occurred adding a lifecycle state.", + response = io.entgra.application.mgt.common.ErrorResponse.class) + }) + Response changeDeviceStatus( + @ApiParam( + name = "deviceId", + value = "The device identifier of the device.", + required = true) + @QueryParam("deviceId") + @Size(max = 45) + String deviceId, + @ApiParam( + name = "nextStatus", + value = "The device's next state.", + required = true) + @QueryParam("nextStatus") + EnrolmentInfo.Status nextStatus); + + @GET + @Produces(MediaType.APPLICATION_JSON) + @Path("/{type}/{deviceId}/lifecycle") + @ApiOperation( + produces = MediaType.APPLICATION_JSON, + httpMethod = "GET", + value = "Get Device's lifecycle history", + notes = "Get the lifecycle history of the device, since the enrolement", + tags = "Device Management Administrative Service", + extensions = { + @Extension(properties = { + @ExtensionProperty(name = Constants.SCOPE, value = "perm:admin:devices:view") + }) + } + ) + @ApiResponses( + value = { + @ApiResponse( + code = 200, + message = "OK. \n Successfully fetched the status history of matching devices.", + response = List.class, + responseHeaders = { + @ResponseHeader( + name = "Content-Type", + description = "The content type of the body"), + @ResponseHeader( + name = "ETag", + description = "Entity Tag of the response resource.\n" + + "Used by caches, or in conditional requests."), + @ResponseHeader( + name = "Last-Modified", + description = "Date and time the resource was last modified.\n" + + "Used by caches, or in conditional requests."), + }), + @ApiResponse( + code = 304, + message = "Not Modified. Empty body because the client already has the latest version" + + " of the requested resource.\n"), + @ApiResponse( + code = 400, + message = "Bad Request. \n Invalid request or validation error.", + response = ErrorResponse.class), + @ApiResponse( + code = 404, + message = "Not Found. \n A device with the specified device type and id was not found.", + response = ErrorResponse.class), + @ApiResponse( + code = 500, + message = "Internal Server Error. \n " + + "Server error occurred while retrieving the device details.", + response = ErrorResponse.class) + }) + Response getDeviceLifecycle( + @ApiParam( + name = "DeviceId", + value = "Device ID.", + required = true) + @PathParam("deviceId") + @Size(max = 45) + String id, + @ApiParam( + name = "type", + value = "The device type, such as ios, android, or windows.", + required = true) + @PathParam("type") + @Size(max = 45) + String type, + @ApiParam( + name = "offset", + value = "The starting pagination index for the complete list of qualified items.", + required = false, + defaultValue = "0") + @QueryParam("offset") + int offset, + @ApiParam( + name = "limit", + value = "Provide how many device details you require from the starting pagination index/offset.", + required = false, + defaultValue = "5") + @QueryParam("limit") + int limit) throws DeviceManagementException; + } diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/admin/DeviceManagementAdminServiceImpl.java b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/admin/DeviceManagementAdminServiceImpl.java index acadf926f2b..0351e629fdd 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/admin/DeviceManagementAdminServiceImpl.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/admin/DeviceManagementAdminServiceImpl.java @@ -40,9 +40,12 @@ import org.wso2.carbon.base.MultitenantConstants; import org.wso2.carbon.context.CarbonContext; import org.wso2.carbon.context.PrivilegedCarbonContext; import org.wso2.carbon.device.mgt.common.Device; +import org.wso2.carbon.device.mgt.common.DeviceIdentifier; import org.wso2.carbon.device.mgt.common.EnrolmentInfo; +import org.wso2.carbon.device.mgt.common.LifecycleStateDevice; import org.wso2.carbon.device.mgt.common.MDMAppConstants; 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.ConfigurationEntry; import org.wso2.carbon.device.mgt.common.configuration.mgt.ConfigurationManagementException; import org.wso2.carbon.device.mgt.common.configuration.mgt.PlatformConfiguration; @@ -50,14 +53,18 @@ import org.wso2.carbon.device.mgt.common.configuration.mgt.PlatformConfiguration import org.wso2.carbon.device.mgt.common.exceptions.BadRequestException; import org.wso2.carbon.device.mgt.common.exceptions.DeviceManagementException; import org.wso2.carbon.device.mgt.common.exceptions.DeviceNotFoundException; +import org.wso2.carbon.device.mgt.common.exceptions.DeviceStatusException; import org.wso2.carbon.device.mgt.common.exceptions.InvalidDeviceException; +import org.wso2.carbon.device.mgt.common.exceptions.InvalidStatusException; import org.wso2.carbon.device.mgt.common.exceptions.UserNotFoundException; import org.wso2.carbon.device.mgt.common.PaginationResult; import org.wso2.carbon.device.mgt.core.service.DeviceManagementProviderService; import org.wso2.carbon.device.mgt.jaxrs.beans.DeviceList; import org.wso2.carbon.device.mgt.jaxrs.beans.ErrorResponse; +import org.wso2.carbon.device.mgt.jaxrs.beans.LifecycleStateDeviceList; import org.wso2.carbon.device.mgt.jaxrs.service.api.admin.DeviceManagementAdminService; import org.wso2.carbon.device.mgt.jaxrs.service.impl.util.RequestValidationUtil; +import org.wso2.carbon.device.mgt.jaxrs.util.Constants; import org.wso2.carbon.device.mgt.jaxrs.util.DeviceMgtAPIUtils; import org.wso2.carbon.user.api.UserStoreException; import org.wso2.carbon.user.core.service.RealmService; @@ -283,4 +290,104 @@ public class DeviceManagementAdminServiceImpl implements DeviceManagementAdminSe return Response.status(Response.Status.INTERNAL_SERVER_ERROR).entity(msg).build(); } } + + /** + * This change the device status + * + * @param deviceId Id of the device + * @param nextStatus next status of the device + * @return response + */ + @POST + @Path("/status") + public Response changeDeviceStatus( + @QueryParam("deviceId") String deviceId, + @QueryParam("nextStatus") EnrolmentInfo.Status nextStatus) { + + try { + if (nextStatus == null) { + return Response.status(Response.Status.BAD_REQUEST).entity( + new ErrorResponse.ErrorResponseBuilder().setMessage("Next status is required") + .build()).build(); + } + + RequestValidationUtil.validateDeviceIdentifier(Constants.ANY, deviceId); + DeviceManagementProviderService dms = DeviceMgtAPIUtils.getDeviceManagementService(); + Device device = dms.getDevice(deviceId, false); + if (device == null) { + String message = "Device does not exist with id '" + deviceId + "'"; + log.error(message); + return Response.status(Response.Status.NOT_FOUND).entity( + new ErrorResponse.ErrorResponseBuilder().setMessage(message).build()).build(); + } + LifecycleStateDevice updatedInfo = DeviceMgtAPIUtils.getDeviceStateManagementService() + .changeDeviceStatus(device, nextStatus); + return Response.status(Response.Status.OK).entity(updatedInfo).build(); + } catch (InvalidStatusException e) { + String msg = "Error occured while changing status: Invalid status or invalid status change"; + log.error(msg, e); + return Response.status(Response.Status.BAD_REQUEST).entity(msg).build(); + } catch (DeviceManagementException e) { + String msg = "Error occurred while getting the device '" + deviceId + "'"; + log.error(msg, e); + return Response.serverError().entity( + new ErrorResponse.ErrorResponseBuilder().setMessage(msg).build()).build(); + } catch (DeviceStatusException e) { + String msg = "Error occurred while getting device Status"; + log.error(msg, e); + return Response.serverError().entity( + new ErrorResponse.ErrorResponseBuilder().setMessage(msg).build()).build(); + } + } + + /** + * Get the devicelifecycle history + * + * @param type Device type + * @param deviceId Device id + * @param offset is starting number of the record which we want tot get + * @param limit is the number of records we want starting from offset + * @return lifecycle history + */ + + @Override + @GET + @Path("/{type}/{deviceId}/lifecycle") + public Response getDeviceLifecycle( + @PathParam("type") String type, + @PathParam("deviceId") String deviceId, + @QueryParam("offset") int offset, + @QueryParam("limit") int limit) { + + try { + RequestValidationUtil.validatePaginationParameters(offset, limit); + PaginationRequest request = new PaginationRequest(offset, limit); + PaginationResult result; + + RequestValidationUtil.validateDeviceIdentifier(type, deviceId); + DeviceManagementProviderService deviceManagementProviderService = + DeviceMgtAPIUtils.getDeviceManagementService(); + DeviceIdentifier deviceIdentifier = new DeviceIdentifier(deviceId, type); + Device device = deviceManagementProviderService.getDevice(deviceIdentifier, false); + if (device == null) { + return Response.status(Response.Status.NOT_FOUND).build(); + } + LifecycleStateDeviceList states = new LifecycleStateDeviceList(); + result = DeviceMgtAPIUtils.getDeviceStateManagementService() + .getDeviceLifecycleHistory(request, device); + states.setLifecycleStates((List) result.getData()); + states.setCount(result.getRecordsTotal()); + return Response.status(Response.Status.OK).entity(states).build(); + } catch (DeviceManagementException e) { + String msg = "Error occurred while getting the device '" + deviceId + "'"; + log.error(msg); + return Response.serverError().entity( + new ErrorResponse.ErrorResponseBuilder().setMessage(msg).build()).build(); + } catch (DeviceStatusException e) { + String msg = "Error occurred while getting device Status"; + log.error(msg, e); + return Response.serverError().entity( + new ErrorResponse.ErrorResponseBuilder().setMessage(msg).build()).build(); + } + } } diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/util/Constants.java b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/util/Constants.java index d7462993a92..95fadfb4526 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/util/Constants.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/util/Constants.java @@ -58,6 +58,7 @@ public class Constants { "core.polcy.AndroidPolicyPayloadValidator"; public static final String IOS = "ios"; public static final String WINDOWS = "windows"; + public static final String ANY = "any"; public final class OperationStatus { diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/util/DeviceMgtAPIUtils.java b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/util/DeviceMgtAPIUtils.java index 92bc2790d49..5806d948c16 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/util/DeviceMgtAPIUtils.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/util/DeviceMgtAPIUtils.java @@ -86,6 +86,7 @@ import org.wso2.carbon.device.mgt.core.permission.mgt.PermissionUtils; import org.wso2.carbon.device.mgt.core.privacy.PrivacyComplianceProvider; import org.wso2.carbon.device.mgt.core.search.mgt.SearchManagerService; import org.wso2.carbon.device.mgt.core.service.DeviceManagementProviderService; +import org.wso2.carbon.device.mgt.core.service.DeviceStateManagementService; import org.wso2.carbon.device.mgt.core.service.GroupManagementProviderService; import org.wso2.carbon.device.mgt.core.traccar.api.service.DeviceAPIClientService; import org.wso2.carbon.device.mgt.jaxrs.beans.DeviceTypeVersionWrapper; @@ -271,6 +272,18 @@ public class DeviceMgtAPIUtils { } } + public static DeviceStateManagementService getDeviceStateManagementService() { + PrivilegedCarbonContext ctx = PrivilegedCarbonContext.getThreadLocalCarbonContext(); + DeviceStateManagementService deviceStateManagementService = + (DeviceStateManagementService) ctx.getOSGiService(DeviceStateManagementService.class, null); + if (deviceStateManagementService == null) { + String msg = "DeviceStateManagementService service has not initialized."; + log.error(msg); + throw new IllegalStateException(msg); + } + return deviceStateManagementService; + } + public static DeviceManagementProviderService getDeviceManagementService() { PrivilegedCarbonContext ctx = PrivilegedCarbonContext.getThreadLocalCarbonContext(); DeviceManagementProviderService deviceManagementProviderService = diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/DeviceManagementConstants.java b/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/DeviceManagementConstants.java index 154594678c7..3bbaf472507 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/DeviceManagementConstants.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/DeviceManagementConstants.java @@ -28,6 +28,7 @@ public final class DeviceManagementConstants { public static final String SECURE_VAULT_NS = "http://org.wso2.securevault/configuration"; public static final String DEVICE_CONFIG_XML_NAME = "cdm-config.xml"; public static final String UI_CONFIG_XML_NAME = "mdm-ui-config.xml"; + public static final String DEVICE_LIFECYCLE_STATES_XML_NAME = "lifecycle-states.xml"; } public static final class SecureValueProperties { diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/LifecycleStateDevice.java b/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/LifecycleStateDevice.java new file mode 100644 index 00000000000..fe968c0b235 --- /dev/null +++ b/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/LifecycleStateDevice.java @@ -0,0 +1,96 @@ +/* + * Copyright (c) 2022, Entgra (pvt) Ltd. (http://entgra.io) All Rights Reserved. + * + * Entgra (pvt) Ltd. licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.wso2.carbon.device.mgt.common; + +import java.util.Date; + +/** + * Information of the device lifecycle + */ +public class LifecycleStateDevice { + + private int deviceId; + private String currentStatus; + private String previousStatus; + private String updatedBy; + private Date updatedAt; + + public LifecycleStateDevice() { + } + + public LifecycleStateDevice(int deviceId, String currentStatus, String previousStatus, String updatedBy, + Date updatedAt) { + this.deviceId = deviceId; + this.currentStatus = currentStatus; + this.previousStatus = previousStatus; + this.updatedBy = updatedBy; + this.updatedAt = updatedAt; + } + + public String getCurrentStatus() { + return currentStatus; + } + + public void setCurrentStatus(String currentStatus) { + this.currentStatus = currentStatus; + } + + public String getPreviousStatus() { + return previousStatus; + } + + public void setPreviousStatus(String previousStatus) { + this.previousStatus = previousStatus; + } + + public String getUpdatedBy() { + return updatedBy; + } + + public void setUpdatedBy(String updatedBy) { + this.updatedBy = updatedBy; + } + + public Date getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(Date updatedAt) { + this.updatedAt = updatedAt; + } + + public int getDeviceId() { + return deviceId; + } + + public void setDeviceId(int deviceId) { + this.deviceId = deviceId; + } + + @Override + public String toString() { + return "LifecycleStateDevice{" + + "deviceId=" + deviceId + + ", currentStatus='" + currentStatus + '\'' + + ", previousStatus='" + previousStatus + '\'' + + ", updatedBy='" + updatedBy + '\'' + + ", updatedAt=" + updatedAt + + '}'; + } +} diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/configuration/mgt/DeviceLifecycleState.java b/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/configuration/mgt/DeviceLifecycleState.java new file mode 100644 index 00000000000..3211a7149e1 --- /dev/null +++ b/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/configuration/mgt/DeviceLifecycleState.java @@ -0,0 +1,80 @@ +/* + * Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. + * + * WSO2 Inc. licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * + */ +/* + * Copyright (c) 2022, Entgra (pvt) Ltd. (http://entgra.io) All Rights Reserved. + * + * Entgra (pvt) Ltd. licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.wso2.carbon.device.mgt.common.configuration.mgt; + +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlElementWrapper; +import javax.xml.bind.annotation.XmlRootElement; +import java.util.List; + +/** + * Bean of the DeviceLifecycleState + */ +@XmlRootElement(name = "LifecycleState") +public class DeviceLifecycleState { + + private String name; + private List proceedingStates; + + @XmlAttribute(name = "name") + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + @XmlElementWrapper(name = "ProceedingStates") + @XmlElement(name = "State") + public List getProceedingStates() { + return proceedingStates; + } + + public void setProceedingStates(List proceedingStates) { + this.proceedingStates = proceedingStates; + } + + @Override + public String toString() { + return "DeviceLifecycleState{" + + "name='" + name + '\'' + + ", proceedingStates=" + proceedingStates + + '}'; + } +} diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/exceptions/DeviceStatusException.java b/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/exceptions/DeviceStatusException.java new file mode 100644 index 00000000000..706f14f0d62 --- /dev/null +++ b/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/exceptions/DeviceStatusException.java @@ -0,0 +1,30 @@ +package org.wso2.carbon.device.mgt.common.exceptions; + +public class DeviceStatusException extends Exception{ + + private static final long serialVersionUID = 1608833587090532707L; + + public DeviceStatusException() { + } + + public DeviceStatusException(String msg, Exception nestedEx) { + super(msg, nestedEx); + } + + + public DeviceStatusException(String message) { + super(message); + } + + public DeviceStatusException(String message, Throwable cause) { + super(message, cause); + } + + public DeviceStatusException(Throwable cause) { + super(cause); + } + + public DeviceStatusException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) { + super(message, cause, enableSuppression, writableStackTrace); + } +} diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/exceptions/InvalidStatusException.java b/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/exceptions/InvalidStatusException.java new file mode 100644 index 00000000000..3c3f0c9b47b --- /dev/null +++ b/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/exceptions/InvalidStatusException.java @@ -0,0 +1,28 @@ +package org.wso2.carbon.device.mgt.common.exceptions; + +public class InvalidStatusException extends Exception{ + + private static final long serialVersionUID = -7379721600057895944L; + + + public InvalidStatusException() { + } + + public InvalidStatusException(String message) { + super(message); + } + + public InvalidStatusException(String message, Throwable cause) { + super(message, cause); + } + + public InvalidStatusException(Throwable cause) { + super(cause); + } + + public InvalidStatusException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) { + super(message, cause, enableSuppression, writableStackTrace); + } + + +} diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/config/DeviceConfigurationManager.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/config/DeviceConfigurationManager.java index 027ddd2417c..0ea2660762e 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/config/DeviceConfigurationManager.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/config/DeviceConfigurationManager.java @@ -40,6 +40,7 @@ public class DeviceConfigurationManager { private static final String DEVICE_MGT_CONFIG_PATH = CarbonUtils.getCarbonConfigDirPath() + File.separator + DeviceManagementConstants.DataSourceProperties.DEVICE_CONFIG_XML_NAME; + private static final String DEVICE_MGT_CONFIG_SCHEMA_PATH = "resources/config/schema/device-mgt-config-schema.xsd"; public static DeviceConfigurationManager getInstance() { diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/config/lifecycleState/DeviceLifecycleConfig.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/config/lifecycleState/DeviceLifecycleConfig.java new file mode 100644 index 00000000000..bdafeae3201 --- /dev/null +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/config/lifecycleState/DeviceLifecycleConfig.java @@ -0,0 +1,46 @@ +/* + * Copyright (c) 2022, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. + * + * WSO2 Inc. licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * + */ + +package org.wso2.carbon.device.mgt.core.config.lifecycleState; + +import org.wso2.carbon.device.mgt.common.configuration.mgt.DeviceLifecycleState; + +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlElementWrapper; +import javax.xml.bind.annotation.XmlRootElement; +import java.util.List; + +/** + * Represents Device lifecycle status configuration. + */ +@XmlRootElement(name = "LifecycleManagementConfiguration") +public class DeviceLifecycleConfig { + + private List deviceLifecycleStates; + + @XmlElementWrapper(name = "LifecycleStates") + @XmlElement(name = "LifecycleState") + public List getDeviceLifecycleStates() { + return deviceLifecycleStates; + } + + public void setDeviceLifecycleStates(List deviceLifecycleStates) { + this.deviceLifecycleStates = deviceLifecycleStates; + } +} diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/config/lifecycleState/DeviceLifecycleConfigManager.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/config/lifecycleState/DeviceLifecycleConfigManager.java new file mode 100644 index 00000000000..b4b941fd18c --- /dev/null +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/config/lifecycleState/DeviceLifecycleConfigManager.java @@ -0,0 +1,89 @@ +/* + * Copyright (c) 2022, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. + * + * WSO2 Inc. licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * + */ + +package org.wso2.carbon.device.mgt.core.config.lifecycleState; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.wso2.carbon.device.mgt.common.DeviceManagementConstants; +import org.wso2.carbon.utils.CarbonUtils; + +import javax.xml.bind.JAXBContext; +import javax.xml.bind.JAXBException; +import javax.xml.bind.Unmarshaller; +import java.io.File; + +/** + * Class responsible for the LifecycleStates configuration initialization. + */ +public class DeviceLifecycleConfigManager { + + private static final Log log = LogFactory.getLog(DeviceLifecycleConfigManager.class); + private DeviceLifecycleConfig deviceLifecycleConfig; + private static volatile DeviceLifecycleConfigManager deviceLifecycleConfigManager; + private static final String DEVICE_LIFECYCLE_PATH = CarbonUtils.getCarbonConfigDirPath() + File.separator + + DeviceManagementConstants.DataSourceProperties.DEVICE_LIFECYCLE_STATES_XML_NAME; + + private DeviceLifecycleConfigManager() { + } + + public static DeviceLifecycleConfigManager getInstance() { + if (deviceLifecycleConfigManager == null) { + synchronized (DeviceLifecycleConfigManager.class) { + if (deviceLifecycleConfigManager == null) { + deviceLifecycleConfigManager = new DeviceLifecycleConfigManager(); + try { + deviceLifecycleConfigManager.initConfig(); + } catch (Exception e) { + log.error(e); + } + } else { + try { + deviceLifecycleConfigManager.initConfig(); + } catch (Exception e) { + log.error(e); + } + } + } + } + return deviceLifecycleConfigManager; + } + + public synchronized void initConfig() { + try { + File deviceLifecycleConfig = new File(DEVICE_LIFECYCLE_PATH); + JAXBContext jaxbContext = JAXBContext.newInstance(DeviceLifecycleConfig.class); + Unmarshaller unmarshaller = jaxbContext.createUnmarshaller(); + this.deviceLifecycleConfig = (DeviceLifecycleConfig) unmarshaller.unmarshal(deviceLifecycleConfig); + + } catch (JAXBException e) { + String msg = "Error occured while initializing deviceLifecycle config"; + log.error(msg, e); + throw new RuntimeException(e); + } catch (Exception e) { + String msg = "Error(Exception) occured while initializing deviceLifecycle config"; + log.error(msg, e); + throw new RuntimeException(e); + } + } + + public DeviceLifecycleConfig getDeviceLifecycleConfig() { + return deviceLifecycleConfig; + } +} diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/dao/DeviceLifecycleDAO.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/dao/DeviceLifecycleDAO.java new file mode 100644 index 00000000000..874e39e34dd --- /dev/null +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/dao/DeviceLifecycleDAO.java @@ -0,0 +1,72 @@ +/* + * Copyright (c) 2022, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. + * + * WSO2 Inc. licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * + */ + +package org.wso2.carbon.device.mgt.core.dao; + +import org.wso2.carbon.device.mgt.common.EnrolmentInfo; +import org.wso2.carbon.device.mgt.common.LifecycleStateDevice; + +import java.util.List; + +/** + * Device status relevent DAO activity + */ +public interface DeviceLifecycleDAO { + + /** + * can change the relevent device's status + * + * @param enrolmentId Enrolment Id + * @param status changing status + * @param tenantId tenantId + * @return true or false + * @throws DeviceManagementDAOException when device no found + */ + boolean changeStatus(int enrolmentId, EnrolmentInfo.Status status, int tenantId) throws DeviceManagementDAOException; + + /** + * Add the changed status + * + * @param enrolmentId Enrolment Id + * @param currentStatus Current Status + * @param previousStatus Previous Status + * @param deviceId Id of the device + * @return Added or not, true or false + * @throws DeviceManagementDAOException When device not found + */ + boolean addStatus(int enrolmentId, EnrolmentInfo.Status currentStatus, EnrolmentInfo.Status previousStatus, + int deviceId) throws DeviceManagementDAOException; + + /** + * Get Device ID + * + * @param enrolmentId Enrolment ID + * @return Device id + * @throws DeviceManagementDAOException when device not found + */ + int getDeviceId(int enrolmentId) throws DeviceManagementDAOException; + + /** + * Get the lifecycle history of the device + * + * @param id id of the device + * @return List of LifecycleStateDevice + */ + List getDeviceLifecycle(int id) throws DeviceManagementDAOException; +} diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/dao/DeviceManagementDAOFactory.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/dao/DeviceManagementDAOFactory.java index cbd7c697f4a..5157860705f 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/dao/DeviceManagementDAOFactory.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/dao/DeviceManagementDAOFactory.java @@ -125,6 +125,10 @@ public class DeviceManagementDAOFactory { return new EnrollmentDAOImpl(); } + public static DeviceLifecycleDAO getDeviceLifecycleDAO() { + return new DeviceLifecycleDAOImpl(); + } + public static TrackerDAO getTrackerDAO() { if (databaseEngine != null) { switch (databaseEngine) { diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/dao/impl/DeviceLifecycleDAOImpl.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/dao/impl/DeviceLifecycleDAOImpl.java new file mode 100644 index 00000000000..cfefbaad086 --- /dev/null +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/dao/impl/DeviceLifecycleDAOImpl.java @@ -0,0 +1,174 @@ +/* + * Copyright (c) 2022, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. + * + * WSO2 Inc. licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * + */ + +package org.wso2.carbon.device.mgt.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.DeviceManagementConstants; +import org.wso2.carbon.device.mgt.common.EnrolmentInfo; +import org.wso2.carbon.device.mgt.common.LifecycleStateDevice; +import org.wso2.carbon.device.mgt.core.dao.DeviceLifecycleDAO; +import org.wso2.carbon.device.mgt.core.dao.DeviceManagementDAOException; +import org.wso2.carbon.device.mgt.core.dao.DeviceManagementDAOFactory; +import org.wso2.carbon.device.mgt.core.dao.util.DeviceManagementDAOUtil; + +import java.sql.Connection; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.sql.Timestamp; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class DeviceLifecycleDAOImpl implements DeviceLifecycleDAO { + + private static final Log log = LogFactory.getLog(DeviceLifecycleDAOImpl.class); + + private Connection getConnection() throws SQLException { + return DeviceManagementDAOFactory.getConnection(); + } + + @Override + public boolean changeStatus(int enrolmentId, EnrolmentInfo.Status status, int tenantId) + throws DeviceManagementDAOException { + Connection conn; + PreparedStatement stmt = null; + Timestamp updateTime = new Timestamp(new Date().getTime()); + try { + conn = this.getConnection(); + String sql = "UPDATE DM_ENROLMENT SET STATUS = ?, DATE_OF_LAST_UPDATE = ? WHERE ID = ? AND TENANT_ID = ?"; + stmt = conn.prepareStatement(sql); + stmt.setString(1, status.toString()); + stmt.setTimestamp(2, updateTime); + stmt.setInt(3, enrolmentId); + stmt.setInt(4, tenantId); + int updatedRowCount = stmt.executeUpdate(); + if (updatedRowCount != 1) { + throw new DeviceManagementDAOException("Error occurred while setting the status of device enrolment: " + + updatedRowCount + " rows were updated instead of one row!!!"); + } + } catch (SQLException e) { + String msg = "Error occurred while changing status of the device which has " + enrolmentId + " enrolmentId"; + log.error(msg, e); + throw new DeviceManagementDAOException(msg, e); + } finally { + DeviceManagementDAOUtil.cleanupResources(stmt, null); + } + return true; + } + + @Override + public boolean addStatus(int enrolmentId, EnrolmentInfo.Status currentStatus, EnrolmentInfo.Status previousStatus, + int deviceId) throws DeviceManagementDAOException { + Connection conn; + String changedBy = PrivilegedCarbonContext.getThreadLocalCarbonContext().getUsername(); + if (changedBy == null) { + changedBy = DeviceManagementConstants.MaintenanceProperties.MAINTENANCE_USER; + } + PreparedStatement stmt = null; + Timestamp updateTime = new Timestamp(new Date().getTime()); + try { + conn = this.getConnection(); + String sql = "INSERT INTO DM_DEVICE_STATUS (ENROLMENT_ID, DEVICE_ID, STATUS, UPDATE_TIME, CHANGED_BY, " + + "PREVIOUS_STATUS) VALUES(?, ?, ?, ?, ?, ?)"; + stmt = conn.prepareStatement(sql); + stmt.setInt(1, enrolmentId); + stmt.setInt(2, deviceId); + stmt.setString(3, currentStatus.toString()); + stmt.setTimestamp(4, updateTime); + stmt.setString(5, changedBy); + stmt.setString(6, previousStatus.toString()); + stmt.executeUpdate(); + } catch (SQLException e) { + String msg = "Error occurred while inserting device lifecycle"; + log.error(msg, e); + throw new DeviceManagementDAOException(msg, e); + } finally { + DeviceManagementDAOUtil.cleanupResources(stmt, null); + } + return true; + } + + public int getDeviceId(int enrolmentId) throws DeviceManagementDAOException { + int deviceId; + Connection conn; + PreparedStatement stmt = null; + ResultSet rs = null; + try { + conn = this.getConnection(); + String sql = "SELECT DEVICE_ID FROM DM_ENROLMENT WHERE ID = ?"; + stmt = conn.prepareStatement(sql); + stmt.setInt(1, enrolmentId); + rs = stmt.executeQuery(); + if (rs.next()) { + deviceId = rs.getInt("DEVICE_ID"); + } else { + // if there were no records corresponding to the enrolment id this is a problem. i.e. enrolment + // id is invalid + throw new DeviceManagementDAOException("Error occurred while getting the status of device enrolment: " + + "no record for enrolment id " + enrolmentId); + } + } catch (SQLException e) { + String msg = "Error occurred while getiing the device if which has " + enrolmentId + " enrolmentId"; + log.error(msg, e); + throw new DeviceManagementDAOException(msg, e); + } finally { + DeviceManagementDAOUtil.cleanupResources(stmt, null); + } + return deviceId; + } + + @Override + public List getDeviceLifecycle(int id) throws DeviceManagementDAOException { + List result = new ArrayList<>(); + Connection conn; + PreparedStatement stmt = null; + ResultSet rs = null; + try { + conn = this.getConnection(); + String sql = "SELECT DEVICE_ID, STATUS, UPDATE_TIME, CHANGED_BY, PREVIOUS_STATUS FROM DM_DEVICE_STATUS " + + "WHERE DEVICE_ID = ?"; + + stmt = conn.prepareStatement(sql); + stmt.setInt(1, id); + rs = stmt.executeQuery(); + + while (rs.next()) { + LifecycleStateDevice lifecycleStateDevice = new LifecycleStateDevice( + rs.getInt("DEVICE_ID"), + rs.getString("STATUS"), + rs.getString("PREVIOUS_STATUS"), + rs.getString("CHANGED_BY"), + new Date(rs.getTimestamp("UPDATE_TIME").getTime()) + ); + result.add(lifecycleStateDevice); + } + } catch (SQLException e) { + String msg = "Error occurred while getiing the device lifecycle which has " + id + " deviceId"; + log.error(msg, e); + throw new DeviceManagementDAOException(msg, e); + } finally { + DeviceManagementDAOUtil.cleanupResources(stmt, rs); + } + return result; + } +} diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/dao/impl/EnrollmentDAOImpl.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/dao/impl/EnrollmentDAOImpl.java index 7b3e08cd509..2ae2fb8b60a 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/dao/impl/EnrollmentDAOImpl.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/dao/impl/EnrollmentDAOImpl.java @@ -348,7 +348,7 @@ public class EnrollmentDAOImpl implements EnrollmentDAO { DeviceManagementDAOUtil.cleanupResources(stmt, null); // if there was no record for the enrolment or the previous status is not the same as the current status // we'll add a record - if (previousStatus == null || previousStatus != status){ + if (previousStatus == null || previousStatus != status) { if (deviceId == -1) { // we need the device id in order to add a new record, therefore we get it from the enrolment table sql = "SELECT DEVICE_ID FROM DM_ENROLMENT WHERE ID = ?"; @@ -364,8 +364,16 @@ public class EnrollmentDAOImpl implements EnrollmentDAO { } DeviceManagementDAOUtil.cleanupResources(stmt, null); } + sql = "INSERT INTO DM_DEVICE_STATUS (ENROLMENT_ID, DEVICE_ID, STATUS, UPDATE_TIME, CHANGED_BY"; + if (previousStatus != null) { + sql += ", PREVIOUS_STATUS"; + } + sql += ") VALUES(?, ?, ?, ?, ?"; + if (previousStatus != null) { + sql += ", ?"; + } + sql += ")"; - sql = "INSERT INTO DM_DEVICE_STATUS (ENROLMENT_ID, DEVICE_ID, STATUS, UPDATE_TIME, CHANGED_BY) VALUES(?, ?, ?, ?, ?)"; stmt = conn.prepareStatement(sql); Timestamp updateTime = new Timestamp(new Date().getTime()); stmt.setInt(1, enrolmentId); @@ -373,9 +381,10 @@ public class EnrollmentDAOImpl implements EnrollmentDAO { stmt.setString(3, status.toString()); stmt.setTimestamp(4, updateTime); stmt.setString(5, changedBy); - stmt.execute(); - } else { - // no need to update status since the last recorded status is the same as the current status + if (previousStatus != null) { + stmt.setString(6, previousStatus.toString()); + } + stmt.executeUpdate(); } } catch (SQLException e) { throw new DeviceManagementDAOException("Error occurred while setting the status of device", e); diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/internal/DeviceManagementDataHolder.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/internal/DeviceManagementDataHolder.java index 6a69cb02ba5..a5331d3c0ef 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/internal/DeviceManagementDataHolder.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/internal/DeviceManagementDataHolder.java @@ -34,6 +34,7 @@ import org.wso2.carbon.device.mgt.core.device.details.mgt.DeviceInformationManag import org.wso2.carbon.device.mgt.core.dto.DeviceType; import org.wso2.carbon.device.mgt.core.dto.DeviceTypeServiceIdentifier; import org.wso2.carbon.device.mgt.core.geo.task.GeoFenceEventOperationManager; +import org.wso2.carbon.device.mgt.core.lifeCycle.DeviceLifecycleStateManager; import org.wso2.carbon.device.mgt.core.operation.timeout.task.OperationTimeoutTaskManagerService; import org.wso2.carbon.device.mgt.core.privacy.PrivacyComplianceProvider; import org.wso2.carbon.device.mgt.core.push.notification.mgt.PushNotificationProviderRepository; @@ -86,6 +87,7 @@ public class DeviceManagementDataHolder { private OperationTimeoutTaskManagerService operationTimeoutTaskManagerService; private DeviceAPIClientService deviceAPIClientService; + private DeviceLifecycleStateManager deviceLifecycleStateManager; private final Map deviceStatusTaskPluginConfigs = Collections.synchronizedMap( new HashMap<>()); @@ -359,4 +361,12 @@ public class DeviceManagementDataHolder { public void setDeviceAPIClientService(DeviceAPIClientService deviceAPIClientService) { this.deviceAPIClientService = deviceAPIClientService; } + + public DeviceLifecycleStateManager getDeviceLifecycleStateManager() { + return deviceLifecycleStateManager; + } + + public void setDeviceLifecycleStateManager(DeviceLifecycleStateManager deviceLifecycleStateManager) { + this.deviceLifecycleStateManager = deviceLifecycleStateManager; + } } 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 a266a40499d..1efe03c5f9d 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,6 +25,7 @@ import org.osgi.service.component.ComponentContext; import org.wso2.carbon.core.ServerStartupObserver; 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.DeviceLifecycleState; import org.wso2.carbon.device.mgt.common.configuration.mgt.PlatformConfigurationManagementService; import org.wso2.carbon.device.mgt.common.event.config.EventConfigurationProviderService; import org.wso2.carbon.device.mgt.common.exceptions.DeviceManagementException; @@ -48,6 +49,7 @@ import org.wso2.carbon.device.mgt.core.authorization.DeviceAccessAuthorizationSe import org.wso2.carbon.device.mgt.core.config.DeviceConfigurationManager; import org.wso2.carbon.device.mgt.core.config.DeviceManagementConfig; import org.wso2.carbon.device.mgt.core.config.datasource.DataSourceConfig; +import org.wso2.carbon.device.mgt.core.config.lifecycleState.DeviceLifecycleConfigManager; import org.wso2.carbon.device.mgt.core.config.tenant.PlatformConfigurationManagementServiceImpl; import org.wso2.carbon.device.mgt.core.config.ui.UIConfigurationManager; import org.wso2.carbon.device.mgt.core.dao.DeviceManagementDAOFactory; @@ -58,6 +60,7 @@ import org.wso2.carbon.device.mgt.core.device.details.mgt.DeviceInformationManag import org.wso2.carbon.device.mgt.core.device.details.mgt.impl.DeviceInformationManagerImpl; import org.wso2.carbon.device.mgt.core.event.config.EventConfigurationProviderServiceImpl; import org.wso2.carbon.device.mgt.core.geo.service.GeoLocationProviderServiceImpl; +import org.wso2.carbon.device.mgt.core.lifeCycle.DeviceLifecycleStateManager; import org.wso2.carbon.device.mgt.core.metadata.mgt.MetadataManagementServiceImpl; import org.wso2.carbon.device.mgt.core.metadata.mgt.dao.MetadataManagementDAOFactory; import org.wso2.carbon.device.mgt.core.notification.mgt.NotificationManagementServiceImpl; @@ -76,6 +79,8 @@ import org.wso2.carbon.device.mgt.core.search.mgt.SearchManagerService; import org.wso2.carbon.device.mgt.core.search.mgt.impl.SearchManagerServiceImpl; import org.wso2.carbon.device.mgt.core.service.DeviceManagementProviderService; import org.wso2.carbon.device.mgt.core.service.DeviceManagementProviderServiceImpl; +import org.wso2.carbon.device.mgt.core.service.DeviceStateManagementService; +import org.wso2.carbon.device.mgt.core.service.DeviceStateManagementServiceImpl; import org.wso2.carbon.device.mgt.core.service.GroupManagementProviderService; import org.wso2.carbon.device.mgt.core.service.GroupManagementProviderServiceImpl; import org.wso2.carbon.device.mgt.core.task.DeviceTaskManagerService; @@ -274,6 +279,19 @@ public class DeviceManagementServiceComponent { if (log.isDebugEnabled()) { log.debug("Device management core bundle has been successfully initialized"); } + + /* Initializing DeviceLifecycleState Configuration */ + List deviceLifecycleStates = DeviceLifecycleConfigManager.getInstance(). + getDeviceLifecycleConfig().getDeviceLifecycleStates(); + DeviceLifecycleStateManager deviceLifecycleStateManager = new DeviceLifecycleStateManager(); + deviceLifecycleStateManager.init(deviceLifecycleStates); + DeviceManagementDataHolder.getInstance().setDeviceLifecycleStateManager(deviceLifecycleStateManager); + componentContext.getBundleContext().registerService(DeviceLifecycleStateManager.class.getName(), + deviceLifecycleStateManager, null); + + DeviceStateManagementService deviceStateManagementService = new DeviceStateManagementServiceImpl(); + componentContext.getBundleContext().registerService(DeviceStateManagementService.class.getName(), + deviceStateManagementService, null); } catch (Throwable e) { log.error("Error occurred while initializing device management core bundle", e); } diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/lifeCycle/DeviceLifecycleStateManager.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/lifeCycle/DeviceLifecycleStateManager.java new file mode 100644 index 00000000000..dde06468584 --- /dev/null +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/lifeCycle/DeviceLifecycleStateManager.java @@ -0,0 +1,79 @@ +/* + * Copyright (c) 2022, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. + * + * WSO2 Inc. licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * + */ + +package org.wso2.carbon.device.mgt.core.lifeCycle; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.wso2.carbon.device.mgt.common.configuration.mgt.DeviceLifecycleState; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/* this class has the methods to check whether the status is valid or status change is valid +deviceLifecycleStates details are coming from lifecycle-states.xml file*/ +public class DeviceLifecycleStateManager { + private Map deviceLifecycleStates; + private static final Log log = LogFactory.getLog(DeviceLifecycleStateManager.class); + + public Map getDeviceLifecycleStates() { + return deviceLifecycleStates; + } + + public void setDeviceLifecycleStates(Map deviceLifecycleStates) { + this.deviceLifecycleStates = deviceLifecycleStates; + } + + public void init(List states) { + deviceLifecycleStates = new HashMap<>(); + for (DeviceLifecycleState deviceLifecycleState : states) { + deviceLifecycleStates.put(deviceLifecycleState.getName(), deviceLifecycleState); + } + } + + public List getNextLifecycleStates(String currentLifecycleState) { + return deviceLifecycleStates.get(currentLifecycleState).getProceedingStates(); + } + + public boolean isValidStateChange(String currentStatus, String nextStatus) { + boolean validChange = false; + List proceedingstates = deviceLifecycleStates.get(currentStatus).getProceedingStates(); + for (String proceedingState : proceedingstates) { + if (proceedingState.equals(nextStatus)) { + validChange = true; + break; + } + } + return validChange; + } + + public boolean isValidState(String nextStatus) { + boolean isValid = false; + List states = new ArrayList<>(deviceLifecycleStates.keySet()); + for (String state : states) { + if (state.equals(nextStatus)) { + isValid = true; + break; + } + } + return isValid; + } +} 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 97f58b3f3c8..cfbe8a34802 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 @@ -2121,10 +2121,11 @@ public class DeviceManagementProviderServiceImpl implements DeviceManagementProv log.debug("get status history of device: " + device.getDeviceIdentifier()); } try { + DeviceManagementDAOFactory.openConnection(); int tenantId = this.getTenantId(); return deviceStatusDAO.getStatus(device.getId(), tenantId, fromDate, toDate, billingStatus); } catch (DeviceManagementDAOException e) { - DeviceManagementDAOFactory.rollbackTransaction(); +// DeviceManagementDAOFactory.rollbackTransaction(); String msg = "Error occurred while retrieving status history"; log.error(msg, e); throw new DeviceManagementException(msg, e); @@ -2132,6 +2133,8 @@ public class DeviceManagementProviderServiceImpl implements DeviceManagementProv String msg = "Error occurred in retrieving status history for device :" + device.getDeviceIdentifier(); log.error(msg, e); throw new DeviceManagementException(msg, e); + } finally { + DeviceManagementDAOFactory.closeConnection(); } } diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/service/DeviceStateManagementService.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/service/DeviceStateManagementService.java new file mode 100644 index 00000000000..dbf44d2581a --- /dev/null +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/service/DeviceStateManagementService.java @@ -0,0 +1,72 @@ +/* + * Copyright (c) 2022, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. + * + * WSO2 Inc. licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * + */ +/* + * Copyright (c) 2019, Entgra (pvt) Ltd. (http://entgra.io) All Rights Reserved. + * + * Entgra (pvt) Ltd. licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.wso2.carbon.device.mgt.core.service; + +import org.wso2.carbon.device.mgt.common.Device; +import org.wso2.carbon.device.mgt.common.EnrolmentInfo; +import org.wso2.carbon.device.mgt.common.LifecycleStateDevice; +import org.wso2.carbon.device.mgt.common.exceptions.DeviceStatusException; +import org.wso2.carbon.device.mgt.common.exceptions.InvalidStatusException; +import org.wso2.carbon.device.mgt.core.dao.DeviceManagementDAOException; + +import java.util.List; + +/** + * This interface manages the device lifecycle, such as statuschange and add status to table + */ +public interface DeviceStateManagementService { + + /** + * This method change the device status and store it in a table + * + * @param enrolmentInfo Enrollment Information about the device + * @param nextStatus Next status of the device + * @return LifecycleStateDevice which contain current and previoius status + * @throws InvalidStatusException If there is a invalid status or invalid status change + * @throws DeviceManagementDAOException if the device cannot be found + */ + LifecycleStateDevice changeDeviceStatus(EnrolmentInfo enrolmentInfo, EnrolmentInfo.Status nextStatus) + throws InvalidStatusException, DeviceStatusException; + + /** + * Get the lifecycle history of the relevent device + * + * @param device Device + * @return List of LifecycleStateDevice + */ + List getDeviceLifecycleHistory(Device device) throws DeviceStatusException; +} diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/service/DeviceStateManagementServiceImpl.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/service/DeviceStateManagementServiceImpl.java new file mode 100644 index 00000000000..742388b0b66 --- /dev/null +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/service/DeviceStateManagementServiceImpl.java @@ -0,0 +1,136 @@ +/* + * Copyright (c) 2022, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. + * + * WSO2 Inc. licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * + */ +/* + * Copyright (c) 2019, Entgra (pvt) Ltd. (http://entgra.io) All Rights Reserved. + * + * Entgra (pvt) Ltd. licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.wso2.carbon.device.mgt.core.service; + +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.Device; +import org.wso2.carbon.device.mgt.common.EnrolmentInfo; +import org.wso2.carbon.device.mgt.common.LifecycleStateDevice; +import org.wso2.carbon.device.mgt.common.exceptions.DeviceStatusException; +import org.wso2.carbon.device.mgt.common.exceptions.IllegalTransactionStateException; +import org.wso2.carbon.device.mgt.common.exceptions.InvalidStatusException; +import org.wso2.carbon.device.mgt.common.exceptions.TransactionManagementException; +import org.wso2.carbon.device.mgt.core.dao.DeviceLifecycleDAO; +import org.wso2.carbon.device.mgt.core.dao.DeviceManagementDAOException; +import org.wso2.carbon.device.mgt.core.dao.DeviceManagementDAOFactory; +import org.wso2.carbon.device.mgt.core.internal.DeviceManagementDataHolder; +import org.wso2.carbon.device.mgt.core.lifeCycle.DeviceLifecycleStateManager; + +import java.sql.SQLException; +import java.util.List; + +public class DeviceStateManagementServiceImpl implements DeviceStateManagementService { + + private static final Log log = LogFactory.getLog(DeviceStateManagementServiceImpl.class); + private final DeviceLifecycleDAO deviceLifecycleDAO; + private final DeviceLifecycleStateManager deviceLifecycleStateManager; + + public DeviceStateManagementServiceImpl() { + this.deviceLifecycleDAO = DeviceManagementDAOFactory.getDeviceLifecycleDAO(); + deviceLifecycleStateManager = DeviceManagementDataHolder.getInstance().getDeviceLifecycleStateManager(); + } + + @Override + public LifecycleStateDevice changeDeviceStatus(EnrolmentInfo enrolmentInfo, EnrolmentInfo.Status nextStatus) throws + InvalidStatusException, DeviceStatusException { + LifecycleStateDevice lifecycleStateDevice = new LifecycleStateDevice(); + EnrolmentInfo.Status currentStatus = enrolmentInfo.getStatus(); + if (deviceLifecycleStateManager.isValidState(nextStatus.toString())){ + if (deviceLifecycleStateManager.isValidStateChange(currentStatus.toString(), nextStatus.toString())) { + lifecycleStateDevice.setCurrentStatus(nextStatus.toString()); + lifecycleStateDevice.setPreviousStatus(currentStatus.toString()); + } else { + String msg ="'" + currentStatus + "' to '" + nextStatus + "' is not a valid Status change. Enter " + + "valid Status"; + log.error(msg); + throw new InvalidStatusException(msg); + } + } else { + String msg = "'" + nextStatus +"' is not a valid Status. Check the Status"; + log.error(msg); + throw new InvalidStatusException(msg); + } + int tenantId = CarbonContext.getThreadLocalCarbonContext().getTenantId(); + int enrolmentId = enrolmentInfo.getId(); + try { + DeviceManagementDAOFactory.beginTransaction(); + int deviceId = deviceLifecycleDAO.getDeviceId(enrolmentId); + deviceLifecycleDAO.changeStatus(enrolmentId, EnrolmentInfo.Status.valueOf( + lifecycleStateDevice.getCurrentStatus()), tenantId); + deviceLifecycleDAO.addStatus(enrolmentId, + EnrolmentInfo.Status.valueOf(lifecycleStateDevice.getCurrentStatus()), + EnrolmentInfo.Status.valueOf(lifecycleStateDevice.getPreviousStatus()), deviceId); + DeviceManagementDAOFactory.commitTransaction(); + return lifecycleStateDevice; + } catch (DeviceManagementDAOException e) { + DeviceManagementDAOFactory.rollbackTransaction(); + String msg = "Error occurred in updating status or storing device status"; + log.error(msg, e); + throw new DeviceStatusException(msg, e); + } catch (IllegalTransactionStateException e) { + String msg = "Error occurred while updating and storing(Transaction Error) device status"; + log.error(msg, e); + throw new DeviceStatusException(msg, e); + } catch (TransactionManagementException e) { + String msg = "Error occurred in DeviceManagementDAOFactory"; + log.error(msg, e); + throw new InvalidStatusException(msg, e); + } finally { + DeviceManagementDAOFactory.closeConnection(); + } + } + + @Override + public List getDeviceLifecycleHistory(Device device) throws DeviceStatusException { + int id = device.getId(); + try { + DeviceManagementDAOFactory.openConnection(); + List listLifecycle = deviceLifecycleDAO.getDeviceLifecycle(id); + return listLifecycle; + } catch (DeviceManagementDAOException e) { + String msg = "Error occurred while getting lifrcycle history"; + log.error(msg, e); + throw new DeviceStatusException(msg, e); + } catch (SQLException e) { + throw new RuntimeException(e); + } finally { + DeviceManagementDAOFactory.closeConnection(); + } + } +} diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/resources/sql/h2.sql b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/resources/sql/h2.sql index d3b81f2655c..395124a9879 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/resources/sql/h2.sql +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/resources/sql/h2.sql @@ -112,6 +112,8 @@ CREATE TABLE IF NOT EXISTS DM_DEVICE_STATUS ( CONSTRAINT fk_dm_device_status_enrolment FOREIGN KEY (ENROLMENT_ID) REFERENCES DM_ENROLMENT (ID) ON DELETE NO ACTION ON UPDATE NO ACTION ); +ALTER TABLE DM_DEVICE_STATUS ADD PREVIOUS_STATUS VARCHAR(50) DEFAULT NULL; + CREATE TABLE IF NOT EXISTS DM_ENROLMENT_OP_MAPPING ( ID INTEGER AUTO_INCREMENT NOT NULL, ENROLMENT_ID INTEGER NOT NULL, diff --git a/features/device-mgt/org.wso2.carbon.device.mgt.basics.feature/src/main/resources/conf/lifecycle-states.xml b/features/device-mgt/org.wso2.carbon.device.mgt.basics.feature/src/main/resources/conf/lifecycle-states.xml new file mode 100644 index 00000000000..ef5c6441076 --- /dev/null +++ b/features/device-mgt/org.wso2.carbon.device.mgt.basics.feature/src/main/resources/conf/lifecycle-states.xml @@ -0,0 +1,116 @@ + + + + + + + + ACTIVE + + + + + UNREACHABLE + REMOVED + + + + + INACTIVE + REMOVED + + + + + REMOVED + + + + + REMOVED + + + + + REMOVED + + + + + REMOVED + + + + + REMOVED + + + + + REMOVED + + + + + REMOVED + + + + + REMOVED + + + + + REMOVED + + + + + REMOVED + + + + + REMOVED + + + + + REMOVED + + + + + REMOVED + + + + + REMOVED + + + + + ACTIVE + CREATED + + + + \ No newline at end of file diff --git a/features/device-mgt/org.wso2.carbon.device.mgt.basics.feature/src/main/resources/dbscripts/cdm/h2.sql b/features/device-mgt/org.wso2.carbon.device.mgt.basics.feature/src/main/resources/dbscripts/cdm/h2.sql index 0e8d1b8466d..3db934311ea 100644 --- a/features/device-mgt/org.wso2.carbon.device.mgt.basics.feature/src/main/resources/dbscripts/cdm/h2.sql +++ b/features/device-mgt/org.wso2.carbon.device.mgt.basics.feature/src/main/resources/dbscripts/cdm/h2.sql @@ -115,12 +115,15 @@ CREATE TABLE IF NOT EXISTS DM_DEVICE_STATUS ( STATUS VARCHAR(50) DEFAULT NULL, UPDATE_TIME TIMESTAMP DEFAULT NULL, CHANGED_BY VARCHAR(255) NOT NULL, + PREVIOUS_STATUS VARCHAR(50) DEFAULT NULL, PRIMARY KEY (ID), CONSTRAINT fk_dm_device_status_device FOREIGN KEY (DEVICE_ID) REFERENCES DM_DEVICE (ID) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT fk_dm_device_status_enrolment FOREIGN KEY (ENROLMENT_ID) REFERENCES DM_ENROLMENT (ID) ON DELETE CASCADE ON UPDATE CASCADE ); +ALTER TABLE DM_DEVICE_STATUS ADD PREVIOUS_STATUS VARCHAR(50) DEFAULT NULL; + CREATE TABLE IF NOT EXISTS DM_ENROLMENT_OP_MAPPING ( ID INTEGER AUTO_INCREMENT NOT NULL, ENROLMENT_ID INTEGER NOT NULL, diff --git a/features/device-mgt/org.wso2.carbon.device.mgt.basics.feature/src/main/resources/dbscripts/cdm/mysql.sql b/features/device-mgt/org.wso2.carbon.device.mgt.basics.feature/src/main/resources/dbscripts/cdm/mysql.sql index 33ac7964dd4..4e354a98808 100644 --- a/features/device-mgt/org.wso2.carbon.device.mgt.basics.feature/src/main/resources/dbscripts/cdm/mysql.sql +++ b/features/device-mgt/org.wso2.carbon.device.mgt.basics.feature/src/main/resources/dbscripts/cdm/mysql.sql @@ -138,6 +138,7 @@ CREATE TABLE IF NOT EXISTS DM_DEVICE_STATUS ( CREATE INDEX IDX_ENROLMENT_FK_DEVICE_ID ON DM_ENROLMENT(DEVICE_ID); CREATE INDEX IDX_ENROLMENT_DEVICE_ID_TENANT_ID ON DM_ENROLMENT(DEVICE_ID, TENANT_ID); CREATE INDEX IDX_ENROLMENT_DEVICE_ID_TENANT_ID_STATUS ON DM_ENROLMENT(DEVICE_ID, TENANT_ID, STATUS); +ALTER TABLE DM_DEVICE_STATUS ADD PREVIOUS_STATUS VARCHAR(50) DEFAULT NULL; CREATE TABLE IF NOT EXISTS DM_ENROLMENT_OP_MAPPING ( ID INTEGER AUTO_INCREMENT NOT NULL, From d69619bf65d27be5b184c516544f52d3f4744425 Mon Sep 17 00:00:00 2001 From: prathabanKavin Date: Thu, 26 Jan 2023 14:49:12 +0530 Subject: [PATCH 04/10] Fix api errors in Lifecycle methods --- .../impl/admin/DeviceManagementAdminServiceImpl.java | 6 +++--- .../mgt/core/service/DeviceStateManagementServiceImpl.java | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/admin/DeviceManagementAdminServiceImpl.java b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/admin/DeviceManagementAdminServiceImpl.java index 0351e629fdd..6407ada6f12 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/admin/DeviceManagementAdminServiceImpl.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/admin/DeviceManagementAdminServiceImpl.java @@ -321,7 +321,7 @@ public class DeviceManagementAdminServiceImpl implements DeviceManagementAdminSe new ErrorResponse.ErrorResponseBuilder().setMessage(message).build()).build(); } LifecycleStateDevice updatedInfo = DeviceMgtAPIUtils.getDeviceStateManagementService() - .changeDeviceStatus(device, nextStatus); + .changeDeviceStatus(device.getEnrolmentInfo(), nextStatus); return Response.status(Response.Status.OK).entity(updatedInfo).build(); } catch (InvalidStatusException e) { String msg = "Error occured while changing status: Invalid status or invalid status change"; @@ -373,8 +373,8 @@ public class DeviceManagementAdminServiceImpl implements DeviceManagementAdminSe return Response.status(Response.Status.NOT_FOUND).build(); } LifecycleStateDeviceList states = new LifecycleStateDeviceList(); - result = DeviceMgtAPIUtils.getDeviceStateManagementService() - .getDeviceLifecycleHistory(request, device); + result = (PaginationResult) DeviceMgtAPIUtils.getDeviceStateManagementService() + .getDeviceLifecycleHistory(device); states.setLifecycleStates((List) result.getData()); states.setCount(result.getRecordsTotal()); return Response.status(Response.Status.OK).entity(states).build(); diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/service/DeviceStateManagementServiceImpl.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/service/DeviceStateManagementServiceImpl.java index 742388b0b66..863e27b4565 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/service/DeviceStateManagementServiceImpl.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/service/DeviceStateManagementServiceImpl.java @@ -124,7 +124,7 @@ public class DeviceStateManagementServiceImpl implements DeviceStateManagementSe List listLifecycle = deviceLifecycleDAO.getDeviceLifecycle(id); return listLifecycle; } catch (DeviceManagementDAOException e) { - String msg = "Error occurred while getting lifrcycle history"; + String msg = "Error occurred while getting lifecycle history"; log.error(msg, e); throw new DeviceStatusException(msg, e); } catch (SQLException e) { From a7cf4fa86c2b829a4bf8e6757e29979cb15b0fe7 Mon Sep 17 00:00:00 2001 From: Rushdi Mohamed Date: Thu, 26 Jan 2023 14:34:24 +0000 Subject: [PATCH 05/10] Add pagination sort by column (#48) ## Purpose Fixes [issues/9743](https://roadmap.entgra.net/issues/9743) ## Improvement Sort in ASC OR DESC on pagination requested by column name Co-authored-by: Rushdi Co-authored-by: Pahansith Gunathilake Reviewed-on: https://repository.entgra.net/community/device-mgt-core/pulls/48 Co-authored-by: Rushdi Mohamed Co-committed-by: Rushdi Mohamed --- .../device/mgt/common/PaginationRequest.java | 30 ++++++++- .../carbon/device/mgt/common/SortColumn.java | 62 +++++++++++++++++++ 2 files changed, 91 insertions(+), 1 deletion(-) create mode 100644 components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/SortColumn.java diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/PaginationRequest.java b/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/PaginationRequest.java index 29bb7922e97..9a24b5c7f35 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/PaginationRequest.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/PaginationRequest.java @@ -44,6 +44,7 @@ public class PaginationRequest { private Map property = new HashMap<>(); private List statusList = new ArrayList<>(); private OperationLogFilters operationLogFilters = new OperationLogFilters(); + private List sortColumn = new ArrayList<>(); public OperationLogFilters getOperationLogFilters() { return operationLogFilters; } @@ -172,11 +173,38 @@ public class PaginationRequest { this.filter = filter; } + public void setSortColumn(List sortColumn) { this.sortColumn = sortColumn; } + + public List getSortColumn() { return sortColumn; } + + /** + * Convert SortColumns field parameter and splitting string into columnName and sortType + * + * @param sortColumns which is separated by a colon(:) and first will be the columnNane and the second will be type ASC or DESC, + * if there is no colon(:) detected, ASC will be default + * (Ex: sort=col1:ASC&sort=col2:DESC, sort=col1&sort=col2:DESC) + * @return sortColumnList as a list of sortColumn + */ + public void setSortColumns(List sortColumns) { + List sortColumnList = new ArrayList<>(); + SortColumn sortColumn; + String[] sorting; + for (String sortBy: sortColumns) { + sortColumn = new SortColumn(); + sorting = sortBy.split(":"); + sortColumn.setName(sorting[0]); + sortColumn.setType(sorting.length >= 2 && (sorting[1].equalsIgnoreCase("desc")) + ? SortColumn.types.DESC : SortColumn.types.ASC); + sortColumnList.add(sortColumn); + } + setSortColumn(sortColumnList); + } + @Override public String toString() { return "Device type '" + this.deviceType + "' Device Name '" + this.deviceName + "' row count: " + this.rowCount + " Owner role '" + this.ownerRole + "' owner pattern '" + this.ownerPattern + "' ownership " + this.ownership + "' Status '" + this.statusList + "' owner '" + this.owner + "' groupId: " + this.groupId - + " start index: " + this.startIndex; + + " start index: " + this.startIndex + ", SortColumns: " + this.sortColumn; } } diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/SortColumn.java b/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/SortColumn.java new file mode 100644 index 00000000000..8e6d4915ea1 --- /dev/null +++ b/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/SortColumn.java @@ -0,0 +1,62 @@ +/* + * Copyright (c) 2023, Entgra (pvt) Ltd. (https://entgra.io) All Rights Reserved. + * + * Entgra (Pvt) Ltd. licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.wso2.carbon.device.mgt.common; + +/** + * This class holds required parameters for a querying a sort by column in pagination. + * + */ +public class SortColumn { + String name; + SortColumn.types type; + + public enum types { + ASC, DESC + } + + /** + * ColumnName setter method + * @param name of the column + */ + public void setName(String name) { this.name = name; } + + /** + * get the name of the column + * @return name + */ + public String getName() { return name; } + + /** + * Column sort type + * @param type of sort as ASC or DESC + */ + public void setType(SortColumn.types type) { this.type = type; } + + /** + * get column sort type + * @return type of sort + */ + public SortColumn.types getType() { return type; } + + @Override + public String toString() { + return "Column Name - " + this.name + ", Type - " + this.type ; + } + +} From 86f709a74a50172491f4d82199502078a436b503 Mon Sep 17 00:00:00 2001 From: Pahansith Date: Thu, 26 Jan 2023 22:21:24 +0530 Subject: [PATCH 06/10] Revert "Fix api errors in Lifecycle methods" This reverts commit d69619bf65d27be5b184c516544f52d3f4744425. --- .../impl/admin/DeviceManagementAdminServiceImpl.java | 6 +++--- .../mgt/core/service/DeviceStateManagementServiceImpl.java | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/admin/DeviceManagementAdminServiceImpl.java b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/admin/DeviceManagementAdminServiceImpl.java index 6407ada6f12..0351e629fdd 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/admin/DeviceManagementAdminServiceImpl.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/admin/DeviceManagementAdminServiceImpl.java @@ -321,7 +321,7 @@ public class DeviceManagementAdminServiceImpl implements DeviceManagementAdminSe new ErrorResponse.ErrorResponseBuilder().setMessage(message).build()).build(); } LifecycleStateDevice updatedInfo = DeviceMgtAPIUtils.getDeviceStateManagementService() - .changeDeviceStatus(device.getEnrolmentInfo(), nextStatus); + .changeDeviceStatus(device, nextStatus); return Response.status(Response.Status.OK).entity(updatedInfo).build(); } catch (InvalidStatusException e) { String msg = "Error occured while changing status: Invalid status or invalid status change"; @@ -373,8 +373,8 @@ public class DeviceManagementAdminServiceImpl implements DeviceManagementAdminSe return Response.status(Response.Status.NOT_FOUND).build(); } LifecycleStateDeviceList states = new LifecycleStateDeviceList(); - result = (PaginationResult) DeviceMgtAPIUtils.getDeviceStateManagementService() - .getDeviceLifecycleHistory(device); + result = DeviceMgtAPIUtils.getDeviceStateManagementService() + .getDeviceLifecycleHistory(request, device); states.setLifecycleStates((List) result.getData()); states.setCount(result.getRecordsTotal()); return Response.status(Response.Status.OK).entity(states).build(); diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/service/DeviceStateManagementServiceImpl.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/service/DeviceStateManagementServiceImpl.java index 863e27b4565..742388b0b66 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/service/DeviceStateManagementServiceImpl.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/service/DeviceStateManagementServiceImpl.java @@ -124,7 +124,7 @@ public class DeviceStateManagementServiceImpl implements DeviceStateManagementSe List listLifecycle = deviceLifecycleDAO.getDeviceLifecycle(id); return listLifecycle; } catch (DeviceManagementDAOException e) { - String msg = "Error occurred while getting lifecycle history"; + String msg = "Error occurred while getting lifrcycle history"; log.error(msg, e); throw new DeviceStatusException(msg, e); } catch (SQLException e) { From 9ef3e0cf6ee33bfb60b4bc3bcd96e6ddfe05b2ec Mon Sep 17 00:00:00 2001 From: Pahansith Date: Thu, 26 Jan 2023 22:22:20 +0530 Subject: [PATCH 07/10] Revert "Change the device status and see the device status lifecycle history" This reverts commit df6a8e20a38812507bf73562b4e6f7b1b38e8172. --- .../jaxrs/beans/LifecycleStateDeviceList.java | 47 ----- .../admin/DeviceManagementAdminService.java | 146 --------------- .../DeviceManagementAdminServiceImpl.java | 107 ----------- .../device/mgt/jaxrs/util/Constants.java | 1 - .../mgt/jaxrs/util/DeviceMgtAPIUtils.java | 13 -- .../mgt/common/DeviceManagementConstants.java | 1 - .../mgt/common/LifecycleStateDevice.java | 96 ---------- .../mgt/DeviceLifecycleState.java | 80 -------- .../exceptions/DeviceStatusException.java | 30 --- .../exceptions/InvalidStatusException.java | 28 --- .../config/DeviceConfigurationManager.java | 1 - .../lifecycleState/DeviceLifecycleConfig.java | 46 ----- .../DeviceLifecycleConfigManager.java | 89 --------- .../mgt/core/dao/DeviceLifecycleDAO.java | 72 -------- .../core/dao/DeviceManagementDAOFactory.java | 4 - .../core/dao/impl/DeviceLifecycleDAOImpl.java | 174 ------------------ .../mgt/core/dao/impl/EnrollmentDAOImpl.java | 19 +- .../internal/DeviceManagementDataHolder.java | 10 - .../DeviceManagementServiceComponent.java | 18 -- .../DeviceLifecycleStateManager.java | 79 -------- .../DeviceManagementProviderServiceImpl.java | 5 +- .../service/DeviceStateManagementService.java | 72 -------- .../DeviceStateManagementServiceImpl.java | 136 -------------- .../src/test/resources/sql/h2.sql | 2 - .../main/resources/conf/lifecycle-states.xml | 116 ------------ .../src/main/resources/dbscripts/cdm/h2.sql | 3 - .../main/resources/dbscripts/cdm/mysql.sql | 1 - 27 files changed, 6 insertions(+), 1390 deletions(-) delete mode 100644 components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/beans/LifecycleStateDeviceList.java delete mode 100644 components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/LifecycleStateDevice.java delete mode 100644 components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/configuration/mgt/DeviceLifecycleState.java delete mode 100644 components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/exceptions/DeviceStatusException.java delete mode 100644 components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/exceptions/InvalidStatusException.java delete mode 100644 components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/config/lifecycleState/DeviceLifecycleConfig.java delete mode 100644 components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/config/lifecycleState/DeviceLifecycleConfigManager.java delete mode 100644 components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/dao/DeviceLifecycleDAO.java delete mode 100644 components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/dao/impl/DeviceLifecycleDAOImpl.java delete mode 100644 components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/lifeCycle/DeviceLifecycleStateManager.java delete mode 100644 components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/service/DeviceStateManagementService.java delete mode 100644 components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/service/DeviceStateManagementServiceImpl.java delete mode 100644 features/device-mgt/org.wso2.carbon.device.mgt.basics.feature/src/main/resources/conf/lifecycle-states.xml diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/beans/LifecycleStateDeviceList.java b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/beans/LifecycleStateDeviceList.java deleted file mode 100644 index d53db399d00..00000000000 --- a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/beans/LifecycleStateDeviceList.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) 2022, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. - * - * WSO2 Inc. licenses this file to you under the Apache License, - * Version 2.0 (the "License"); you may not use this file except - * in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * - */ - -package org.wso2.carbon.device.mgt.jaxrs.beans; - -import io.swagger.annotations.ApiModelProperty; -import org.wso2.carbon.device.mgt.common.LifecycleStateDevice; - -import java.util.ArrayList; -import java.util.List; - -public class LifecycleStateDeviceList extends BasePaginatedResult { - - private List lifecycleStates = new ArrayList<>(); - - @ApiModelProperty(value = "List of lifecycleStates history returned") - public List getLifecycleStates() { - return lifecycleStates; - } - - public void setLifecycleStates(List lifecycleStates) { - this.lifecycleStates = lifecycleStates; - } - - @Override - public String toString() { - return "LifecycleStateDeviceList{" + - "lifecycleStates=" + lifecycleStates + - '}'; - } -} diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/admin/DeviceManagementAdminService.java b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/admin/DeviceManagementAdminService.java index 17136a7e516..b0c850de950 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/admin/DeviceManagementAdminService.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/admin/DeviceManagementAdminService.java @@ -34,7 +34,6 @@ */ package org.wso2.carbon.device.mgt.jaxrs.service.api.admin; -import io.entgra.application.mgt.common.dto.ApplicationDTO; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiParam; @@ -50,8 +49,6 @@ import org.apache.axis2.transport.http.HTTPConstants; import org.wso2.carbon.apimgt.annotations.api.Scope; import org.wso2.carbon.apimgt.annotations.api.Scopes; import org.wso2.carbon.device.mgt.common.Device; -import org.wso2.carbon.device.mgt.common.EnrolmentInfo; -import org.wso2.carbon.device.mgt.common.exceptions.DeviceManagementException; import org.wso2.carbon.device.mgt.jaxrs.beans.DeviceList; import org.wso2.carbon.device.mgt.jaxrs.beans.ErrorResponse; import org.wso2.carbon.device.mgt.jaxrs.util.Constants; @@ -122,13 +119,6 @@ import java.util.List; roles = {"Internal/devicemgt-admin"}, permissions = {"/device-mgt/admin/devices/usage/view"} ), - @Scope( - name = "Change device status.", - description = "Change device status.", - key = "perm:admin:devices:change-status", - roles = {"Internal/devicemgt-admin"}, - permissions = {"/device-mgt/admin/devices/change-status"} - ), } ) public interface DeviceManagementAdminService { @@ -515,140 +505,4 @@ public interface DeviceManagementAdminService { @QueryParam("endDate") Timestamp endDate); - @POST - @Produces(MediaType.APPLICATION_JSON) - @Consumes(MediaType.APPLICATION_JSON) - @Path("/status") - @ApiOperation( - produces = MediaType.APPLICATION_JSON, - consumes = MediaType.APPLICATION_JSON, - httpMethod = "POST", - value = "Update and post device's State", - notes = "Use this API to change the state of the device", - tags = "Device Management Administrative Service", - extensions = { - @Extension(properties = { - @ExtensionProperty(name = Constants.SCOPE, value = "perm:admin:devices:change-status") - }) - } - ) - @ApiResponses( - value = { - @ApiResponse( - code = 201, - message = "OK. \n Successfully added a lifecycle state.", - response = ApplicationDTO.class), - @ApiResponse( - code = 400, - message = "Bad Request. \n " + - "Lifecycle State changing request contains unacceptable or vulnerable data"), - @ApiResponse( - code = 403, - message = "Don't have permission to change the lifecycle state of a lifecycle state."), - @ApiResponse( - code = 404, - message = "NOT FOUND. \n Error occurred while adding new lifecycle state.", - response = io.entgra.application.mgt.common.ErrorResponse.class), - @ApiResponse( - code = 500, - message = "Internal Server Error. \n Error occurred adding a lifecycle state.", - response = io.entgra.application.mgt.common.ErrorResponse.class) - }) - Response changeDeviceStatus( - @ApiParam( - name = "deviceId", - value = "The device identifier of the device.", - required = true) - @QueryParam("deviceId") - @Size(max = 45) - String deviceId, - @ApiParam( - name = "nextStatus", - value = "The device's next state.", - required = true) - @QueryParam("nextStatus") - EnrolmentInfo.Status nextStatus); - - @GET - @Produces(MediaType.APPLICATION_JSON) - @Path("/{type}/{deviceId}/lifecycle") - @ApiOperation( - produces = MediaType.APPLICATION_JSON, - httpMethod = "GET", - value = "Get Device's lifecycle history", - notes = "Get the lifecycle history of the device, since the enrolement", - tags = "Device Management Administrative Service", - extensions = { - @Extension(properties = { - @ExtensionProperty(name = Constants.SCOPE, value = "perm:admin:devices:view") - }) - } - ) - @ApiResponses( - value = { - @ApiResponse( - code = 200, - message = "OK. \n Successfully fetched the status history of matching devices.", - response = List.class, - responseHeaders = { - @ResponseHeader( - name = "Content-Type", - description = "The content type of the body"), - @ResponseHeader( - name = "ETag", - description = "Entity Tag of the response resource.\n" + - "Used by caches, or in conditional requests."), - @ResponseHeader( - name = "Last-Modified", - description = "Date and time the resource was last modified.\n" + - "Used by caches, or in conditional requests."), - }), - @ApiResponse( - code = 304, - message = "Not Modified. Empty body because the client already has the latest version" + - " of the requested resource.\n"), - @ApiResponse( - code = 400, - message = "Bad Request. \n Invalid request or validation error.", - response = ErrorResponse.class), - @ApiResponse( - code = 404, - message = "Not Found. \n A device with the specified device type and id was not found.", - response = ErrorResponse.class), - @ApiResponse( - code = 500, - message = "Internal Server Error. \n " + - "Server error occurred while retrieving the device details.", - response = ErrorResponse.class) - }) - Response getDeviceLifecycle( - @ApiParam( - name = "DeviceId", - value = "Device ID.", - required = true) - @PathParam("deviceId") - @Size(max = 45) - String id, - @ApiParam( - name = "type", - value = "The device type, such as ios, android, or windows.", - required = true) - @PathParam("type") - @Size(max = 45) - String type, - @ApiParam( - name = "offset", - value = "The starting pagination index for the complete list of qualified items.", - required = false, - defaultValue = "0") - @QueryParam("offset") - int offset, - @ApiParam( - name = "limit", - value = "Provide how many device details you require from the starting pagination index/offset.", - required = false, - defaultValue = "5") - @QueryParam("limit") - int limit) throws DeviceManagementException; - } diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/admin/DeviceManagementAdminServiceImpl.java b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/admin/DeviceManagementAdminServiceImpl.java index 0351e629fdd..acadf926f2b 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/admin/DeviceManagementAdminServiceImpl.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/admin/DeviceManagementAdminServiceImpl.java @@ -40,12 +40,9 @@ import org.wso2.carbon.base.MultitenantConstants; import org.wso2.carbon.context.CarbonContext; import org.wso2.carbon.context.PrivilegedCarbonContext; import org.wso2.carbon.device.mgt.common.Device; -import org.wso2.carbon.device.mgt.common.DeviceIdentifier; import org.wso2.carbon.device.mgt.common.EnrolmentInfo; -import org.wso2.carbon.device.mgt.common.LifecycleStateDevice; import org.wso2.carbon.device.mgt.common.MDMAppConstants; 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.ConfigurationEntry; import org.wso2.carbon.device.mgt.common.configuration.mgt.ConfigurationManagementException; import org.wso2.carbon.device.mgt.common.configuration.mgt.PlatformConfiguration; @@ -53,18 +50,14 @@ import org.wso2.carbon.device.mgt.common.configuration.mgt.PlatformConfiguration import org.wso2.carbon.device.mgt.common.exceptions.BadRequestException; import org.wso2.carbon.device.mgt.common.exceptions.DeviceManagementException; import org.wso2.carbon.device.mgt.common.exceptions.DeviceNotFoundException; -import org.wso2.carbon.device.mgt.common.exceptions.DeviceStatusException; import org.wso2.carbon.device.mgt.common.exceptions.InvalidDeviceException; -import org.wso2.carbon.device.mgt.common.exceptions.InvalidStatusException; import org.wso2.carbon.device.mgt.common.exceptions.UserNotFoundException; import org.wso2.carbon.device.mgt.common.PaginationResult; import org.wso2.carbon.device.mgt.core.service.DeviceManagementProviderService; import org.wso2.carbon.device.mgt.jaxrs.beans.DeviceList; import org.wso2.carbon.device.mgt.jaxrs.beans.ErrorResponse; -import org.wso2.carbon.device.mgt.jaxrs.beans.LifecycleStateDeviceList; import org.wso2.carbon.device.mgt.jaxrs.service.api.admin.DeviceManagementAdminService; import org.wso2.carbon.device.mgt.jaxrs.service.impl.util.RequestValidationUtil; -import org.wso2.carbon.device.mgt.jaxrs.util.Constants; import org.wso2.carbon.device.mgt.jaxrs.util.DeviceMgtAPIUtils; import org.wso2.carbon.user.api.UserStoreException; import org.wso2.carbon.user.core.service.RealmService; @@ -290,104 +283,4 @@ public class DeviceManagementAdminServiceImpl implements DeviceManagementAdminSe return Response.status(Response.Status.INTERNAL_SERVER_ERROR).entity(msg).build(); } } - - /** - * This change the device status - * - * @param deviceId Id of the device - * @param nextStatus next status of the device - * @return response - */ - @POST - @Path("/status") - public Response changeDeviceStatus( - @QueryParam("deviceId") String deviceId, - @QueryParam("nextStatus") EnrolmentInfo.Status nextStatus) { - - try { - if (nextStatus == null) { - return Response.status(Response.Status.BAD_REQUEST).entity( - new ErrorResponse.ErrorResponseBuilder().setMessage("Next status is required") - .build()).build(); - } - - RequestValidationUtil.validateDeviceIdentifier(Constants.ANY, deviceId); - DeviceManagementProviderService dms = DeviceMgtAPIUtils.getDeviceManagementService(); - Device device = dms.getDevice(deviceId, false); - if (device == null) { - String message = "Device does not exist with id '" + deviceId + "'"; - log.error(message); - return Response.status(Response.Status.NOT_FOUND).entity( - new ErrorResponse.ErrorResponseBuilder().setMessage(message).build()).build(); - } - LifecycleStateDevice updatedInfo = DeviceMgtAPIUtils.getDeviceStateManagementService() - .changeDeviceStatus(device, nextStatus); - return Response.status(Response.Status.OK).entity(updatedInfo).build(); - } catch (InvalidStatusException e) { - String msg = "Error occured while changing status: Invalid status or invalid status change"; - log.error(msg, e); - return Response.status(Response.Status.BAD_REQUEST).entity(msg).build(); - } catch (DeviceManagementException e) { - String msg = "Error occurred while getting the device '" + deviceId + "'"; - log.error(msg, e); - return Response.serverError().entity( - new ErrorResponse.ErrorResponseBuilder().setMessage(msg).build()).build(); - } catch (DeviceStatusException e) { - String msg = "Error occurred while getting device Status"; - log.error(msg, e); - return Response.serverError().entity( - new ErrorResponse.ErrorResponseBuilder().setMessage(msg).build()).build(); - } - } - - /** - * Get the devicelifecycle history - * - * @param type Device type - * @param deviceId Device id - * @param offset is starting number of the record which we want tot get - * @param limit is the number of records we want starting from offset - * @return lifecycle history - */ - - @Override - @GET - @Path("/{type}/{deviceId}/lifecycle") - public Response getDeviceLifecycle( - @PathParam("type") String type, - @PathParam("deviceId") String deviceId, - @QueryParam("offset") int offset, - @QueryParam("limit") int limit) { - - try { - RequestValidationUtil.validatePaginationParameters(offset, limit); - PaginationRequest request = new PaginationRequest(offset, limit); - PaginationResult result; - - RequestValidationUtil.validateDeviceIdentifier(type, deviceId); - DeviceManagementProviderService deviceManagementProviderService = - DeviceMgtAPIUtils.getDeviceManagementService(); - DeviceIdentifier deviceIdentifier = new DeviceIdentifier(deviceId, type); - Device device = deviceManagementProviderService.getDevice(deviceIdentifier, false); - if (device == null) { - return Response.status(Response.Status.NOT_FOUND).build(); - } - LifecycleStateDeviceList states = new LifecycleStateDeviceList(); - result = DeviceMgtAPIUtils.getDeviceStateManagementService() - .getDeviceLifecycleHistory(request, device); - states.setLifecycleStates((List) result.getData()); - states.setCount(result.getRecordsTotal()); - return Response.status(Response.Status.OK).entity(states).build(); - } catch (DeviceManagementException e) { - String msg = "Error occurred while getting the device '" + deviceId + "'"; - log.error(msg); - return Response.serverError().entity( - new ErrorResponse.ErrorResponseBuilder().setMessage(msg).build()).build(); - } catch (DeviceStatusException e) { - String msg = "Error occurred while getting device Status"; - log.error(msg, e); - return Response.serverError().entity( - new ErrorResponse.ErrorResponseBuilder().setMessage(msg).build()).build(); - } - } } diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/util/Constants.java b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/util/Constants.java index 95fadfb4526..d7462993a92 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/util/Constants.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/util/Constants.java @@ -58,7 +58,6 @@ public class Constants { "core.polcy.AndroidPolicyPayloadValidator"; public static final String IOS = "ios"; public static final String WINDOWS = "windows"; - public static final String ANY = "any"; public final class OperationStatus { diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/util/DeviceMgtAPIUtils.java b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/util/DeviceMgtAPIUtils.java index 5806d948c16..92bc2790d49 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/util/DeviceMgtAPIUtils.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/util/DeviceMgtAPIUtils.java @@ -86,7 +86,6 @@ import org.wso2.carbon.device.mgt.core.permission.mgt.PermissionUtils; import org.wso2.carbon.device.mgt.core.privacy.PrivacyComplianceProvider; import org.wso2.carbon.device.mgt.core.search.mgt.SearchManagerService; import org.wso2.carbon.device.mgt.core.service.DeviceManagementProviderService; -import org.wso2.carbon.device.mgt.core.service.DeviceStateManagementService; import org.wso2.carbon.device.mgt.core.service.GroupManagementProviderService; import org.wso2.carbon.device.mgt.core.traccar.api.service.DeviceAPIClientService; import org.wso2.carbon.device.mgt.jaxrs.beans.DeviceTypeVersionWrapper; @@ -272,18 +271,6 @@ public class DeviceMgtAPIUtils { } } - public static DeviceStateManagementService getDeviceStateManagementService() { - PrivilegedCarbonContext ctx = PrivilegedCarbonContext.getThreadLocalCarbonContext(); - DeviceStateManagementService deviceStateManagementService = - (DeviceStateManagementService) ctx.getOSGiService(DeviceStateManagementService.class, null); - if (deviceStateManagementService == null) { - String msg = "DeviceStateManagementService service has not initialized."; - log.error(msg); - throw new IllegalStateException(msg); - } - return deviceStateManagementService; - } - public static DeviceManagementProviderService getDeviceManagementService() { PrivilegedCarbonContext ctx = PrivilegedCarbonContext.getThreadLocalCarbonContext(); DeviceManagementProviderService deviceManagementProviderService = diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/DeviceManagementConstants.java b/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/DeviceManagementConstants.java index 3bbaf472507..154594678c7 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/DeviceManagementConstants.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/DeviceManagementConstants.java @@ -28,7 +28,6 @@ public final class DeviceManagementConstants { public static final String SECURE_VAULT_NS = "http://org.wso2.securevault/configuration"; public static final String DEVICE_CONFIG_XML_NAME = "cdm-config.xml"; public static final String UI_CONFIG_XML_NAME = "mdm-ui-config.xml"; - public static final String DEVICE_LIFECYCLE_STATES_XML_NAME = "lifecycle-states.xml"; } public static final class SecureValueProperties { diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/LifecycleStateDevice.java b/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/LifecycleStateDevice.java deleted file mode 100644 index fe968c0b235..00000000000 --- a/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/LifecycleStateDevice.java +++ /dev/null @@ -1,96 +0,0 @@ -/* - * Copyright (c) 2022, Entgra (pvt) Ltd. (http://entgra.io) All Rights Reserved. - * - * Entgra (pvt) Ltd. licenses this file to you under the Apache License, - * Version 2.0 (the "License"); you may not use this file except - * in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.wso2.carbon.device.mgt.common; - -import java.util.Date; - -/** - * Information of the device lifecycle - */ -public class LifecycleStateDevice { - - private int deviceId; - private String currentStatus; - private String previousStatus; - private String updatedBy; - private Date updatedAt; - - public LifecycleStateDevice() { - } - - public LifecycleStateDevice(int deviceId, String currentStatus, String previousStatus, String updatedBy, - Date updatedAt) { - this.deviceId = deviceId; - this.currentStatus = currentStatus; - this.previousStatus = previousStatus; - this.updatedBy = updatedBy; - this.updatedAt = updatedAt; - } - - public String getCurrentStatus() { - return currentStatus; - } - - public void setCurrentStatus(String currentStatus) { - this.currentStatus = currentStatus; - } - - public String getPreviousStatus() { - return previousStatus; - } - - public void setPreviousStatus(String previousStatus) { - this.previousStatus = previousStatus; - } - - public String getUpdatedBy() { - return updatedBy; - } - - public void setUpdatedBy(String updatedBy) { - this.updatedBy = updatedBy; - } - - public Date getUpdatedAt() { - return updatedAt; - } - - public void setUpdatedAt(Date updatedAt) { - this.updatedAt = updatedAt; - } - - public int getDeviceId() { - return deviceId; - } - - public void setDeviceId(int deviceId) { - this.deviceId = deviceId; - } - - @Override - public String toString() { - return "LifecycleStateDevice{" + - "deviceId=" + deviceId + - ", currentStatus='" + currentStatus + '\'' + - ", previousStatus='" + previousStatus + '\'' + - ", updatedBy='" + updatedBy + '\'' + - ", updatedAt=" + updatedAt + - '}'; - } -} diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/configuration/mgt/DeviceLifecycleState.java b/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/configuration/mgt/DeviceLifecycleState.java deleted file mode 100644 index 3211a7149e1..00000000000 --- a/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/configuration/mgt/DeviceLifecycleState.java +++ /dev/null @@ -1,80 +0,0 @@ -/* - * Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. - * - * WSO2 Inc. licenses this file to you under the Apache License, - * Version 2.0 (the "License"); you may not use this file except - * in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * - */ -/* - * Copyright (c) 2022, Entgra (pvt) Ltd. (http://entgra.io) All Rights Reserved. - * - * Entgra (pvt) Ltd. licenses this file to you under the Apache License, - * Version 2.0 (the "License"); you may not use this file except - * in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.wso2.carbon.device.mgt.common.configuration.mgt; - -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlElementWrapper; -import javax.xml.bind.annotation.XmlRootElement; -import java.util.List; - -/** - * Bean of the DeviceLifecycleState - */ -@XmlRootElement(name = "LifecycleState") -public class DeviceLifecycleState { - - private String name; - private List proceedingStates; - - @XmlAttribute(name = "name") - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - @XmlElementWrapper(name = "ProceedingStates") - @XmlElement(name = "State") - public List getProceedingStates() { - return proceedingStates; - } - - public void setProceedingStates(List proceedingStates) { - this.proceedingStates = proceedingStates; - } - - @Override - public String toString() { - return "DeviceLifecycleState{" + - "name='" + name + '\'' + - ", proceedingStates=" + proceedingStates + - '}'; - } -} diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/exceptions/DeviceStatusException.java b/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/exceptions/DeviceStatusException.java deleted file mode 100644 index 706f14f0d62..00000000000 --- a/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/exceptions/DeviceStatusException.java +++ /dev/null @@ -1,30 +0,0 @@ -package org.wso2.carbon.device.mgt.common.exceptions; - -public class DeviceStatusException extends Exception{ - - private static final long serialVersionUID = 1608833587090532707L; - - public DeviceStatusException() { - } - - public DeviceStatusException(String msg, Exception nestedEx) { - super(msg, nestedEx); - } - - - public DeviceStatusException(String message) { - super(message); - } - - public DeviceStatusException(String message, Throwable cause) { - super(message, cause); - } - - public DeviceStatusException(Throwable cause) { - super(cause); - } - - public DeviceStatusException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) { - super(message, cause, enableSuppression, writableStackTrace); - } -} diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/exceptions/InvalidStatusException.java b/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/exceptions/InvalidStatusException.java deleted file mode 100644 index 3c3f0c9b47b..00000000000 --- a/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/exceptions/InvalidStatusException.java +++ /dev/null @@ -1,28 +0,0 @@ -package org.wso2.carbon.device.mgt.common.exceptions; - -public class InvalidStatusException extends Exception{ - - private static final long serialVersionUID = -7379721600057895944L; - - - public InvalidStatusException() { - } - - public InvalidStatusException(String message) { - super(message); - } - - public InvalidStatusException(String message, Throwable cause) { - super(message, cause); - } - - public InvalidStatusException(Throwable cause) { - super(cause); - } - - public InvalidStatusException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) { - super(message, cause, enableSuppression, writableStackTrace); - } - - -} diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/config/DeviceConfigurationManager.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/config/DeviceConfigurationManager.java index 0ea2660762e..027ddd2417c 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/config/DeviceConfigurationManager.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/config/DeviceConfigurationManager.java @@ -40,7 +40,6 @@ public class DeviceConfigurationManager { private static final String DEVICE_MGT_CONFIG_PATH = CarbonUtils.getCarbonConfigDirPath() + File.separator + DeviceManagementConstants.DataSourceProperties.DEVICE_CONFIG_XML_NAME; - private static final String DEVICE_MGT_CONFIG_SCHEMA_PATH = "resources/config/schema/device-mgt-config-schema.xsd"; public static DeviceConfigurationManager getInstance() { diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/config/lifecycleState/DeviceLifecycleConfig.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/config/lifecycleState/DeviceLifecycleConfig.java deleted file mode 100644 index bdafeae3201..00000000000 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/config/lifecycleState/DeviceLifecycleConfig.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) 2022, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. - * - * WSO2 Inc. licenses this file to you under the Apache License, - * Version 2.0 (the "License"); you may not use this file except - * in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * - */ - -package org.wso2.carbon.device.mgt.core.config.lifecycleState; - -import org.wso2.carbon.device.mgt.common.configuration.mgt.DeviceLifecycleState; - -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlElementWrapper; -import javax.xml.bind.annotation.XmlRootElement; -import java.util.List; - -/** - * Represents Device lifecycle status configuration. - */ -@XmlRootElement(name = "LifecycleManagementConfiguration") -public class DeviceLifecycleConfig { - - private List deviceLifecycleStates; - - @XmlElementWrapper(name = "LifecycleStates") - @XmlElement(name = "LifecycleState") - public List getDeviceLifecycleStates() { - return deviceLifecycleStates; - } - - public void setDeviceLifecycleStates(List deviceLifecycleStates) { - this.deviceLifecycleStates = deviceLifecycleStates; - } -} diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/config/lifecycleState/DeviceLifecycleConfigManager.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/config/lifecycleState/DeviceLifecycleConfigManager.java deleted file mode 100644 index b4b941fd18c..00000000000 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/config/lifecycleState/DeviceLifecycleConfigManager.java +++ /dev/null @@ -1,89 +0,0 @@ -/* - * Copyright (c) 2022, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. - * - * WSO2 Inc. licenses this file to you under the Apache License, - * Version 2.0 (the "License"); you may not use this file except - * in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * - */ - -package org.wso2.carbon.device.mgt.core.config.lifecycleState; - -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; -import org.wso2.carbon.device.mgt.common.DeviceManagementConstants; -import org.wso2.carbon.utils.CarbonUtils; - -import javax.xml.bind.JAXBContext; -import javax.xml.bind.JAXBException; -import javax.xml.bind.Unmarshaller; -import java.io.File; - -/** - * Class responsible for the LifecycleStates configuration initialization. - */ -public class DeviceLifecycleConfigManager { - - private static final Log log = LogFactory.getLog(DeviceLifecycleConfigManager.class); - private DeviceLifecycleConfig deviceLifecycleConfig; - private static volatile DeviceLifecycleConfigManager deviceLifecycleConfigManager; - private static final String DEVICE_LIFECYCLE_PATH = CarbonUtils.getCarbonConfigDirPath() + File.separator - + DeviceManagementConstants.DataSourceProperties.DEVICE_LIFECYCLE_STATES_XML_NAME; - - private DeviceLifecycleConfigManager() { - } - - public static DeviceLifecycleConfigManager getInstance() { - if (deviceLifecycleConfigManager == null) { - synchronized (DeviceLifecycleConfigManager.class) { - if (deviceLifecycleConfigManager == null) { - deviceLifecycleConfigManager = new DeviceLifecycleConfigManager(); - try { - deviceLifecycleConfigManager.initConfig(); - } catch (Exception e) { - log.error(e); - } - } else { - try { - deviceLifecycleConfigManager.initConfig(); - } catch (Exception e) { - log.error(e); - } - } - } - } - return deviceLifecycleConfigManager; - } - - public synchronized void initConfig() { - try { - File deviceLifecycleConfig = new File(DEVICE_LIFECYCLE_PATH); - JAXBContext jaxbContext = JAXBContext.newInstance(DeviceLifecycleConfig.class); - Unmarshaller unmarshaller = jaxbContext.createUnmarshaller(); - this.deviceLifecycleConfig = (DeviceLifecycleConfig) unmarshaller.unmarshal(deviceLifecycleConfig); - - } catch (JAXBException e) { - String msg = "Error occured while initializing deviceLifecycle config"; - log.error(msg, e); - throw new RuntimeException(e); - } catch (Exception e) { - String msg = "Error(Exception) occured while initializing deviceLifecycle config"; - log.error(msg, e); - throw new RuntimeException(e); - } - } - - public DeviceLifecycleConfig getDeviceLifecycleConfig() { - return deviceLifecycleConfig; - } -} diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/dao/DeviceLifecycleDAO.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/dao/DeviceLifecycleDAO.java deleted file mode 100644 index 874e39e34dd..00000000000 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/dao/DeviceLifecycleDAO.java +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Copyright (c) 2022, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. - * - * WSO2 Inc. licenses this file to you under the Apache License, - * Version 2.0 (the "License"); you may not use this file except - * in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * - */ - -package org.wso2.carbon.device.mgt.core.dao; - -import org.wso2.carbon.device.mgt.common.EnrolmentInfo; -import org.wso2.carbon.device.mgt.common.LifecycleStateDevice; - -import java.util.List; - -/** - * Device status relevent DAO activity - */ -public interface DeviceLifecycleDAO { - - /** - * can change the relevent device's status - * - * @param enrolmentId Enrolment Id - * @param status changing status - * @param tenantId tenantId - * @return true or false - * @throws DeviceManagementDAOException when device no found - */ - boolean changeStatus(int enrolmentId, EnrolmentInfo.Status status, int tenantId) throws DeviceManagementDAOException; - - /** - * Add the changed status - * - * @param enrolmentId Enrolment Id - * @param currentStatus Current Status - * @param previousStatus Previous Status - * @param deviceId Id of the device - * @return Added or not, true or false - * @throws DeviceManagementDAOException When device not found - */ - boolean addStatus(int enrolmentId, EnrolmentInfo.Status currentStatus, EnrolmentInfo.Status previousStatus, - int deviceId) throws DeviceManagementDAOException; - - /** - * Get Device ID - * - * @param enrolmentId Enrolment ID - * @return Device id - * @throws DeviceManagementDAOException when device not found - */ - int getDeviceId(int enrolmentId) throws DeviceManagementDAOException; - - /** - * Get the lifecycle history of the device - * - * @param id id of the device - * @return List of LifecycleStateDevice - */ - List getDeviceLifecycle(int id) throws DeviceManagementDAOException; -} diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/dao/DeviceManagementDAOFactory.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/dao/DeviceManagementDAOFactory.java index 5157860705f..cbd7c697f4a 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/dao/DeviceManagementDAOFactory.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/dao/DeviceManagementDAOFactory.java @@ -125,10 +125,6 @@ public class DeviceManagementDAOFactory { return new EnrollmentDAOImpl(); } - public static DeviceLifecycleDAO getDeviceLifecycleDAO() { - return new DeviceLifecycleDAOImpl(); - } - public static TrackerDAO getTrackerDAO() { if (databaseEngine != null) { switch (databaseEngine) { diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/dao/impl/DeviceLifecycleDAOImpl.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/dao/impl/DeviceLifecycleDAOImpl.java deleted file mode 100644 index cfefbaad086..00000000000 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/dao/impl/DeviceLifecycleDAOImpl.java +++ /dev/null @@ -1,174 +0,0 @@ -/* - * Copyright (c) 2022, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. - * - * WSO2 Inc. licenses this file to you under the Apache License, - * Version 2.0 (the "License"); you may not use this file except - * in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * - */ - -package org.wso2.carbon.device.mgt.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.DeviceManagementConstants; -import org.wso2.carbon.device.mgt.common.EnrolmentInfo; -import org.wso2.carbon.device.mgt.common.LifecycleStateDevice; -import org.wso2.carbon.device.mgt.core.dao.DeviceLifecycleDAO; -import org.wso2.carbon.device.mgt.core.dao.DeviceManagementDAOException; -import org.wso2.carbon.device.mgt.core.dao.DeviceManagementDAOFactory; -import org.wso2.carbon.device.mgt.core.dao.util.DeviceManagementDAOUtil; - -import java.sql.Connection; -import java.sql.PreparedStatement; -import java.sql.ResultSet; -import java.sql.SQLException; -import java.sql.Timestamp; -import java.util.ArrayList; -import java.util.Date; -import java.util.List; - -public class DeviceLifecycleDAOImpl implements DeviceLifecycleDAO { - - private static final Log log = LogFactory.getLog(DeviceLifecycleDAOImpl.class); - - private Connection getConnection() throws SQLException { - return DeviceManagementDAOFactory.getConnection(); - } - - @Override - public boolean changeStatus(int enrolmentId, EnrolmentInfo.Status status, int tenantId) - throws DeviceManagementDAOException { - Connection conn; - PreparedStatement stmt = null; - Timestamp updateTime = new Timestamp(new Date().getTime()); - try { - conn = this.getConnection(); - String sql = "UPDATE DM_ENROLMENT SET STATUS = ?, DATE_OF_LAST_UPDATE = ? WHERE ID = ? AND TENANT_ID = ?"; - stmt = conn.prepareStatement(sql); - stmt.setString(1, status.toString()); - stmt.setTimestamp(2, updateTime); - stmt.setInt(3, enrolmentId); - stmt.setInt(4, tenantId); - int updatedRowCount = stmt.executeUpdate(); - if (updatedRowCount != 1) { - throw new DeviceManagementDAOException("Error occurred while setting the status of device enrolment: " + - updatedRowCount + " rows were updated instead of one row!!!"); - } - } catch (SQLException e) { - String msg = "Error occurred while changing status of the device which has " + enrolmentId + " enrolmentId"; - log.error(msg, e); - throw new DeviceManagementDAOException(msg, e); - } finally { - DeviceManagementDAOUtil.cleanupResources(stmt, null); - } - return true; - } - - @Override - public boolean addStatus(int enrolmentId, EnrolmentInfo.Status currentStatus, EnrolmentInfo.Status previousStatus, - int deviceId) throws DeviceManagementDAOException { - Connection conn; - String changedBy = PrivilegedCarbonContext.getThreadLocalCarbonContext().getUsername(); - if (changedBy == null) { - changedBy = DeviceManagementConstants.MaintenanceProperties.MAINTENANCE_USER; - } - PreparedStatement stmt = null; - Timestamp updateTime = new Timestamp(new Date().getTime()); - try { - conn = this.getConnection(); - String sql = "INSERT INTO DM_DEVICE_STATUS (ENROLMENT_ID, DEVICE_ID, STATUS, UPDATE_TIME, CHANGED_BY, " + - "PREVIOUS_STATUS) VALUES(?, ?, ?, ?, ?, ?)"; - stmt = conn.prepareStatement(sql); - stmt.setInt(1, enrolmentId); - stmt.setInt(2, deviceId); - stmt.setString(3, currentStatus.toString()); - stmt.setTimestamp(4, updateTime); - stmt.setString(5, changedBy); - stmt.setString(6, previousStatus.toString()); - stmt.executeUpdate(); - } catch (SQLException e) { - String msg = "Error occurred while inserting device lifecycle"; - log.error(msg, e); - throw new DeviceManagementDAOException(msg, e); - } finally { - DeviceManagementDAOUtil.cleanupResources(stmt, null); - } - return true; - } - - public int getDeviceId(int enrolmentId) throws DeviceManagementDAOException { - int deviceId; - Connection conn; - PreparedStatement stmt = null; - ResultSet rs = null; - try { - conn = this.getConnection(); - String sql = "SELECT DEVICE_ID FROM DM_ENROLMENT WHERE ID = ?"; - stmt = conn.prepareStatement(sql); - stmt.setInt(1, enrolmentId); - rs = stmt.executeQuery(); - if (rs.next()) { - deviceId = rs.getInt("DEVICE_ID"); - } else { - // if there were no records corresponding to the enrolment id this is a problem. i.e. enrolment - // id is invalid - throw new DeviceManagementDAOException("Error occurred while getting the status of device enrolment: " + - "no record for enrolment id " + enrolmentId); - } - } catch (SQLException e) { - String msg = "Error occurred while getiing the device if which has " + enrolmentId + " enrolmentId"; - log.error(msg, e); - throw new DeviceManagementDAOException(msg, e); - } finally { - DeviceManagementDAOUtil.cleanupResources(stmt, null); - } - return deviceId; - } - - @Override - public List getDeviceLifecycle(int id) throws DeviceManagementDAOException { - List result = new ArrayList<>(); - Connection conn; - PreparedStatement stmt = null; - ResultSet rs = null; - try { - conn = this.getConnection(); - String sql = "SELECT DEVICE_ID, STATUS, UPDATE_TIME, CHANGED_BY, PREVIOUS_STATUS FROM DM_DEVICE_STATUS " + - "WHERE DEVICE_ID = ?"; - - stmt = conn.prepareStatement(sql); - stmt.setInt(1, id); - rs = stmt.executeQuery(); - - while (rs.next()) { - LifecycleStateDevice lifecycleStateDevice = new LifecycleStateDevice( - rs.getInt("DEVICE_ID"), - rs.getString("STATUS"), - rs.getString("PREVIOUS_STATUS"), - rs.getString("CHANGED_BY"), - new Date(rs.getTimestamp("UPDATE_TIME").getTime()) - ); - result.add(lifecycleStateDevice); - } - } catch (SQLException e) { - String msg = "Error occurred while getiing the device lifecycle which has " + id + " deviceId"; - log.error(msg, e); - throw new DeviceManagementDAOException(msg, e); - } finally { - DeviceManagementDAOUtil.cleanupResources(stmt, rs); - } - return result; - } -} diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/dao/impl/EnrollmentDAOImpl.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/dao/impl/EnrollmentDAOImpl.java index 2ae2fb8b60a..7b3e08cd509 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/dao/impl/EnrollmentDAOImpl.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/dao/impl/EnrollmentDAOImpl.java @@ -348,7 +348,7 @@ public class EnrollmentDAOImpl implements EnrollmentDAO { DeviceManagementDAOUtil.cleanupResources(stmt, null); // if there was no record for the enrolment or the previous status is not the same as the current status // we'll add a record - if (previousStatus == null || previousStatus != status) { + if (previousStatus == null || previousStatus != status){ if (deviceId == -1) { // we need the device id in order to add a new record, therefore we get it from the enrolment table sql = "SELECT DEVICE_ID FROM DM_ENROLMENT WHERE ID = ?"; @@ -364,16 +364,8 @@ public class EnrollmentDAOImpl implements EnrollmentDAO { } DeviceManagementDAOUtil.cleanupResources(stmt, null); } - sql = "INSERT INTO DM_DEVICE_STATUS (ENROLMENT_ID, DEVICE_ID, STATUS, UPDATE_TIME, CHANGED_BY"; - if (previousStatus != null) { - sql += ", PREVIOUS_STATUS"; - } - sql += ") VALUES(?, ?, ?, ?, ?"; - if (previousStatus != null) { - sql += ", ?"; - } - sql += ")"; + sql = "INSERT INTO DM_DEVICE_STATUS (ENROLMENT_ID, DEVICE_ID, STATUS, UPDATE_TIME, CHANGED_BY) VALUES(?, ?, ?, ?, ?)"; stmt = conn.prepareStatement(sql); Timestamp updateTime = new Timestamp(new Date().getTime()); stmt.setInt(1, enrolmentId); @@ -381,10 +373,9 @@ public class EnrollmentDAOImpl implements EnrollmentDAO { stmt.setString(3, status.toString()); stmt.setTimestamp(4, updateTime); stmt.setString(5, changedBy); - if (previousStatus != null) { - stmt.setString(6, previousStatus.toString()); - } - stmt.executeUpdate(); + stmt.execute(); + } else { + // no need to update status since the last recorded status is the same as the current status } } catch (SQLException e) { throw new DeviceManagementDAOException("Error occurred while setting the status of device", e); diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/internal/DeviceManagementDataHolder.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/internal/DeviceManagementDataHolder.java index a5331d3c0ef..6a69cb02ba5 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/internal/DeviceManagementDataHolder.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/internal/DeviceManagementDataHolder.java @@ -34,7 +34,6 @@ import org.wso2.carbon.device.mgt.core.device.details.mgt.DeviceInformationManag import org.wso2.carbon.device.mgt.core.dto.DeviceType; import org.wso2.carbon.device.mgt.core.dto.DeviceTypeServiceIdentifier; import org.wso2.carbon.device.mgt.core.geo.task.GeoFenceEventOperationManager; -import org.wso2.carbon.device.mgt.core.lifeCycle.DeviceLifecycleStateManager; import org.wso2.carbon.device.mgt.core.operation.timeout.task.OperationTimeoutTaskManagerService; import org.wso2.carbon.device.mgt.core.privacy.PrivacyComplianceProvider; import org.wso2.carbon.device.mgt.core.push.notification.mgt.PushNotificationProviderRepository; @@ -87,7 +86,6 @@ public class DeviceManagementDataHolder { private OperationTimeoutTaskManagerService operationTimeoutTaskManagerService; private DeviceAPIClientService deviceAPIClientService; - private DeviceLifecycleStateManager deviceLifecycleStateManager; private final Map deviceStatusTaskPluginConfigs = Collections.synchronizedMap( new HashMap<>()); @@ -361,12 +359,4 @@ public class DeviceManagementDataHolder { public void setDeviceAPIClientService(DeviceAPIClientService deviceAPIClientService) { this.deviceAPIClientService = deviceAPIClientService; } - - public DeviceLifecycleStateManager getDeviceLifecycleStateManager() { - return deviceLifecycleStateManager; - } - - public void setDeviceLifecycleStateManager(DeviceLifecycleStateManager deviceLifecycleStateManager) { - this.deviceLifecycleStateManager = deviceLifecycleStateManager; - } } 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 1efe03c5f9d..a266a40499d 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,7 +25,6 @@ import org.osgi.service.component.ComponentContext; import org.wso2.carbon.core.ServerStartupObserver; 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.DeviceLifecycleState; import org.wso2.carbon.device.mgt.common.configuration.mgt.PlatformConfigurationManagementService; import org.wso2.carbon.device.mgt.common.event.config.EventConfigurationProviderService; import org.wso2.carbon.device.mgt.common.exceptions.DeviceManagementException; @@ -49,7 +48,6 @@ import org.wso2.carbon.device.mgt.core.authorization.DeviceAccessAuthorizationSe import org.wso2.carbon.device.mgt.core.config.DeviceConfigurationManager; import org.wso2.carbon.device.mgt.core.config.DeviceManagementConfig; import org.wso2.carbon.device.mgt.core.config.datasource.DataSourceConfig; -import org.wso2.carbon.device.mgt.core.config.lifecycleState.DeviceLifecycleConfigManager; import org.wso2.carbon.device.mgt.core.config.tenant.PlatformConfigurationManagementServiceImpl; import org.wso2.carbon.device.mgt.core.config.ui.UIConfigurationManager; import org.wso2.carbon.device.mgt.core.dao.DeviceManagementDAOFactory; @@ -60,7 +58,6 @@ import org.wso2.carbon.device.mgt.core.device.details.mgt.DeviceInformationManag import org.wso2.carbon.device.mgt.core.device.details.mgt.impl.DeviceInformationManagerImpl; import org.wso2.carbon.device.mgt.core.event.config.EventConfigurationProviderServiceImpl; import org.wso2.carbon.device.mgt.core.geo.service.GeoLocationProviderServiceImpl; -import org.wso2.carbon.device.mgt.core.lifeCycle.DeviceLifecycleStateManager; import org.wso2.carbon.device.mgt.core.metadata.mgt.MetadataManagementServiceImpl; import org.wso2.carbon.device.mgt.core.metadata.mgt.dao.MetadataManagementDAOFactory; import org.wso2.carbon.device.mgt.core.notification.mgt.NotificationManagementServiceImpl; @@ -79,8 +76,6 @@ import org.wso2.carbon.device.mgt.core.search.mgt.SearchManagerService; import org.wso2.carbon.device.mgt.core.search.mgt.impl.SearchManagerServiceImpl; import org.wso2.carbon.device.mgt.core.service.DeviceManagementProviderService; import org.wso2.carbon.device.mgt.core.service.DeviceManagementProviderServiceImpl; -import org.wso2.carbon.device.mgt.core.service.DeviceStateManagementService; -import org.wso2.carbon.device.mgt.core.service.DeviceStateManagementServiceImpl; import org.wso2.carbon.device.mgt.core.service.GroupManagementProviderService; import org.wso2.carbon.device.mgt.core.service.GroupManagementProviderServiceImpl; import org.wso2.carbon.device.mgt.core.task.DeviceTaskManagerService; @@ -279,19 +274,6 @@ public class DeviceManagementServiceComponent { if (log.isDebugEnabled()) { log.debug("Device management core bundle has been successfully initialized"); } - - /* Initializing DeviceLifecycleState Configuration */ - List deviceLifecycleStates = DeviceLifecycleConfigManager.getInstance(). - getDeviceLifecycleConfig().getDeviceLifecycleStates(); - DeviceLifecycleStateManager deviceLifecycleStateManager = new DeviceLifecycleStateManager(); - deviceLifecycleStateManager.init(deviceLifecycleStates); - DeviceManagementDataHolder.getInstance().setDeviceLifecycleStateManager(deviceLifecycleStateManager); - componentContext.getBundleContext().registerService(DeviceLifecycleStateManager.class.getName(), - deviceLifecycleStateManager, null); - - DeviceStateManagementService deviceStateManagementService = new DeviceStateManagementServiceImpl(); - componentContext.getBundleContext().registerService(DeviceStateManagementService.class.getName(), - deviceStateManagementService, null); } catch (Throwable e) { log.error("Error occurred while initializing device management core bundle", e); } diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/lifeCycle/DeviceLifecycleStateManager.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/lifeCycle/DeviceLifecycleStateManager.java deleted file mode 100644 index dde06468584..00000000000 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/lifeCycle/DeviceLifecycleStateManager.java +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Copyright (c) 2022, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. - * - * WSO2 Inc. licenses this file to you under the Apache License, - * Version 2.0 (the "License"); you may not use this file except - * in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * - */ - -package org.wso2.carbon.device.mgt.core.lifeCycle; - -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; -import org.wso2.carbon.device.mgt.common.configuration.mgt.DeviceLifecycleState; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -/* this class has the methods to check whether the status is valid or status change is valid -deviceLifecycleStates details are coming from lifecycle-states.xml file*/ -public class DeviceLifecycleStateManager { - private Map deviceLifecycleStates; - private static final Log log = LogFactory.getLog(DeviceLifecycleStateManager.class); - - public Map getDeviceLifecycleStates() { - return deviceLifecycleStates; - } - - public void setDeviceLifecycleStates(Map deviceLifecycleStates) { - this.deviceLifecycleStates = deviceLifecycleStates; - } - - public void init(List states) { - deviceLifecycleStates = new HashMap<>(); - for (DeviceLifecycleState deviceLifecycleState : states) { - deviceLifecycleStates.put(deviceLifecycleState.getName(), deviceLifecycleState); - } - } - - public List getNextLifecycleStates(String currentLifecycleState) { - return deviceLifecycleStates.get(currentLifecycleState).getProceedingStates(); - } - - public boolean isValidStateChange(String currentStatus, String nextStatus) { - boolean validChange = false; - List proceedingstates = deviceLifecycleStates.get(currentStatus).getProceedingStates(); - for (String proceedingState : proceedingstates) { - if (proceedingState.equals(nextStatus)) { - validChange = true; - break; - } - } - return validChange; - } - - public boolean isValidState(String nextStatus) { - boolean isValid = false; - List states = new ArrayList<>(deviceLifecycleStates.keySet()); - for (String state : states) { - if (state.equals(nextStatus)) { - isValid = true; - break; - } - } - return isValid; - } -} 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 77c8c38f83d..d28a3065143 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 @@ -2123,11 +2123,10 @@ public class DeviceManagementProviderServiceImpl implements DeviceManagementProv log.debug("get status history of device: " + device.getDeviceIdentifier()); } try { - DeviceManagementDAOFactory.openConnection(); int tenantId = this.getTenantId(); return deviceStatusDAO.getStatus(device.getId(), tenantId, fromDate, toDate, billingStatus); } catch (DeviceManagementDAOException e) { -// DeviceManagementDAOFactory.rollbackTransaction(); + DeviceManagementDAOFactory.rollbackTransaction(); String msg = "Error occurred while retrieving status history"; log.error(msg, e); throw new DeviceManagementException(msg, e); @@ -2135,8 +2134,6 @@ public class DeviceManagementProviderServiceImpl implements DeviceManagementProv String msg = "Error occurred in retrieving status history for device :" + device.getDeviceIdentifier(); log.error(msg, e); throw new DeviceManagementException(msg, e); - } finally { - DeviceManagementDAOFactory.closeConnection(); } } diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/service/DeviceStateManagementService.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/service/DeviceStateManagementService.java deleted file mode 100644 index dbf44d2581a..00000000000 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/service/DeviceStateManagementService.java +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Copyright (c) 2022, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. - * - * WSO2 Inc. licenses this file to you under the Apache License, - * Version 2.0 (the "License"); you may not use this file except - * in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * - */ -/* - * Copyright (c) 2019, Entgra (pvt) Ltd. (http://entgra.io) All Rights Reserved. - * - * Entgra (pvt) Ltd. licenses this file to you under the Apache License, - * Version 2.0 (the "License"); you may not use this file except - * in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.wso2.carbon.device.mgt.core.service; - -import org.wso2.carbon.device.mgt.common.Device; -import org.wso2.carbon.device.mgt.common.EnrolmentInfo; -import org.wso2.carbon.device.mgt.common.LifecycleStateDevice; -import org.wso2.carbon.device.mgt.common.exceptions.DeviceStatusException; -import org.wso2.carbon.device.mgt.common.exceptions.InvalidStatusException; -import org.wso2.carbon.device.mgt.core.dao.DeviceManagementDAOException; - -import java.util.List; - -/** - * This interface manages the device lifecycle, such as statuschange and add status to table - */ -public interface DeviceStateManagementService { - - /** - * This method change the device status and store it in a table - * - * @param enrolmentInfo Enrollment Information about the device - * @param nextStatus Next status of the device - * @return LifecycleStateDevice which contain current and previoius status - * @throws InvalidStatusException If there is a invalid status or invalid status change - * @throws DeviceManagementDAOException if the device cannot be found - */ - LifecycleStateDevice changeDeviceStatus(EnrolmentInfo enrolmentInfo, EnrolmentInfo.Status nextStatus) - throws InvalidStatusException, DeviceStatusException; - - /** - * Get the lifecycle history of the relevent device - * - * @param device Device - * @return List of LifecycleStateDevice - */ - List getDeviceLifecycleHistory(Device device) throws DeviceStatusException; -} diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/service/DeviceStateManagementServiceImpl.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/service/DeviceStateManagementServiceImpl.java deleted file mode 100644 index 742388b0b66..00000000000 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/service/DeviceStateManagementServiceImpl.java +++ /dev/null @@ -1,136 +0,0 @@ -/* - * Copyright (c) 2022, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. - * - * WSO2 Inc. licenses this file to you under the Apache License, - * Version 2.0 (the "License"); you may not use this file except - * in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * - */ -/* - * Copyright (c) 2019, Entgra (pvt) Ltd. (http://entgra.io) All Rights Reserved. - * - * Entgra (pvt) Ltd. licenses this file to you under the Apache License, - * Version 2.0 (the "License"); you may not use this file except - * in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.wso2.carbon.device.mgt.core.service; - -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.Device; -import org.wso2.carbon.device.mgt.common.EnrolmentInfo; -import org.wso2.carbon.device.mgt.common.LifecycleStateDevice; -import org.wso2.carbon.device.mgt.common.exceptions.DeviceStatusException; -import org.wso2.carbon.device.mgt.common.exceptions.IllegalTransactionStateException; -import org.wso2.carbon.device.mgt.common.exceptions.InvalidStatusException; -import org.wso2.carbon.device.mgt.common.exceptions.TransactionManagementException; -import org.wso2.carbon.device.mgt.core.dao.DeviceLifecycleDAO; -import org.wso2.carbon.device.mgt.core.dao.DeviceManagementDAOException; -import org.wso2.carbon.device.mgt.core.dao.DeviceManagementDAOFactory; -import org.wso2.carbon.device.mgt.core.internal.DeviceManagementDataHolder; -import org.wso2.carbon.device.mgt.core.lifeCycle.DeviceLifecycleStateManager; - -import java.sql.SQLException; -import java.util.List; - -public class DeviceStateManagementServiceImpl implements DeviceStateManagementService { - - private static final Log log = LogFactory.getLog(DeviceStateManagementServiceImpl.class); - private final DeviceLifecycleDAO deviceLifecycleDAO; - private final DeviceLifecycleStateManager deviceLifecycleStateManager; - - public DeviceStateManagementServiceImpl() { - this.deviceLifecycleDAO = DeviceManagementDAOFactory.getDeviceLifecycleDAO(); - deviceLifecycleStateManager = DeviceManagementDataHolder.getInstance().getDeviceLifecycleStateManager(); - } - - @Override - public LifecycleStateDevice changeDeviceStatus(EnrolmentInfo enrolmentInfo, EnrolmentInfo.Status nextStatus) throws - InvalidStatusException, DeviceStatusException { - LifecycleStateDevice lifecycleStateDevice = new LifecycleStateDevice(); - EnrolmentInfo.Status currentStatus = enrolmentInfo.getStatus(); - if (deviceLifecycleStateManager.isValidState(nextStatus.toString())){ - if (deviceLifecycleStateManager.isValidStateChange(currentStatus.toString(), nextStatus.toString())) { - lifecycleStateDevice.setCurrentStatus(nextStatus.toString()); - lifecycleStateDevice.setPreviousStatus(currentStatus.toString()); - } else { - String msg ="'" + currentStatus + "' to '" + nextStatus + "' is not a valid Status change. Enter " + - "valid Status"; - log.error(msg); - throw new InvalidStatusException(msg); - } - } else { - String msg = "'" + nextStatus +"' is not a valid Status. Check the Status"; - log.error(msg); - throw new InvalidStatusException(msg); - } - int tenantId = CarbonContext.getThreadLocalCarbonContext().getTenantId(); - int enrolmentId = enrolmentInfo.getId(); - try { - DeviceManagementDAOFactory.beginTransaction(); - int deviceId = deviceLifecycleDAO.getDeviceId(enrolmentId); - deviceLifecycleDAO.changeStatus(enrolmentId, EnrolmentInfo.Status.valueOf( - lifecycleStateDevice.getCurrentStatus()), tenantId); - deviceLifecycleDAO.addStatus(enrolmentId, - EnrolmentInfo.Status.valueOf(lifecycleStateDevice.getCurrentStatus()), - EnrolmentInfo.Status.valueOf(lifecycleStateDevice.getPreviousStatus()), deviceId); - DeviceManagementDAOFactory.commitTransaction(); - return lifecycleStateDevice; - } catch (DeviceManagementDAOException e) { - DeviceManagementDAOFactory.rollbackTransaction(); - String msg = "Error occurred in updating status or storing device status"; - log.error(msg, e); - throw new DeviceStatusException(msg, e); - } catch (IllegalTransactionStateException e) { - String msg = "Error occurred while updating and storing(Transaction Error) device status"; - log.error(msg, e); - throw new DeviceStatusException(msg, e); - } catch (TransactionManagementException e) { - String msg = "Error occurred in DeviceManagementDAOFactory"; - log.error(msg, e); - throw new InvalidStatusException(msg, e); - } finally { - DeviceManagementDAOFactory.closeConnection(); - } - } - - @Override - public List getDeviceLifecycleHistory(Device device) throws DeviceStatusException { - int id = device.getId(); - try { - DeviceManagementDAOFactory.openConnection(); - List listLifecycle = deviceLifecycleDAO.getDeviceLifecycle(id); - return listLifecycle; - } catch (DeviceManagementDAOException e) { - String msg = "Error occurred while getting lifrcycle history"; - log.error(msg, e); - throw new DeviceStatusException(msg, e); - } catch (SQLException e) { - throw new RuntimeException(e); - } finally { - DeviceManagementDAOFactory.closeConnection(); - } - } -} diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/resources/sql/h2.sql b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/resources/sql/h2.sql index 395124a9879..d3b81f2655c 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/resources/sql/h2.sql +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/resources/sql/h2.sql @@ -112,8 +112,6 @@ CREATE TABLE IF NOT EXISTS DM_DEVICE_STATUS ( CONSTRAINT fk_dm_device_status_enrolment FOREIGN KEY (ENROLMENT_ID) REFERENCES DM_ENROLMENT (ID) ON DELETE NO ACTION ON UPDATE NO ACTION ); -ALTER TABLE DM_DEVICE_STATUS ADD PREVIOUS_STATUS VARCHAR(50) DEFAULT NULL; - CREATE TABLE IF NOT EXISTS DM_ENROLMENT_OP_MAPPING ( ID INTEGER AUTO_INCREMENT NOT NULL, ENROLMENT_ID INTEGER NOT NULL, diff --git a/features/device-mgt/org.wso2.carbon.device.mgt.basics.feature/src/main/resources/conf/lifecycle-states.xml b/features/device-mgt/org.wso2.carbon.device.mgt.basics.feature/src/main/resources/conf/lifecycle-states.xml deleted file mode 100644 index ef5c6441076..00000000000 --- a/features/device-mgt/org.wso2.carbon.device.mgt.basics.feature/src/main/resources/conf/lifecycle-states.xml +++ /dev/null @@ -1,116 +0,0 @@ - - - - - - - - ACTIVE - - - - - UNREACHABLE - REMOVED - - - - - INACTIVE - REMOVED - - - - - REMOVED - - - - - REMOVED - - - - - REMOVED - - - - - REMOVED - - - - - REMOVED - - - - - REMOVED - - - - - REMOVED - - - - - REMOVED - - - - - REMOVED - - - - - REMOVED - - - - - REMOVED - - - - - REMOVED - - - - - REMOVED - - - - - REMOVED - - - - - ACTIVE - CREATED - - - - \ No newline at end of file diff --git a/features/device-mgt/org.wso2.carbon.device.mgt.basics.feature/src/main/resources/dbscripts/cdm/h2.sql b/features/device-mgt/org.wso2.carbon.device.mgt.basics.feature/src/main/resources/dbscripts/cdm/h2.sql index 3db934311ea..0e8d1b8466d 100644 --- a/features/device-mgt/org.wso2.carbon.device.mgt.basics.feature/src/main/resources/dbscripts/cdm/h2.sql +++ b/features/device-mgt/org.wso2.carbon.device.mgt.basics.feature/src/main/resources/dbscripts/cdm/h2.sql @@ -115,15 +115,12 @@ CREATE TABLE IF NOT EXISTS DM_DEVICE_STATUS ( STATUS VARCHAR(50) DEFAULT NULL, UPDATE_TIME TIMESTAMP DEFAULT NULL, CHANGED_BY VARCHAR(255) NOT NULL, - PREVIOUS_STATUS VARCHAR(50) DEFAULT NULL, PRIMARY KEY (ID), CONSTRAINT fk_dm_device_status_device FOREIGN KEY (DEVICE_ID) REFERENCES DM_DEVICE (ID) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT fk_dm_device_status_enrolment FOREIGN KEY (ENROLMENT_ID) REFERENCES DM_ENROLMENT (ID) ON DELETE CASCADE ON UPDATE CASCADE ); -ALTER TABLE DM_DEVICE_STATUS ADD PREVIOUS_STATUS VARCHAR(50) DEFAULT NULL; - CREATE TABLE IF NOT EXISTS DM_ENROLMENT_OP_MAPPING ( ID INTEGER AUTO_INCREMENT NOT NULL, ENROLMENT_ID INTEGER NOT NULL, diff --git a/features/device-mgt/org.wso2.carbon.device.mgt.basics.feature/src/main/resources/dbscripts/cdm/mysql.sql b/features/device-mgt/org.wso2.carbon.device.mgt.basics.feature/src/main/resources/dbscripts/cdm/mysql.sql index 4e354a98808..33ac7964dd4 100644 --- a/features/device-mgt/org.wso2.carbon.device.mgt.basics.feature/src/main/resources/dbscripts/cdm/mysql.sql +++ b/features/device-mgt/org.wso2.carbon.device.mgt.basics.feature/src/main/resources/dbscripts/cdm/mysql.sql @@ -138,7 +138,6 @@ CREATE TABLE IF NOT EXISTS DM_DEVICE_STATUS ( CREATE INDEX IDX_ENROLMENT_FK_DEVICE_ID ON DM_ENROLMENT(DEVICE_ID); CREATE INDEX IDX_ENROLMENT_DEVICE_ID_TENANT_ID ON DM_ENROLMENT(DEVICE_ID, TENANT_ID); CREATE INDEX IDX_ENROLMENT_DEVICE_ID_TENANT_ID_STATUS ON DM_ENROLMENT(DEVICE_ID, TENANT_ID, STATUS); -ALTER TABLE DM_DEVICE_STATUS ADD PREVIOUS_STATUS VARCHAR(50) DEFAULT NULL; CREATE TABLE IF NOT EXISTS DM_ENROLMENT_OP_MAPPING ( ID INTEGER AUTO_INCREMENT NOT NULL, From cf305362b40a26a2a8fc66e50ecd0c993ea96b4e Mon Sep 17 00:00:00 2001 From: builder Date: Fri, 27 Jan 2023 19:20:08 +0530 Subject: [PATCH 08/10] [maven-release-plugin] prepare release v5.0.16 --- .../io.entgra.analytics.mgt.grafana.proxy.api/pom.xml | 2 +- .../io.entgra.analytics.mgt.grafana.proxy.common/pom.xml | 2 +- .../io.entgra.analytics.mgt.grafana.proxy.core/pom.xml | 2 +- components/analytics-mgt/grafana-mgt/pom.xml | 2 +- components/analytics-mgt/pom.xml | 2 +- .../org.wso2.carbon.apimgt.annotations/pom.xml | 2 +- .../pom.xml | 2 +- .../org.wso2.carbon.apimgt.application.extension/pom.xml | 2 +- .../org.wso2.carbon.apimgt.keymgt.extension.api/pom.xml | 2 +- .../org.wso2.carbon.apimgt.keymgt.extension/pom.xml | 2 +- .../org.wso2.carbon.apimgt.webapp.publisher/pom.xml | 2 +- components/apimgt-extensions/pom.xml | 2 +- .../io.entgra.application.mgt.addons/pom.xml | 2 +- .../application-mgt/io.entgra.application.mgt.api/pom.xml | 2 +- .../io.entgra.application.mgt.common/pom.xml | 2 +- .../application-mgt/io.entgra.application.mgt.core/pom.xml | 2 +- .../io.entgra.application.mgt.publisher.api/pom.xml | 2 +- .../io.entgra.application.mgt.store.api/pom.xml | 2 +- components/application-mgt/pom.xml | 2 +- .../org.wso2.carbon.certificate.mgt.api/pom.xml | 2 +- .../org.wso2.carbon.certificate.mgt.cert.admin.api/pom.xml | 2 +- .../org.wso2.carbon.certificate.mgt.core/pom.xml | 2 +- components/certificate-mgt/pom.xml | 2 +- .../pom.xml | 2 +- .../io.entgra.device.mgt.extensions.logger/pom.xml | 2 +- .../io.entgra.device.mgt.extensions.stateengine/pom.xml | 2 +- .../pom.xml | 2 +- .../pom.xml | 2 +- .../pom.xml | 2 +- .../pom.xml | 2 +- .../pom.xml | 2 +- .../pom.xml | 2 +- components/device-mgt-extensions/pom.xml | 2 +- .../io.entgra.carbon.device.mgt.config.api/pom.xml | 2 +- .../device-mgt/org.wso2.carbon.device.mgt.api/pom.xml | 2 +- .../device-mgt/org.wso2.carbon.device.mgt.common/pom.xml | 2 +- .../device-mgt/org.wso2.carbon.device.mgt.core/pom.xml | 2 +- .../org.wso2.carbon.device.mgt.extensions/pom.xml | 2 +- .../org.wso2.carbon.device.mgt.url.printer/pom.xml | 2 +- components/device-mgt/pom.xml | 2 +- .../io.entgra.server.bootup.heartbeat.beacon/pom.xml | 2 +- components/heartbeat-management/pom.xml | 2 +- .../org.wso2.carbon.device.mgt.oauth.extensions/pom.xml | 2 +- .../org.wso2.carbon.identity.jwt.client.extension/pom.xml | 2 +- components/identity-extensions/pom.xml | 2 +- .../org.wso2.carbon.policy.decision.point/pom.xml | 2 +- .../org.wso2.carbon.policy.information.point/pom.xml | 2 +- .../policy-mgt/org.wso2.carbon.policy.mgt.common/pom.xml | 2 +- .../policy-mgt/org.wso2.carbon.policy.mgt.core/pom.xml | 2 +- components/policy-mgt/pom.xml | 2 +- .../email-sender/org.wso2.carbon.email.sender.core/pom.xml | 2 +- components/transport-mgt/email-sender/pom.xml | 2 +- components/transport-mgt/pom.xml | 2 +- .../io.entgra.transport.mgt.sms.handler.api/pom.xml | 2 +- .../io.entgra.transport.mgt.sms.handler.common/pom.xml | 2 +- .../io.entgra.transport.mgt.sms.handler.core/pom.xml | 2 +- components/transport-mgt/sms-handler/pom.xml | 2 +- .../io.entgra.ui.request.interceptor/pom.xml | 2 +- components/ui-request-interceptor/pom.xml | 2 +- .../org.wso2.carbon.webapp.authenticator.framework/pom.xml | 2 +- components/webapp-authenticator-framework/pom.xml | 2 +- .../pom.xml | 2 +- .../pom.xml | 2 +- features/analytics-mgt/grafana-mgt/pom.xml | 2 +- features/analytics-mgt/pom.xml | 2 +- .../pom.xml | 2 +- .../org.wso2.carbon.apimgt.keymgt.extension.feature/pom.xml | 2 +- .../org.wso2.carbon.apimgt.webapp.publisher.feature/pom.xml | 2 +- features/apimgt-extensions/pom.xml | 2 +- .../io.entgra.application.mgt.api.feature/pom.xml | 2 +- .../io.entgra.application.mgt.server.feature/pom.xml | 2 +- features/application-mgt/pom.xml | 2 +- .../org.wso2.carbon.certificate.mgt.api.feature/pom.xml | 2 +- .../pom.xml | 2 +- .../org.wso2.carbon.certificate.mgt.server.feature/pom.xml | 2 +- features/certificate-mgt/pom.xml | 2 +- .../pom.xml | 2 +- .../io.entgra.device.mgt.extensions.logger.feature/pom.xml | 2 +- .../pom.xml | 2 +- .../pom.xml | 2 +- .../pom.xml | 2 +- .../pom.xml | 2 +- .../pom.xml | 2 +- .../pom.xml | 2 +- features/device-mgt-extensions/pom.xml | 2 +- .../org.wso2.carbon.device.mgt.api.feature/pom.xml | 2 +- .../org.wso2.carbon.device.mgt.basics.feature/pom.xml | 2 +- .../org.wso2.carbon.device.mgt.extensions.feature/pom.xml | 2 +- .../device-mgt/org.wso2.carbon.device.mgt.feature/pom.xml | 2 +- .../org.wso2.carbon.device.mgt.server.feature/pom.xml | 2 +- features/device-mgt/pom.xml | 2 +- .../io.entgra.server.heart.beat.feature/pom.xml | 2 +- features/heartbeat-management/pom.xml | 2 +- .../pom.xml | 2 +- features/jwt-client/pom.xml | 2 +- .../org.wso2.carbon.policy.mgt.server.feature/pom.xml | 2 +- features/policy-mgt/pom.xml | 2 +- .../org.wso2.carbon.email.sender.feature/pom.xml | 2 +- features/transport-mgt/email-sender/pom.xml | 2 +- features/transport-mgt/pom.xml | 2 +- .../io.entgra.transport.mgt.sms.handler.api.feature/pom.xml | 2 +- .../pom.xml | 2 +- features/transport-mgt/sms-handler/pom.xml | 2 +- .../io.entgra.ui.request.interceptor.feature/pom.xml | 2 +- features/ui-request-interceptor/pom.xml | 2 +- .../pom.xml | 2 +- features/webapp-authenticator-framework/pom.xml | 2 +- pom.xml | 6 +++--- 108 files changed, 110 insertions(+), 110 deletions(-) diff --git a/components/analytics-mgt/grafana-mgt/io.entgra.analytics.mgt.grafana.proxy.api/pom.xml b/components/analytics-mgt/grafana-mgt/io.entgra.analytics.mgt.grafana.proxy.api/pom.xml index 748108ec609..7af3c3a01ae 100644 --- a/components/analytics-mgt/grafana-mgt/io.entgra.analytics.mgt.grafana.proxy.api/pom.xml +++ b/components/analytics-mgt/grafana-mgt/io.entgra.analytics.mgt.grafana.proxy.api/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt grafana-mgt - 5.0.16-SNAPSHOT + 5.0.16 ../pom.xml diff --git a/components/analytics-mgt/grafana-mgt/io.entgra.analytics.mgt.grafana.proxy.common/pom.xml b/components/analytics-mgt/grafana-mgt/io.entgra.analytics.mgt.grafana.proxy.common/pom.xml index 45a1ab13817..c5966f69ae5 100644 --- a/components/analytics-mgt/grafana-mgt/io.entgra.analytics.mgt.grafana.proxy.common/pom.xml +++ b/components/analytics-mgt/grafana-mgt/io.entgra.analytics.mgt.grafana.proxy.common/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt grafana-mgt - 5.0.16-SNAPSHOT + 5.0.16 ../pom.xml diff --git a/components/analytics-mgt/grafana-mgt/io.entgra.analytics.mgt.grafana.proxy.core/pom.xml b/components/analytics-mgt/grafana-mgt/io.entgra.analytics.mgt.grafana.proxy.core/pom.xml index 15bce921232..8bed46ff0e3 100644 --- a/components/analytics-mgt/grafana-mgt/io.entgra.analytics.mgt.grafana.proxy.core/pom.xml +++ b/components/analytics-mgt/grafana-mgt/io.entgra.analytics.mgt.grafana.proxy.core/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt grafana-mgt - 5.0.16-SNAPSHOT + 5.0.16 ../pom.xml diff --git a/components/analytics-mgt/grafana-mgt/pom.xml b/components/analytics-mgt/grafana-mgt/pom.xml index 781fa794dbe..f0edd92c872 100644 --- a/components/analytics-mgt/grafana-mgt/pom.xml +++ b/components/analytics-mgt/grafana-mgt/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt analytics-mgt - 5.0.16-SNAPSHOT + 5.0.16 ../pom.xml diff --git a/components/analytics-mgt/pom.xml b/components/analytics-mgt/pom.xml index 21f5069a74c..978268e6acd 100644 --- a/components/analytics-mgt/pom.xml +++ b/components/analytics-mgt/pom.xml @@ -3,7 +3,7 @@ carbon-devicemgt org.wso2.carbon.devicemgt - 5.0.16-SNAPSHOT + 5.0.16 ../../pom.xml 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 1783073616e..e3a11df699f 100644 --- a/components/apimgt-extensions/org.wso2.carbon.apimgt.annotations/pom.xml +++ b/components/apimgt-extensions/org.wso2.carbon.apimgt.annotations/pom.xml @@ -22,7 +22,7 @@ apimgt-extensions org.wso2.carbon.devicemgt - 5.0.16-SNAPSHOT + 5.0.16 ../pom.xml diff --git a/components/apimgt-extensions/org.wso2.carbon.apimgt.application.extension.api/pom.xml b/components/apimgt-extensions/org.wso2.carbon.apimgt.application.extension.api/pom.xml index 95cc7dbf4ba..9bdc36e6151 100644 --- a/components/apimgt-extensions/org.wso2.carbon.apimgt.application.extension.api/pom.xml +++ b/components/apimgt-extensions/org.wso2.carbon.apimgt.application.extension.api/pom.xml @@ -21,7 +21,7 @@ apimgt-extensions org.wso2.carbon.devicemgt - 5.0.16-SNAPSHOT + 5.0.16 ../pom.xml diff --git a/components/apimgt-extensions/org.wso2.carbon.apimgt.application.extension/pom.xml b/components/apimgt-extensions/org.wso2.carbon.apimgt.application.extension/pom.xml index e7a8040eef8..5c77a81b228 100644 --- a/components/apimgt-extensions/org.wso2.carbon.apimgt.application.extension/pom.xml +++ b/components/apimgt-extensions/org.wso2.carbon.apimgt.application.extension/pom.xml @@ -22,7 +22,7 @@ apimgt-extensions org.wso2.carbon.devicemgt - 5.0.16-SNAPSHOT + 5.0.16 ../pom.xml diff --git a/components/apimgt-extensions/org.wso2.carbon.apimgt.keymgt.extension.api/pom.xml b/components/apimgt-extensions/org.wso2.carbon.apimgt.keymgt.extension.api/pom.xml index 03da5eb4af3..2da538bbd19 100644 --- a/components/apimgt-extensions/org.wso2.carbon.apimgt.keymgt.extension.api/pom.xml +++ b/components/apimgt-extensions/org.wso2.carbon.apimgt.keymgt.extension.api/pom.xml @@ -3,7 +3,7 @@ apimgt-extensions org.wso2.carbon.devicemgt - 5.0.16-SNAPSHOT + 5.0.16 4.0.0 diff --git a/components/apimgt-extensions/org.wso2.carbon.apimgt.keymgt.extension/pom.xml b/components/apimgt-extensions/org.wso2.carbon.apimgt.keymgt.extension/pom.xml index 1d064a5656e..6b049a95915 100644 --- a/components/apimgt-extensions/org.wso2.carbon.apimgt.keymgt.extension/pom.xml +++ b/components/apimgt-extensions/org.wso2.carbon.apimgt.keymgt.extension/pom.xml @@ -3,7 +3,7 @@ apimgt-extensions org.wso2.carbon.devicemgt - 5.0.16-SNAPSHOT + 5.0.16 ../pom.xml 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 20525b51422..ba32af1afd1 100644 --- a/components/apimgt-extensions/org.wso2.carbon.apimgt.webapp.publisher/pom.xml +++ b/components/apimgt-extensions/org.wso2.carbon.apimgt.webapp.publisher/pom.xml @@ -22,7 +22,7 @@ apimgt-extensions org.wso2.carbon.devicemgt - 5.0.16-SNAPSHOT + 5.0.16 ../pom.xml diff --git a/components/apimgt-extensions/pom.xml b/components/apimgt-extensions/pom.xml index c09f37daa44..626cf97b305 100644 --- a/components/apimgt-extensions/pom.xml +++ b/components/apimgt-extensions/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt carbon-devicemgt - 5.0.16-SNAPSHOT + 5.0.16 ../../pom.xml diff --git a/components/application-mgt/io.entgra.application.mgt.addons/pom.xml b/components/application-mgt/io.entgra.application.mgt.addons/pom.xml index 26c496befd0..58b20d279c8 100644 --- a/components/application-mgt/io.entgra.application.mgt.addons/pom.xml +++ b/components/application-mgt/io.entgra.application.mgt.addons/pom.xml @@ -20,7 +20,7 @@ application-mgt org.wso2.carbon.devicemgt - 5.0.16-SNAPSHOT + 5.0.16 ../pom.xml diff --git a/components/application-mgt/io.entgra.application.mgt.api/pom.xml b/components/application-mgt/io.entgra.application.mgt.api/pom.xml index 93e0c641b49..1f9af2b5550 100644 --- a/components/application-mgt/io.entgra.application.mgt.api/pom.xml +++ b/components/application-mgt/io.entgra.application.mgt.api/pom.xml @@ -22,7 +22,7 @@ application-mgt org.wso2.carbon.devicemgt - 5.0.16-SNAPSHOT + 5.0.16 ../pom.xml diff --git a/components/application-mgt/io.entgra.application.mgt.common/pom.xml b/components/application-mgt/io.entgra.application.mgt.common/pom.xml index 54ddd889e8f..94736a3ef5a 100644 --- a/components/application-mgt/io.entgra.application.mgt.common/pom.xml +++ b/components/application-mgt/io.entgra.application.mgt.common/pom.xml @@ -21,7 +21,7 @@ org.wso2.carbon.devicemgt application-mgt - 5.0.16-SNAPSHOT + 5.0.16 ../pom.xml diff --git a/components/application-mgt/io.entgra.application.mgt.core/pom.xml b/components/application-mgt/io.entgra.application.mgt.core/pom.xml index 2c882ffc3cb..9c6102cdc7a 100644 --- a/components/application-mgt/io.entgra.application.mgt.core/pom.xml +++ b/components/application-mgt/io.entgra.application.mgt.core/pom.xml @@ -21,7 +21,7 @@ org.wso2.carbon.devicemgt application-mgt - 5.0.16-SNAPSHOT + 5.0.16 ../pom.xml diff --git a/components/application-mgt/io.entgra.application.mgt.publisher.api/pom.xml b/components/application-mgt/io.entgra.application.mgt.publisher.api/pom.xml index f246e392fa1..32abf335b48 100644 --- a/components/application-mgt/io.entgra.application.mgt.publisher.api/pom.xml +++ b/components/application-mgt/io.entgra.application.mgt.publisher.api/pom.xml @@ -22,7 +22,7 @@ application-mgt org.wso2.carbon.devicemgt - 5.0.16-SNAPSHOT + 5.0.16 ../pom.xml diff --git a/components/application-mgt/io.entgra.application.mgt.store.api/pom.xml b/components/application-mgt/io.entgra.application.mgt.store.api/pom.xml index 3cc8edac9a2..67773992f62 100644 --- a/components/application-mgt/io.entgra.application.mgt.store.api/pom.xml +++ b/components/application-mgt/io.entgra.application.mgt.store.api/pom.xml @@ -22,7 +22,7 @@ application-mgt org.wso2.carbon.devicemgt - 5.0.16-SNAPSHOT + 5.0.16 ../pom.xml diff --git a/components/application-mgt/pom.xml b/components/application-mgt/pom.xml index 58475ac289d..f7d2fdb9228 100644 --- a/components/application-mgt/pom.xml +++ b/components/application-mgt/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt carbon-devicemgt - 5.0.16-SNAPSHOT + 5.0.16 ../../pom.xml 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 156ccf9cb01..de48baebf5f 100644 --- a/components/certificate-mgt/org.wso2.carbon.certificate.mgt.api/pom.xml +++ b/components/certificate-mgt/org.wso2.carbon.certificate.mgt.api/pom.xml @@ -22,7 +22,7 @@ certificate-mgt org.wso2.carbon.devicemgt - 5.0.16-SNAPSHOT + 5.0.16 ../pom.xml diff --git a/components/certificate-mgt/org.wso2.carbon.certificate.mgt.cert.admin.api/pom.xml b/components/certificate-mgt/org.wso2.carbon.certificate.mgt.cert.admin.api/pom.xml index f6175594545..4d95d71580d 100644 --- a/components/certificate-mgt/org.wso2.carbon.certificate.mgt.cert.admin.api/pom.xml +++ b/components/certificate-mgt/org.wso2.carbon.certificate.mgt.cert.admin.api/pom.xml @@ -22,7 +22,7 @@ certificate-mgt org.wso2.carbon.devicemgt - 5.0.16-SNAPSHOT + 5.0.16 ../pom.xml diff --git a/components/certificate-mgt/org.wso2.carbon.certificate.mgt.core/pom.xml b/components/certificate-mgt/org.wso2.carbon.certificate.mgt.core/pom.xml index 8521489c1c9..f59efa75eee 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 @@ -38,7 +38,7 @@ org.wso2.carbon.devicemgt certificate-mgt - 5.0.16-SNAPSHOT + 5.0.16 ../pom.xml diff --git a/components/certificate-mgt/pom.xml b/components/certificate-mgt/pom.xml index a780123240d..ebb44f6e005 100644 --- a/components/certificate-mgt/pom.xml +++ b/components/certificate-mgt/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt carbon-devicemgt - 5.0.16-SNAPSHOT + 5.0.16 ../../pom.xml diff --git a/components/device-mgt-extensions/io.entgra.device.mgt.extensions.defaultrole.manager/pom.xml b/components/device-mgt-extensions/io.entgra.device.mgt.extensions.defaultrole.manager/pom.xml index 21986acdcc7..b5636dc88fc 100644 --- a/components/device-mgt-extensions/io.entgra.device.mgt.extensions.defaultrole.manager/pom.xml +++ b/components/device-mgt-extensions/io.entgra.device.mgt.extensions.defaultrole.manager/pom.xml @@ -23,7 +23,7 @@ device-mgt-extensions org.wso2.carbon.devicemgt - 5.0.16-SNAPSHOT + 5.0.16 ../pom.xml diff --git a/components/device-mgt-extensions/io.entgra.device.mgt.extensions.logger/pom.xml b/components/device-mgt-extensions/io.entgra.device.mgt.extensions.logger/pom.xml index 4153e2c3374..da06425cd1b 100644 --- a/components/device-mgt-extensions/io.entgra.device.mgt.extensions.logger/pom.xml +++ b/components/device-mgt-extensions/io.entgra.device.mgt.extensions.logger/pom.xml @@ -22,7 +22,7 @@ device-mgt-extensions org.wso2.carbon.devicemgt - 5.0.16-SNAPSHOT + 5.0.16 ../pom.xml diff --git a/components/device-mgt-extensions/io.entgra.device.mgt.extensions.stateengine/pom.xml b/components/device-mgt-extensions/io.entgra.device.mgt.extensions.stateengine/pom.xml index 2dd1025f8bd..f0a20a772e9 100644 --- a/components/device-mgt-extensions/io.entgra.device.mgt.extensions.stateengine/pom.xml +++ b/components/device-mgt-extensions/io.entgra.device.mgt.extensions.stateengine/pom.xml @@ -23,7 +23,7 @@ device-mgt-extensions org.wso2.carbon.devicemgt - 5.0.16-SNAPSHOT + 5.0.16 ../pom.xml diff --git a/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.device.type.deployer/pom.xml b/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.device.type.deployer/pom.xml index 65c27150c01..f24306264ac 100644 --- a/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.device.type.deployer/pom.xml +++ b/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.device.type.deployer/pom.xml @@ -22,7 +22,7 @@ device-mgt-extensions org.wso2.carbon.devicemgt - 5.0.16-SNAPSHOT + 5.0.16 ../pom.xml diff --git a/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.pull.notification/pom.xml b/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.pull.notification/pom.xml index a6f43d0f7d8..01d006fc1bc 100644 --- a/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.pull.notification/pom.xml +++ b/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.pull.notification/pom.xml @@ -22,7 +22,7 @@ device-mgt-extensions org.wso2.carbon.devicemgt - 5.0.16-SNAPSHOT + 5.0.16 ../pom.xml diff --git a/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.fcm/pom.xml b/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.fcm/pom.xml index 7687af14ec2..ea89d437497 100644 --- a/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.fcm/pom.xml +++ b/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.fcm/pom.xml @@ -22,7 +22,7 @@ device-mgt-extensions org.wso2.carbon.devicemgt - 5.0.16-SNAPSHOT + 5.0.16 ../pom.xml diff --git a/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.http/pom.xml b/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.http/pom.xml index 250d1b27559..6f06591e92f 100644 --- a/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.http/pom.xml +++ b/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.http/pom.xml @@ -22,7 +22,7 @@ device-mgt-extensions org.wso2.carbon.devicemgt - 5.0.16-SNAPSHOT + 5.0.16 ../pom.xml diff --git a/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.mqtt/pom.xml b/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.mqtt/pom.xml index 27e81b20862..4492587c178 100644 --- a/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.mqtt/pom.xml +++ b/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.mqtt/pom.xml @@ -22,7 +22,7 @@ device-mgt-extensions org.wso2.carbon.devicemgt - 5.0.16-SNAPSHOT + 5.0.16 ../pom.xml diff --git a/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.xmpp/pom.xml b/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.xmpp/pom.xml index ac1d9433dbb..1f898e639bc 100644 --- a/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.xmpp/pom.xml +++ b/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.xmpp/pom.xml @@ -22,7 +22,7 @@ device-mgt-extensions org.wso2.carbon.devicemgt - 5.0.16-SNAPSHOT + 5.0.16 ../pom.xml diff --git a/components/device-mgt-extensions/pom.xml b/components/device-mgt-extensions/pom.xml index 61cc4740967..7ec4e28d02b 100644 --- a/components/device-mgt-extensions/pom.xml +++ b/components/device-mgt-extensions/pom.xml @@ -22,7 +22,7 @@ carbon-devicemgt org.wso2.carbon.devicemgt - 5.0.16-SNAPSHOT + 5.0.16 ../../pom.xml diff --git a/components/device-mgt/io.entgra.carbon.device.mgt.config.api/pom.xml b/components/device-mgt/io.entgra.carbon.device.mgt.config.api/pom.xml index 6173c124e8d..436e308dec8 100644 --- a/components/device-mgt/io.entgra.carbon.device.mgt.config.api/pom.xml +++ b/components/device-mgt/io.entgra.carbon.device.mgt.config.api/pom.xml @@ -22,7 +22,7 @@ device-mgt org.wso2.carbon.devicemgt - 5.0.16-SNAPSHOT + 5.0.16 ../pom.xml diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.api/pom.xml b/components/device-mgt/org.wso2.carbon.device.mgt.api/pom.xml index d232be71b83..70bc34091c8 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.api/pom.xml +++ b/components/device-mgt/org.wso2.carbon.device.mgt.api/pom.xml @@ -22,7 +22,7 @@ device-mgt org.wso2.carbon.devicemgt - 5.0.16-SNAPSHOT + 5.0.16 ../pom.xml diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.common/pom.xml b/components/device-mgt/org.wso2.carbon.device.mgt.common/pom.xml index bdc879561d3..f349e40f1a6 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.common/pom.xml +++ b/components/device-mgt/org.wso2.carbon.device.mgt.common/pom.xml @@ -21,7 +21,7 @@ device-mgt org.wso2.carbon.devicemgt - 5.0.16-SNAPSHOT + 5.0.16 ../pom.xml diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/pom.xml b/components/device-mgt/org.wso2.carbon.device.mgt.core/pom.xml index 6176c74ff5a..7027bdb19cb 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/pom.xml +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt device-mgt - 5.0.16-SNAPSHOT + 5.0.16 ../pom.xml diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.extensions/pom.xml b/components/device-mgt/org.wso2.carbon.device.mgt.extensions/pom.xml index 5f934cdba4f..e35031d5c1c 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.extensions/pom.xml +++ b/components/device-mgt/org.wso2.carbon.device.mgt.extensions/pom.xml @@ -22,7 +22,7 @@ device-mgt org.wso2.carbon.devicemgt - 5.0.16-SNAPSHOT + 5.0.16 ../pom.xml diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.url.printer/pom.xml b/components/device-mgt/org.wso2.carbon.device.mgt.url.printer/pom.xml index 78d65441e79..c28feb1f9c0 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.url.printer/pom.xml +++ b/components/device-mgt/org.wso2.carbon.device.mgt.url.printer/pom.xml @@ -23,7 +23,7 @@ device-mgt org.wso2.carbon.devicemgt - 5.0.16-SNAPSHOT + 5.0.16 ../pom.xml diff --git a/components/device-mgt/pom.xml b/components/device-mgt/pom.xml index 01a2b614150..925052b0cab 100644 --- a/components/device-mgt/pom.xml +++ b/components/device-mgt/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt carbon-devicemgt - 5.0.16-SNAPSHOT + 5.0.16 ../../pom.xml diff --git a/components/heartbeat-management/io.entgra.server.bootup.heartbeat.beacon/pom.xml b/components/heartbeat-management/io.entgra.server.bootup.heartbeat.beacon/pom.xml index 62f34fec47c..506cd32ddae 100644 --- a/components/heartbeat-management/io.entgra.server.bootup.heartbeat.beacon/pom.xml +++ b/components/heartbeat-management/io.entgra.server.bootup.heartbeat.beacon/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt heartbeat-management - 5.0.16-SNAPSHOT + 5.0.16 ../pom.xml diff --git a/components/heartbeat-management/pom.xml b/components/heartbeat-management/pom.xml index 12b187f60bd..8038a5e3a67 100644 --- a/components/heartbeat-management/pom.xml +++ b/components/heartbeat-management/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt carbon-devicemgt - 5.0.16-SNAPSHOT + 5.0.16 ../../pom.xml diff --git a/components/identity-extensions/org.wso2.carbon.device.mgt.oauth.extensions/pom.xml b/components/identity-extensions/org.wso2.carbon.device.mgt.oauth.extensions/pom.xml index 2f143b316a3..4e57f82e000 100644 --- a/components/identity-extensions/org.wso2.carbon.device.mgt.oauth.extensions/pom.xml +++ b/components/identity-extensions/org.wso2.carbon.device.mgt.oauth.extensions/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt identity-extensions - 5.0.16-SNAPSHOT + 5.0.16 ../pom.xml 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 4ca291c2998..c406c9f014c 100644 --- a/components/identity-extensions/org.wso2.carbon.identity.jwt.client.extension/pom.xml +++ b/components/identity-extensions/org.wso2.carbon.identity.jwt.client.extension/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt identity-extensions - 5.0.16-SNAPSHOT + 5.0.16 ../pom.xml diff --git a/components/identity-extensions/pom.xml b/components/identity-extensions/pom.xml index 12f156ebe63..68fa0ca3dec 100644 --- a/components/identity-extensions/pom.xml +++ b/components/identity-extensions/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt carbon-devicemgt - 5.0.16-SNAPSHOT + 5.0.16 ../../pom.xml diff --git a/components/policy-mgt/org.wso2.carbon.policy.decision.point/pom.xml b/components/policy-mgt/org.wso2.carbon.policy.decision.point/pom.xml index adbad363b8c..445de9b55c4 100644 --- a/components/policy-mgt/org.wso2.carbon.policy.decision.point/pom.xml +++ b/components/policy-mgt/org.wso2.carbon.policy.decision.point/pom.xml @@ -3,7 +3,7 @@ org.wso2.carbon.devicemgt policy-mgt - 5.0.16-SNAPSHOT + 5.0.16 ../pom.xml diff --git a/components/policy-mgt/org.wso2.carbon.policy.information.point/pom.xml b/components/policy-mgt/org.wso2.carbon.policy.information.point/pom.xml index 5ea8b324a79..4a8b51f96c4 100644 --- a/components/policy-mgt/org.wso2.carbon.policy.information.point/pom.xml +++ b/components/policy-mgt/org.wso2.carbon.policy.information.point/pom.xml @@ -3,7 +3,7 @@ org.wso2.carbon.devicemgt policy-mgt - 5.0.16-SNAPSHOT + 5.0.16 ../pom.xml diff --git a/components/policy-mgt/org.wso2.carbon.policy.mgt.common/pom.xml b/components/policy-mgt/org.wso2.carbon.policy.mgt.common/pom.xml index e37d88532b7..22d49411ae3 100644 --- a/components/policy-mgt/org.wso2.carbon.policy.mgt.common/pom.xml +++ b/components/policy-mgt/org.wso2.carbon.policy.mgt.common/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt policy-mgt - 5.0.16-SNAPSHOT + 5.0.16 ../pom.xml 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 be0b657d10e..c6c62708b41 100644 --- a/components/policy-mgt/org.wso2.carbon.policy.mgt.core/pom.xml +++ b/components/policy-mgt/org.wso2.carbon.policy.mgt.core/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt policy-mgt - 5.0.16-SNAPSHOT + 5.0.16 ../pom.xml diff --git a/components/policy-mgt/pom.xml b/components/policy-mgt/pom.xml index c7893323ec0..f2a3f19db8b 100644 --- a/components/policy-mgt/pom.xml +++ b/components/policy-mgt/pom.xml @@ -23,7 +23,7 @@ org.wso2.carbon.devicemgt carbon-devicemgt - 5.0.16-SNAPSHOT + 5.0.16 ../../pom.xml diff --git a/components/transport-mgt/email-sender/org.wso2.carbon.email.sender.core/pom.xml b/components/transport-mgt/email-sender/org.wso2.carbon.email.sender.core/pom.xml index 40b9eca423f..d45e9190c02 100644 --- a/components/transport-mgt/email-sender/org.wso2.carbon.email.sender.core/pom.xml +++ b/components/transport-mgt/email-sender/org.wso2.carbon.email.sender.core/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt email-sender - 5.0.16-SNAPSHOT + 5.0.16 ../pom.xml diff --git a/components/transport-mgt/email-sender/pom.xml b/components/transport-mgt/email-sender/pom.xml index fb2fb758157..68bb5696589 100644 --- a/components/transport-mgt/email-sender/pom.xml +++ b/components/transport-mgt/email-sender/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt transport-mgt - 5.0.16-SNAPSHOT + 5.0.16 ../pom.xml diff --git a/components/transport-mgt/pom.xml b/components/transport-mgt/pom.xml index 7d745fe4893..07c38d07903 100644 --- a/components/transport-mgt/pom.xml +++ b/components/transport-mgt/pom.xml @@ -3,7 +3,7 @@ carbon-devicemgt org.wso2.carbon.devicemgt - 5.0.16-SNAPSHOT + 5.0.16 ../../pom.xml diff --git a/components/transport-mgt/sms-handler/io.entgra.transport.mgt.sms.handler.api/pom.xml b/components/transport-mgt/sms-handler/io.entgra.transport.mgt.sms.handler.api/pom.xml index 949fd17fb83..2c6bde93b98 100644 --- a/components/transport-mgt/sms-handler/io.entgra.transport.mgt.sms.handler.api/pom.xml +++ b/components/transport-mgt/sms-handler/io.entgra.transport.mgt.sms.handler.api/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt sms-handler - 5.0.16-SNAPSHOT + 5.0.16 ../pom.xml diff --git a/components/transport-mgt/sms-handler/io.entgra.transport.mgt.sms.handler.common/pom.xml b/components/transport-mgt/sms-handler/io.entgra.transport.mgt.sms.handler.common/pom.xml index 157cd9b525e..36a3368a22d 100644 --- a/components/transport-mgt/sms-handler/io.entgra.transport.mgt.sms.handler.common/pom.xml +++ b/components/transport-mgt/sms-handler/io.entgra.transport.mgt.sms.handler.common/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt sms-handler - 5.0.16-SNAPSHOT + 5.0.16 ../pom.xml diff --git a/components/transport-mgt/sms-handler/io.entgra.transport.mgt.sms.handler.core/pom.xml b/components/transport-mgt/sms-handler/io.entgra.transport.mgt.sms.handler.core/pom.xml index 4b595c67131..591e22ac63c 100644 --- a/components/transport-mgt/sms-handler/io.entgra.transport.mgt.sms.handler.core/pom.xml +++ b/components/transport-mgt/sms-handler/io.entgra.transport.mgt.sms.handler.core/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt sms-handler - 5.0.16-SNAPSHOT + 5.0.16 ../pom.xml diff --git a/components/transport-mgt/sms-handler/pom.xml b/components/transport-mgt/sms-handler/pom.xml index 26692cbe038..344debb7895 100644 --- a/components/transport-mgt/sms-handler/pom.xml +++ b/components/transport-mgt/sms-handler/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt transport-mgt - 5.0.16-SNAPSHOT + 5.0.16 ../pom.xml diff --git a/components/ui-request-interceptor/io.entgra.ui.request.interceptor/pom.xml b/components/ui-request-interceptor/io.entgra.ui.request.interceptor/pom.xml index e6a9a9be204..0c1acb421cf 100644 --- a/components/ui-request-interceptor/io.entgra.ui.request.interceptor/pom.xml +++ b/components/ui-request-interceptor/io.entgra.ui.request.interceptor/pom.xml @@ -21,7 +21,7 @@ ui-request-interceptor io.entgra.devicemgt - 5.0.16-SNAPSHOT + 5.0.16 4.0.0 diff --git a/components/ui-request-interceptor/pom.xml b/components/ui-request-interceptor/pom.xml index 8477f978796..2950f329361 100644 --- a/components/ui-request-interceptor/pom.xml +++ b/components/ui-request-interceptor/pom.xml @@ -21,7 +21,7 @@ carbon-devicemgt org.wso2.carbon.devicemgt - 5.0.16-SNAPSHOT + 5.0.16 ../../pom.xml 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 9dc0e25218b..76d42b172c2 100644 --- a/components/webapp-authenticator-framework/org.wso2.carbon.webapp.authenticator.framework/pom.xml +++ b/components/webapp-authenticator-framework/org.wso2.carbon.webapp.authenticator.framework/pom.xml @@ -21,7 +21,7 @@ org.wso2.carbon.devicemgt webapp-authenticator-framework - 5.0.16-SNAPSHOT + 5.0.16 ../pom.xml diff --git a/components/webapp-authenticator-framework/pom.xml b/components/webapp-authenticator-framework/pom.xml index 3ffd5ca3386..1c7a9d4aaf5 100644 --- a/components/webapp-authenticator-framework/pom.xml +++ b/components/webapp-authenticator-framework/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt carbon-devicemgt - 5.0.16-SNAPSHOT + 5.0.16 ../../pom.xml diff --git a/features/analytics-mgt/grafana-mgt/io.entgra.analytics.mgt.grafana.proxy.api.feature/pom.xml b/features/analytics-mgt/grafana-mgt/io.entgra.analytics.mgt.grafana.proxy.api.feature/pom.xml index 32f3e183cdd..f8d732dd0e5 100644 --- a/features/analytics-mgt/grafana-mgt/io.entgra.analytics.mgt.grafana.proxy.api.feature/pom.xml +++ b/features/analytics-mgt/grafana-mgt/io.entgra.analytics.mgt.grafana.proxy.api.feature/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt grafana-mgt-feature - 5.0.16-SNAPSHOT + 5.0.16 ../pom.xml diff --git a/features/analytics-mgt/grafana-mgt/io.entgra.analytics.mgt.grafana.proxy.server.feature/pom.xml b/features/analytics-mgt/grafana-mgt/io.entgra.analytics.mgt.grafana.proxy.server.feature/pom.xml index 30a1342c734..af8a760f7de 100644 --- a/features/analytics-mgt/grafana-mgt/io.entgra.analytics.mgt.grafana.proxy.server.feature/pom.xml +++ b/features/analytics-mgt/grafana-mgt/io.entgra.analytics.mgt.grafana.proxy.server.feature/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt grafana-mgt-feature - 5.0.16-SNAPSHOT + 5.0.16 ../pom.xml diff --git a/features/analytics-mgt/grafana-mgt/pom.xml b/features/analytics-mgt/grafana-mgt/pom.xml index 1526f52946f..30b2fae1906 100644 --- a/features/analytics-mgt/grafana-mgt/pom.xml +++ b/features/analytics-mgt/grafana-mgt/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt analytics-mgt-feature - 5.0.16-SNAPSHOT + 5.0.16 ../pom.xml diff --git a/features/analytics-mgt/pom.xml b/features/analytics-mgt/pom.xml index 3e0c361e024..ccb405ea8ac 100644 --- a/features/analytics-mgt/pom.xml +++ b/features/analytics-mgt/pom.xml @@ -3,7 +3,7 @@ carbon-devicemgt org.wso2.carbon.devicemgt - 5.0.16-SNAPSHOT + 5.0.16 ../../pom.xml diff --git a/features/apimgt-extensions/org.wso2.carbon.apimgt.application.extension.feature/pom.xml b/features/apimgt-extensions/org.wso2.carbon.apimgt.application.extension.feature/pom.xml index ba1696ca435..f99278d15f7 100644 --- a/features/apimgt-extensions/org.wso2.carbon.apimgt.application.extension.feature/pom.xml +++ b/features/apimgt-extensions/org.wso2.carbon.apimgt.application.extension.feature/pom.xml @@ -21,7 +21,7 @@ org.wso2.carbon.devicemgt apimgt-extensions-feature - 5.0.16-SNAPSHOT + 5.0.16 ../pom.xml diff --git a/features/apimgt-extensions/org.wso2.carbon.apimgt.keymgt.extension.feature/pom.xml b/features/apimgt-extensions/org.wso2.carbon.apimgt.keymgt.extension.feature/pom.xml index 8a676873d8b..b9f17e5aedf 100644 --- a/features/apimgt-extensions/org.wso2.carbon.apimgt.keymgt.extension.feature/pom.xml +++ b/features/apimgt-extensions/org.wso2.carbon.apimgt.keymgt.extension.feature/pom.xml @@ -21,7 +21,7 @@ org.wso2.carbon.devicemgt apimgt-extensions-feature - 5.0.16-SNAPSHOT + 5.0.16 ../pom.xml diff --git a/features/apimgt-extensions/org.wso2.carbon.apimgt.webapp.publisher.feature/pom.xml b/features/apimgt-extensions/org.wso2.carbon.apimgt.webapp.publisher.feature/pom.xml index 6c9e2929aee..7d5a130a33e 100644 --- a/features/apimgt-extensions/org.wso2.carbon.apimgt.webapp.publisher.feature/pom.xml +++ b/features/apimgt-extensions/org.wso2.carbon.apimgt.webapp.publisher.feature/pom.xml @@ -21,7 +21,7 @@ org.wso2.carbon.devicemgt apimgt-extensions-feature - 5.0.16-SNAPSHOT + 5.0.16 ../pom.xml diff --git a/features/apimgt-extensions/pom.xml b/features/apimgt-extensions/pom.xml index ef802e791ff..84a7ea607d8 100644 --- a/features/apimgt-extensions/pom.xml +++ b/features/apimgt-extensions/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt carbon-devicemgt - 5.0.16-SNAPSHOT + 5.0.16 ../../pom.xml diff --git a/features/application-mgt/io.entgra.application.mgt.api.feature/pom.xml b/features/application-mgt/io.entgra.application.mgt.api.feature/pom.xml index 9beeb2a45fc..c6086158091 100644 --- a/features/application-mgt/io.entgra.application.mgt.api.feature/pom.xml +++ b/features/application-mgt/io.entgra.application.mgt.api.feature/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt application-mgt-feature - 5.0.16-SNAPSHOT + 5.0.16 ../pom.xml diff --git a/features/application-mgt/io.entgra.application.mgt.server.feature/pom.xml b/features/application-mgt/io.entgra.application.mgt.server.feature/pom.xml index a29aef3b8b8..b3548e544e2 100644 --- a/features/application-mgt/io.entgra.application.mgt.server.feature/pom.xml +++ b/features/application-mgt/io.entgra.application.mgt.server.feature/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt application-mgt-feature - 5.0.16-SNAPSHOT + 5.0.16 ../pom.xml diff --git a/features/application-mgt/pom.xml b/features/application-mgt/pom.xml index 66b040bcdd3..36cc8b37d24 100644 --- a/features/application-mgt/pom.xml +++ b/features/application-mgt/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt carbon-devicemgt - 5.0.16-SNAPSHOT + 5.0.16 ../../pom.xml diff --git a/features/certificate-mgt/org.wso2.carbon.certificate.mgt.api.feature/pom.xml b/features/certificate-mgt/org.wso2.carbon.certificate.mgt.api.feature/pom.xml index 0653561d5e2..0bb6b55ad5c 100644 --- a/features/certificate-mgt/org.wso2.carbon.certificate.mgt.api.feature/pom.xml +++ b/features/certificate-mgt/org.wso2.carbon.certificate.mgt.api.feature/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt certificate-mgt-feature - 5.0.16-SNAPSHOT + 5.0.16 ../pom.xml diff --git a/features/certificate-mgt/org.wso2.carbon.certificate.mgt.cert.admin.api.feature/pom.xml b/features/certificate-mgt/org.wso2.carbon.certificate.mgt.cert.admin.api.feature/pom.xml index 30215f2ee20..69c5e6ef0cd 100644 --- a/features/certificate-mgt/org.wso2.carbon.certificate.mgt.cert.admin.api.feature/pom.xml +++ b/features/certificate-mgt/org.wso2.carbon.certificate.mgt.cert.admin.api.feature/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt certificate-mgt-feature - 5.0.16-SNAPSHOT + 5.0.16 ../pom.xml diff --git a/features/certificate-mgt/org.wso2.carbon.certificate.mgt.server.feature/pom.xml b/features/certificate-mgt/org.wso2.carbon.certificate.mgt.server.feature/pom.xml index 0d39f02701c..e52d31fa01a 100644 --- a/features/certificate-mgt/org.wso2.carbon.certificate.mgt.server.feature/pom.xml +++ b/features/certificate-mgt/org.wso2.carbon.certificate.mgt.server.feature/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt certificate-mgt-feature - 5.0.16-SNAPSHOT + 5.0.16 ../pom.xml diff --git a/features/certificate-mgt/pom.xml b/features/certificate-mgt/pom.xml index cc903aa17e0..3f843763146 100644 --- a/features/certificate-mgt/pom.xml +++ b/features/certificate-mgt/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt carbon-devicemgt - 5.0.16-SNAPSHOT + 5.0.16 ../../pom.xml diff --git a/features/device-mgt-extensions/io.entgra.device.mgt.extensions.defaultrole.manager.feature/pom.xml b/features/device-mgt-extensions/io.entgra.device.mgt.extensions.defaultrole.manager.feature/pom.xml index 29aacad17b6..63c71bc9df7 100644 --- a/features/device-mgt-extensions/io.entgra.device.mgt.extensions.defaultrole.manager.feature/pom.xml +++ b/features/device-mgt-extensions/io.entgra.device.mgt.extensions.defaultrole.manager.feature/pom.xml @@ -23,7 +23,7 @@ org.wso2.carbon.devicemgt device-mgt-extensions-feature - 5.0.16-SNAPSHOT + 5.0.16 ../pom.xml diff --git a/features/device-mgt-extensions/io.entgra.device.mgt.extensions.logger.feature/pom.xml b/features/device-mgt-extensions/io.entgra.device.mgt.extensions.logger.feature/pom.xml index a4b1e41bbcf..2a1520581e1 100644 --- a/features/device-mgt-extensions/io.entgra.device.mgt.extensions.logger.feature/pom.xml +++ b/features/device-mgt-extensions/io.entgra.device.mgt.extensions.logger.feature/pom.xml @@ -23,7 +23,7 @@ org.wso2.carbon.devicemgt device-mgt-extensions-feature - 5.0.16-SNAPSHOT + 5.0.16 ../pom.xml diff --git a/features/device-mgt-extensions/io.entgra.device.mgt.extensions.stateengine.feature/pom.xml b/features/device-mgt-extensions/io.entgra.device.mgt.extensions.stateengine.feature/pom.xml index b1bb7519b3f..b3eb5ffb5b0 100644 --- a/features/device-mgt-extensions/io.entgra.device.mgt.extensions.stateengine.feature/pom.xml +++ b/features/device-mgt-extensions/io.entgra.device.mgt.extensions.stateengine.feature/pom.xml @@ -23,7 +23,7 @@ org.wso2.carbon.devicemgt device-mgt-extensions-feature - 5.0.16-SNAPSHOT + 5.0.16 ../pom.xml diff --git a/features/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.device.type.deployer.feature/pom.xml b/features/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.device.type.deployer.feature/pom.xml index c4aa1edfee4..ca6a749d403 100644 --- a/features/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.device.type.deployer.feature/pom.xml +++ b/features/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.device.type.deployer.feature/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt device-mgt-extensions-feature - 5.0.16-SNAPSHOT + 5.0.16 ../pom.xml diff --git a/features/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.fcm.feature/pom.xml b/features/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.fcm.feature/pom.xml index 23097f159c5..02e61a944fd 100644 --- a/features/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.fcm.feature/pom.xml +++ b/features/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.fcm.feature/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt device-mgt-extensions-feature - 5.0.16-SNAPSHOT + 5.0.16 ../pom.xml diff --git a/features/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.http.feature/pom.xml b/features/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.http.feature/pom.xml index 56eeb0bfcc0..05bb14da8f0 100644 --- a/features/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.http.feature/pom.xml +++ b/features/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.http.feature/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt device-mgt-extensions-feature - 5.0.16-SNAPSHOT + 5.0.16 ../pom.xml diff --git a/features/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.mqtt.feature/pom.xml b/features/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.mqtt.feature/pom.xml index a930e180c05..67abc698e4c 100644 --- a/features/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.mqtt.feature/pom.xml +++ b/features/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.mqtt.feature/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt device-mgt-extensions-feature - 5.0.16-SNAPSHOT + 5.0.16 ../pom.xml diff --git a/features/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.xmpp.feature/pom.xml b/features/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.xmpp.feature/pom.xml index 86c64be0431..03048e2e784 100644 --- a/features/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.xmpp.feature/pom.xml +++ b/features/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.xmpp.feature/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt device-mgt-extensions-feature - 5.0.16-SNAPSHOT + 5.0.16 ../pom.xml diff --git a/features/device-mgt-extensions/pom.xml b/features/device-mgt-extensions/pom.xml index fcb0afbb857..c3eeeca917c 100644 --- a/features/device-mgt-extensions/pom.xml +++ b/features/device-mgt-extensions/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt carbon-devicemgt - 5.0.16-SNAPSHOT + 5.0.16 ../../pom.xml diff --git a/features/device-mgt/org.wso2.carbon.device.mgt.api.feature/pom.xml b/features/device-mgt/org.wso2.carbon.device.mgt.api.feature/pom.xml index cf1749359d3..4ba7e5a07d4 100644 --- a/features/device-mgt/org.wso2.carbon.device.mgt.api.feature/pom.xml +++ b/features/device-mgt/org.wso2.carbon.device.mgt.api.feature/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt device-mgt-feature - 5.0.16-SNAPSHOT + 5.0.16 ../pom.xml diff --git a/features/device-mgt/org.wso2.carbon.device.mgt.basics.feature/pom.xml b/features/device-mgt/org.wso2.carbon.device.mgt.basics.feature/pom.xml index e33829a360c..d5f56e66e63 100644 --- a/features/device-mgt/org.wso2.carbon.device.mgt.basics.feature/pom.xml +++ b/features/device-mgt/org.wso2.carbon.device.mgt.basics.feature/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt device-mgt-feature - 5.0.16-SNAPSHOT + 5.0.16 ../pom.xml diff --git a/features/device-mgt/org.wso2.carbon.device.mgt.extensions.feature/pom.xml b/features/device-mgt/org.wso2.carbon.device.mgt.extensions.feature/pom.xml index f0e0bd1b1a3..074b5d21055 100644 --- a/features/device-mgt/org.wso2.carbon.device.mgt.extensions.feature/pom.xml +++ b/features/device-mgt/org.wso2.carbon.device.mgt.extensions.feature/pom.xml @@ -4,7 +4,7 @@ org.wso2.carbon.devicemgt device-mgt-feature - 5.0.16-SNAPSHOT + 5.0.16 ../pom.xml 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 900ec36b6a2..d37d2aec52f 100644 --- a/features/device-mgt/org.wso2.carbon.device.mgt.feature/pom.xml +++ b/features/device-mgt/org.wso2.carbon.device.mgt.feature/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt device-mgt-feature - 5.0.16-SNAPSHOT + 5.0.16 ../pom.xml diff --git a/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/pom.xml b/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/pom.xml index e72a0e0e0c5..6ad7c9f03fc 100644 --- a/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/pom.xml +++ b/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt device-mgt-feature - 5.0.16-SNAPSHOT + 5.0.16 ../pom.xml diff --git a/features/device-mgt/pom.xml b/features/device-mgt/pom.xml index 6aa8b07dbe7..16050f8a0d8 100644 --- a/features/device-mgt/pom.xml +++ b/features/device-mgt/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt carbon-devicemgt - 5.0.16-SNAPSHOT + 5.0.16 ../../pom.xml diff --git a/features/heartbeat-management/io.entgra.server.heart.beat.feature/pom.xml b/features/heartbeat-management/io.entgra.server.heart.beat.feature/pom.xml index 7892b1fd484..8c8e5b507c4 100644 --- a/features/heartbeat-management/io.entgra.server.heart.beat.feature/pom.xml +++ b/features/heartbeat-management/io.entgra.server.heart.beat.feature/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt heart-beat-feature - 5.0.16-SNAPSHOT + 5.0.16 ../pom.xml diff --git a/features/heartbeat-management/pom.xml b/features/heartbeat-management/pom.xml index 39703223a50..6b6b6d4589c 100644 --- a/features/heartbeat-management/pom.xml +++ b/features/heartbeat-management/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt carbon-devicemgt - 5.0.16-SNAPSHOT + 5.0.16 ../../pom.xml diff --git a/features/jwt-client/org.wso2.carbon.identity.jwt.client.extension.feature/pom.xml b/features/jwt-client/org.wso2.carbon.identity.jwt.client.extension.feature/pom.xml index cfb3303f014..36163de76bd 100644 --- a/features/jwt-client/org.wso2.carbon.identity.jwt.client.extension.feature/pom.xml +++ b/features/jwt-client/org.wso2.carbon.identity.jwt.client.extension.feature/pom.xml @@ -23,7 +23,7 @@ org.wso2.carbon.devicemgt jwt-client-feature - 5.0.16-SNAPSHOT + 5.0.16 ../pom.xml diff --git a/features/jwt-client/pom.xml b/features/jwt-client/pom.xml index 36fae9c7942..01aabff9495 100644 --- a/features/jwt-client/pom.xml +++ b/features/jwt-client/pom.xml @@ -23,7 +23,7 @@ org.wso2.carbon.devicemgt carbon-devicemgt - 5.0.16-SNAPSHOT + 5.0.16 ../../pom.xml 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 0c6770578df..ff2f2d1671c 100644 --- a/features/policy-mgt/org.wso2.carbon.policy.mgt.server.feature/pom.xml +++ b/features/policy-mgt/org.wso2.carbon.policy.mgt.server.feature/pom.xml @@ -23,7 +23,7 @@ org.wso2.carbon.devicemgt policy-mgt-feature - 5.0.16-SNAPSHOT + 5.0.16 ../pom.xml diff --git a/features/policy-mgt/pom.xml b/features/policy-mgt/pom.xml index 0478dbb17bc..93096fa1a28 100644 --- a/features/policy-mgt/pom.xml +++ b/features/policy-mgt/pom.xml @@ -23,7 +23,7 @@ org.wso2.carbon.devicemgt carbon-devicemgt - 5.0.16-SNAPSHOT + 5.0.16 ../../pom.xml diff --git a/features/transport-mgt/email-sender/org.wso2.carbon.email.sender.feature/pom.xml b/features/transport-mgt/email-sender/org.wso2.carbon.email.sender.feature/pom.xml index f6907c375e5..b1feab4c9d8 100644 --- a/features/transport-mgt/email-sender/org.wso2.carbon.email.sender.feature/pom.xml +++ b/features/transport-mgt/email-sender/org.wso2.carbon.email.sender.feature/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt email-sender-feature - 5.0.16-SNAPSHOT + 5.0.16 ../pom.xml diff --git a/features/transport-mgt/email-sender/pom.xml b/features/transport-mgt/email-sender/pom.xml index 2f0bb51811a..79db9183c4c 100644 --- a/features/transport-mgt/email-sender/pom.xml +++ b/features/transport-mgt/email-sender/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt transport-mgt-feature - 5.0.16-SNAPSHOT + 5.0.16 ../pom.xml diff --git a/features/transport-mgt/pom.xml b/features/transport-mgt/pom.xml index aa42bb243ce..d1730541f0f 100644 --- a/features/transport-mgt/pom.xml +++ b/features/transport-mgt/pom.xml @@ -3,7 +3,7 @@ carbon-devicemgt org.wso2.carbon.devicemgt - 5.0.16-SNAPSHOT + 5.0.16 ../../pom.xml diff --git a/features/transport-mgt/sms-handler/io.entgra.transport.mgt.sms.handler.api.feature/pom.xml b/features/transport-mgt/sms-handler/io.entgra.transport.mgt.sms.handler.api.feature/pom.xml index 7942210a3f8..897d948d086 100644 --- a/features/transport-mgt/sms-handler/io.entgra.transport.mgt.sms.handler.api.feature/pom.xml +++ b/features/transport-mgt/sms-handler/io.entgra.transport.mgt.sms.handler.api.feature/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt sms-handler-feature - 5.0.16-SNAPSHOT + 5.0.16 ../pom.xml diff --git a/features/transport-mgt/sms-handler/io.entgra.transport.mgt.sms.handler.server.feature/pom.xml b/features/transport-mgt/sms-handler/io.entgra.transport.mgt.sms.handler.server.feature/pom.xml index 9620d1cea1c..e8f4f7d8ba5 100644 --- a/features/transport-mgt/sms-handler/io.entgra.transport.mgt.sms.handler.server.feature/pom.xml +++ b/features/transport-mgt/sms-handler/io.entgra.transport.mgt.sms.handler.server.feature/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt sms-handler-feature - 5.0.16-SNAPSHOT + 5.0.16 ../pom.xml diff --git a/features/transport-mgt/sms-handler/pom.xml b/features/transport-mgt/sms-handler/pom.xml index 1420821a234..1cfe5c8fc50 100644 --- a/features/transport-mgt/sms-handler/pom.xml +++ b/features/transport-mgt/sms-handler/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt transport-mgt-feature - 5.0.16-SNAPSHOT + 5.0.16 ../pom.xml diff --git a/features/ui-request-interceptor/io.entgra.ui.request.interceptor.feature/pom.xml b/features/ui-request-interceptor/io.entgra.ui.request.interceptor.feature/pom.xml index b8c13455138..eeb5633b6cd 100644 --- a/features/ui-request-interceptor/io.entgra.ui.request.interceptor.feature/pom.xml +++ b/features/ui-request-interceptor/io.entgra.ui.request.interceptor.feature/pom.xml @@ -21,7 +21,7 @@ ui-request-interceptor-feature io.entgra.devicemgt - 5.0.16-SNAPSHOT + 5.0.16 4.0.0 diff --git a/features/ui-request-interceptor/pom.xml b/features/ui-request-interceptor/pom.xml index 82269506f9b..7771cdb043b 100644 --- a/features/ui-request-interceptor/pom.xml +++ b/features/ui-request-interceptor/pom.xml @@ -21,7 +21,7 @@ carbon-devicemgt org.wso2.carbon.devicemgt - 5.0.16-SNAPSHOT + 5.0.16 ../../pom.xml 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 322a15b651b..ca070c26cfd 100644 --- a/features/webapp-authenticator-framework/org.wso2.carbon.webapp.authenticator.framework.server.feature/pom.xml +++ b/features/webapp-authenticator-framework/org.wso2.carbon.webapp.authenticator.framework.server.feature/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt webapp-authenticator-framework-feature - 5.0.16-SNAPSHOT + 5.0.16 ../pom.xml diff --git a/features/webapp-authenticator-framework/pom.xml b/features/webapp-authenticator-framework/pom.xml index 01f400a3dad..f4be06d2318 100644 --- a/features/webapp-authenticator-framework/pom.xml +++ b/features/webapp-authenticator-framework/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt carbon-devicemgt - 5.0.16-SNAPSHOT + 5.0.16 ../../pom.xml diff --git a/pom.xml b/pom.xml index aa41e4956d6..1bcd8ca4543 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ org.wso2.carbon.devicemgt carbon-devicemgt pom - 5.0.16-SNAPSHOT + 5.0.16 WSO2 Carbon - Device Management - Parent http://wso2.org WSO2 Connected Device Manager Components @@ -1821,7 +1821,7 @@ https://repository.entgra.net/community/device-mgt-core.git scm:git:https://repository.entgra.net/community/device-mgt-core.git scm:git:https://repository.entgra.net/community/device-mgt-core.git - HEAD + v5.0.16 @@ -2033,7 +2033,7 @@ 1.2.11.wso2v10 - 5.0.16-SNAPSHOT + 5.0.16 4.7.35 From 071b9486bb227e7ff82f9e14b20c4ee2f56a34f0 Mon Sep 17 00:00:00 2001 From: builder Date: Fri, 27 Jan 2023 19:20:14 +0530 Subject: [PATCH 09/10] [maven-release-plugin] prepare for next development iteration --- .../io.entgra.analytics.mgt.grafana.proxy.api/pom.xml | 2 +- .../io.entgra.analytics.mgt.grafana.proxy.common/pom.xml | 2 +- .../io.entgra.analytics.mgt.grafana.proxy.core/pom.xml | 2 +- components/analytics-mgt/grafana-mgt/pom.xml | 2 +- components/analytics-mgt/pom.xml | 2 +- .../org.wso2.carbon.apimgt.annotations/pom.xml | 2 +- .../pom.xml | 2 +- .../org.wso2.carbon.apimgt.application.extension/pom.xml | 2 +- .../org.wso2.carbon.apimgt.keymgt.extension.api/pom.xml | 2 +- .../org.wso2.carbon.apimgt.keymgt.extension/pom.xml | 2 +- .../org.wso2.carbon.apimgt.webapp.publisher/pom.xml | 2 +- components/apimgt-extensions/pom.xml | 2 +- .../io.entgra.application.mgt.addons/pom.xml | 2 +- .../application-mgt/io.entgra.application.mgt.api/pom.xml | 2 +- .../io.entgra.application.mgt.common/pom.xml | 2 +- .../application-mgt/io.entgra.application.mgt.core/pom.xml | 2 +- .../io.entgra.application.mgt.publisher.api/pom.xml | 2 +- .../io.entgra.application.mgt.store.api/pom.xml | 2 +- components/application-mgt/pom.xml | 2 +- .../org.wso2.carbon.certificate.mgt.api/pom.xml | 2 +- .../org.wso2.carbon.certificate.mgt.cert.admin.api/pom.xml | 2 +- .../org.wso2.carbon.certificate.mgt.core/pom.xml | 2 +- components/certificate-mgt/pom.xml | 2 +- .../pom.xml | 2 +- .../io.entgra.device.mgt.extensions.logger/pom.xml | 2 +- .../io.entgra.device.mgt.extensions.stateengine/pom.xml | 2 +- .../pom.xml | 2 +- .../pom.xml | 2 +- .../pom.xml | 2 +- .../pom.xml | 2 +- .../pom.xml | 2 +- .../pom.xml | 2 +- components/device-mgt-extensions/pom.xml | 2 +- .../io.entgra.carbon.device.mgt.config.api/pom.xml | 2 +- .../device-mgt/org.wso2.carbon.device.mgt.api/pom.xml | 2 +- .../device-mgt/org.wso2.carbon.device.mgt.common/pom.xml | 2 +- .../device-mgt/org.wso2.carbon.device.mgt.core/pom.xml | 2 +- .../org.wso2.carbon.device.mgt.extensions/pom.xml | 2 +- .../org.wso2.carbon.device.mgt.url.printer/pom.xml | 2 +- components/device-mgt/pom.xml | 2 +- .../io.entgra.server.bootup.heartbeat.beacon/pom.xml | 2 +- components/heartbeat-management/pom.xml | 2 +- .../org.wso2.carbon.device.mgt.oauth.extensions/pom.xml | 2 +- .../org.wso2.carbon.identity.jwt.client.extension/pom.xml | 2 +- components/identity-extensions/pom.xml | 2 +- .../org.wso2.carbon.policy.decision.point/pom.xml | 2 +- .../org.wso2.carbon.policy.information.point/pom.xml | 2 +- .../policy-mgt/org.wso2.carbon.policy.mgt.common/pom.xml | 2 +- .../policy-mgt/org.wso2.carbon.policy.mgt.core/pom.xml | 2 +- components/policy-mgt/pom.xml | 2 +- .../email-sender/org.wso2.carbon.email.sender.core/pom.xml | 2 +- components/transport-mgt/email-sender/pom.xml | 2 +- components/transport-mgt/pom.xml | 2 +- .../io.entgra.transport.mgt.sms.handler.api/pom.xml | 2 +- .../io.entgra.transport.mgt.sms.handler.common/pom.xml | 2 +- .../io.entgra.transport.mgt.sms.handler.core/pom.xml | 2 +- components/transport-mgt/sms-handler/pom.xml | 2 +- .../io.entgra.ui.request.interceptor/pom.xml | 2 +- components/ui-request-interceptor/pom.xml | 2 +- .../org.wso2.carbon.webapp.authenticator.framework/pom.xml | 2 +- components/webapp-authenticator-framework/pom.xml | 2 +- .../pom.xml | 2 +- .../pom.xml | 2 +- features/analytics-mgt/grafana-mgt/pom.xml | 2 +- features/analytics-mgt/pom.xml | 2 +- .../pom.xml | 2 +- .../org.wso2.carbon.apimgt.keymgt.extension.feature/pom.xml | 2 +- .../org.wso2.carbon.apimgt.webapp.publisher.feature/pom.xml | 2 +- features/apimgt-extensions/pom.xml | 2 +- .../io.entgra.application.mgt.api.feature/pom.xml | 2 +- .../io.entgra.application.mgt.server.feature/pom.xml | 2 +- features/application-mgt/pom.xml | 2 +- .../org.wso2.carbon.certificate.mgt.api.feature/pom.xml | 2 +- .../pom.xml | 2 +- .../org.wso2.carbon.certificate.mgt.server.feature/pom.xml | 2 +- features/certificate-mgt/pom.xml | 2 +- .../pom.xml | 2 +- .../io.entgra.device.mgt.extensions.logger.feature/pom.xml | 2 +- .../pom.xml | 2 +- .../pom.xml | 2 +- .../pom.xml | 2 +- .../pom.xml | 2 +- .../pom.xml | 2 +- .../pom.xml | 2 +- features/device-mgt-extensions/pom.xml | 2 +- .../org.wso2.carbon.device.mgt.api.feature/pom.xml | 2 +- .../org.wso2.carbon.device.mgt.basics.feature/pom.xml | 2 +- .../org.wso2.carbon.device.mgt.extensions.feature/pom.xml | 2 +- .../device-mgt/org.wso2.carbon.device.mgt.feature/pom.xml | 2 +- .../org.wso2.carbon.device.mgt.server.feature/pom.xml | 2 +- features/device-mgt/pom.xml | 2 +- .../io.entgra.server.heart.beat.feature/pom.xml | 2 +- features/heartbeat-management/pom.xml | 2 +- .../pom.xml | 2 +- features/jwt-client/pom.xml | 2 +- .../org.wso2.carbon.policy.mgt.server.feature/pom.xml | 2 +- features/policy-mgt/pom.xml | 2 +- .../org.wso2.carbon.email.sender.feature/pom.xml | 2 +- features/transport-mgt/email-sender/pom.xml | 2 +- features/transport-mgt/pom.xml | 2 +- .../io.entgra.transport.mgt.sms.handler.api.feature/pom.xml | 2 +- .../pom.xml | 2 +- features/transport-mgt/sms-handler/pom.xml | 2 +- .../io.entgra.ui.request.interceptor.feature/pom.xml | 2 +- features/ui-request-interceptor/pom.xml | 2 +- .../pom.xml | 2 +- features/webapp-authenticator-framework/pom.xml | 2 +- pom.xml | 6 +++--- 108 files changed, 110 insertions(+), 110 deletions(-) diff --git a/components/analytics-mgt/grafana-mgt/io.entgra.analytics.mgt.grafana.proxy.api/pom.xml b/components/analytics-mgt/grafana-mgt/io.entgra.analytics.mgt.grafana.proxy.api/pom.xml index 7af3c3a01ae..bc77e97bc2b 100644 --- a/components/analytics-mgt/grafana-mgt/io.entgra.analytics.mgt.grafana.proxy.api/pom.xml +++ b/components/analytics-mgt/grafana-mgt/io.entgra.analytics.mgt.grafana.proxy.api/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt grafana-mgt - 5.0.16 + 5.0.17-SNAPSHOT ../pom.xml diff --git a/components/analytics-mgt/grafana-mgt/io.entgra.analytics.mgt.grafana.proxy.common/pom.xml b/components/analytics-mgt/grafana-mgt/io.entgra.analytics.mgt.grafana.proxy.common/pom.xml index c5966f69ae5..5113864d19c 100644 --- a/components/analytics-mgt/grafana-mgt/io.entgra.analytics.mgt.grafana.proxy.common/pom.xml +++ b/components/analytics-mgt/grafana-mgt/io.entgra.analytics.mgt.grafana.proxy.common/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt grafana-mgt - 5.0.16 + 5.0.17-SNAPSHOT ../pom.xml diff --git a/components/analytics-mgt/grafana-mgt/io.entgra.analytics.mgt.grafana.proxy.core/pom.xml b/components/analytics-mgt/grafana-mgt/io.entgra.analytics.mgt.grafana.proxy.core/pom.xml index 8bed46ff0e3..32df0002a55 100644 --- a/components/analytics-mgt/grafana-mgt/io.entgra.analytics.mgt.grafana.proxy.core/pom.xml +++ b/components/analytics-mgt/grafana-mgt/io.entgra.analytics.mgt.grafana.proxy.core/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt grafana-mgt - 5.0.16 + 5.0.17-SNAPSHOT ../pom.xml diff --git a/components/analytics-mgt/grafana-mgt/pom.xml b/components/analytics-mgt/grafana-mgt/pom.xml index f0edd92c872..728851ef38e 100644 --- a/components/analytics-mgt/grafana-mgt/pom.xml +++ b/components/analytics-mgt/grafana-mgt/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt analytics-mgt - 5.0.16 + 5.0.17-SNAPSHOT ../pom.xml diff --git a/components/analytics-mgt/pom.xml b/components/analytics-mgt/pom.xml index 978268e6acd..cc7611730c8 100644 --- a/components/analytics-mgt/pom.xml +++ b/components/analytics-mgt/pom.xml @@ -3,7 +3,7 @@ carbon-devicemgt org.wso2.carbon.devicemgt - 5.0.16 + 5.0.17-SNAPSHOT ../../pom.xml 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 e3a11df699f..9773a973fff 100644 --- a/components/apimgt-extensions/org.wso2.carbon.apimgt.annotations/pom.xml +++ b/components/apimgt-extensions/org.wso2.carbon.apimgt.annotations/pom.xml @@ -22,7 +22,7 @@ apimgt-extensions org.wso2.carbon.devicemgt - 5.0.16 + 5.0.17-SNAPSHOT ../pom.xml diff --git a/components/apimgt-extensions/org.wso2.carbon.apimgt.application.extension.api/pom.xml b/components/apimgt-extensions/org.wso2.carbon.apimgt.application.extension.api/pom.xml index 9bdc36e6151..af6f9902723 100644 --- a/components/apimgt-extensions/org.wso2.carbon.apimgt.application.extension.api/pom.xml +++ b/components/apimgt-extensions/org.wso2.carbon.apimgt.application.extension.api/pom.xml @@ -21,7 +21,7 @@ apimgt-extensions org.wso2.carbon.devicemgt - 5.0.16 + 5.0.17-SNAPSHOT ../pom.xml diff --git a/components/apimgt-extensions/org.wso2.carbon.apimgt.application.extension/pom.xml b/components/apimgt-extensions/org.wso2.carbon.apimgt.application.extension/pom.xml index 5c77a81b228..3209c1930d9 100644 --- a/components/apimgt-extensions/org.wso2.carbon.apimgt.application.extension/pom.xml +++ b/components/apimgt-extensions/org.wso2.carbon.apimgt.application.extension/pom.xml @@ -22,7 +22,7 @@ apimgt-extensions org.wso2.carbon.devicemgt - 5.0.16 + 5.0.17-SNAPSHOT ../pom.xml diff --git a/components/apimgt-extensions/org.wso2.carbon.apimgt.keymgt.extension.api/pom.xml b/components/apimgt-extensions/org.wso2.carbon.apimgt.keymgt.extension.api/pom.xml index 2da538bbd19..72753654afb 100644 --- a/components/apimgt-extensions/org.wso2.carbon.apimgt.keymgt.extension.api/pom.xml +++ b/components/apimgt-extensions/org.wso2.carbon.apimgt.keymgt.extension.api/pom.xml @@ -3,7 +3,7 @@ apimgt-extensions org.wso2.carbon.devicemgt - 5.0.16 + 5.0.17-SNAPSHOT 4.0.0 diff --git a/components/apimgt-extensions/org.wso2.carbon.apimgt.keymgt.extension/pom.xml b/components/apimgt-extensions/org.wso2.carbon.apimgt.keymgt.extension/pom.xml index 6b049a95915..4767eb8ccc4 100644 --- a/components/apimgt-extensions/org.wso2.carbon.apimgt.keymgt.extension/pom.xml +++ b/components/apimgt-extensions/org.wso2.carbon.apimgt.keymgt.extension/pom.xml @@ -3,7 +3,7 @@ apimgt-extensions org.wso2.carbon.devicemgt - 5.0.16 + 5.0.17-SNAPSHOT ../pom.xml 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 ba32af1afd1..13d844372e9 100644 --- a/components/apimgt-extensions/org.wso2.carbon.apimgt.webapp.publisher/pom.xml +++ b/components/apimgt-extensions/org.wso2.carbon.apimgt.webapp.publisher/pom.xml @@ -22,7 +22,7 @@ apimgt-extensions org.wso2.carbon.devicemgt - 5.0.16 + 5.0.17-SNAPSHOT ../pom.xml diff --git a/components/apimgt-extensions/pom.xml b/components/apimgt-extensions/pom.xml index 626cf97b305..60cb7564ec4 100644 --- a/components/apimgt-extensions/pom.xml +++ b/components/apimgt-extensions/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt carbon-devicemgt - 5.0.16 + 5.0.17-SNAPSHOT ../../pom.xml diff --git a/components/application-mgt/io.entgra.application.mgt.addons/pom.xml b/components/application-mgt/io.entgra.application.mgt.addons/pom.xml index 58b20d279c8..4a2a85283f9 100644 --- a/components/application-mgt/io.entgra.application.mgt.addons/pom.xml +++ b/components/application-mgt/io.entgra.application.mgt.addons/pom.xml @@ -20,7 +20,7 @@ application-mgt org.wso2.carbon.devicemgt - 5.0.16 + 5.0.17-SNAPSHOT ../pom.xml diff --git a/components/application-mgt/io.entgra.application.mgt.api/pom.xml b/components/application-mgt/io.entgra.application.mgt.api/pom.xml index 1f9af2b5550..ca28a4fd427 100644 --- a/components/application-mgt/io.entgra.application.mgt.api/pom.xml +++ b/components/application-mgt/io.entgra.application.mgt.api/pom.xml @@ -22,7 +22,7 @@ application-mgt org.wso2.carbon.devicemgt - 5.0.16 + 5.0.17-SNAPSHOT ../pom.xml diff --git a/components/application-mgt/io.entgra.application.mgt.common/pom.xml b/components/application-mgt/io.entgra.application.mgt.common/pom.xml index 94736a3ef5a..d79e130aa08 100644 --- a/components/application-mgt/io.entgra.application.mgt.common/pom.xml +++ b/components/application-mgt/io.entgra.application.mgt.common/pom.xml @@ -21,7 +21,7 @@ org.wso2.carbon.devicemgt application-mgt - 5.0.16 + 5.0.17-SNAPSHOT ../pom.xml diff --git a/components/application-mgt/io.entgra.application.mgt.core/pom.xml b/components/application-mgt/io.entgra.application.mgt.core/pom.xml index 9c6102cdc7a..aeffd64b75a 100644 --- a/components/application-mgt/io.entgra.application.mgt.core/pom.xml +++ b/components/application-mgt/io.entgra.application.mgt.core/pom.xml @@ -21,7 +21,7 @@ org.wso2.carbon.devicemgt application-mgt - 5.0.16 + 5.0.17-SNAPSHOT ../pom.xml diff --git a/components/application-mgt/io.entgra.application.mgt.publisher.api/pom.xml b/components/application-mgt/io.entgra.application.mgt.publisher.api/pom.xml index 32abf335b48..4a1945078b4 100644 --- a/components/application-mgt/io.entgra.application.mgt.publisher.api/pom.xml +++ b/components/application-mgt/io.entgra.application.mgt.publisher.api/pom.xml @@ -22,7 +22,7 @@ application-mgt org.wso2.carbon.devicemgt - 5.0.16 + 5.0.17-SNAPSHOT ../pom.xml diff --git a/components/application-mgt/io.entgra.application.mgt.store.api/pom.xml b/components/application-mgt/io.entgra.application.mgt.store.api/pom.xml index 67773992f62..2006236912e 100644 --- a/components/application-mgt/io.entgra.application.mgt.store.api/pom.xml +++ b/components/application-mgt/io.entgra.application.mgt.store.api/pom.xml @@ -22,7 +22,7 @@ application-mgt org.wso2.carbon.devicemgt - 5.0.16 + 5.0.17-SNAPSHOT ../pom.xml diff --git a/components/application-mgt/pom.xml b/components/application-mgt/pom.xml index f7d2fdb9228..3e2eb6aba4f 100644 --- a/components/application-mgt/pom.xml +++ b/components/application-mgt/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt carbon-devicemgt - 5.0.16 + 5.0.17-SNAPSHOT ../../pom.xml 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 de48baebf5f..c03158f34df 100644 --- a/components/certificate-mgt/org.wso2.carbon.certificate.mgt.api/pom.xml +++ b/components/certificate-mgt/org.wso2.carbon.certificate.mgt.api/pom.xml @@ -22,7 +22,7 @@ certificate-mgt org.wso2.carbon.devicemgt - 5.0.16 + 5.0.17-SNAPSHOT ../pom.xml diff --git a/components/certificate-mgt/org.wso2.carbon.certificate.mgt.cert.admin.api/pom.xml b/components/certificate-mgt/org.wso2.carbon.certificate.mgt.cert.admin.api/pom.xml index 4d95d71580d..2184cb821de 100644 --- a/components/certificate-mgt/org.wso2.carbon.certificate.mgt.cert.admin.api/pom.xml +++ b/components/certificate-mgt/org.wso2.carbon.certificate.mgt.cert.admin.api/pom.xml @@ -22,7 +22,7 @@ certificate-mgt org.wso2.carbon.devicemgt - 5.0.16 + 5.0.17-SNAPSHOT ../pom.xml diff --git a/components/certificate-mgt/org.wso2.carbon.certificate.mgt.core/pom.xml b/components/certificate-mgt/org.wso2.carbon.certificate.mgt.core/pom.xml index f59efa75eee..473f58ee25d 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 @@ -38,7 +38,7 @@ org.wso2.carbon.devicemgt certificate-mgt - 5.0.16 + 5.0.17-SNAPSHOT ../pom.xml diff --git a/components/certificate-mgt/pom.xml b/components/certificate-mgt/pom.xml index ebb44f6e005..7d3b251c7fa 100644 --- a/components/certificate-mgt/pom.xml +++ b/components/certificate-mgt/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt carbon-devicemgt - 5.0.16 + 5.0.17-SNAPSHOT ../../pom.xml diff --git a/components/device-mgt-extensions/io.entgra.device.mgt.extensions.defaultrole.manager/pom.xml b/components/device-mgt-extensions/io.entgra.device.mgt.extensions.defaultrole.manager/pom.xml index b5636dc88fc..0fdbb381589 100644 --- a/components/device-mgt-extensions/io.entgra.device.mgt.extensions.defaultrole.manager/pom.xml +++ b/components/device-mgt-extensions/io.entgra.device.mgt.extensions.defaultrole.manager/pom.xml @@ -23,7 +23,7 @@ device-mgt-extensions org.wso2.carbon.devicemgt - 5.0.16 + 5.0.17-SNAPSHOT ../pom.xml diff --git a/components/device-mgt-extensions/io.entgra.device.mgt.extensions.logger/pom.xml b/components/device-mgt-extensions/io.entgra.device.mgt.extensions.logger/pom.xml index da06425cd1b..7dece8d92c9 100644 --- a/components/device-mgt-extensions/io.entgra.device.mgt.extensions.logger/pom.xml +++ b/components/device-mgt-extensions/io.entgra.device.mgt.extensions.logger/pom.xml @@ -22,7 +22,7 @@ device-mgt-extensions org.wso2.carbon.devicemgt - 5.0.16 + 5.0.17-SNAPSHOT ../pom.xml diff --git a/components/device-mgt-extensions/io.entgra.device.mgt.extensions.stateengine/pom.xml b/components/device-mgt-extensions/io.entgra.device.mgt.extensions.stateengine/pom.xml index f0a20a772e9..fab80c86120 100644 --- a/components/device-mgt-extensions/io.entgra.device.mgt.extensions.stateengine/pom.xml +++ b/components/device-mgt-extensions/io.entgra.device.mgt.extensions.stateengine/pom.xml @@ -23,7 +23,7 @@ device-mgt-extensions org.wso2.carbon.devicemgt - 5.0.16 + 5.0.17-SNAPSHOT ../pom.xml diff --git a/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.device.type.deployer/pom.xml b/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.device.type.deployer/pom.xml index f24306264ac..4b5b078aa82 100644 --- a/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.device.type.deployer/pom.xml +++ b/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.device.type.deployer/pom.xml @@ -22,7 +22,7 @@ device-mgt-extensions org.wso2.carbon.devicemgt - 5.0.16 + 5.0.17-SNAPSHOT ../pom.xml diff --git a/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.pull.notification/pom.xml b/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.pull.notification/pom.xml index 01d006fc1bc..59edf0d48d5 100644 --- a/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.pull.notification/pom.xml +++ b/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.pull.notification/pom.xml @@ -22,7 +22,7 @@ device-mgt-extensions org.wso2.carbon.devicemgt - 5.0.16 + 5.0.17-SNAPSHOT ../pom.xml diff --git a/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.fcm/pom.xml b/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.fcm/pom.xml index ea89d437497..a955ac7a02f 100644 --- a/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.fcm/pom.xml +++ b/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.fcm/pom.xml @@ -22,7 +22,7 @@ device-mgt-extensions org.wso2.carbon.devicemgt - 5.0.16 + 5.0.17-SNAPSHOT ../pom.xml diff --git a/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.http/pom.xml b/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.http/pom.xml index 6f06591e92f..d97c7272b0c 100644 --- a/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.http/pom.xml +++ b/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.http/pom.xml @@ -22,7 +22,7 @@ device-mgt-extensions org.wso2.carbon.devicemgt - 5.0.16 + 5.0.17-SNAPSHOT ../pom.xml diff --git a/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.mqtt/pom.xml b/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.mqtt/pom.xml index 4492587c178..4c16f24ff18 100644 --- a/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.mqtt/pom.xml +++ b/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.mqtt/pom.xml @@ -22,7 +22,7 @@ device-mgt-extensions org.wso2.carbon.devicemgt - 5.0.16 + 5.0.17-SNAPSHOT ../pom.xml diff --git a/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.xmpp/pom.xml b/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.xmpp/pom.xml index 1f898e639bc..837bb27d07c 100644 --- a/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.xmpp/pom.xml +++ b/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.xmpp/pom.xml @@ -22,7 +22,7 @@ device-mgt-extensions org.wso2.carbon.devicemgt - 5.0.16 + 5.0.17-SNAPSHOT ../pom.xml diff --git a/components/device-mgt-extensions/pom.xml b/components/device-mgt-extensions/pom.xml index 7ec4e28d02b..e885c0956c0 100644 --- a/components/device-mgt-extensions/pom.xml +++ b/components/device-mgt-extensions/pom.xml @@ -22,7 +22,7 @@ carbon-devicemgt org.wso2.carbon.devicemgt - 5.0.16 + 5.0.17-SNAPSHOT ../../pom.xml diff --git a/components/device-mgt/io.entgra.carbon.device.mgt.config.api/pom.xml b/components/device-mgt/io.entgra.carbon.device.mgt.config.api/pom.xml index 436e308dec8..6182f300cd6 100644 --- a/components/device-mgt/io.entgra.carbon.device.mgt.config.api/pom.xml +++ b/components/device-mgt/io.entgra.carbon.device.mgt.config.api/pom.xml @@ -22,7 +22,7 @@ device-mgt org.wso2.carbon.devicemgt - 5.0.16 + 5.0.17-SNAPSHOT ../pom.xml diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.api/pom.xml b/components/device-mgt/org.wso2.carbon.device.mgt.api/pom.xml index 70bc34091c8..d9a956d1b5a 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.api/pom.xml +++ b/components/device-mgt/org.wso2.carbon.device.mgt.api/pom.xml @@ -22,7 +22,7 @@ device-mgt org.wso2.carbon.devicemgt - 5.0.16 + 5.0.17-SNAPSHOT ../pom.xml diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.common/pom.xml b/components/device-mgt/org.wso2.carbon.device.mgt.common/pom.xml index f349e40f1a6..429fed59c2d 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.common/pom.xml +++ b/components/device-mgt/org.wso2.carbon.device.mgt.common/pom.xml @@ -21,7 +21,7 @@ device-mgt org.wso2.carbon.devicemgt - 5.0.16 + 5.0.17-SNAPSHOT ../pom.xml diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/pom.xml b/components/device-mgt/org.wso2.carbon.device.mgt.core/pom.xml index 7027bdb19cb..aa41e41e30b 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/pom.xml +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt device-mgt - 5.0.16 + 5.0.17-SNAPSHOT ../pom.xml diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.extensions/pom.xml b/components/device-mgt/org.wso2.carbon.device.mgt.extensions/pom.xml index e35031d5c1c..4944d580233 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.extensions/pom.xml +++ b/components/device-mgt/org.wso2.carbon.device.mgt.extensions/pom.xml @@ -22,7 +22,7 @@ device-mgt org.wso2.carbon.devicemgt - 5.0.16 + 5.0.17-SNAPSHOT ../pom.xml diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.url.printer/pom.xml b/components/device-mgt/org.wso2.carbon.device.mgt.url.printer/pom.xml index c28feb1f9c0..6733f2e25f2 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.url.printer/pom.xml +++ b/components/device-mgt/org.wso2.carbon.device.mgt.url.printer/pom.xml @@ -23,7 +23,7 @@ device-mgt org.wso2.carbon.devicemgt - 5.0.16 + 5.0.17-SNAPSHOT ../pom.xml diff --git a/components/device-mgt/pom.xml b/components/device-mgt/pom.xml index 925052b0cab..aa5a9ada9e4 100644 --- a/components/device-mgt/pom.xml +++ b/components/device-mgt/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt carbon-devicemgt - 5.0.16 + 5.0.17-SNAPSHOT ../../pom.xml diff --git a/components/heartbeat-management/io.entgra.server.bootup.heartbeat.beacon/pom.xml b/components/heartbeat-management/io.entgra.server.bootup.heartbeat.beacon/pom.xml index 506cd32ddae..8b9688aa1cb 100644 --- a/components/heartbeat-management/io.entgra.server.bootup.heartbeat.beacon/pom.xml +++ b/components/heartbeat-management/io.entgra.server.bootup.heartbeat.beacon/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt heartbeat-management - 5.0.16 + 5.0.17-SNAPSHOT ../pom.xml diff --git a/components/heartbeat-management/pom.xml b/components/heartbeat-management/pom.xml index 8038a5e3a67..640631870a6 100644 --- a/components/heartbeat-management/pom.xml +++ b/components/heartbeat-management/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt carbon-devicemgt - 5.0.16 + 5.0.17-SNAPSHOT ../../pom.xml diff --git a/components/identity-extensions/org.wso2.carbon.device.mgt.oauth.extensions/pom.xml b/components/identity-extensions/org.wso2.carbon.device.mgt.oauth.extensions/pom.xml index 4e57f82e000..87eeefacdb4 100644 --- a/components/identity-extensions/org.wso2.carbon.device.mgt.oauth.extensions/pom.xml +++ b/components/identity-extensions/org.wso2.carbon.device.mgt.oauth.extensions/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt identity-extensions - 5.0.16 + 5.0.17-SNAPSHOT ../pom.xml 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 c406c9f014c..537815b5127 100644 --- a/components/identity-extensions/org.wso2.carbon.identity.jwt.client.extension/pom.xml +++ b/components/identity-extensions/org.wso2.carbon.identity.jwt.client.extension/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt identity-extensions - 5.0.16 + 5.0.17-SNAPSHOT ../pom.xml diff --git a/components/identity-extensions/pom.xml b/components/identity-extensions/pom.xml index 68fa0ca3dec..127428b5af3 100644 --- a/components/identity-extensions/pom.xml +++ b/components/identity-extensions/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt carbon-devicemgt - 5.0.16 + 5.0.17-SNAPSHOT ../../pom.xml diff --git a/components/policy-mgt/org.wso2.carbon.policy.decision.point/pom.xml b/components/policy-mgt/org.wso2.carbon.policy.decision.point/pom.xml index 445de9b55c4..e2f7d96e5ff 100644 --- a/components/policy-mgt/org.wso2.carbon.policy.decision.point/pom.xml +++ b/components/policy-mgt/org.wso2.carbon.policy.decision.point/pom.xml @@ -3,7 +3,7 @@ org.wso2.carbon.devicemgt policy-mgt - 5.0.16 + 5.0.17-SNAPSHOT ../pom.xml diff --git a/components/policy-mgt/org.wso2.carbon.policy.information.point/pom.xml b/components/policy-mgt/org.wso2.carbon.policy.information.point/pom.xml index 4a8b51f96c4..c7493fca3f7 100644 --- a/components/policy-mgt/org.wso2.carbon.policy.information.point/pom.xml +++ b/components/policy-mgt/org.wso2.carbon.policy.information.point/pom.xml @@ -3,7 +3,7 @@ org.wso2.carbon.devicemgt policy-mgt - 5.0.16 + 5.0.17-SNAPSHOT ../pom.xml diff --git a/components/policy-mgt/org.wso2.carbon.policy.mgt.common/pom.xml b/components/policy-mgt/org.wso2.carbon.policy.mgt.common/pom.xml index 22d49411ae3..e366aaee36e 100644 --- a/components/policy-mgt/org.wso2.carbon.policy.mgt.common/pom.xml +++ b/components/policy-mgt/org.wso2.carbon.policy.mgt.common/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt policy-mgt - 5.0.16 + 5.0.17-SNAPSHOT ../pom.xml 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 c6c62708b41..714087fefed 100644 --- a/components/policy-mgt/org.wso2.carbon.policy.mgt.core/pom.xml +++ b/components/policy-mgt/org.wso2.carbon.policy.mgt.core/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt policy-mgt - 5.0.16 + 5.0.17-SNAPSHOT ../pom.xml diff --git a/components/policy-mgt/pom.xml b/components/policy-mgt/pom.xml index f2a3f19db8b..46231b1b764 100644 --- a/components/policy-mgt/pom.xml +++ b/components/policy-mgt/pom.xml @@ -23,7 +23,7 @@ org.wso2.carbon.devicemgt carbon-devicemgt - 5.0.16 + 5.0.17-SNAPSHOT ../../pom.xml diff --git a/components/transport-mgt/email-sender/org.wso2.carbon.email.sender.core/pom.xml b/components/transport-mgt/email-sender/org.wso2.carbon.email.sender.core/pom.xml index d45e9190c02..b9ebca38224 100644 --- a/components/transport-mgt/email-sender/org.wso2.carbon.email.sender.core/pom.xml +++ b/components/transport-mgt/email-sender/org.wso2.carbon.email.sender.core/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt email-sender - 5.0.16 + 5.0.17-SNAPSHOT ../pom.xml diff --git a/components/transport-mgt/email-sender/pom.xml b/components/transport-mgt/email-sender/pom.xml index 68bb5696589..d633ccb6a1e 100644 --- a/components/transport-mgt/email-sender/pom.xml +++ b/components/transport-mgt/email-sender/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt transport-mgt - 5.0.16 + 5.0.17-SNAPSHOT ../pom.xml diff --git a/components/transport-mgt/pom.xml b/components/transport-mgt/pom.xml index 07c38d07903..48230dbf9bb 100644 --- a/components/transport-mgt/pom.xml +++ b/components/transport-mgt/pom.xml @@ -3,7 +3,7 @@ carbon-devicemgt org.wso2.carbon.devicemgt - 5.0.16 + 5.0.17-SNAPSHOT ../../pom.xml diff --git a/components/transport-mgt/sms-handler/io.entgra.transport.mgt.sms.handler.api/pom.xml b/components/transport-mgt/sms-handler/io.entgra.transport.mgt.sms.handler.api/pom.xml index 2c6bde93b98..05923484747 100644 --- a/components/transport-mgt/sms-handler/io.entgra.transport.mgt.sms.handler.api/pom.xml +++ b/components/transport-mgt/sms-handler/io.entgra.transport.mgt.sms.handler.api/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt sms-handler - 5.0.16 + 5.0.17-SNAPSHOT ../pom.xml diff --git a/components/transport-mgt/sms-handler/io.entgra.transport.mgt.sms.handler.common/pom.xml b/components/transport-mgt/sms-handler/io.entgra.transport.mgt.sms.handler.common/pom.xml index 36a3368a22d..e295e9e708d 100644 --- a/components/transport-mgt/sms-handler/io.entgra.transport.mgt.sms.handler.common/pom.xml +++ b/components/transport-mgt/sms-handler/io.entgra.transport.mgt.sms.handler.common/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt sms-handler - 5.0.16 + 5.0.17-SNAPSHOT ../pom.xml diff --git a/components/transport-mgt/sms-handler/io.entgra.transport.mgt.sms.handler.core/pom.xml b/components/transport-mgt/sms-handler/io.entgra.transport.mgt.sms.handler.core/pom.xml index 591e22ac63c..e9e21d0ce1d 100644 --- a/components/transport-mgt/sms-handler/io.entgra.transport.mgt.sms.handler.core/pom.xml +++ b/components/transport-mgt/sms-handler/io.entgra.transport.mgt.sms.handler.core/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt sms-handler - 5.0.16 + 5.0.17-SNAPSHOT ../pom.xml diff --git a/components/transport-mgt/sms-handler/pom.xml b/components/transport-mgt/sms-handler/pom.xml index 344debb7895..4fdccfb6157 100644 --- a/components/transport-mgt/sms-handler/pom.xml +++ b/components/transport-mgt/sms-handler/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt transport-mgt - 5.0.16 + 5.0.17-SNAPSHOT ../pom.xml diff --git a/components/ui-request-interceptor/io.entgra.ui.request.interceptor/pom.xml b/components/ui-request-interceptor/io.entgra.ui.request.interceptor/pom.xml index 0c1acb421cf..c0e795baaf6 100644 --- a/components/ui-request-interceptor/io.entgra.ui.request.interceptor/pom.xml +++ b/components/ui-request-interceptor/io.entgra.ui.request.interceptor/pom.xml @@ -21,7 +21,7 @@ ui-request-interceptor io.entgra.devicemgt - 5.0.16 + 5.0.17-SNAPSHOT 4.0.0 diff --git a/components/ui-request-interceptor/pom.xml b/components/ui-request-interceptor/pom.xml index 2950f329361..2f9fe328f54 100644 --- a/components/ui-request-interceptor/pom.xml +++ b/components/ui-request-interceptor/pom.xml @@ -21,7 +21,7 @@ carbon-devicemgt org.wso2.carbon.devicemgt - 5.0.16 + 5.0.17-SNAPSHOT ../../pom.xml 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 76d42b172c2..3cf1a018775 100644 --- a/components/webapp-authenticator-framework/org.wso2.carbon.webapp.authenticator.framework/pom.xml +++ b/components/webapp-authenticator-framework/org.wso2.carbon.webapp.authenticator.framework/pom.xml @@ -21,7 +21,7 @@ org.wso2.carbon.devicemgt webapp-authenticator-framework - 5.0.16 + 5.0.17-SNAPSHOT ../pom.xml diff --git a/components/webapp-authenticator-framework/pom.xml b/components/webapp-authenticator-framework/pom.xml index 1c7a9d4aaf5..a724b7c167f 100644 --- a/components/webapp-authenticator-framework/pom.xml +++ b/components/webapp-authenticator-framework/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt carbon-devicemgt - 5.0.16 + 5.0.17-SNAPSHOT ../../pom.xml diff --git a/features/analytics-mgt/grafana-mgt/io.entgra.analytics.mgt.grafana.proxy.api.feature/pom.xml b/features/analytics-mgt/grafana-mgt/io.entgra.analytics.mgt.grafana.proxy.api.feature/pom.xml index f8d732dd0e5..947540ab230 100644 --- a/features/analytics-mgt/grafana-mgt/io.entgra.analytics.mgt.grafana.proxy.api.feature/pom.xml +++ b/features/analytics-mgt/grafana-mgt/io.entgra.analytics.mgt.grafana.proxy.api.feature/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt grafana-mgt-feature - 5.0.16 + 5.0.17-SNAPSHOT ../pom.xml diff --git a/features/analytics-mgt/grafana-mgt/io.entgra.analytics.mgt.grafana.proxy.server.feature/pom.xml b/features/analytics-mgt/grafana-mgt/io.entgra.analytics.mgt.grafana.proxy.server.feature/pom.xml index af8a760f7de..d69d323425a 100644 --- a/features/analytics-mgt/grafana-mgt/io.entgra.analytics.mgt.grafana.proxy.server.feature/pom.xml +++ b/features/analytics-mgt/grafana-mgt/io.entgra.analytics.mgt.grafana.proxy.server.feature/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt grafana-mgt-feature - 5.0.16 + 5.0.17-SNAPSHOT ../pom.xml diff --git a/features/analytics-mgt/grafana-mgt/pom.xml b/features/analytics-mgt/grafana-mgt/pom.xml index 30b2fae1906..970b1f2e2c1 100644 --- a/features/analytics-mgt/grafana-mgt/pom.xml +++ b/features/analytics-mgt/grafana-mgt/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt analytics-mgt-feature - 5.0.16 + 5.0.17-SNAPSHOT ../pom.xml diff --git a/features/analytics-mgt/pom.xml b/features/analytics-mgt/pom.xml index ccb405ea8ac..92db34abab7 100644 --- a/features/analytics-mgt/pom.xml +++ b/features/analytics-mgt/pom.xml @@ -3,7 +3,7 @@ carbon-devicemgt org.wso2.carbon.devicemgt - 5.0.16 + 5.0.17-SNAPSHOT ../../pom.xml diff --git a/features/apimgt-extensions/org.wso2.carbon.apimgt.application.extension.feature/pom.xml b/features/apimgt-extensions/org.wso2.carbon.apimgt.application.extension.feature/pom.xml index f99278d15f7..13ef7fa6f0e 100644 --- a/features/apimgt-extensions/org.wso2.carbon.apimgt.application.extension.feature/pom.xml +++ b/features/apimgt-extensions/org.wso2.carbon.apimgt.application.extension.feature/pom.xml @@ -21,7 +21,7 @@ org.wso2.carbon.devicemgt apimgt-extensions-feature - 5.0.16 + 5.0.17-SNAPSHOT ../pom.xml diff --git a/features/apimgt-extensions/org.wso2.carbon.apimgt.keymgt.extension.feature/pom.xml b/features/apimgt-extensions/org.wso2.carbon.apimgt.keymgt.extension.feature/pom.xml index b9f17e5aedf..cacb9db60b8 100644 --- a/features/apimgt-extensions/org.wso2.carbon.apimgt.keymgt.extension.feature/pom.xml +++ b/features/apimgt-extensions/org.wso2.carbon.apimgt.keymgt.extension.feature/pom.xml @@ -21,7 +21,7 @@ org.wso2.carbon.devicemgt apimgt-extensions-feature - 5.0.16 + 5.0.17-SNAPSHOT ../pom.xml diff --git a/features/apimgt-extensions/org.wso2.carbon.apimgt.webapp.publisher.feature/pom.xml b/features/apimgt-extensions/org.wso2.carbon.apimgt.webapp.publisher.feature/pom.xml index 7d5a130a33e..c1724f76526 100644 --- a/features/apimgt-extensions/org.wso2.carbon.apimgt.webapp.publisher.feature/pom.xml +++ b/features/apimgt-extensions/org.wso2.carbon.apimgt.webapp.publisher.feature/pom.xml @@ -21,7 +21,7 @@ org.wso2.carbon.devicemgt apimgt-extensions-feature - 5.0.16 + 5.0.17-SNAPSHOT ../pom.xml diff --git a/features/apimgt-extensions/pom.xml b/features/apimgt-extensions/pom.xml index 84a7ea607d8..d4a366c4576 100644 --- a/features/apimgt-extensions/pom.xml +++ b/features/apimgt-extensions/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt carbon-devicemgt - 5.0.16 + 5.0.17-SNAPSHOT ../../pom.xml diff --git a/features/application-mgt/io.entgra.application.mgt.api.feature/pom.xml b/features/application-mgt/io.entgra.application.mgt.api.feature/pom.xml index c6086158091..e7eb0a03d78 100644 --- a/features/application-mgt/io.entgra.application.mgt.api.feature/pom.xml +++ b/features/application-mgt/io.entgra.application.mgt.api.feature/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt application-mgt-feature - 5.0.16 + 5.0.17-SNAPSHOT ../pom.xml diff --git a/features/application-mgt/io.entgra.application.mgt.server.feature/pom.xml b/features/application-mgt/io.entgra.application.mgt.server.feature/pom.xml index b3548e544e2..477b78cca8d 100644 --- a/features/application-mgt/io.entgra.application.mgt.server.feature/pom.xml +++ b/features/application-mgt/io.entgra.application.mgt.server.feature/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt application-mgt-feature - 5.0.16 + 5.0.17-SNAPSHOT ../pom.xml diff --git a/features/application-mgt/pom.xml b/features/application-mgt/pom.xml index 36cc8b37d24..83ea62c7888 100644 --- a/features/application-mgt/pom.xml +++ b/features/application-mgt/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt carbon-devicemgt - 5.0.16 + 5.0.17-SNAPSHOT ../../pom.xml diff --git a/features/certificate-mgt/org.wso2.carbon.certificate.mgt.api.feature/pom.xml b/features/certificate-mgt/org.wso2.carbon.certificate.mgt.api.feature/pom.xml index 0bb6b55ad5c..978b64d5058 100644 --- a/features/certificate-mgt/org.wso2.carbon.certificate.mgt.api.feature/pom.xml +++ b/features/certificate-mgt/org.wso2.carbon.certificate.mgt.api.feature/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt certificate-mgt-feature - 5.0.16 + 5.0.17-SNAPSHOT ../pom.xml diff --git a/features/certificate-mgt/org.wso2.carbon.certificate.mgt.cert.admin.api.feature/pom.xml b/features/certificate-mgt/org.wso2.carbon.certificate.mgt.cert.admin.api.feature/pom.xml index 69c5e6ef0cd..cc6905413db 100644 --- a/features/certificate-mgt/org.wso2.carbon.certificate.mgt.cert.admin.api.feature/pom.xml +++ b/features/certificate-mgt/org.wso2.carbon.certificate.mgt.cert.admin.api.feature/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt certificate-mgt-feature - 5.0.16 + 5.0.17-SNAPSHOT ../pom.xml diff --git a/features/certificate-mgt/org.wso2.carbon.certificate.mgt.server.feature/pom.xml b/features/certificate-mgt/org.wso2.carbon.certificate.mgt.server.feature/pom.xml index e52d31fa01a..5ee10ff4756 100644 --- a/features/certificate-mgt/org.wso2.carbon.certificate.mgt.server.feature/pom.xml +++ b/features/certificate-mgt/org.wso2.carbon.certificate.mgt.server.feature/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt certificate-mgt-feature - 5.0.16 + 5.0.17-SNAPSHOT ../pom.xml diff --git a/features/certificate-mgt/pom.xml b/features/certificate-mgt/pom.xml index 3f843763146..29a1b8fe321 100644 --- a/features/certificate-mgt/pom.xml +++ b/features/certificate-mgt/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt carbon-devicemgt - 5.0.16 + 5.0.17-SNAPSHOT ../../pom.xml diff --git a/features/device-mgt-extensions/io.entgra.device.mgt.extensions.defaultrole.manager.feature/pom.xml b/features/device-mgt-extensions/io.entgra.device.mgt.extensions.defaultrole.manager.feature/pom.xml index 63c71bc9df7..e68453ae3c1 100644 --- a/features/device-mgt-extensions/io.entgra.device.mgt.extensions.defaultrole.manager.feature/pom.xml +++ b/features/device-mgt-extensions/io.entgra.device.mgt.extensions.defaultrole.manager.feature/pom.xml @@ -23,7 +23,7 @@ org.wso2.carbon.devicemgt device-mgt-extensions-feature - 5.0.16 + 5.0.17-SNAPSHOT ../pom.xml diff --git a/features/device-mgt-extensions/io.entgra.device.mgt.extensions.logger.feature/pom.xml b/features/device-mgt-extensions/io.entgra.device.mgt.extensions.logger.feature/pom.xml index 2a1520581e1..3a473f1be7d 100644 --- a/features/device-mgt-extensions/io.entgra.device.mgt.extensions.logger.feature/pom.xml +++ b/features/device-mgt-extensions/io.entgra.device.mgt.extensions.logger.feature/pom.xml @@ -23,7 +23,7 @@ org.wso2.carbon.devicemgt device-mgt-extensions-feature - 5.0.16 + 5.0.17-SNAPSHOT ../pom.xml diff --git a/features/device-mgt-extensions/io.entgra.device.mgt.extensions.stateengine.feature/pom.xml b/features/device-mgt-extensions/io.entgra.device.mgt.extensions.stateengine.feature/pom.xml index b3eb5ffb5b0..1830443b112 100644 --- a/features/device-mgt-extensions/io.entgra.device.mgt.extensions.stateengine.feature/pom.xml +++ b/features/device-mgt-extensions/io.entgra.device.mgt.extensions.stateengine.feature/pom.xml @@ -23,7 +23,7 @@ org.wso2.carbon.devicemgt device-mgt-extensions-feature - 5.0.16 + 5.0.17-SNAPSHOT ../pom.xml diff --git a/features/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.device.type.deployer.feature/pom.xml b/features/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.device.type.deployer.feature/pom.xml index ca6a749d403..bc895902794 100644 --- a/features/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.device.type.deployer.feature/pom.xml +++ b/features/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.device.type.deployer.feature/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt device-mgt-extensions-feature - 5.0.16 + 5.0.17-SNAPSHOT ../pom.xml diff --git a/features/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.fcm.feature/pom.xml b/features/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.fcm.feature/pom.xml index 02e61a944fd..cab1c4b45ba 100644 --- a/features/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.fcm.feature/pom.xml +++ b/features/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.fcm.feature/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt device-mgt-extensions-feature - 5.0.16 + 5.0.17-SNAPSHOT ../pom.xml diff --git a/features/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.http.feature/pom.xml b/features/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.http.feature/pom.xml index 05bb14da8f0..36886183416 100644 --- a/features/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.http.feature/pom.xml +++ b/features/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.http.feature/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt device-mgt-extensions-feature - 5.0.16 + 5.0.17-SNAPSHOT ../pom.xml diff --git a/features/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.mqtt.feature/pom.xml b/features/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.mqtt.feature/pom.xml index 67abc698e4c..b2399767ee2 100644 --- a/features/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.mqtt.feature/pom.xml +++ b/features/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.mqtt.feature/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt device-mgt-extensions-feature - 5.0.16 + 5.0.17-SNAPSHOT ../pom.xml diff --git a/features/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.xmpp.feature/pom.xml b/features/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.xmpp.feature/pom.xml index 03048e2e784..4ea6eef8ce8 100644 --- a/features/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.xmpp.feature/pom.xml +++ b/features/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.xmpp.feature/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt device-mgt-extensions-feature - 5.0.16 + 5.0.17-SNAPSHOT ../pom.xml diff --git a/features/device-mgt-extensions/pom.xml b/features/device-mgt-extensions/pom.xml index c3eeeca917c..2d762b92285 100644 --- a/features/device-mgt-extensions/pom.xml +++ b/features/device-mgt-extensions/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt carbon-devicemgt - 5.0.16 + 5.0.17-SNAPSHOT ../../pom.xml diff --git a/features/device-mgt/org.wso2.carbon.device.mgt.api.feature/pom.xml b/features/device-mgt/org.wso2.carbon.device.mgt.api.feature/pom.xml index 4ba7e5a07d4..421edce3831 100644 --- a/features/device-mgt/org.wso2.carbon.device.mgt.api.feature/pom.xml +++ b/features/device-mgt/org.wso2.carbon.device.mgt.api.feature/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt device-mgt-feature - 5.0.16 + 5.0.17-SNAPSHOT ../pom.xml diff --git a/features/device-mgt/org.wso2.carbon.device.mgt.basics.feature/pom.xml b/features/device-mgt/org.wso2.carbon.device.mgt.basics.feature/pom.xml index d5f56e66e63..cca2850c19f 100644 --- a/features/device-mgt/org.wso2.carbon.device.mgt.basics.feature/pom.xml +++ b/features/device-mgt/org.wso2.carbon.device.mgt.basics.feature/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt device-mgt-feature - 5.0.16 + 5.0.17-SNAPSHOT ../pom.xml diff --git a/features/device-mgt/org.wso2.carbon.device.mgt.extensions.feature/pom.xml b/features/device-mgt/org.wso2.carbon.device.mgt.extensions.feature/pom.xml index 074b5d21055..399212de811 100644 --- a/features/device-mgt/org.wso2.carbon.device.mgt.extensions.feature/pom.xml +++ b/features/device-mgt/org.wso2.carbon.device.mgt.extensions.feature/pom.xml @@ -4,7 +4,7 @@ org.wso2.carbon.devicemgt device-mgt-feature - 5.0.16 + 5.0.17-SNAPSHOT ../pom.xml 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 d37d2aec52f..4e0c0bf76ec 100644 --- a/features/device-mgt/org.wso2.carbon.device.mgt.feature/pom.xml +++ b/features/device-mgt/org.wso2.carbon.device.mgt.feature/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt device-mgt-feature - 5.0.16 + 5.0.17-SNAPSHOT ../pom.xml diff --git a/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/pom.xml b/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/pom.xml index 6ad7c9f03fc..114e82b22eb 100644 --- a/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/pom.xml +++ b/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt device-mgt-feature - 5.0.16 + 5.0.17-SNAPSHOT ../pom.xml diff --git a/features/device-mgt/pom.xml b/features/device-mgt/pom.xml index 16050f8a0d8..d0811506aa0 100644 --- a/features/device-mgt/pom.xml +++ b/features/device-mgt/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt carbon-devicemgt - 5.0.16 + 5.0.17-SNAPSHOT ../../pom.xml diff --git a/features/heartbeat-management/io.entgra.server.heart.beat.feature/pom.xml b/features/heartbeat-management/io.entgra.server.heart.beat.feature/pom.xml index 8c8e5b507c4..405cf77df3c 100644 --- a/features/heartbeat-management/io.entgra.server.heart.beat.feature/pom.xml +++ b/features/heartbeat-management/io.entgra.server.heart.beat.feature/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt heart-beat-feature - 5.0.16 + 5.0.17-SNAPSHOT ../pom.xml diff --git a/features/heartbeat-management/pom.xml b/features/heartbeat-management/pom.xml index 6b6b6d4589c..c73df4fd889 100644 --- a/features/heartbeat-management/pom.xml +++ b/features/heartbeat-management/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt carbon-devicemgt - 5.0.16 + 5.0.17-SNAPSHOT ../../pom.xml diff --git a/features/jwt-client/org.wso2.carbon.identity.jwt.client.extension.feature/pom.xml b/features/jwt-client/org.wso2.carbon.identity.jwt.client.extension.feature/pom.xml index 36163de76bd..d993b05473a 100644 --- a/features/jwt-client/org.wso2.carbon.identity.jwt.client.extension.feature/pom.xml +++ b/features/jwt-client/org.wso2.carbon.identity.jwt.client.extension.feature/pom.xml @@ -23,7 +23,7 @@ org.wso2.carbon.devicemgt jwt-client-feature - 5.0.16 + 5.0.17-SNAPSHOT ../pom.xml diff --git a/features/jwt-client/pom.xml b/features/jwt-client/pom.xml index 01aabff9495..e5b2f4c0387 100644 --- a/features/jwt-client/pom.xml +++ b/features/jwt-client/pom.xml @@ -23,7 +23,7 @@ org.wso2.carbon.devicemgt carbon-devicemgt - 5.0.16 + 5.0.17-SNAPSHOT ../../pom.xml 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 ff2f2d1671c..6e9a45613c4 100644 --- a/features/policy-mgt/org.wso2.carbon.policy.mgt.server.feature/pom.xml +++ b/features/policy-mgt/org.wso2.carbon.policy.mgt.server.feature/pom.xml @@ -23,7 +23,7 @@ org.wso2.carbon.devicemgt policy-mgt-feature - 5.0.16 + 5.0.17-SNAPSHOT ../pom.xml diff --git a/features/policy-mgt/pom.xml b/features/policy-mgt/pom.xml index 93096fa1a28..e9b3b588bc6 100644 --- a/features/policy-mgt/pom.xml +++ b/features/policy-mgt/pom.xml @@ -23,7 +23,7 @@ org.wso2.carbon.devicemgt carbon-devicemgt - 5.0.16 + 5.0.17-SNAPSHOT ../../pom.xml diff --git a/features/transport-mgt/email-sender/org.wso2.carbon.email.sender.feature/pom.xml b/features/transport-mgt/email-sender/org.wso2.carbon.email.sender.feature/pom.xml index b1feab4c9d8..1c4b6b0fde9 100644 --- a/features/transport-mgt/email-sender/org.wso2.carbon.email.sender.feature/pom.xml +++ b/features/transport-mgt/email-sender/org.wso2.carbon.email.sender.feature/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt email-sender-feature - 5.0.16 + 5.0.17-SNAPSHOT ../pom.xml diff --git a/features/transport-mgt/email-sender/pom.xml b/features/transport-mgt/email-sender/pom.xml index 79db9183c4c..6e11ee2cd8b 100644 --- a/features/transport-mgt/email-sender/pom.xml +++ b/features/transport-mgt/email-sender/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt transport-mgt-feature - 5.0.16 + 5.0.17-SNAPSHOT ../pom.xml diff --git a/features/transport-mgt/pom.xml b/features/transport-mgt/pom.xml index d1730541f0f..6278f0fac45 100644 --- a/features/transport-mgt/pom.xml +++ b/features/transport-mgt/pom.xml @@ -3,7 +3,7 @@ carbon-devicemgt org.wso2.carbon.devicemgt - 5.0.16 + 5.0.17-SNAPSHOT ../../pom.xml diff --git a/features/transport-mgt/sms-handler/io.entgra.transport.mgt.sms.handler.api.feature/pom.xml b/features/transport-mgt/sms-handler/io.entgra.transport.mgt.sms.handler.api.feature/pom.xml index 897d948d086..91521014661 100644 --- a/features/transport-mgt/sms-handler/io.entgra.transport.mgt.sms.handler.api.feature/pom.xml +++ b/features/transport-mgt/sms-handler/io.entgra.transport.mgt.sms.handler.api.feature/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt sms-handler-feature - 5.0.16 + 5.0.17-SNAPSHOT ../pom.xml diff --git a/features/transport-mgt/sms-handler/io.entgra.transport.mgt.sms.handler.server.feature/pom.xml b/features/transport-mgt/sms-handler/io.entgra.transport.mgt.sms.handler.server.feature/pom.xml index e8f4f7d8ba5..ce337bc4628 100644 --- a/features/transport-mgt/sms-handler/io.entgra.transport.mgt.sms.handler.server.feature/pom.xml +++ b/features/transport-mgt/sms-handler/io.entgra.transport.mgt.sms.handler.server.feature/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt sms-handler-feature - 5.0.16 + 5.0.17-SNAPSHOT ../pom.xml diff --git a/features/transport-mgt/sms-handler/pom.xml b/features/transport-mgt/sms-handler/pom.xml index 1cfe5c8fc50..114ded253e5 100644 --- a/features/transport-mgt/sms-handler/pom.xml +++ b/features/transport-mgt/sms-handler/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt transport-mgt-feature - 5.0.16 + 5.0.17-SNAPSHOT ../pom.xml diff --git a/features/ui-request-interceptor/io.entgra.ui.request.interceptor.feature/pom.xml b/features/ui-request-interceptor/io.entgra.ui.request.interceptor.feature/pom.xml index eeb5633b6cd..ad1ed21ba0a 100644 --- a/features/ui-request-interceptor/io.entgra.ui.request.interceptor.feature/pom.xml +++ b/features/ui-request-interceptor/io.entgra.ui.request.interceptor.feature/pom.xml @@ -21,7 +21,7 @@ ui-request-interceptor-feature io.entgra.devicemgt - 5.0.16 + 5.0.17-SNAPSHOT 4.0.0 diff --git a/features/ui-request-interceptor/pom.xml b/features/ui-request-interceptor/pom.xml index 7771cdb043b..551c0e0ecd6 100644 --- a/features/ui-request-interceptor/pom.xml +++ b/features/ui-request-interceptor/pom.xml @@ -21,7 +21,7 @@ carbon-devicemgt org.wso2.carbon.devicemgt - 5.0.16 + 5.0.17-SNAPSHOT ../../pom.xml 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 ca070c26cfd..a7ff96c8145 100644 --- a/features/webapp-authenticator-framework/org.wso2.carbon.webapp.authenticator.framework.server.feature/pom.xml +++ b/features/webapp-authenticator-framework/org.wso2.carbon.webapp.authenticator.framework.server.feature/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt webapp-authenticator-framework-feature - 5.0.16 + 5.0.17-SNAPSHOT ../pom.xml diff --git a/features/webapp-authenticator-framework/pom.xml b/features/webapp-authenticator-framework/pom.xml index f4be06d2318..5ce4fa7d330 100644 --- a/features/webapp-authenticator-framework/pom.xml +++ b/features/webapp-authenticator-framework/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt carbon-devicemgt - 5.0.16 + 5.0.17-SNAPSHOT ../../pom.xml diff --git a/pom.xml b/pom.xml index 1bcd8ca4543..a2c8d782a83 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ org.wso2.carbon.devicemgt carbon-devicemgt pom - 5.0.16 + 5.0.17-SNAPSHOT WSO2 Carbon - Device Management - Parent http://wso2.org WSO2 Connected Device Manager Components @@ -1821,7 +1821,7 @@ https://repository.entgra.net/community/device-mgt-core.git scm:git:https://repository.entgra.net/community/device-mgt-core.git scm:git:https://repository.entgra.net/community/device-mgt-core.git - v5.0.16 + HEAD @@ -2033,7 +2033,7 @@ 1.2.11.wso2v10 - 5.0.16 + 5.0.17-SNAPSHOT 4.7.35 From 5cf7377a850f9b21afb760cd3bdf1a83bab03eaf Mon Sep 17 00:00:00 2001 From: Rushdi Date: Mon, 30 Jan 2023 13:05:55 +0530 Subject: [PATCH 10/10] Update sendDeviceNameChangedNotification --- .../mgt/jaxrs/service/impl/DeviceManagementServiceImpl.java | 2 +- .../mgt/core/service/DeviceManagementProviderService.java | 2 +- .../mgt/core/service/DeviceManagementProviderServiceImpl.java | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/DeviceManagementServiceImpl.java b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/DeviceManagementServiceImpl.java index d8c6371315b..75702272031 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/DeviceManagementServiceImpl.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/DeviceManagementServiceImpl.java @@ -618,7 +618,7 @@ public class DeviceManagementServiceImpl implements DeviceManagementService { persistedDevice.setName(device.getName()); System.out.println("This is rename device"); boolean responseOfmodifyEnrollment = deviceManagementProviderService.modifyEnrollment(persistedDevice); - boolean responseOfDeviceNameChanged = deviceManagementProviderService.SendDeviceNameChangedNotification( + boolean responseOfDeviceNameChanged = deviceManagementProviderService.sendDeviceNameChangedNotification( persistedDevice); boolean response = responseOfmodifyEnrollment && responseOfDeviceNameChanged; 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 f781fd3d75d..4e12d2cf1a4 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 @@ -1031,5 +1031,5 @@ public interface DeviceManagementProviderService { PaginationResult getDevicesDetails(PaginationRequest request, List devicesIds, String groupName) throws DeviceManagementException; - Boolean SendDeviceNameChangedNotification(Device device) throws DeviceManagementException; + Boolean sendDeviceNameChangedNotification(Device device) 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 d28a3065143..7bb7e7c6273 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 @@ -4878,7 +4878,7 @@ public class DeviceManagementProviderServiceImpl implements DeviceManagementProv } @Override - public Boolean SendDeviceNameChangedNotification(Device device) throws DeviceManagementException { + public Boolean sendDeviceNameChangedNotification(Device device) throws DeviceManagementException { try { ProfileOperation operation = new ProfileOperation();