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 b8c626cb41..821a47319f 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 a84deb8894..cbf57941d2 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 2f0439f8ca..786bbc9b05 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 821a47319f..464da3a89f 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 0db16ff451..7d7c3ba853 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 786bbc9b05..74700125cd 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 0000000000..d53db399d0 --- /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 b0c850de95..17136a7e51 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 acadf926f2..0351e629fd 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 d7462993a9..95fadfb452 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 92bc2790d4..5806d948c1 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 154594678c..3bbaf47250 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 0000000000..fe968c0b23 --- /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 0000000000..3211a7149e --- /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 0000000000..706f14f0d6 --- /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 0000000000..3c3f0c9b47 --- /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 027ddd2417..0ea2660762 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 0000000000..bdafeae320 --- /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 0000000000..b4b941fd18 --- /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 0000000000..874e39e34d --- /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 cbd7c697f4..5157860705 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 0000000000..cfefbaad08 --- /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 7b3e08cd50..2ae2fb8b60 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 6a69cb02ba..a5331d3c0e 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 a266a40499..1efe03c5f9 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 0000000000..dde0646858 --- /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 97f58b3f3c..cfbe8a3480 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 0000000000..dbf44d2581 --- /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 0000000000..742388b0b6 --- /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 d3b81f2655..395124a987 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 0000000000..ef5c644107 --- /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 0e8d1b8466..3db934311e 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 33ac7964dd..4e354a9880 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 0351e629fd..6407ada6f1 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 742388b0b6..863e27b456 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 29bb7922e9..9a24b5c7f3 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 0000000000..8e6d4915ea --- /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 6407ada6f1..0351e629fd 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 863e27b456..742388b0b6 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 d53db399d0..0000000000 --- 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 17136a7e51..b0c850de95 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 0351e629fd..acadf926f2 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 95fadfb452..d7462993a9 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 5806d948c1..92bc2790d4 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 3bbaf47250..154594678c 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 fe968c0b23..0000000000 --- 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 3211a7149e..0000000000 --- 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 706f14f0d6..0000000000 --- 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 3c3f0c9b47..0000000000 --- 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 0ea2660762..027ddd2417 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 bdafeae320..0000000000 --- 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 b4b941fd18..0000000000 --- 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 874e39e34d..0000000000 --- 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 5157860705..cbd7c697f4 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 cfefbaad08..0000000000 --- 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 2ae2fb8b60..7b3e08cd50 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 a5331d3c0e..6a69cb02ba 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 1efe03c5f9..a266a40499 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 dde0646858..0000000000 --- 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 77c8c38f83..d28a306514 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 dbf44d2581..0000000000 --- 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 742388b0b6..0000000000 --- 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 395124a987..d3b81f2655 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 ef5c644107..0000000000 --- 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 3db934311e..0e8d1b8466 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 4e354a9880..33ac7964dd 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 748108ec60..7af3c3a01a 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 45a1ab1381..c5966f69ae 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 15bce92123..8bed46ff0e 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 781fa794db..f0edd92c87 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 21f5069a74..978268e6ac 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 1783073616..e3a11df699 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 95cc7dbf4b..9bdc36e615 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 e7a8040eef..5c77a81b22 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 03da5eb4af..2da538bbd1 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 1d064a5656..6b049a9591 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 20525b5142..ba32af1afd 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 c09f37daa4..626cf97b30 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 26c496befd..58b20d279c 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 93e0c641b4..1f9af2b555 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 54ddd889e8..94736a3ef5 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 2c882ffc3c..9c6102cdc7 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 f246e392fa..32abf335b4 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 3cc8edac9a..67773992f6 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 58475ac289..f7d2fdb922 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 156ccf9cb0..de48baebf5 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 f617559454..4d95d71580 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 8521489c1c..f59efa75ee 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 a780123240..ebb44f6e00 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 21986acdcc..b5636dc88f 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 4153e2c337..da06425cd1 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 2dd1025f8b..f0a20a772e 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 65c27150c0..f24306264a 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 a6f43d0f7d..01d006fc1b 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 7687af14ec..ea89d43749 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 250d1b2755..6f06591e92 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 27e81b2086..4492587c17 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 ac1d9433db..1f898e639b 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 61cc474096..7ec4e28d02 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 6173c124e8..436e308dec 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 d232be71b8..70bc34091c 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 bdc879561d..f349e40f1a 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 6176c74ff5..7027bdb19c 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 5f934cdba4..e35031d5c1 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 78d65441e7..c28feb1f9c 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 01a2b61415..925052b0ca 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 62f34fec47..506cd32dda 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 12b187f60b..8038a5e3a6 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 2f143b316a..4e57f82e00 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 4ca291c299..c406c9f014 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 12f156ebe6..68fa0ca3de 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 adbad363b8..445de9b55c 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 5ea8b324a7..4a8b51f96c 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 e37d88532b..22d49411ae 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 be0b657d10..c6c62708b4 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 c7893323ec..f2a3f19db8 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 40b9eca423..d45e9190c0 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 fb2fb75815..68bb569658 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 7d745fe489..07c38d0790 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 949fd17fb8..2c6bde93b9 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 157cd9b525..36a3368a22 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 4b595c6713..591e22ac63 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 26692cbe03..344debb789 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 e6a9a9be20..0c1acb421c 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 8477f97879..2950f32936 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 9dc0e25218..76d42b172c 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 3ffd5ca338..1c7a9d4aaf 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 32f3e183cd..f8d732dd0e 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 30a1342c73..af8a760f7d 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 1526f52946..30b2fae190 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 3e0c361e02..ccb405ea8a 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 ba1696ca43..f99278d15f 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 8a676873d8..b9f17e5aed 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 6c9e2929ae..7d5a130a33 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 ef802e791f..84a7ea607d 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 9beeb2a45f..c608615809 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 a29aef3b8b..b3548e544e 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 66b040bcdd..36cc8b37d2 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 0653561d5e..0bb6b55ad5 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 30215f2ee2..69c5e6ef0c 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 0d39f02701..e52d31fa01 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 cc903aa17e..3f84376314 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 29aacad17b..63c71bc9df 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 a4b1e41bbc..2a1520581e 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 b1bb7519b3..b3eb5ffb5b 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 c4aa1edfee..ca6a749d40 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 23097f159c..02e61a944f 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 56eeb0bfcc..05bb14da8f 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 a930e180c0..67abc698e4 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 86c64be043..03048e2e78 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 fcb0afbb85..c3eeeca917 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 cf1749359d..4ba7e5a07d 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 e33829a360..d5f56e66e6 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 f0e0bd1b1a..074b5d2105 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 900ec36b6a..d37d2aec52 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 e72a0e0e0c..6ad7c9f03f 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 6aa8b07dbe..16050f8a0d 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 7892b1fd48..8c8e5b507c 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 39703223a5..6b6b6d4589 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 cfb3303f01..36163de76b 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 36fae9c794..01aabff949 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 0c6770578d..ff2f2d1671 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 0478dbb17b..93096fa1a2 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 f6907c375e..b1feab4c9d 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 2f0bb51811..79db9183c4 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 aa42bb243c..d1730541f0 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 7942210a3f..897d948d08 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 9620d1cea1..e8f4f7d8ba 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 1420821a23..1cfe5c8fc5 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 b8c1345513..eeb5633b6c 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 82269506f9..7771cdb043 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 322a15b651..ca070c26cf 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 01f400a3da..f4be06d231 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 aa41e4956d..1bcd8ca454 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 7af3c3a01a..bc77e97bc2 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 c5966f69ae..5113864d19 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 8bed46ff0e..32df0002a5 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 f0edd92c87..728851ef38 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 978268e6ac..cc7611730c 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 e3a11df699..9773a973ff 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 9bdc36e615..af6f990272 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 5c77a81b22..3209c1930d 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 2da538bbd1..72753654af 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 6b049a9591..4767eb8ccc 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 ba32af1afd..13d844372e 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 626cf97b30..60cb7564ec 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 58b20d279c..4a2a85283f 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 1f9af2b555..ca28a4fd42 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 94736a3ef5..d79e130aa0 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 9c6102cdc7..aeffd64b75 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 32abf335b4..4a1945078b 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 67773992f6..2006236912 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 f7d2fdb922..3e2eb6aba4 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 de48baebf5..c03158f34d 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 4d95d71580..2184cb821d 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 f59efa75ee..473f58ee25 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 ebb44f6e00..7d3b251c7f 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 b5636dc88f..0fdbb38158 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 da06425cd1..7dece8d92c 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 f0a20a772e..fab80c8612 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 f24306264a..4b5b078aa8 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 01d006fc1b..59edf0d48d 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 ea89d43749..a955ac7a02 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 6f06591e92..d97c7272b0 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 4492587c17..4c16f24ff1 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 1f898e639b..837bb27d07 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 7ec4e28d02..e885c0956c 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 436e308dec..6182f300cd 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 70bc34091c..d9a956d1b5 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 f349e40f1a..429fed59c2 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 7027bdb19c..aa41e41e30 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 e35031d5c1..4944d58023 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 c28feb1f9c..6733f2e25f 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 925052b0ca..aa5a9ada9e 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 506cd32dda..8b9688aa1c 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 8038a5e3a6..640631870a 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 4e57f82e00..87eeefacdb 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 c406c9f014..537815b512 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 68fa0ca3de..127428b5af 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 445de9b55c..e2f7d96e5f 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 4a8b51f96c..c7493fca3f 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 22d49411ae..e366aaee36 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 c6c62708b4..714087fefe 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 f2a3f19db8..46231b1b76 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 d45e9190c0..b9ebca3822 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 68bb569658..d633ccb6a1 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 07c38d0790..48230dbf9b 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 2c6bde93b9..0592348474 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 36a3368a22..e295e9e708 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 591e22ac63..e9e21d0ce1 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 344debb789..4fdccfb615 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 0c1acb421c..c0e795baaf 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 2950f32936..2f9fe328f5 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 76d42b172c..3cf1a01877 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 1c7a9d4aaf..a724b7c167 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 f8d732dd0e..947540ab23 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 af8a760f7d..d69d323425 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 30b2fae190..970b1f2e2c 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 ccb405ea8a..92db34abab 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 f99278d15f..13ef7fa6f0 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 b9f17e5aed..cacb9db60b 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 7d5a130a33..c1724f7652 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 84a7ea607d..d4a366c457 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 c608615809..e7eb0a03d7 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 b3548e544e..477b78cca8 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 36cc8b37d2..83ea62c788 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 0bb6b55ad5..978b64d505 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 69c5e6ef0c..cc6905413d 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 e52d31fa01..5ee10ff475 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 3f84376314..29a1b8fe32 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 63c71bc9df..e68453ae3c 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 2a1520581e..3a473f1be7 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 b3eb5ffb5b..1830443b11 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 ca6a749d40..bc89590279 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 02e61a944f..cab1c4b45b 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 05bb14da8f..3688618341 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 67abc698e4..b2399767ee 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 03048e2e78..4ea6eef8ce 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 c3eeeca917..2d762b9228 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 4ba7e5a07d..421edce383 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 d5f56e66e6..cca2850c19 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 074b5d2105..399212de81 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 d37d2aec52..4e0c0bf76e 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 6ad7c9f03f..114e82b22e 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 16050f8a0d..d0811506aa 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 8c8e5b507c..405cf77df3 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 6b6b6d4589..c73df4fd88 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 36163de76b..d993b05473 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 01aabff949..e5b2f4c038 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 ff2f2d1671..6e9a45613c 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 93096fa1a2..e9b3b588bc 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 b1feab4c9d..1c4b6b0fde 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 79db9183c4..6e11ee2cd8 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 d1730541f0..6278f0fac4 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 897d948d08..9152101466 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 e8f4f7d8ba..ce337bc462 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 1cfe5c8fc5..114ded253e 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 eeb5633b6c..ad1ed21ba0 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 7771cdb043..551c0e0ecd 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 ca070c26cf..a7ff96c814 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 f4be06d231..5ce4fa7d33 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 1bcd8ca454..a2c8d782a8 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 d8c6371315..7570227203 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 f781fd3d75..4e12d2cf1a 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 d28a306514..7bb7e7c627 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();