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 434c4a6775..8174536bd2 100644 --- a/components/apimgt-extensions/org.wso2.carbon.apimgt.annotations/pom.xml +++ b/components/apimgt-extensions/org.wso2.carbon.apimgt.annotations/pom.xml @@ -22,13 +22,13 @@ apimgt-extensions org.wso2.carbon.devicemgt - 2.0.14-SNAPSHOT + 2.0.16-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.apimgt.annotations - 2.0.14-SNAPSHOT + 2.0.16-SNAPSHOT bundle WSO2 Carbon - API Management Annotations WSO2 Carbon - API Management Custom Annotation Module 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 2ee4c6430e..4894c6a3ba 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,12 +21,12 @@ apimgt-extensions org.wso2.carbon.devicemgt - 2.0.14-SNAPSHOT + 2.0.16-SNAPSHOT ../pom.xml 4.0.0 - 2.0.14-SNAPSHOT + 2.0.16-SNAPSHOT org.wso2.carbon.apimgt.application.extension.api war WSO2 Carbon - API Application Management API 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 6e4284f173..3f240c3340 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,12 +22,12 @@ apimgt-extensions org.wso2.carbon.devicemgt - 2.0.14-SNAPSHOT + 2.0.16-SNAPSHOT ../pom.xml 4.0.0 - 2.0.14-SNAPSHOT + 2.0.16-SNAPSHOT org.wso2.carbon.apimgt.application.extension bundle WSO2 Carbon - API Application Management diff --git a/components/apimgt-extensions/org.wso2.carbon.apimgt.handlers/pom.xml b/components/apimgt-extensions/org.wso2.carbon.apimgt.handlers/pom.xml index 3c3f3bbedb..272d0c5e34 100644 --- a/components/apimgt-extensions/org.wso2.carbon.apimgt.handlers/pom.xml +++ b/components/apimgt-extensions/org.wso2.carbon.apimgt.handlers/pom.xml @@ -21,13 +21,13 @@ apimgt-extensions org.wso2.carbon.devicemgt - 2.0.14-SNAPSHOT + 2.0.16-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.apimgt.handlers - 2.0.14-SNAPSHOT + 2.0.16-SNAPSHOT bundle WSO2 Carbon - API Security Handler Component WSO2 Carbon - API Management Security Handler Module 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 38746a00d4..eb154f0102 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,13 +22,13 @@ apimgt-extensions org.wso2.carbon.devicemgt - 2.0.14-SNAPSHOT + 2.0.16-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.apimgt.webapp.publisher - 2.0.14-SNAPSHOT + 2.0.16-SNAPSHOT bundle WSO2 Carbon - API Management Webapp Publisher WSO2 Carbon - API Management Webapp Publisher diff --git a/components/apimgt-extensions/pom.xml b/components/apimgt-extensions/pom.xml index 1211393c47..b7ba0a2747 100644 --- a/components/apimgt-extensions/pom.xml +++ b/components/apimgt-extensions/pom.xml @@ -22,13 +22,13 @@ org.wso2.carbon.devicemgt carbon-devicemgt - 2.0.14-SNAPSHOT + 2.0.16-SNAPSHOT ../../pom.xml 4.0.0 apimgt-extensions - 2.0.14-SNAPSHOT + 2.0.16-SNAPSHOT pom WSO2 Carbon - API Management Extensions Component http://wso2.org 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 2d6af3f10c..948ba6691b 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 - 2.0.14-SNAPSHOT + 2.0.16-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 39f83e6a14..955bb55fa2 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 - 2.0.14-SNAPSHOT + 2.0.16-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 5ba6836fa1..764f381934 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 @@ -21,13 +21,13 @@ org.wso2.carbon.devicemgt certificate-mgt - 2.0.14-SNAPSHOT + 2.0.16-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.certificate.mgt.core - 2.0.14-SNAPSHOT + 2.0.16-SNAPSHOT bundle WSO2 Carbon - Certificate Management Core WSO2 Carbon - Certificate Management Core diff --git a/components/certificate-mgt/pom.xml b/components/certificate-mgt/pom.xml index 30b0186238..44988a66b4 100644 --- a/components/certificate-mgt/pom.xml +++ b/components/certificate-mgt/pom.xml @@ -22,14 +22,14 @@ org.wso2.carbon.devicemgt carbon-devicemgt - 2.0.14-SNAPSHOT + 2.0.16-SNAPSHOT ../../pom.xml 4.0.0 org.wso2.carbon.devicemgt certificate-mgt - 2.0.14-SNAPSHOT + 2.0.16-SNAPSHOT pom WSO2 Carbon - Certificate Management Component http://wso2.org 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 0fdf348315..435730554e 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 - 2.0.14-SNAPSHOT + 2.0.16-SNAPSHOT ../pom.xml diff --git a/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.gcm/pom.xml b/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.gcm/pom.xml index ea9f8c173f..e4af0cccb0 100644 --- a/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.gcm/pom.xml +++ b/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.gcm/pom.xml @@ -22,7 +22,7 @@ device-mgt-extensions org.wso2.carbon.devicemgt - 2.0.14-SNAPSHOT + 2.0.16-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 0ac6ea57a3..01626d2475 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 - 2.0.14-SNAPSHOT + 2.0.16-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 fb4e62bb66..47cd64f41e 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 - 2.0.14-SNAPSHOT + 2.0.16-SNAPSHOT ../pom.xml diff --git a/components/device-mgt-extensions/pom.xml b/components/device-mgt-extensions/pom.xml index 8f3b451be7..f1a3bc5edd 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 - 2.0.14-SNAPSHOT + 2.0.16-SNAPSHOT ../../pom.xml diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.analytics.dashboard/pom.xml b/components/device-mgt/org.wso2.carbon.device.mgt.analytics.dashboard/pom.xml index 4f96da0d4a..8bd503dc20 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.analytics.dashboard/pom.xml +++ b/components/device-mgt/org.wso2.carbon.device.mgt.analytics.dashboard/pom.xml @@ -3,7 +3,7 @@ org.wso2.carbon.devicemgt device-mgt - 2.0.14-SNAPSHOT + 2.0.16-SNAPSHOT ../pom.xml diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.analytics.data.publisher/pom.xml b/components/device-mgt/org.wso2.carbon.device.mgt.analytics.data.publisher/pom.xml index 3cc2b79748..7a35748c11 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.analytics.data.publisher/pom.xml +++ b/components/device-mgt/org.wso2.carbon.device.mgt.analytics.data.publisher/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt device-mgt - 2.0.14-SNAPSHOT + 2.0.16-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 b572c746c5..5ad39c39aa 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 - 2.0.14-SNAPSHOT + 2.0.16-SNAPSHOT ../pom.xml diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/Dashboard.java b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/Dashboard.java deleted file mode 100644 index 3a0564bb06..0000000000 --- a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/Dashboard.java +++ /dev/null @@ -1,841 +0,0 @@ -package org.wso2.carbon.device.mgt.jaxrs.service.api; - -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; -import io.swagger.annotations.ApiParam; -import io.swagger.annotations.ApiResponse; -import io.swagger.annotations.ApiResponses; -import io.swagger.annotations.Authorization; -import io.swagger.annotations.AuthorizationScope; -import io.swagger.annotations.Extension; -import io.swagger.annotations.ExtensionProperty; -import io.swagger.annotations.Info; -import io.swagger.annotations.ResponseHeader; -import io.swagger.annotations.SwaggerDefinition; -import io.swagger.annotations.Tag; -import org.wso2.carbon.apimgt.annotations.api.Scope; -import org.wso2.carbon.apimgt.annotations.api.Scopes; -import org.wso2.carbon.device.mgt.analytics.dashboard.bean.DeviceCountByGroup; -import org.wso2.carbon.device.mgt.jaxrs.beans.DashboardGadgetDataWrapper; -import org.wso2.carbon.device.mgt.jaxrs.beans.DashboardPaginationGadgetDataWrapper; -import org.wso2.carbon.device.mgt.jaxrs.beans.ErrorResponse; -import org.wso2.carbon.device.mgt.jaxrs.util.Constants; - -import javax.ws.rs.Consumes; -import javax.ws.rs.GET; -import javax.ws.rs.Path; -import javax.ws.rs.Produces; -import javax.ws.rs.QueryParam; -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.Response; - -/** - * Device Analytics Dashboard related REST-APIs. This can be used to obtain device related analytics. - */ -@SwaggerDefinition( - info = @Info( - version = "1.0.0", - title = "", - extensions = { - @Extension(properties = { - @ExtensionProperty(name = "name", value = "DeviceAnalyticsDashboard"), - @ExtensionProperty(name = "context", value = "/api/device-mgt/v1.0/dashboard"), - }) - } - ), - tags = { - @Tag(name = "device_management", description = "Device Analytics Dashboard related APIs.") - } -) -@Scopes( - scopes = { - @Scope( - name = "Device Count Overview", - description = "Device Count Overview", - key = "perm:dashboard:count-overview", - permissions = {"/device-mgt/dashboard/view"} - ), - @Scope( - name = "Device Counts by Potential Vulnerabilities", - description = "Device Counts by Potential Vulnerabilities", - key = "perm:dashboard:vulnerabilities", - permissions = {"/device-mgt/dashboard/view"} - ), - @Scope( - name = "Get the number of devices that have not complied to a policy", - description = "Get the number of devices that have not complied to a policy", - key = "perm:dashboard:non-compliant", - permissions = {"/device-mgt/dashboard/view"} - ), - @Scope( - name = "Get the number of devices for a given device type, such as connectivity status, " - + "potential vulnerability, platform, and ownership", - description = "Get the number of devices for a given device type, such as connectivity status, " - + "potential vulnerability, platform, and ownership", - key = "perm:dashboard:by-groups", - permissions = {"/device-mgt/dashboard/view"} - ), - @Scope( - name = "Get the number of devices that have not complied to a given policy based on a particular", - description = "Get the number of devices that have not complied to a given policy based on a particular", - key = "perm:dashboard:device-counts", - permissions = {"/device-mgt/dashboard/view"} - ), - @Scope( - name = "Get the number of devices that have not complied to a given policy based on a particular" - + " device type.", - description = "Get the number of devices that have not complied to a given policy based on a " + - "particular device type.", - key = "perm:dashboard:filtered-count", - permissions = {"/device-mgt/dashboard/view"} - ), - @Scope( - name = "Get the number of devices that have not complied to a given policy over the total" - + " number of devices registered with WSO2 EMM.\n", - description = "Get the number of devices that have not complied to a given policy over the total" - + " number of devices registered with WSO2 EMM.\n", - key = "perm:dashboard:non-compliant-count", - permissions = {"/device-mgt/dashboard/view"} - ), - @Scope( - name = "Get device details of devices based on a particular device type.", - description = "Get device details of devices based on a particular device type.", - key = "perm:dashboard:details", - permissions = {"/device-mgt/dashboard/view"} - ), - @Scope( - name = "Get device details of non-compliant devices which do not comply to a given policy.", - description = "Get device details of non-compliant devices which do not comply to a given policy.", - key = "perm:dashboard:feature-non-compliant", - permissions = {"/device-mgt/dashboard/view"} - ) - } -) -@Path("/dashboard") -@Api(value = "Device Analytics Dashboard", - description = "Device Analytics Dashboard related information APIs are described here.") -@Produces(MediaType.APPLICATION_JSON) -@Consumes(MediaType.APPLICATION_JSON) -public interface Dashboard { - - String CONNECTIVITY_STATUS = "connectivity-status"; - String POTENTIAL_VULNERABILITY = "potential-vulnerability"; - String NON_COMPLIANT_FEATURE_CODE = "non-compliant-feature-code"; - String PLATFORM = "platform"; - String OWNERSHIP = "ownership"; - // Constants related to pagination - String PAGINATION_ENABLED = "pagination-enabled"; - String START_INDEX = "start"; - String RESULT_COUNT = "length"; - - @GET - @Path("device-count-overview") - @ApiOperation( - produces = MediaType.APPLICATION_JSON, - httpMethod = "GET", - value = "Get the details of registered devices in WSO2 IoT.", - notes = "Get the details of active, inactive, removed and total number of registered devices in" - + " WSO2 IoT.", - tags = "Dashboard", - extensions = { - @Extension(properties = { - @ExtensionProperty(name = Constants.SCOPE, value = "perm:dashboard:count-overview") - }) - } - ) - @ApiResponses(value = { - @ApiResponse( - code = 200, - message = "OK.", - response = DashboardGadgetDataWrapper.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 has been modified the last time.\n" + - "Used by caches, or in conditional requests."), - }), - @ApiResponse( - code = 304, - message = "Not Modified. \n Empty body because the client has already the latest version of " + - "the requested resource."), - @ApiResponse( - code = 400, - message = "Bad Request. \n Invalid request or validation error.", - response = ErrorResponse.class), - @ApiResponse( - code = 401, - message = "Unauthorized. \n Unauthorized request."), - @ApiResponse( - code = 404, - message = "Not Found.", - response = ErrorResponse.class), - @ApiResponse( - code = 406, - message = "Not Acceptable.\n The requested media type is not supported"), - @ApiResponse( - code = 500, - message = "Internal Server Error. \n ErrorResponse in retrieving requested data.", - response = ErrorResponse.class) - }) - Response getOverviewDeviceCounts(); - - @GET - @Path("device-counts-by-potential-vulnerabilities") - @ApiOperation( - produces = MediaType.APPLICATION_JSON, - httpMethod = "GET", - value = "Get the number of unmonitored and non-compliant devices in WSO2 IoT.", - tags = "Dashboard", - extensions = { - @Extension(properties = { - @ExtensionProperty(name = Constants.SCOPE, value = "perm:dashboard:vulnerabilities") - }) - } - ) - @ApiResponses(value = { - @ApiResponse( - code = 200, - message = "OK.", - response = DashboardGadgetDataWrapper.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 has been modified the last time.\n" + - "Used by caches, or in conditional requests."), - }), - @ApiResponse( - code = 304, - message = "Not Modified. \n Empty body because the client has already the latest version of " + - "the requested resource."), - @ApiResponse( - code = 400, - message = "Bad Request. \n Invalid request or validation error.", - response = ErrorResponse.class), - @ApiResponse( - code = 401, - message = "Unauthorized. \n Unauthorized request."), - @ApiResponse( - code = 404, - message = "Not Found.", - response = ErrorResponse.class), - @ApiResponse( - code = 406, - message = "Not Acceptable.\n The requested media type is not supported"), - @ApiResponse( - code = 500, - message = "Internal Server Error. \n Server error occurred while fetching activity data.", - response = ErrorResponse.class) - }) - Response getDeviceCountsByPotentialVulnerabilities(); - - @GET - @Path("non-compliant-device-counts-by-features") - @ApiOperation( - produces = MediaType.APPLICATION_JSON, - httpMethod = "GET", - value = "Get the number of devices that have not complied to a policy that was enforced on a " - + "device.", - tags = "Dashboard", - extensions = { - @Extension(properties = { - @ExtensionProperty(name = Constants.SCOPE, value = "perm:dashboard:non-compliant") - }) - } - ) - @ApiResponses(value = { - @ApiResponse( - code = 200, - message = "OK.", - response = DashboardPaginationGadgetDataWrapper.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 has been modified the last time.\n" + - "Used by caches, or in conditional requests."), - }), - @ApiResponse( - code = 304, - message = "Not Modified. \n Empty body because the client has already the latest version of " + - "the requested resource."), - @ApiResponse( - code = 400, - message = "Bad Request. \n", - response = ErrorResponse.class), - @ApiResponse( - code = 401, - message = "Unauthorized. \n Unauthorized request."), - @ApiResponse( - code = 404, - message = "Not Found. \n", - response = ErrorResponse.class), - @ApiResponse( - code = 406, - message = "Not Acceptable.\n The requested media type is not supported"), - @ApiResponse( - code = 500, - message = "Internal Server Error. \n ErrorResponse in retrieving requested data.", - response = ErrorResponse.class) - }) - Response getNonCompliantDeviceCountsByFeatures( - @ApiParam( - name = "start", - value = "Provide the starting pagination index. Example 10", - required = true) - @QueryParam(START_INDEX) int startIndex, - @ApiParam( - name = "length", - value = "Provide how many policy details you require from the starting pagination index." - + " For example if you require the non-compliant policy details from the 10th " - + "pagination index to the 15th, you must define 10 as the value for start and " - + "5 as the value for length.", - required = true) - @QueryParam(RESULT_COUNT) int resultCount); - - @GET - @Path("device-counts-by-groups") - @ApiOperation( - produces = MediaType.APPLICATION_JSON, - httpMethod = "GET", - value = "Get the number of devices for a given device type, such as connectivity status, " - + "potential vulnerability, platform, and ownership.\n", - tags = "Dashboard", - extensions = { - @Extension(properties = { - @ExtensionProperty(name = Constants.SCOPE, value = "perm:dashboard:by-groups") - }) - } - ) - @ApiResponses(value = { - @ApiResponse( - code = 200, - message = "OK.", - response = DeviceCountByGroup.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 has been modified the last time.\n" + - "Used by caches, or in conditional requests."), - }), - @ApiResponse( - code = 304, - message = "Not Modified. \n Empty body because the client has already the latest version of " + - "the requested resource."), - @ApiResponse( - code = 400, - message = "Bad Request.", - response = ErrorResponse.class), - @ApiResponse( - code = 401, - message = "Unauthorized. \n Unauthorized request."), - @ApiResponse( - code = 404, - message = "Not Found.", - response = ErrorResponse.class), - @ApiResponse( - code = 406, - message = "Not Acceptable.\n The requested media type is not supported"), - @ApiResponse( - code = 500, - message = "Internal Server Error. \n ErrorResponse in retrieving requested data.", - response = ErrorResponse.class) - }) - Response getDeviceCountsByGroups( - @ApiParam( - name = "connectivity-status", - value = "Provide the connectivity status of the device. The following values can be assigned:\n" - + "active: The devices that are registered with WSO2 IoT and are actively " - + "communicating with the server.\n" - + "inactive: The devices that are registered with WSO2 IoT but unable to " - + "actively communicate with the server.\n" - + "removed: The devices that have unregistered from WSO2 IoT", - required = true) - @QueryParam(CONNECTIVITY_STATUS) String connectivityStatus, - @ApiParam( - name = "potential-vulnerability", - value = "Provide details of the potential vulnerabilities of the device. The following " - + "values can be assigned:\n" - + "non-compliant: Devices that have not complied to the policies enforced on the " - + "device by WSO2 IoT.\n" - + "unmonitored: Devices that have no policy assigned to them.", - required = true) - @QueryParam(POTENTIAL_VULNERABILITY) String potentialVulnerability, - @ApiParam( - name = "platform", - value = "Provide the platform that the device is running on. The following values can " - + "be assigned:\n" - + "iOS\n" + "Android\n" + "Windows", - required = true) - @QueryParam(PLATFORM) String platform, - @ApiParam( - name = "ownership", - value = "Provide the ownership status of the device. The following values can be assigned:\n" - + "BYOD: Bring Your Own Device\n" + "COPE: Corporate-Owned, Personally-Enabled", - required = true) - @QueryParam(OWNERSHIP) String ownership); - - @GET - @Path("feature-non-compliant-device-counts-by-groups") - @ApiOperation( - produces = MediaType.APPLICATION_JSON, - httpMethod = "GET", - value = "Get the number of devices that have not complied to a given policy based on a particular" - + " device type.", - tags = "Dashboard", - extensions = { - @Extension(properties = { - @ExtensionProperty(name = Constants.SCOPE, value = "perm:dashboard:device-counts") - }) - } - ) - @ApiResponses(value = { - @ApiResponse( - code = 200, - message = "OK.", - response = DeviceCountByGroup.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 has been modified the last time.\n" + - "Used by caches, or in conditional requests."), - }), - @ApiResponse( - code = 304, - message = "Not Modified. \n Empty body because the client has already the latest version of " + - "the requested resource."), - @ApiResponse( - code = 400, - message = "Bad Request.", - response = ErrorResponse.class), - @ApiResponse( - code = 401, - message = "Unauthorized. \n Unauthorized request."), - @ApiResponse( - code = 404, - message = "Not Found.", - response = ErrorResponse.class), - @ApiResponse( - code = 406, - message = "Not Acceptable.\n The requested media type is not supported"), - @ApiResponse( - code = 500, - message = "Internal Server Error. \n ErrorResponse in retrieving requested data.", - response = ErrorResponse.class) - }) - Response getFeatureNonCompliantDeviceCountsByGroups( - @ApiParam( - name = "non-compliant-feature-code", - value = "As the value for this parameter, the policy feature code or ID can be used. Some" - + " examples for feature codes are: PASSCODE_POLICY,CAMERA and WIFI.", - required = true) - @QueryParam(NON_COMPLIANT_FEATURE_CODE) String nonCompliantFeatureCode, - @ApiParam( - name = "platform", - value = "Provide the platform that the device is running on. The following values can " - + "be assigned:\n" - + "iOS\n" + "Android\n" + "Windows", - required = false) - @QueryParam(PLATFORM) String platform, - @ApiParam( - name = "ownership", - value = "Provide the ownership status of the device. The following values can be assigned:\n" - + "BYOD: Bring Your Own Device\n" + "COPE: Corporate-Owned, Personally-Enabled", - required = false) - @QueryParam(OWNERSHIP) String ownership); - - @GET - @Path("filtered-device-count-over-total") - @ApiOperation( - produces = MediaType.APPLICATION_JSON, - httpMethod = "GET", - value = "Get the number of devices that are registered with WSO2 IoT filtered by one of the " - + "following attributes:\n" - + "Connectivity status of the device, such as active, inactive or removed.\n" - + "The device ownership type, such as BYOD or COPE.\n" + "The device platform.\n" - + "The potential vulnerabilities faced by the devices.", - tags = "Dashboard", - extensions = { - @Extension(properties = { - @ExtensionProperty(name = Constants.SCOPE, value = "perm:dashboard:filtered-count") - }) - } - ) - @ApiResponses(value = { - @ApiResponse( - code = 200, - message = "OK.", - response = DashboardGadgetDataWrapper.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 has been modified the last time.\n" + - "Used by caches, or in conditional requests."), - }), - @ApiResponse( - code = 304, - message = "Not Modified. \n Empty body because the client has already the latest version of " + - "the requested resource."), - @ApiResponse( - code = 400, - message = "Bad Request.", - response = ErrorResponse.class), - @ApiResponse( - code = 401, - message = "Unauthorized. \n Unauthorized request."), - @ApiResponse( - code = 404, - message = "Not Found.", - response = ErrorResponse.class), - @ApiResponse( - code = 406, - message = "Not Acceptable.\n The requested media type is not supported"), - @ApiResponse( - code = 500, - message = "Internal Server Error. \n ErrorResponse in retrieving requested data.", - response = ErrorResponse.class) - }) - Response getFilteredDeviceCountOverTotal( - @ApiParam( - name = "connectivity-status", - value = "Provide the connectivity status of the device. You can assign any of the values " - + "given below:\n" - + "Total: All the devices that have registered with WSO2 IoT.\n" - + "active: The devices that are registered with WSO2 IoT and are actively " - + "communicating with the server.\n" - + "inactive: The devices that are registered with WSO2 IoT but unable to actively" - + " communicate with the server.\n" - + "removed: The devices that have unregistered from WSO2 IoT.", - required = true) - @QueryParam(CONNECTIVITY_STATUS) String connectivityStatus, - @ApiParam( - name = "potential-vulnerability", - value = "Provide details of the potential vulnerabilities of the device. You can assign" - + " any of the values given below:\n" - + "non-compliant: Devices that have not complied to the policies enforced on the " - + "device by WSO2 IoT.\n" - + "unmonitored: Devices that have no policy assigned to them.", - required = true) - @QueryParam(POTENTIAL_VULNERABILITY) String potentialVulnerability, - @ApiParam( - name = "platform", - value = "Provide the platform that the device is running on. You can assign any of the " - + "values given below:\n" - + "iOS\n" + "Android\n" + "Windows", - required = true) - @QueryParam(PLATFORM) String platform, - @ApiParam( - name = "ownership", - value = "Provide the ownership status of the device. You can assign any of the values " - + "given below:\n" - + "BYOD: Bring Your Own Device\n" + "COPE: Corporate-Owned, Personally-Enabled", - required = true) - @QueryParam(OWNERSHIP) String ownership); - - @GET - @Path("feature-non-compliant-device-count-over-total") - @ApiOperation( - produces = MediaType.APPLICATION_JSON, - httpMethod = "GET", - value = "Get the number of devices that have not complied to a given policy over the total" - + " number of devices registered with WSO2 IoT.\n", - tags = "Dashboard", - extensions = { - @Extension(properties = { - @ExtensionProperty(name = Constants.SCOPE, value = "perm:dashboard:non-compliant-count") - }) - } - ) - @ApiResponses(value = { - @ApiResponse( - code = 200, - message = "OK.", - response = DashboardGadgetDataWrapper.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 has been modified the last time.\n" + - "Used by caches, or in conditional requests."), - }), - @ApiResponse( - code = 304, - message = "Not Modified. \n Empty body because the client has already the latest version of " + - "the requested resource."), - @ApiResponse( - code = 400, - message = "Bad Request.", - response = ErrorResponse.class), - @ApiResponse( - code = 401, - message = "Unauthorized. \n Unauthorized request."), - @ApiResponse( - code = 404, - message = "Not Found.", - response = ErrorResponse.class), - @ApiResponse( - code = 406, - message = "Not Acceptable.\n The requested media type is not supported"), - @ApiResponse( - code = 500, - message = "Internal Server Error. \n ErrorResponse in retrieving requested data.", - response = ErrorResponse.class) - }) - Response getFeatureNonCompliantDeviceCountOverTotal( - @ApiParam( - name = "non-compliant-feature-code", - value = "Provide the feature code or ID of the policy. Some examples for feature codes " - + "are: WIFI, PASSCODE_POLICY, CAMERA and ENCRYPT_STORAGE.", - required = true) - @QueryParam(NON_COMPLIANT_FEATURE_CODE) String nonCompliantFeatureCode, - @ApiParam( - name = "platform", - value = "Provide the platform that the device is running on. You can assign the values " - + "given below:\n" - + "iOS\n" + "Android\n" + "Windows", - required = true) - @QueryParam(PLATFORM) String platform, - @ApiParam( - name = "ownership", - value = "Provide the ownership status of the device. You can assign the values given below:\n" - + "BYOD: Bring Your Own Device\n" + "COPE: Corporate-Owned, Personally-Enabled", - required = true) - @QueryParam(OWNERSHIP) String ownership); - - @GET - @Path("devices-with-details") - @ApiOperation( - produces = MediaType.APPLICATION_JSON, - httpMethod = "GET", - value = "Get device details of devices based on a particular device type.", - tags = "Dashboard", - extensions = { - @Extension(properties = { - @ExtensionProperty(name = Constants.SCOPE, value = "perm:dashboard:details") - }) - } - ) - @ApiResponses(value = { - @ApiResponse( - code = 200, - message = "OK.", - response = DashboardPaginationGadgetDataWrapper.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 has been modified the last time.\n" + - "Used by caches, or in conditional requests."), - }), - @ApiResponse( - code = 304, - message = "Not Modified. \n Empty body because the client has already the latest version of " + - "the requested resource."), - @ApiResponse( - code = 400, - message = "Bad Request.", - response = ErrorResponse.class), - @ApiResponse( - code = 401, - message = "Unauthorized. \n Unauthorized request."), - @ApiResponse( - code = 404, - message = "Not Found.", - response = ErrorResponse.class), - @ApiResponse( - code = 406, - message = "Not Acceptable.\n The requested media type is not supported"), - @ApiResponse( - code = 500, - message = "Internal Server Error. \n ErrorResponse in retrieving requested data.", - response = ErrorResponse.class) - }) - Response getDevicesWithDetails( - @ApiParam( - name = "connectivity-status", - value = "Provide the connectivity status of the device. This can be one of the following:\n" - + "Total: All the devices that have registered with WSO2 IoT.\n" - + "active: The devices that are registered with WSO2 IoT and are actively " - + "communicating with the server.\n" - + "inactive: The devices that are registered with WSO2 IoT but unable to actively" - + " communicate with the server.\n" - + "removed: The devices that have unregistered from WSO2 IoT.", - required = true) - @QueryParam(CONNECTIVITY_STATUS) String connectivityStatus, - @ApiParam( - name = "potential-vulnerability", - value = "Provide details of the potential vulnerabilities of the device. This can be:\n" - + "non-compliant: Devices that have not complied to the policies enforced on " - + "the device by WSO2 IoT.\n" - + "unmonitored: Devices that have no policy assigned to them. ", - required = true) - @QueryParam(POTENTIAL_VULNERABILITY) String potentialVulnerability, - @ApiParam( - name = "platform", - value = "Provide the platform that the device is running on. This can be one of the following:\n" - + "iOS\n" + "Android\n" + "Windows", - required = true) - @QueryParam(PLATFORM) String platform, - @ApiParam( - name = "ownership", - value = "Provide the ownership status of the device. This can be one of the following:\n" - + "BYOD: Bring Your Own Device\n" + "COPE: Corporate-Owned, Personally-Enabled", - required = true) - @QueryParam(OWNERSHIP) String ownership, - @ApiParam( - name = "pagination-enabled", - value = "To enable/disable pagination set the value as true or false", - required = true) - @QueryParam(PAGINATION_ENABLED) String paginationEnabled, - @ApiParam( - name = "start", - value = "Provide the starting pagination index.", - required = true) - @QueryParam(START_INDEX) int startIndex, - @ApiParam( - name = "length", - value = "Provide how many policy details you require from the starting pagination index.", - required = true) - @QueryParam(RESULT_COUNT) int resultCount); - - @GET - @Path("feature-non-compliant-devices-with-details") - @ApiOperation( - produces = MediaType.APPLICATION_JSON, - httpMethod = "GET", - value = "Get device details of non-compliant devices which do not comply to a given policy.", - tags = "Dashboard", - extensions = { - @Extension(properties = { - @ExtensionProperty(name = Constants.SCOPE, value = "perm:dashboard:feature-non-compliant") - }) - } - ) - @ApiResponses(value = { - @ApiResponse( - code = 200, - message = "OK.", - response = DashboardPaginationGadgetDataWrapper.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 has been modified the last time.\n" + - "Used by caches, or in conditional requests."), - }), - @ApiResponse( - code = 304, - message = "Not Modified. \n Empty body because the client has already the latest version of " + - "the requested resource."), - @ApiResponse( - code = 400, - message = "Bad Request.", - response = ErrorResponse.class), - @ApiResponse( - code = 401, - message = "Unauthorized. \n Unauthorized request."), - @ApiResponse( - code = 404, - message = "Not Found.", - response = ErrorResponse.class), - @ApiResponse( - code = 406, - message = "Not Acceptable.\n The requested media type is not supported"), - @ApiResponse( - code = 500, - message = "Internal Server Error. \n ErrorResponse in retrieving requested data.", - response = ErrorResponse.class) - }) - Response getFeatureNonCompliantDevicesWithDetails( - @ApiParam( - name = "non-compliant-feature-code", - value = "Provide the code specific to the feature " - + "(examples for feature codes are: WIFI,PASSCODE_POLICY, CAMERA and ENCRYPT_STORAGE.)", - required = true) - @QueryParam(NON_COMPLIANT_FEATURE_CODE) String nonCompliantFeatureCode, - @ApiParam( - name = "platform", - value = "Provide the platform that the device is running on. This can be one of the following:\n" - + "iOS\n" + "Android\n" + "Windows", - required = true) - @QueryParam(PLATFORM) String platform, - @ApiParam( - name = "ownership", - value = "Provide the ownership status of the device. This can be one of the following:\n" - + "BYOD: Bring Your Own Device\n" + "COPE: Corporate-Owned, Personally-Enabled", - required = true) - @QueryParam(OWNERSHIP) String ownership, - @ApiParam( - name = "pagination-enabled", - value = "To enable/disable pagination set the value as true or false", - required = true) - @QueryParam(PAGINATION_ENABLED) String paginationEnabled, - @ApiParam( - name = "start", - value = "Provide the starting pagination index.", - required = true) - @QueryParam(START_INDEX) int startIndex, - @ApiParam( - name = "length", - value = "Provide how many policy details you require from the starting pagination index.", - required = true) - @QueryParam(RESULT_COUNT) int resultCount); -} diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/DeviceManagementService.java b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/DeviceManagementService.java index 05a22be16d..b655b7b26b 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/DeviceManagementService.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/DeviceManagementService.java @@ -18,32 +18,40 @@ */ package org.wso2.carbon.device.mgt.jaxrs.service.api; -import io.swagger.annotations.SwaggerDefinition; -import io.swagger.annotations.Info; -import io.swagger.annotations.ExtensionProperty; -import io.swagger.annotations.Extension; -import io.swagger.annotations.Tag; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiParam; import io.swagger.annotations.ApiResponse; import io.swagger.annotations.ApiResponses; +import io.swagger.annotations.Extension; +import io.swagger.annotations.ExtensionProperty; +import io.swagger.annotations.Info; import io.swagger.annotations.ResponseHeader; +import io.swagger.annotations.SwaggerDefinition; +import io.swagger.annotations.Tag; 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.Feature; import org.wso2.carbon.device.mgt.common.app.mgt.Application; import org.wso2.carbon.device.mgt.common.operation.mgt.Operation; +import org.wso2.carbon.device.mgt.common.policy.mgt.Policy; +import org.wso2.carbon.device.mgt.common.policy.mgt.monitor.NonComplianceData; import org.wso2.carbon.device.mgt.common.search.SearchContext; 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; -import org.wso2.carbon.device.mgt.common.policy.mgt.Policy; -import org.wso2.carbon.device.mgt.common.policy.mgt.monitor.NonComplianceData; import javax.validation.constraints.Size; -import javax.ws.rs.*; +import javax.ws.rs.Consumes; +import javax.ws.rs.DELETE; +import javax.ws.rs.GET; +import javax.ws.rs.HeaderParam; +import javax.ws.rs.POST; +import javax.ws.rs.Path; +import javax.ws.rs.PathParam; +import javax.ws.rs.Produces; +import javax.ws.rs.QueryParam; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Response; @@ -141,7 +149,7 @@ public interface DeviceManagementService { produces = MediaType.APPLICATION_JSON, httpMethod = "GET", value = "Getting Details of Registered Devices", - notes = "Provides details of all the devices enrolled with WSO2 EMM.", + notes = "Provides details of all the devices enrolled with WSO2 IoT Server.", tags = "Device Management", extensions = { @Extension(properties = { @@ -266,6 +274,71 @@ public interface DeviceManagementService { @QueryParam("limit") int limit); + @GET + @ApiOperation( + produces = MediaType.APPLICATION_JSON, + httpMethod = "GET", + value = "Getting Details of Registered Devices owned by authenticated user", + notes = "Provides details of devices enrolled by authenticated user.", + tags = "Device Management", + extensions = { + @Extension(properties = { + @ExtensionProperty(name = Constants.SCOPE, value = "perm:devices:view") + }) + } + ) + @ApiResponses(value = { + @ApiResponse(code = 200, message = "OK. \n Successfully fetched the list of devices.", + response = DeviceList.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. \n Empty body because the client already has the latest version of " + + "the requested resource.\n"), + @ApiResponse( + code = 400, + message = "The incoming request has more than one selection criteria defined via the query parameters.", + response = ErrorResponse.class), + @ApiResponse( + code = 404, + message = "The search criteria did not match any device registered with the server.", + response = ErrorResponse.class), + @ApiResponse( + code = 406, + message = "Not Acceptable.\n The requested media type is not supported."), + @ApiResponse( + code = 500, + message = "Internal Server Error. \n Server error occurred while fetching the device list.", + response = ErrorResponse.class) + }) + @Path("/user-devices") + Response getDeviceByUser( + @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); @GET @Path("/{type}/{id}") @@ -321,9 +394,8 @@ public interface DeviceManagementService { Response getDevice( @ApiParam( name = "type", - value = "The device type, such as ios, android or windows.", - required = true, - allowableValues = "android, ios, windows") + value = "The device type name, such as ios, android, windows or fire-alarm.", + required = true) @PathParam("type") @Size(max = 45) String type, @@ -556,9 +628,8 @@ public interface DeviceManagementService { Response getFeaturesOfDevice( @ApiParam( name = "type", - value = "The device type, such as ios, android or windows.", - required = true, - allowableValues = "android, ios, windows") + value = "The device type name, such as ios, android, windows or fire-alarm.", + required = true) @PathParam("type") @Size(max = 45) String type, @@ -723,9 +794,8 @@ public interface DeviceManagementService { Response getInstalledApplications( @ApiParam( name = "type", - value = "The device type, such as ios, android or windows.", - required = true, - allowableValues = "android, ios, windows") + value = "The device type name, such as ios, android, windows or fire-alarm.", + required = true) @PathParam("type") @Size(max = 45) String type, @@ -825,9 +895,8 @@ public interface DeviceManagementService { Response getDeviceOperations( @ApiParam( name = "type", - value = "The device type, such as ios, android or windows.", - required = true, - allowableValues = "android, ios, windows") + value = "The device type name, such as ios, android, windows or fire-alarm.", + required = true) @PathParam("type") @Size(max = 45) String type, @@ -936,9 +1005,8 @@ public interface DeviceManagementService { Response getEffectivePolicyOfDevice( @ApiParam( name = "type", - value = "The device type, such as ios, android or windows.", - required = true, - allowableValues = "android, ios, windows") + value = "The device type name, such as ios, android, windows or fire-alarm.", + required = true) @PathParam("type") @Size(max = 45) String type, diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/DeviceTypeManagementService.java b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/DeviceTypeManagementService.java index 83566b6f12..b71c918fca 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/DeviceTypeManagementService.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/DeviceTypeManagementService.java @@ -192,9 +192,8 @@ public interface DeviceTypeManagementService { Response getFeatures( @ApiParam( name = "type", - value = "The device type, such as ios, android or windows.", - required = true, - allowableValues = "android, ios, windows") + value = "The device type name, such as ios, android, windows or fire-alarm.", + required = true) @PathParam("type") @Size(max = 45) String type, diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/GroupManagementService.java b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/GroupManagementService.java index 51a6dae87c..a815304fb0 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/GroupManagementService.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/GroupManagementService.java @@ -204,10 +204,6 @@ public interface GroupManagementService { code = 304, message = "Not Modified. \n Empty body because the client has already the latest version of " + "the requested resource."), - @ApiResponse( - code = 404, - message = "No groups found.", - response = ErrorResponse.class), @ApiResponse( code = 406, message = "Not Acceptable.\n The requested media type is not supported."), @@ -219,19 +215,25 @@ public interface GroupManagementService { Response getGroups(@ApiParam( name = "name", value = "Name of the group.") - @QueryParam("name") String name, + @QueryParam("name") + String name, @ApiParam( name = "owner", value = "Owner of the group.") - @QueryParam("owner") String owner, + @QueryParam("owner") + String owner, @ApiParam( name = "offset", - value = "Starting point within the complete list of items qualified.") - @QueryParam("offset") int offset, + value = "The starting pagination index for the complete list of qualified items.", + defaultValue = "0") + @QueryParam("offset") + int offset, @ApiParam( name = "limit", - value = "Maximum size of resource array to return.") - @QueryParam("limit") int limit); + value = "Provide how many device details you require from the starting pagination index/offset.", + defaultValue = "5") + @QueryParam("limit") + int limit); @Path("/count") @GET @@ -268,10 +270,6 @@ public interface GroupManagementService { code = 304, message = "Not Modified. \n Empty body because the client has already the latest version of " + "the requested resource."), - @ApiResponse( - code = 404, - message = "No groups found.", - response = ErrorResponse.class), @ApiResponse( code = 406, message = "Not Acceptable.\n The requested media type is not supported."), @@ -383,7 +381,7 @@ public interface GroupManagementService { "the requested resource."), @ApiResponse( code = 404, - message = "No groups found.", + message = "Group found.", response = ErrorResponse.class), @ApiResponse( code = 406, @@ -435,7 +433,7 @@ public interface GroupManagementService { "the requested resource."), @ApiResponse( code = 404, - message = "No groups found.", + message = "Group not found.", response = ErrorResponse.class), @ApiResponse( code = 406, @@ -492,7 +490,7 @@ public interface GroupManagementService { "the requested resource."), @ApiResponse( code = 404, - message = "No groups found.", + message = "Group not found.", response = ErrorResponse.class), @ApiResponse( code = 406, @@ -544,7 +542,7 @@ public interface GroupManagementService { "the requested resource."), @ApiResponse( code = 404, - message = "No groups found.", + message = "Group not found.", response = ErrorResponse.class), @ApiResponse( code = 406, @@ -601,7 +599,7 @@ public interface GroupManagementService { "the requested resource."), @ApiResponse( code = 404, - message = "No groups found.", + message = "Group not found.", response = ErrorResponse.class), @ApiResponse( code = 406, @@ -653,7 +651,7 @@ public interface GroupManagementService { "the requested resource."), @ApiResponse( code = 404, - message = "No groups found.", + message = "Group not found.", response = ErrorResponse.class), @ApiResponse( code = 406, @@ -667,15 +665,20 @@ public interface GroupManagementService { name = "groupId", value = "ID of the group.", required = true) - @PathParam("groupId") int groupId, + @PathParam("groupId") + int groupId, @ApiParam( name = "offset", - value = "Starting point within the complete list of items qualified.") - @QueryParam("offset") int offset, + value = "The starting pagination index for the complete list of qualified items.", + defaultValue = "0") + @QueryParam("offset") + int offset, @ApiParam( name = "limit", - value = "Maximum size of resource array to return.") - @QueryParam("limit") int limit); + value = "Provide how many device details you require from the starting pagination index/offset.", + defaultValue = "5") + @QueryParam("limit") + int limit); @Path("/id/{groupId}/devices/count") @GET @@ -926,10 +929,6 @@ public interface GroupManagementService { code = 304, message = "Not Modified. \n Empty body because the client has already the latest version of " + "the requested resource."), - @ApiResponse( - code = 404, - message = "No groups found.", - response = ErrorResponse.class), @ApiResponse( code = 406, message = "Not Acceptable.\n The requested media type is not supported."), @@ -941,11 +940,15 @@ public interface GroupManagementService { Response getGroups( @ApiParam( name = "deviceId", - value = "Id of the device.") - @QueryParam("deviceId") String deviceId, + value = "Id of the device.", + required = true) + @QueryParam("deviceId") + String deviceId, @ApiParam( name = "deviceType", - value = "Type of the device.") - @QueryParam("deviceType") String deviceType); + value = "Type of the device.", + required = true) + @QueryParam("deviceType") + String deviceType); } diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/PolicyManagementService.java b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/PolicyManagementService.java index 8656456f1f..ed49af08cc 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/PolicyManagementService.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/PolicyManagementService.java @@ -672,9 +672,8 @@ public interface PolicyManagementService { Response getEffectivePolicy( @ApiParam( name = "deviceType", - value = "The device type, such as ios, android or windows.", - required = true, - allowableValues = "android, ios, windows") + value = "The device type name, such as ios, android, windows or fire-alarm.", + required = true) @PathParam("deviceType") @Size(max = 45) String deviceType, 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 14a34d3520..0ac0677151 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 @@ -136,9 +136,8 @@ public interface DeviceManagementAdminService { String name, @ApiParam( name = "type", - value = "The type of the device, such as android, ios or windows.", - required = true, - allowableValues = "android, ios, windows") + value = "The device type name, such as ios, android, windows or fire-alarm.", + required = true) @QueryParam("type") @Size(min = 2, max = 45) String type, diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/admin/GroupManagementAdminService.java b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/admin/GroupManagementAdminService.java index 64020ce56e..3e47728c3d 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/admin/GroupManagementAdminService.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/admin/GroupManagementAdminService.java @@ -113,10 +113,6 @@ public interface GroupManagementAdminService { code = 304, message = "Not Modified. \n Empty body because the client has already the latest version of " + "the requested resource."), - @ApiResponse( - code = 404, - message = "No groups found.", - response = ErrorResponse.class), @ApiResponse( code = 406, message = "Not Acceptable.\n The requested media type is not supported."), @@ -128,19 +124,25 @@ public interface GroupManagementAdminService { Response getGroups(@ApiParam( name = "name", value = "Name of the group.") - @QueryParam("name") String name, + @QueryParam("name") + String name, @ApiParam( name = "owner", value = "Owner of the group.") - @QueryParam("owner") String owner, + @QueryParam("owner") + String owner, @ApiParam( name = "offset", - value = "Starting point within the complete list of items qualified.") - @QueryParam("offset") int offset, + value = "The starting pagination index for the complete list of qualified items.", + defaultValue = "0") + @QueryParam("offset") + int offset, @ApiParam( name = "limit", - value = "Maximum size of resource array to return.") - @QueryParam("limit") int limit); + value = "Provide how many device details you require from the starting pagination index/offset.", + defaultValue = "5") + @QueryParam("limit") + int limit); @Path("/count") @GET diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/DashboardImpl.java b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/DashboardImpl.java deleted file mode 100644 index c6940599ed..0000000000 --- a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/DashboardImpl.java +++ /dev/null @@ -1,706 +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. - */ - -package org.wso2.carbon.device.mgt.jaxrs.service.impl; - -import org.apache.commons.httpclient.HttpStatus; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; -import org.wso2.carbon.device.mgt.analytics.dashboard.GadgetDataService; -import org.wso2.carbon.device.mgt.analytics.dashboard.bean.BasicFilterSet; -import org.wso2.carbon.device.mgt.analytics.dashboard.bean.DeviceCountByGroup; -import org.wso2.carbon.device.mgt.analytics.dashboard.bean.DeviceWithDetails; -import org.wso2.carbon.device.mgt.analytics.dashboard.bean.ExtendedFilterSet; -import org.wso2.carbon.device.mgt.analytics.dashboard.exception.*; -import org.wso2.carbon.device.mgt.common.PaginationResult; -import org.wso2.carbon.device.mgt.jaxrs.util.DeviceMgtAPIUtils; -import org.wso2.carbon.device.mgt.jaxrs.beans.DashboardGadgetDataWrapper; -import org.wso2.carbon.device.mgt.jaxrs.beans.DashboardPaginationGadgetDataWrapper; -import org.wso2.carbon.device.mgt.jaxrs.service.api.Dashboard; - -import javax.ws.rs.*; -import javax.ws.rs.core.Response; -import java.util.ArrayList; -import java.util.List; - -import static org.wso2.carbon.device.mgt.analytics.dashboard.util.APIUtil.getAuthenticatedUser; - -/** - * This class consists of dashboard related REST APIs - * to be consumed by individual client gadgets such as - * [1] Overview of Devices, - * [2] Potential Vulnerabilities, - * [3] Non-compliant Devices by Features, - * [4] Device Groupings and etc. - */ - -@Consumes({"application/json"}) -@Produces({"application/json"}) - -@SuppressWarnings("NonJaxWsWebServices") -public class DashboardImpl implements Dashboard { - - private static Log log = LogFactory.getLog(DashboardImpl.class); - - private static final String FLAG_TRUE = "true"; - private static final String FLAG_FALSE = "false"; - // Constants related to common error-response messages - private static final String INVALID_QUERY_PARAM_VALUE_POTENTIAL_VULNERABILITY = "Received an invalid value for " + - "query parameter : " + POTENTIAL_VULNERABILITY + ", Should be either NON_COMPLIANT or UNMONITORED."; - private static final String INVALID_QUERY_PARAM_VALUE_START_INDEX = "Received an invalid value for " + - "query parameter : " + START_INDEX + ", Should not be lesser than 0."; - private static final String INVALID_QUERY_PARAM_VALUE_RESULT_COUNT = "Received an invalid value for " + - "query parameter : " + RESULT_COUNT + ", Should not be lesser than 5."; - private static final String INVALID_QUERY_PARAM_VALUE_PAGINATION_ENABLED = "Received an invalid value for " + - "query parameter : " + PAGINATION_ENABLED + ", Should be either true or false."; - private static final String REQUIRED_QUERY_PARAM_VALUE_NON_COMPLIANT_FEATURE_CODE = "Missing required query " + - "parameter : " + NON_COMPLIANT_FEATURE_CODE; - private static final String REQUIRED_QUERY_PARAM_VALUE_PAGINATION_ENABLED = "Missing required query " + - "parameter : " + PAGINATION_ENABLED; - private static final String ERROR_IN_RETRIEVING_REQUESTED_DATA = "ErrorResponse in retrieving requested data."; - - @GET - @Path("device-count-overview") - public Response getOverviewDeviceCounts() { - GadgetDataService gadgetDataService = DeviceMgtAPIUtils.getGadgetDataService(); - - DashboardGadgetDataWrapper dashboardGadgetDataWrapper1 = new DashboardGadgetDataWrapper(); - - // getting total device count - DeviceCountByGroup totalDeviceCount; - try { - String userName = getAuthenticatedUser(); - totalDeviceCount = gadgetDataService.getTotalDeviceCount(userName); - } catch (DataAccessLayerException e) { - log.error("An internal error occurred while trying to execute relevant data service function " + - "@ Dashboard API layer to retrieve total device count.", e); - return Response.status(HttpStatus.SC_INTERNAL_SERVER_ERROR). - entity(ERROR_IN_RETRIEVING_REQUESTED_DATA).build(); - } - - List totalDeviceCountInListEntry = new ArrayList<>(); - totalDeviceCountInListEntry.add(totalDeviceCount); - - dashboardGadgetDataWrapper1.setContext("Total-device-count"); - dashboardGadgetDataWrapper1.setGroupingAttribute(null); - dashboardGadgetDataWrapper1.setData(totalDeviceCountInListEntry); - - // getting device counts by connectivity statuses - List deviceCountsByConnectivityStatuses; - try { - String userName = getAuthenticatedUser(); - deviceCountsByConnectivityStatuses = gadgetDataService.getDeviceCountsByConnectivityStatuses(userName); - } catch (DataAccessLayerException e) { - log.error("An internal error occurred while trying to execute relevant data service function " + - "@ Dashboard API layer to retrieve device counts by connectivity statuses.", e); - return Response.status(HttpStatus.SC_INTERNAL_SERVER_ERROR). - entity(ERROR_IN_RETRIEVING_REQUESTED_DATA).build(); - } - - DashboardGadgetDataWrapper dashboardGadgetDataWrapper2 = new DashboardGadgetDataWrapper(); - - dashboardGadgetDataWrapper2.setContext("Device-counts-by-connectivity-statuses"); - dashboardGadgetDataWrapper2.setGroupingAttribute(CONNECTIVITY_STATUS); - dashboardGadgetDataWrapper2.setData(deviceCountsByConnectivityStatuses); - - List responsePayload = new ArrayList<>(); - responsePayload.add(dashboardGadgetDataWrapper1); - responsePayload.add(dashboardGadgetDataWrapper2); - - return Response.status(HttpStatus.SC_OK).entity(responsePayload).build(); - } - - @GET - @Path("device-counts-by-potential-vulnerabilities") - public Response getDeviceCountsByPotentialVulnerabilities() { - GadgetDataService gadgetDataService = DeviceMgtAPIUtils.getGadgetDataService(); - - List deviceCountsByPotentialVulnerabilities; - try { - String userName = getAuthenticatedUser(); - deviceCountsByPotentialVulnerabilities = gadgetDataService.getDeviceCountsByPotentialVulnerabilities(userName); - } catch (DataAccessLayerException e) { - log.error("An internal error occurred while trying to execute relevant data service function " + - "@ Dashboard API layer to retrieve device counts by potential vulnerabilities.", e); - return Response.status(HttpStatus.SC_INTERNAL_SERVER_ERROR). - entity(ERROR_IN_RETRIEVING_REQUESTED_DATA).build(); - } - - DashboardGadgetDataWrapper dashboardGadgetDataWrapper = new DashboardGadgetDataWrapper(); - dashboardGadgetDataWrapper.setContext("Device-counts-by-potential-vulnerabilities"); - dashboardGadgetDataWrapper.setGroupingAttribute(POTENTIAL_VULNERABILITY); - dashboardGadgetDataWrapper.setData(deviceCountsByPotentialVulnerabilities); - - List responsePayload = new ArrayList<>(); - responsePayload.add(dashboardGadgetDataWrapper); - - return Response.status(HttpStatus.SC_OK).entity(responsePayload).build(); - } - - @GET - @Path("non-compliant-device-counts-by-features") - public Response getNonCompliantDeviceCountsByFeatures(@QueryParam(START_INDEX) int startIndex, - @QueryParam(RESULT_COUNT) int resultCount) { - - GadgetDataService gadgetDataService = DeviceMgtAPIUtils.getGadgetDataService(); - DashboardPaginationGadgetDataWrapper - dashboardPaginationGadgetDataWrapper = new DashboardPaginationGadgetDataWrapper(); - - PaginationResult paginationResult; - try { - String userName = getAuthenticatedUser(); - paginationResult = gadgetDataService. - getNonCompliantDeviceCountsByFeatures(startIndex, resultCount, userName); - } catch (InvalidStartIndexValueException e) { - log.error("Bad request and error occurred @ Gadget Data Service layer due to " + - "invalid (query) parameter value. This was while trying to execute relevant data service " + - "function @ Dashboard API layer to retrieve a non-compliant set " + - "of device counts by features.", e); - return Response.status(HttpStatus.SC_BAD_REQUEST).entity(INVALID_QUERY_PARAM_VALUE_START_INDEX).build(); - } catch (InvalidResultCountValueException e) { - log.error("Bad request and error occurred @ Gadget Data Service layer due to " + - "invalid (query) parameter value. This was while trying to execute relevant data service " + - "function @ Dashboard API layer to retrieve a non-compliant set " + - "of device counts by features.", e); - return Response.status(HttpStatus.SC_BAD_REQUEST).entity(INVALID_QUERY_PARAM_VALUE_RESULT_COUNT).build(); - } catch (DataAccessLayerException e) { - log.error("An internal error occurred while trying to execute relevant data service function " + - "@ Dashboard API layer to retrieve a non-compliant set of device counts by features.", e); - return Response.status(HttpStatus.SC_INTERNAL_SERVER_ERROR). - entity(ERROR_IN_RETRIEVING_REQUESTED_DATA).build(); - } - - dashboardPaginationGadgetDataWrapper.setContext("Non-compliant-device-counts-by-features"); - dashboardPaginationGadgetDataWrapper.setGroupingAttribute(NON_COMPLIANT_FEATURE_CODE); - dashboardPaginationGadgetDataWrapper.setData(paginationResult.getData()); - dashboardPaginationGadgetDataWrapper.setTotalRecordCount(paginationResult.getRecordsTotal()); - - List responsePayload = new ArrayList<>(); - responsePayload.add(dashboardPaginationGadgetDataWrapper); - - return Response.status(HttpStatus.SC_OK).entity(responsePayload).build(); - } - - @GET - @Path("device-counts-by-groups") - public Response getDeviceCountsByGroups(@QueryParam(CONNECTIVITY_STATUS) String connectivityStatus, - @QueryParam(POTENTIAL_VULNERABILITY) String potentialVulnerability, - @QueryParam(PLATFORM) String platform, - @QueryParam(OWNERSHIP) String ownership) { - - // getting gadget data service - GadgetDataService gadgetDataService = DeviceMgtAPIUtils.getGadgetDataService(); - - // constructing filter set - ExtendedFilterSet filterSet = new ExtendedFilterSet(); - filterSet.setConnectivityStatus(connectivityStatus); - filterSet.setPotentialVulnerability(potentialVulnerability); - filterSet.setPlatform(platform); - filterSet.setOwnership(ownership); - - // creating device-Counts-by-platforms Data Wrapper - List deviceCountsByPlatforms; - try { - String userName = getAuthenticatedUser(); - deviceCountsByPlatforms = gadgetDataService.getDeviceCountsByPlatforms(filterSet, userName); - } catch (InvalidPotentialVulnerabilityValueException e) { - log.error("Bad request and error occurred @ Gadget Data Service layer due to " + - "invalid (query) parameter value. This was while trying to execute relevant data service " + - "function @ Dashboard API layer to retrieve a filtered set of device counts by platforms.", e); - return Response.status(HttpStatus.SC_BAD_REQUEST). - entity(INVALID_QUERY_PARAM_VALUE_POTENTIAL_VULNERABILITY).build(); - } catch (DataAccessLayerException e) { - log.error("An internal error occurred while trying to execute relevant data service function " + - "@ Dashboard API layer to retrieve a filtered set of device counts by platforms.", e); - return Response.status(HttpStatus.SC_INTERNAL_SERVER_ERROR). - entity(ERROR_IN_RETRIEVING_REQUESTED_DATA).build(); - } - - DashboardGadgetDataWrapper dashboardGadgetDataWrapper1 = new DashboardGadgetDataWrapper(); - dashboardGadgetDataWrapper1.setContext("Device-counts-by-platforms"); - dashboardGadgetDataWrapper1.setGroupingAttribute(PLATFORM); - dashboardGadgetDataWrapper1.setData(deviceCountsByPlatforms); - - // creating device-Counts-by-ownership-types Data Wrapper - List deviceCountsByOwnerships; - try { - String userName = getAuthenticatedUser(); - deviceCountsByOwnerships = gadgetDataService.getDeviceCountsByOwnershipTypes(filterSet, userName); - } catch (InvalidPotentialVulnerabilityValueException e) { - log.error("Bad request and error occurred @ Gadget Data Service layer due to " + - "invalid (query) parameter value. This was while trying to execute relevant data service " + - "function @ Dashboard API layer to retrieve a filtered set of device counts by ownerships.", e); - return Response.status(HttpStatus.SC_BAD_REQUEST). - entity(INVALID_QUERY_PARAM_VALUE_POTENTIAL_VULNERABILITY).build(); - } catch (DataAccessLayerException e) { - log.error("An internal error occurred while trying to execute relevant data service function " + - "@ Dashboard API layer to retrieve a filtered set of device counts by ownerships.", e); - return Response.status(HttpStatus.SC_INTERNAL_SERVER_ERROR). - entity(ERROR_IN_RETRIEVING_REQUESTED_DATA).build(); - } - - DashboardGadgetDataWrapper dashboardGadgetDataWrapper2 = new DashboardGadgetDataWrapper(); - dashboardGadgetDataWrapper2.setContext("Device-counts-by-ownerships"); - dashboardGadgetDataWrapper2.setGroupingAttribute(OWNERSHIP); - dashboardGadgetDataWrapper2.setData(deviceCountsByOwnerships); - - List responsePayload = new ArrayList<>(); - responsePayload.add(dashboardGadgetDataWrapper1); - responsePayload.add(dashboardGadgetDataWrapper2); - - return Response.status(HttpStatus.SC_OK).entity(responsePayload).build(); - } - - @GET - @Path("feature-non-compliant-device-counts-by-groups") - public Response getFeatureNonCompliantDeviceCountsByGroups(@QueryParam(NON_COMPLIANT_FEATURE_CODE) String nonCompliantFeatureCode, - @QueryParam(PLATFORM) String platform, - @QueryParam(OWNERSHIP) String ownership) { - // getting gadget data service - GadgetDataService gadgetDataService = DeviceMgtAPIUtils.getGadgetDataService(); - - // constructing filter set - BasicFilterSet filterSet = new BasicFilterSet(); - filterSet.setPlatform(platform); - filterSet.setOwnership(ownership); - - // creating feature-non-compliant-device-Counts-by-platforms Data Wrapper - List featureNonCompliantDeviceCountsByPlatforms; - try { - String userName = getAuthenticatedUser(); - featureNonCompliantDeviceCountsByPlatforms = gadgetDataService. - getFeatureNonCompliantDeviceCountsByPlatforms(nonCompliantFeatureCode, filterSet, userName); - } catch (InvalidFeatureCodeValueException e) { - log.error("Bad request and error occurred @ Gadget Data Service layer due to " + - "invalid (query) parameter value. This was while trying to execute relevant data service " + - "function @ Dashboard API layer to retrieve a filtered set of feature " + - "non-compliant device counts by platforms.", e); - return Response.status(HttpStatus.SC_BAD_REQUEST). - entity(REQUIRED_QUERY_PARAM_VALUE_NON_COMPLIANT_FEATURE_CODE).build(); - } catch (DataAccessLayerException e) { - log.error("An internal error occurred while trying to execute relevant data service function " + - "@ Dashboard API layer to retrieve a filtered set of feature non-compliant " + - "device counts by platforms.", e); - return Response.status(HttpStatus.SC_INTERNAL_SERVER_ERROR). - entity(ERROR_IN_RETRIEVING_REQUESTED_DATA).build(); - } - - DashboardGadgetDataWrapper dashboardGadgetDataWrapper1 = new DashboardGadgetDataWrapper(); - dashboardGadgetDataWrapper1.setContext("Feature-non-compliant-device-counts-by-platforms"); - dashboardGadgetDataWrapper1.setGroupingAttribute(PLATFORM); - dashboardGadgetDataWrapper1.setData(featureNonCompliantDeviceCountsByPlatforms); - - // creating feature-non-compliant-device-Counts-by-ownership-types Data Wrapper - List featureNonCompliantDeviceCountsByOwnerships; - try { - String userName = getAuthenticatedUser(); - featureNonCompliantDeviceCountsByOwnerships = gadgetDataService. - getFeatureNonCompliantDeviceCountsByOwnershipTypes(nonCompliantFeatureCode, filterSet, userName); - } catch (InvalidFeatureCodeValueException e) { - log.error("Bad request and error occurred @ Gadget Data Service layer due to " + - "invalid (query) parameter value. This was while trying to execute relevant data service function " + - "@ Dashboard API layer to retrieve a filtered set of feature " + - "non-compliant device counts by ownerships.", e); - return Response.status(HttpStatus.SC_BAD_REQUEST). - entity(REQUIRED_QUERY_PARAM_VALUE_NON_COMPLIANT_FEATURE_CODE).build(); - } catch (DataAccessLayerException e) { - log.error("An internal error occurred while trying to execute relevant data service function " + - "@ Dashboard API layer to retrieve a filtered set of feature non-compliant " + - "device counts by ownerships.", e); - return Response.status(HttpStatus.SC_INTERNAL_SERVER_ERROR). - entity(ERROR_IN_RETRIEVING_REQUESTED_DATA).build(); - } - - DashboardGadgetDataWrapper dashboardGadgetDataWrapper2 = new DashboardGadgetDataWrapper(); - dashboardGadgetDataWrapper2.setContext("Feature-non-compliant-device-counts-by-ownerships"); - dashboardGadgetDataWrapper2.setGroupingAttribute(OWNERSHIP); - dashboardGadgetDataWrapper2.setData(featureNonCompliantDeviceCountsByOwnerships); - - List responsePayload = new ArrayList<>(); - responsePayload.add(dashboardGadgetDataWrapper1); - responsePayload.add(dashboardGadgetDataWrapper2); - - return Response.status(HttpStatus.SC_OK).entity(responsePayload).build(); - } - - @GET - @Path("filtered-device-count-over-total") - public Response getFilteredDeviceCountOverTotal(@QueryParam(CONNECTIVITY_STATUS) String connectivityStatus, - @QueryParam(POTENTIAL_VULNERABILITY) String potentialVulnerability, - @QueryParam(PLATFORM) String platform, - @QueryParam(OWNERSHIP) String ownership) { - - // getting gadget data service - GadgetDataService gadgetDataService = DeviceMgtAPIUtils.getGadgetDataService(); - - // constructing filter set - ExtendedFilterSet filterSet = new ExtendedFilterSet(); - filterSet.setConnectivityStatus(connectivityStatus); - filterSet.setPotentialVulnerability(potentialVulnerability); - filterSet.setPlatform(platform); - filterSet.setOwnership(ownership); - - // creating filteredDeviceCount Data Wrapper - DeviceCountByGroup filteredDeviceCount; - try { - String userName = getAuthenticatedUser(); - filteredDeviceCount = gadgetDataService.getDeviceCount(filterSet, userName); - } catch (InvalidPotentialVulnerabilityValueException e) { - log.error("Bad request and error occurred @ Gadget Data Service layer due to " + - "invalid (query) parameter value. This was while trying to execute relevant data service " + - "function @ Dashboard API layer to retrieve a filtered device count over the total.", e); - return Response.status(HttpStatus.SC_BAD_REQUEST). - entity(INVALID_QUERY_PARAM_VALUE_POTENTIAL_VULNERABILITY).build(); - } catch (DataAccessLayerException e) { - log.error("An internal error occurred while trying to execute relevant data service function " + - "@ Dashboard API layer to retrieve a filtered device count over the total.", e); - return Response.status(HttpStatus.SC_INTERNAL_SERVER_ERROR). - entity(ERROR_IN_RETRIEVING_REQUESTED_DATA).build(); - } - - // creating TotalDeviceCount Data Wrapper - DeviceCountByGroup totalDeviceCount; - try { - String userName = getAuthenticatedUser(); - totalDeviceCount = gadgetDataService.getTotalDeviceCount(userName); - } catch (DataAccessLayerException e) { - log.error("An internal error occurred while trying to execute relevant data service function " + - "@ Dashboard API layer to retrieve the total device count over filtered.", e); - return Response.status(HttpStatus.SC_INTERNAL_SERVER_ERROR). - entity(ERROR_IN_RETRIEVING_REQUESTED_DATA).build(); - } - - List filteredDeviceCountOverTotalDataWrapper = new ArrayList<>(); - filteredDeviceCountOverTotalDataWrapper.add(filteredDeviceCount); - filteredDeviceCountOverTotalDataWrapper.add(totalDeviceCount); - - DashboardGadgetDataWrapper dashboardGadgetDataWrapper = new DashboardGadgetDataWrapper(); - dashboardGadgetDataWrapper.setContext("Filtered-device-count-over-total"); - dashboardGadgetDataWrapper.setGroupingAttribute(null); - dashboardGadgetDataWrapper.setData(filteredDeviceCountOverTotalDataWrapper); - - List responsePayload = new ArrayList<>(); - responsePayload.add(dashboardGadgetDataWrapper); - - return Response.status(HttpStatus.SC_OK).entity(responsePayload).build(); - } - - @GET - @Path("feature-non-compliant-device-count-over-total") - public Response getFeatureNonCompliantDeviceCountOverTotal(@QueryParam(NON_COMPLIANT_FEATURE_CODE) String nonCompliantFeatureCode, - @QueryParam(PLATFORM) String platform, - @QueryParam(OWNERSHIP) String ownership) { - - // getting gadget data service - GadgetDataService gadgetDataService = DeviceMgtAPIUtils.getGadgetDataService(); - - // constructing filter set - BasicFilterSet filterSet = new BasicFilterSet(); - filterSet.setPlatform(platform); - filterSet.setOwnership(ownership); - - // creating featureNonCompliantDeviceCount Data Wrapper - DeviceCountByGroup featureNonCompliantDeviceCount; - try { - String userName = getAuthenticatedUser(); - featureNonCompliantDeviceCount = gadgetDataService. - getFeatureNonCompliantDeviceCount(nonCompliantFeatureCode, filterSet, userName); - } catch (InvalidFeatureCodeValueException e) { - log.error("Bad request and error occurred @ Gadget Data Service layer due to " + - "invalid (query) parameter value. This was while trying to execute relevant data service function " + - "@ Dashboard API layer to retrieve a feature non-compliant device count over the total.", e); - return Response.status(HttpStatus.SC_BAD_REQUEST). - entity(REQUIRED_QUERY_PARAM_VALUE_NON_COMPLIANT_FEATURE_CODE).build(); - } catch (DataAccessLayerException e) { - log.error("An internal error occurred while trying to execute relevant data service function " + - "@ Dashboard API layer to retrieve a feature non-compliant device count over the total.", e); - return Response.status(HttpStatus.SC_INTERNAL_SERVER_ERROR). - entity(ERROR_IN_RETRIEVING_REQUESTED_DATA).build(); - } - - // creating TotalDeviceCount Data Wrapper - DeviceCountByGroup totalDeviceCount; - try { - String userName = getAuthenticatedUser(); - totalDeviceCount = gadgetDataService.getTotalDeviceCount(userName); - } catch (DataAccessLayerException e) { - log.error("An internal error occurred while trying to execute relevant data service function " + - "@ Dashboard API layer to retrieve the total device count over filtered feature non-compliant.", e); - return Response.status(HttpStatus.SC_INTERNAL_SERVER_ERROR). - entity(ERROR_IN_RETRIEVING_REQUESTED_DATA).build(); - } - - List featureNonCompliantDeviceCountOverTotalDataWrapper = new ArrayList<>(); - featureNonCompliantDeviceCountOverTotalDataWrapper.add(featureNonCompliantDeviceCount); - featureNonCompliantDeviceCountOverTotalDataWrapper.add(totalDeviceCount); - - DashboardGadgetDataWrapper dashboardGadgetDataWrapper = new DashboardGadgetDataWrapper(); - dashboardGadgetDataWrapper.setContext("Feature-non-compliant-device-count-over-total"); - dashboardGadgetDataWrapper.setGroupingAttribute(null); - dashboardGadgetDataWrapper.setData(featureNonCompliantDeviceCountOverTotalDataWrapper); - - List responsePayload = new ArrayList<>(); - responsePayload.add(dashboardGadgetDataWrapper); - - return Response.status(HttpStatus.SC_OK).entity(responsePayload).build(); - } - - @GET - @Path("devices-with-details") - public Response getDevicesWithDetails(@QueryParam(CONNECTIVITY_STATUS) String connectivityStatus, - @QueryParam(POTENTIAL_VULNERABILITY) String potentialVulnerability, - @QueryParam(PLATFORM) String platform, - @QueryParam(OWNERSHIP) String ownership, - @QueryParam(PAGINATION_ENABLED) String paginationEnabled, - @QueryParam(START_INDEX) int startIndex, - @QueryParam(RESULT_COUNT) int resultCount) { - - if (paginationEnabled == null) { - - log.error("Bad request on retrieving a filtered set of devices with details @ " + - "Dashboard API layer. " + REQUIRED_QUERY_PARAM_VALUE_PAGINATION_ENABLED); - return Response.status(HttpStatus.SC_BAD_REQUEST). - entity(REQUIRED_QUERY_PARAM_VALUE_PAGINATION_ENABLED).build(); - - } else if (FLAG_TRUE.equals(paginationEnabled)) { - - // getting gadget data service - GadgetDataService gadgetDataService = DeviceMgtAPIUtils.getGadgetDataService(); - - // constructing filter set - ExtendedFilterSet filterSet = new ExtendedFilterSet(); - filterSet.setConnectivityStatus(connectivityStatus); - filterSet.setPotentialVulnerability(potentialVulnerability); - filterSet.setPlatform(platform); - filterSet.setOwnership(ownership); - - PaginationResult paginationResult; - try { - String userName = getAuthenticatedUser(); - paginationResult = gadgetDataService. - getDevicesWithDetails(filterSet, startIndex, resultCount, userName); - } catch (InvalidPotentialVulnerabilityValueException e) { - log.error("Bad request and error occurred @ Gadget Data Service layer due to " + - "invalid (query) parameter value. This was while trying to execute relevant data service " + - "function @ Dashboard API layer to retrieve a filtered set of devices with details.", e); - return Response.status(HttpStatus.SC_BAD_REQUEST). - entity(INVALID_QUERY_PARAM_VALUE_POTENTIAL_VULNERABILITY).build(); - } catch (InvalidStartIndexValueException e) { - log.error("Bad request and error occurred @ Gadget Data Service layer due to " + - "invalid (query) parameter value. This was while trying to execute relevant data service " + - "function @ Dashboard API layer to retrieve a filtered set of devices with details.", e); - return Response.status(HttpStatus.SC_BAD_REQUEST). - entity(INVALID_QUERY_PARAM_VALUE_START_INDEX).build(); - } catch (InvalidResultCountValueException e) { - log.error("Bad request and error occurred @ Gadget Data Service layer due to " + - "invalid (query) parameter value. This was while trying to execute relevant data service " + - "function @ Dashboard API layer to retrieve a filtered set of devices with details.", e); - return Response.status(HttpStatus.SC_BAD_REQUEST). - entity(INVALID_QUERY_PARAM_VALUE_RESULT_COUNT).build(); - } catch (DataAccessLayerException e) { - log.error("An internal error occurred while trying to execute relevant data service function " + - "@ Dashboard API layer to retrieve a filtered set of devices with details.", e); - return Response.status(HttpStatus.SC_INTERNAL_SERVER_ERROR). - entity(ERROR_IN_RETRIEVING_REQUESTED_DATA).build(); - } - - DashboardPaginationGadgetDataWrapper - dashboardPaginationGadgetDataWrapper = new DashboardPaginationGadgetDataWrapper(); - dashboardPaginationGadgetDataWrapper.setContext("Filtered-and-paginated-devices-with-details"); - dashboardPaginationGadgetDataWrapper.setGroupingAttribute(null); - dashboardPaginationGadgetDataWrapper.setData(paginationResult.getData()); - dashboardPaginationGadgetDataWrapper.setTotalRecordCount(paginationResult.getRecordsTotal()); - - List responsePayload = new ArrayList<>(); - responsePayload.add(dashboardPaginationGadgetDataWrapper); - - return Response.status(HttpStatus.SC_OK).entity(responsePayload).build(); - - } else if (FLAG_FALSE.equals(paginationEnabled)) { - - // getting gadget data service - GadgetDataService gadgetDataService = DeviceMgtAPIUtils.getGadgetDataService(); - - // constructing filter set - ExtendedFilterSet filterSet = new ExtendedFilterSet(); - filterSet.setConnectivityStatus(connectivityStatus); - filterSet.setPotentialVulnerability(potentialVulnerability); - filterSet.setPlatform(platform); - filterSet.setOwnership(ownership); - - List devicesWithDetails; - try { - String userName = getAuthenticatedUser(); - devicesWithDetails = gadgetDataService.getDevicesWithDetails(filterSet, userName); - } catch (InvalidPotentialVulnerabilityValueException e) { - log.error("Bad request and error occurred @ Gadget Data Service layer due to " + - "invalid (query) parameter value. This was while trying to execute relevant data service " + - "function @ Dashboard API layer to retrieve a filtered set of devices with details.", e); - return Response.status(HttpStatus.SC_BAD_REQUEST). - entity(INVALID_QUERY_PARAM_VALUE_POTENTIAL_VULNERABILITY).build(); - } catch (DataAccessLayerException e) { - log.error("An internal error occurred while trying to execute relevant data service function " + - "@ Dashboard API layer to retrieve a filtered set of devices with details.", e); - return Response.status(HttpStatus.SC_INTERNAL_SERVER_ERROR). - entity(ERROR_IN_RETRIEVING_REQUESTED_DATA).build(); - } - - DashboardGadgetDataWrapper dashboardGadgetDataWrapper = new DashboardGadgetDataWrapper(); - dashboardGadgetDataWrapper.setContext("Filtered-devices-with-details"); - dashboardGadgetDataWrapper.setGroupingAttribute(null); - dashboardGadgetDataWrapper.setData(devicesWithDetails); - - List responsePayload = new ArrayList<>(); - responsePayload.add(dashboardGadgetDataWrapper); - - return Response.status(HttpStatus.SC_OK).entity(responsePayload).build(); - - } else { - - log.error("Bad request on retrieving a filtered set of devices with details @ " + - "Dashboard API layer. " + INVALID_QUERY_PARAM_VALUE_PAGINATION_ENABLED); - return Response.status(HttpStatus.SC_BAD_REQUEST). - entity(INVALID_QUERY_PARAM_VALUE_PAGINATION_ENABLED).build(); - - } - } - - @GET - @Path("feature-non-compliant-devices-with-details") - public Response getFeatureNonCompliantDevicesWithDetails(@QueryParam(NON_COMPLIANT_FEATURE_CODE) String nonCompliantFeatureCode, - @QueryParam(PLATFORM) String platform, - @QueryParam(OWNERSHIP) String ownership, - @QueryParam(PAGINATION_ENABLED) String paginationEnabled, - @QueryParam(START_INDEX) int startIndex, - @QueryParam(RESULT_COUNT) int resultCount) { - if (paginationEnabled == null) { - - log.error("Bad request on retrieving a filtered set of feature non-compliant devices with " + - "details @ Dashboard API layer. " + REQUIRED_QUERY_PARAM_VALUE_PAGINATION_ENABLED); - return Response.status(HttpStatus.SC_BAD_REQUEST). - entity(REQUIRED_QUERY_PARAM_VALUE_PAGINATION_ENABLED).build(); - - } else if (FLAG_TRUE.equals(paginationEnabled)) { - - // getting gadget data service - GadgetDataService gadgetDataService = DeviceMgtAPIUtils.getGadgetDataService(); - - // constructing filter set - BasicFilterSet filterSet = new BasicFilterSet(); - filterSet.setPlatform(platform); - filterSet.setOwnership(ownership); - - PaginationResult paginationResult; - try { - String userName = getAuthenticatedUser(); - paginationResult = gadgetDataService. - getFeatureNonCompliantDevicesWithDetails(nonCompliantFeatureCode, - filterSet, startIndex, resultCount, userName); - } catch (InvalidFeatureCodeValueException e) { - log.error("Bad request and error occurred @ Gadget Data Service layer due to " + - "invalid (query) parameter value. This was while trying to execute relevant data service " + - "function @ Dashboard API layer to retrieve a filtered set of " + - "feature non-compliant devices with details.", e); - return Response.status(HttpStatus.SC_BAD_REQUEST). - entity(REQUIRED_QUERY_PARAM_VALUE_NON_COMPLIANT_FEATURE_CODE).build(); - } catch (InvalidStartIndexValueException e) { - log.error("Bad request and error occurred @ Gadget Data Service layer due to " + - "invalid (query) parameter value. This was while trying to execute relevant data service " + - "function @ Dashboard API layer to retrieve a filtered set of " + - "feature non-compliant devices with details.", e); - return Response.status(HttpStatus.SC_BAD_REQUEST). - entity(INVALID_QUERY_PARAM_VALUE_START_INDEX).build(); - } catch (InvalidResultCountValueException e) { - log.error("Bad request and error occurred @ Gadget Data Service layer due to " + - "invalid (query) parameter value. This was while trying to execute relevant data service " + - "function @ Dashboard API layer to retrieve a filtered set of " + - "feature non-compliant devices with details.", e); - return Response.status(HttpStatus.SC_BAD_REQUEST). - entity(INVALID_QUERY_PARAM_VALUE_RESULT_COUNT).build(); - } catch (DataAccessLayerException e) { - log.error("An internal error occurred while trying to execute relevant data service function " + - "@ Dashboard API layer to retrieve a filtered set of feature " + - "non-compliant devices with details.", e); - return Response.status(HttpStatus.SC_INTERNAL_SERVER_ERROR). - entity(ERROR_IN_RETRIEVING_REQUESTED_DATA).build(); - } - - DashboardPaginationGadgetDataWrapper - dashboardPaginationGadgetDataWrapper = new DashboardPaginationGadgetDataWrapper(); - dashboardPaginationGadgetDataWrapper. - setContext("Filtered-and-paginated-feature-non-compliant-devices-with-details"); - dashboardPaginationGadgetDataWrapper.setGroupingAttribute(null); - dashboardPaginationGadgetDataWrapper.setData(paginationResult.getData()); - dashboardPaginationGadgetDataWrapper.setTotalRecordCount(paginationResult.getRecordsTotal()); - - List responsePayload = new ArrayList<>(); - responsePayload.add(dashboardPaginationGadgetDataWrapper); - - return Response.status(HttpStatus.SC_OK).entity(responsePayload).build(); - - } else if (FLAG_FALSE.equals(paginationEnabled)) { - - // getting gadget data service - GadgetDataService gadgetDataService = DeviceMgtAPIUtils.getGadgetDataService(); - - // constructing filter set - BasicFilterSet filterSet = new BasicFilterSet(); - filterSet.setPlatform(platform); - filterSet.setOwnership(ownership); - - List featureNonCompliantDevicesWithDetails; - try { - String userName = getAuthenticatedUser(); - featureNonCompliantDevicesWithDetails = gadgetDataService. - getFeatureNonCompliantDevicesWithDetails(nonCompliantFeatureCode, filterSet, userName); - } catch (InvalidFeatureCodeValueException e) { - log.error("Bad request and error occurred @ Gadget Data Service layer due to " + - "invalid (query) parameter value. This was while trying to execute relevant data service " + - "function @ Dashboard API layer to retrieve a filtered set of " + - "feature non-compliant devices with details.", e); - return Response.status(HttpStatus.SC_BAD_REQUEST). - entity(REQUIRED_QUERY_PARAM_VALUE_NON_COMPLIANT_FEATURE_CODE).build(); - } catch (DataAccessLayerException e) { - log.error("An internal error occurred while trying to execute relevant data service function " + - "@ Dashboard API layer to retrieve a filtered set of feature " + - "non-compliant devices with details.", e); - return Response.status(HttpStatus.SC_INTERNAL_SERVER_ERROR). - entity(ERROR_IN_RETRIEVING_REQUESTED_DATA).build(); - } - - DashboardGadgetDataWrapper dashboardGadgetDataWrapper = new DashboardGadgetDataWrapper(); - dashboardGadgetDataWrapper.setContext("Filtered-feature-non-compliant-devices-with-details"); - dashboardGadgetDataWrapper.setGroupingAttribute(null); - dashboardGadgetDataWrapper.setData(featureNonCompliantDevicesWithDetails); - - List responsePayload = new ArrayList<>(); - responsePayload.add(dashboardGadgetDataWrapper); - - return Response.status(HttpStatus.SC_OK).entity(responsePayload).build(); - - } else { - - log.error("Bad request on retrieving a filtered set of feature non-compliant devices with " + - "details @ Dashboard API layer. " + INVALID_QUERY_PARAM_VALUE_PAGINATION_ENABLED); - return Response.status(HttpStatus.SC_BAD_REQUEST). - entity(INVALID_QUERY_PARAM_VALUE_PAGINATION_ENABLED).build(); - - } - } - -} 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 bab0d1fd39..3532fbe38f 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 @@ -221,6 +221,7 @@ public class DeviceManagementServiceImpl implements DeviceManagementService { } @GET + @Override @Path("/user-devices") public Response getDeviceByUser(@QueryParam("offset") int offset, @QueryParam("limit") int limit) { diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/GroupManagementServiceImpl.java b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/GroupManagementServiceImpl.java index 4811e9b902..cc5fa3ddac 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/GroupManagementServiceImpl.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/GroupManagementServiceImpl.java @@ -65,14 +65,15 @@ public class GroupManagementServiceImpl implements GroupManagementService { request.setOwner(owner); PaginationResult deviceGroupsResult = DeviceMgtAPIUtils.getGroupManagementProviderService() .getGroups(currentUser, request); + DeviceGroupList deviceGroupList = new DeviceGroupList(); if (deviceGroupsResult.getData() != null && deviceGroupsResult.getRecordsTotal() > 0) { - DeviceGroupList deviceGroupList = new DeviceGroupList(); deviceGroupList.setList(deviceGroupsResult.getData()); deviceGroupList.setCount(deviceGroupsResult.getRecordsTotal()); - return Response.status(Response.Status.OK).entity(deviceGroupList).build(); } else { - return Response.status(Response.Status.NOT_FOUND).build(); + deviceGroupList.setList(new ArrayList<>()); + deviceGroupList.setCount(0); } + return Response.status(Response.Status.OK).entity(deviceGroupList).build(); } catch (GroupManagementException e) { String error = "Error occurred while getting the groups."; log.error(error, e); @@ -184,15 +185,15 @@ public class GroupManagementServiceImpl implements GroupManagementService { public Response getRolesOfGroup(int groupId) { try { List groupRoles = DeviceMgtAPIUtils.getGroupManagementProviderService().getRoles(groupId); - - if(groupRoles != null && groupRoles.size() > 0) { - RoleList deviceGroupRolesList = new RoleList(); + RoleList deviceGroupRolesList = new RoleList(); + if(groupRoles != null) { deviceGroupRolesList.setList(groupRoles); deviceGroupRolesList.setCount(groupRoles.size()); - return Response.status(Response.Status.OK).entity(deviceGroupRolesList).build(); } else { - return Response.status(Response.Status.OK).entity(EMPTY_RESULT).build(); + deviceGroupRolesList.setList(new ArrayList()); + deviceGroupRolesList.setCount(0); } + return Response.status(Response.Status.OK).entity(deviceGroupRolesList).build(); } catch (GroupManagementException e) { String msg = "Error occurred while getting roles of the group."; log.error(msg, e); @@ -205,14 +206,15 @@ public class GroupManagementServiceImpl implements GroupManagementService { try { GroupManagementProviderService service = DeviceMgtAPIUtils.getGroupManagementProviderService(); List deviceList = service.getDevices(groupId, offset, limit); - if (deviceList != null && deviceList.size() > 0) { - DeviceList deviceListWrapper = new DeviceList(); + int deviceCount = service.getDeviceCount(groupId); + DeviceList deviceListWrapper = new DeviceList(); + if (deviceList != null) { deviceListWrapper.setList(deviceList); - deviceListWrapper.setCount(service.getDeviceCount(groupId)); - return Response.status(Response.Status.OK).entity(deviceListWrapper).build(); } else { - return Response.status(Response.Status.NOT_FOUND).build(); + deviceListWrapper.setList(new ArrayList()); } + deviceListWrapper.setCount(deviceCount); + return Response.status(Response.Status.OK).entity(deviceListWrapper).build(); } catch (GroupManagementException e) { String msg = "Error occurred while getting devices the group."; log.error(msg, e); @@ -295,7 +297,7 @@ public class GroupManagementServiceImpl implements GroupManagementService { List deviceGroups = DeviceMgtAPIUtils.getGroupManagementProviderService().getGroups(deviceIdentifier); return Response.status(Response.Status.OK).entity(deviceGroups).build(); } catch (GroupManagementException e) { - String msg = "Error occurred while removing devices from group."; + String msg = "Error occurred while getting groups of device."; log.error(msg, e); return Response.status(Response.Status.INTERNAL_SERVER_ERROR).entity(msg).build(); } diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/admin/GroupManagementAdminServiceImpl.java b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/admin/GroupManagementAdminServiceImpl.java index 55b67029fa..8222210cad 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/admin/GroupManagementAdminServiceImpl.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/admin/GroupManagementAdminServiceImpl.java @@ -32,6 +32,7 @@ import org.wso2.carbon.device.mgt.jaxrs.service.impl.util.RequestValidationUtil; import org.wso2.carbon.device.mgt.jaxrs.util.DeviceMgtAPIUtils; import javax.ws.rs.core.Response; +import java.util.ArrayList; import java.util.List; public class GroupManagementAdminServiceImpl implements GroupManagementAdminService { @@ -47,14 +48,15 @@ public class GroupManagementAdminServiceImpl implements GroupManagementAdminServ request.setOwner(owner); PaginationResult deviceGroupsResult = DeviceMgtAPIUtils.getGroupManagementProviderService() .getGroups(request); - if (deviceGroupsResult.getData() != null && deviceGroupsResult.getRecordsTotal() > 0) { - DeviceGroupList deviceGroupList = new DeviceGroupList(); + DeviceGroupList deviceGroupList = new DeviceGroupList(); + if (deviceGroupsResult.getData() != null) { deviceGroupList.setList(deviceGroupsResult.getData()); deviceGroupList.setCount(deviceGroupsResult.getRecordsTotal()); - return Response.status(Response.Status.OK).entity(deviceGroupList).build(); } else { - return Response.status(Response.Status.NOT_FOUND).build(); + deviceGroupList.setList(new ArrayList<>()); + deviceGroupList.setCount(0); } + return Response.status(Response.Status.OK).entity(deviceGroupList).build(); } catch (GroupManagementException e) { String msg = "ErrorResponse occurred while retrieving all groups."; log.error(msg, e); diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/webapp/WEB-INF/cxf-servlet.xml b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/webapp/WEB-INF/cxf-servlet.xml index 7650316687..7948186893 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/webapp/WEB-INF/cxf-servlet.xml +++ b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/webapp/WEB-INF/cxf-servlet.xml @@ -39,7 +39,6 @@ - @@ -79,7 +78,6 @@ - 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 380cfd9ae3..0067817575 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 - 2.0.14-SNAPSHOT + 2.0.16-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 b98368eed5..f2b7a661a4 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 - 2.0.14-SNAPSHOT + 2.0.16-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 3683e9b095..6b799048d0 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 - 2.0.14-SNAPSHOT + 2.0.16-SNAPSHOT ../pom.xml diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/pom.xml b/components/device-mgt/org.wso2.carbon.device.mgt.ui/pom.xml index a870326643..8476e6b962 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/pom.xml +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/pom.xml @@ -22,7 +22,7 @@ device-mgt org.wso2.carbon.devicemgt - 2.0.14-SNAPSHOT + 2.0.16-SNAPSHOT ../pom.xml diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/conf/config.json b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/conf/config.json index 5323b5814c..340aac83e8 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/conf/config.json +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/conf/config.json @@ -1,5 +1,6 @@ { "appContext": "/devicemgt/", + "isCloud": false, "httpsURL" : "https://%iot.gateway.host%:%iot.gateway.https.port%", "httpURL" : "http://%iot.gateway.host%:%iot.gateway.http.port", "wssURL" : "https://%iot.analytics.host%:%iot.analytics.https.port%", diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/modules/batch-provider-api.js b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/modules/batch-provider-api.js index 78d026bf1a..b747ae3153 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/modules/batch-provider-api.js +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/modules/batch-provider-api.js @@ -125,6 +125,13 @@ batchProviders = function () { result = connector.getRecordsByRange(loggedInUser, tablename, from, to, 0, limit, null).getMessage(); } + + // error handling ---- + var resultString = result.toString(); + if (resultString.contains("Failed to get records from table")) { + return null; + } + result = JSON.parse(result); var data = []; for (var i = 0; i < result.length; i++) { diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/modules/business-controllers/device.js b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/modules/business-controllers/device.js index 56939377cf..68fa4630d7 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/modules/business-controllers/device.js +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/modules/business-controllers/device.js @@ -71,7 +71,7 @@ deviceModule = function () { var userName = carbonUser.username + "@" + carbonUser.domain; var locationDataSet = []; - switch(deviceType) { + switch (deviceType) { case 'android': locationDataSet = batchProvider.getData(userName, deviceId, deviceType); break; @@ -80,24 +80,24 @@ deviceModule = function () { break; } - - var locationData = []; var locationTimeData = []; - for (var i = 0 ; i < locationDataSet.length; i++) { - var gpsReading = {}; - var gpsReadingTimes = {}; - gpsReading.lat = locationDataSet[i].latitude; - gpsReading.lng = locationDataSet[i].longitude; - if (deviceType == "android") { - gpsReadingTimes.time = locationDataSet[i].timeStamp; - } else { - gpsReadingTimes.time = locationDataSet[i].meta_timestamp; + if (locationDataSet != null) { + + for (var i = 0; i < locationDataSet.length; i++) { + var gpsReading = {}; + var gpsReadingTimes = {}; + gpsReading.lat = locationDataSet[i].latitude; + gpsReading.lng = locationDataSet[i].longitude; + if (deviceType == "android") { + gpsReadingTimes.time = locationDataSet[i].timeStamp; + } else { + gpsReadingTimes.time = locationDataSet[i].meta_timestamp; + } + locationData.push(gpsReading); + locationTimeData.push(gpsReadingTimes); } - locationData.push(gpsReading); - locationTimeData.push(gpsReadingTimes); } - var utility = require('/app/modules/utility.js')["utility"]; try { utility.startTenantFlow(carbonUser); diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.user.create/create.hbs b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.user.create/create.hbs index 6c152b07ee..e69c9d4184 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.user.create/create.hbs +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.user.create/create.hbs @@ -127,14 +127,7 @@

User was added successfully.

An invitation mail will be sent to this user to initiate device enrollment. - Below QR code can also be used to enroll a device.

-
- -
-
-
-

Please click "Add Another User", if you wish to add another user or click "View User List" to complete the process and go back to the user list. diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.ui.header.cloud.user-menu/user-menu.hbs b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.ui.header.cloud.user-menu/user-menu.hbs new file mode 100644 index 0000000000..28f1e68b7c --- /dev/null +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.ui.header.cloud.user-menu/user-menu.hbs @@ -0,0 +1,219 @@ +{{! + 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. +}} + \ No newline at end of file diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.ui.header.cloud.user-menu/user-menu.js b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.ui.header.cloud.user-menu/user-menu.js new file mode 100644 index 0000000000..03d61cad53 --- /dev/null +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.ui.header.cloud.user-menu/user-menu.js @@ -0,0 +1,30 @@ +/* + * Copyright (c) 2015, 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. + */ + +function onRequest(context) { + var constants = require("/app/modules/constants.js"); + var user = context.user; + var isSuperTenant = false; + if (user.tenantId == -1234){ + isSuperTenant = true; + } + var viewModal = {}; + viewModal.isSuperTenant = isSuperTenant; + viewModal.USER_SESSION_KEY = session.get(constants["USER_SESSION_KEY"]); + return viewModal; +} diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.ui.header.cloud.user-menu/user-menu.json b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.ui.header.cloud.user-menu/user-menu.json new file mode 100644 index 0000000000..e4e47235ef --- /dev/null +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.ui.header.cloud.user-menu/user-menu.json @@ -0,0 +1,3 @@ +{ + "version": "1.0.0", +} \ No newline at end of file diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.ui.header.user-menu/public/js/user-menu.js b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.ui.header.default.user-menu/public/js/user-menu.js similarity index 100% rename from components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.ui.header.user-menu/public/js/user-menu.js rename to components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.ui.header.default.user-menu/public/js/user-menu.js diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.ui.header.default.user-menu/user-menu.hbs b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.ui.header.default.user-menu/user-menu.hbs new file mode 100644 index 0000000000..8bc7d0b35b --- /dev/null +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.ui.header.default.user-menu/user-menu.hbs @@ -0,0 +1,123 @@ +{{! + 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. +}} + + + +{{#zone "bottomJs"}} + {{js "/js/user-menu.js"}} +{{/zone}} \ No newline at end of file diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.ui.header.default.user-menu/user-menu.js b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.ui.header.default.user-menu/user-menu.js new file mode 100644 index 0000000000..03d61cad53 --- /dev/null +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.ui.header.default.user-menu/user-menu.js @@ -0,0 +1,30 @@ +/* + * Copyright (c) 2015, 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. + */ + +function onRequest(context) { + var constants = require("/app/modules/constants.js"); + var user = context.user; + var isSuperTenant = false; + if (user.tenantId == -1234){ + isSuperTenant = true; + } + var viewModal = {}; + viewModal.isSuperTenant = isSuperTenant; + viewModal.USER_SESSION_KEY = session.get(constants["USER_SESSION_KEY"]); + return viewModal; +} diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.ui.header.default.user-menu/user-menu.json b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.ui.header.default.user-menu/user-menu.json new file mode 100644 index 0000000000..e4e47235ef --- /dev/null +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.ui.header.default.user-menu/user-menu.json @@ -0,0 +1,3 @@ +{ + "version": "1.0.0", +} \ No newline at end of file diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.ui.header.user-menu/user-menu.hbs b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.ui.header.user-menu/user-menu.hbs index 95d7264473..bd55f2a00d 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.ui.header.user-menu/user-menu.hbs +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.ui.header.user-menu/user-menu.hbs @@ -15,110 +15,11 @@ specific language governing permissions and limitations under the License. }} -{{#zone "userMenu"}} - -{{/zone}} - -{{#zone "bottomJs"}} - {{js "/js/user-menu.js"}} +{{#zone "userMenu"}} + {{#if isCloud}} + {{unit "cdmf.unit.ui.header.cloud.user-menu"}} + {{else}} + {{unit "cdmf.unit.ui.header.default.user-menu"}} + {{/if}} {{/zone}} \ No newline at end of file diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.ui.header.user-menu/user-menu.js b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.ui.header.user-menu/user-menu.js index 03d61cad53..e63ad073c3 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.ui.header.user-menu/user-menu.js +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.ui.header.user-menu/user-menu.js @@ -17,14 +17,8 @@ */ function onRequest(context) { - var constants = require("/app/modules/constants.js"); - var user = context.user; - var isSuperTenant = false; - if (user.tenantId == -1234){ - isSuperTenant = true; - } + var mdmProps = require("/app/modules/conf-reader/main.js")["conf"]; var viewModal = {}; - viewModal.isSuperTenant = isSuperTenant; - viewModal.USER_SESSION_KEY = session.get(constants["USER_SESSION_KEY"]); + viewModal.isCloud = mdmProps["isCloud"]; return viewModal; } diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.ui.theme/public/css/custom-desktop.css b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.ui.theme/public/css/custom-desktop.css index 6321372ccd..a7114108ee 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.ui.theme/public/css/custom-desktop.css +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.ui.theme/public/css/custom-desktop.css @@ -6517,7 +6517,7 @@ select > option:hover { } .header .fw:before { - color: #000; + } /* Adding style for required fields */ diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/uuf-template-app/app/units/uuf.unit.header/header.hbs b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/uuf-template-app/app/units/uuf.unit.header/header.hbs index fe6c030d27..af3e248189 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/uuf-template-app/app/units/uuf.unit.header/header.hbs +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/uuf-template-app/app/units/uuf.unit.header/header.hbs @@ -21,6 +21,9 @@
{{defineZone "brand"}}
+
+ {{defineZone "cloudMenu"}} +
{{defineZone "userMenu"}}
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 3d980569d4..48c3755ddb 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 - 2.0.14-SNAPSHOT + 2.0.16-SNAPSHOT ../pom.xml diff --git a/components/device-mgt/pom.xml b/components/device-mgt/pom.xml index 7d86eebc3e..d079a852f4 100644 --- a/components/device-mgt/pom.xml +++ b/components/device-mgt/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt carbon-devicemgt - 2.0.14-SNAPSHOT + 2.0.16-SNAPSHOT ../../pom.xml diff --git a/components/email-sender/org.wso2.carbon.email.sender.core/pom.xml b/components/email-sender/org.wso2.carbon.email.sender.core/pom.xml index ecc5f145c3..dd783d7bb3 100644 --- a/components/email-sender/org.wso2.carbon.email.sender.core/pom.xml +++ b/components/email-sender/org.wso2.carbon.email.sender.core/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt email-sender - 2.0.14-SNAPSHOT + 2.0.16-SNAPSHOT ../pom.xml diff --git a/components/email-sender/pom.xml b/components/email-sender/pom.xml index b433d98724..245c1da23e 100644 --- a/components/email-sender/pom.xml +++ b/components/email-sender/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt carbon-devicemgt - 2.0.14-SNAPSHOT + 2.0.16-SNAPSHOT ../../pom.xml diff --git a/components/identity-extensions/dynamic-client-registration/dynamic-client-web-proxy/pom.xml b/components/identity-extensions/dynamic-client-registration/dynamic-client-web-proxy/pom.xml index edbac611eb..c7cb351cfc 100644 --- a/components/identity-extensions/dynamic-client-registration/dynamic-client-web-proxy/pom.xml +++ b/components/identity-extensions/dynamic-client-registration/dynamic-client-web-proxy/pom.xml @@ -21,7 +21,7 @@ dynamic-client-registration org.wso2.carbon.devicemgt - 2.0.14-SNAPSHOT + 2.0.16-SNAPSHOT ../pom.xml diff --git a/components/identity-extensions/dynamic-client-registration/dynamic-client-web/pom.xml b/components/identity-extensions/dynamic-client-registration/dynamic-client-web/pom.xml index 5e694d7eb0..d160b902b2 100644 --- a/components/identity-extensions/dynamic-client-registration/dynamic-client-web/pom.xml +++ b/components/identity-extensions/dynamic-client-registration/dynamic-client-web/pom.xml @@ -21,7 +21,7 @@ dynamic-client-registration org.wso2.carbon.devicemgt - 2.0.14-SNAPSHOT + 2.0.16-SNAPSHOT ../pom.xml diff --git a/components/identity-extensions/dynamic-client-registration/org.wso2.carbon.dynamic.client.registration/pom.xml b/components/identity-extensions/dynamic-client-registration/org.wso2.carbon.dynamic.client.registration/pom.xml index 8527359d77..1c2bd4c876 100644 --- a/components/identity-extensions/dynamic-client-registration/org.wso2.carbon.dynamic.client.registration/pom.xml +++ b/components/identity-extensions/dynamic-client-registration/org.wso2.carbon.dynamic.client.registration/pom.xml @@ -21,13 +21,13 @@ dynamic-client-registration org.wso2.carbon.devicemgt - 2.0.14-SNAPSHOT + 2.0.16-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.dynamic.client.registration - 2.0.14-SNAPSHOT + 2.0.16-SNAPSHOT bundle WSO2 Carbon - Dynamic client registration service WSO2 Carbon - Dynamic Client Registration Service diff --git a/components/identity-extensions/dynamic-client-registration/org.wso2.carbon.dynamic.client.web.app.registration/pom.xml b/components/identity-extensions/dynamic-client-registration/org.wso2.carbon.dynamic.client.web.app.registration/pom.xml index 2cf30119e4..f4c093fba9 100644 --- a/components/identity-extensions/dynamic-client-registration/org.wso2.carbon.dynamic.client.web.app.registration/pom.xml +++ b/components/identity-extensions/dynamic-client-registration/org.wso2.carbon.dynamic.client.web.app.registration/pom.xml @@ -21,13 +21,13 @@ dynamic-client-registration org.wso2.carbon.devicemgt - 2.0.14-SNAPSHOT + 2.0.16-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.dynamic.client.web.app.registration - 2.0.14-SNAPSHOT + 2.0.16-SNAPSHOT bundle WSO2 Carbon - Dynamic client web app registration WSO2 Carbon - Dynamic Client Web-app Registration Service diff --git a/components/identity-extensions/dynamic-client-registration/pom.xml b/components/identity-extensions/dynamic-client-registration/pom.xml index 479fbdd6a3..08c77ec516 100644 --- a/components/identity-extensions/dynamic-client-registration/pom.xml +++ b/components/identity-extensions/dynamic-client-registration/pom.xml @@ -22,14 +22,14 @@ org.wso2.carbon.devicemgt identity-extensions - 2.0.14-SNAPSHOT + 2.0.16-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.devicemgt dynamic-client-registration - 2.0.14-SNAPSHOT + 2.0.16-SNAPSHOT pom WSO2 Carbon - Dynamic client registration http://wso2.org 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 7991efcfca..75239f0fb2 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,13 +22,13 @@ org.wso2.carbon.devicemgt identity-extensions - 2.0.14-SNAPSHOT + 2.0.16-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.device.mgt.oauth.extensions - 2.0.14-SNAPSHOT + 2.0.16-SNAPSHOT bundle WSO2 Carbon - OAuth Extensions http://wso2.org diff --git a/components/identity-extensions/org.wso2.carbon.identity.authenticator.backend.oauth/pom.xml b/components/identity-extensions/org.wso2.carbon.identity.authenticator.backend.oauth/pom.xml index 6b68c6631e..9a48123286 100644 --- a/components/identity-extensions/org.wso2.carbon.identity.authenticator.backend.oauth/pom.xml +++ b/components/identity-extensions/org.wso2.carbon.identity.authenticator.backend.oauth/pom.xml @@ -21,7 +21,7 @@ identity-extensions org.wso2.carbon.devicemgt - 2.0.14-SNAPSHOT + 2.0.16-SNAPSHOT 4.0.0 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 3f2a1467ae..9426233579 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 - 2.0.14-SNAPSHOT + 2.0.16-SNAPSHOT ../pom.xml diff --git a/components/identity-extensions/pom.xml b/components/identity-extensions/pom.xml index c08d3c050c..623cfc1968 100644 --- a/components/identity-extensions/pom.xml +++ b/components/identity-extensions/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt carbon-devicemgt - 2.0.14-SNAPSHOT + 2.0.16-SNAPSHOT ../../pom.xml diff --git a/components/policy-mgt/org.wso2.carbon.complex.policy.decision.point/pom.xml b/components/policy-mgt/org.wso2.carbon.complex.policy.decision.point/pom.xml index 57b6dd8ca9..7c0b63ead6 100644 --- a/components/policy-mgt/org.wso2.carbon.complex.policy.decision.point/pom.xml +++ b/components/policy-mgt/org.wso2.carbon.complex.policy.decision.point/pom.xml @@ -22,14 +22,14 @@ org.wso2.carbon.devicemgt policy-mgt - 2.0.14-SNAPSHOT + 2.0.16-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.devicemgt org.wso2.carbon.complex.policy.decision.point - 2.0.14-SNAPSHOT + 2.0.16-SNAPSHOT bundle WSO2 Carbon - Policy Decision Point WSO2 Carbon - Policy Decision Point 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 5c2563fcf4..119e583cbe 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,14 +3,14 @@ org.wso2.carbon.devicemgt policy-mgt - 2.0.14-SNAPSHOT + 2.0.16-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.devicemgt org.wso2.carbon.policy.decision.point - 2.0.14-SNAPSHOT + 2.0.16-SNAPSHOT bundle WSO2 Carbon - Policy Decision Point WSO2 Carbon - Policy Decision Point 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 b729b87600..73a1f34f6b 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 - 2.0.14-SNAPSHOT + 2.0.16-SNAPSHOT ../pom.xml @@ -11,7 +11,7 @@ 4.0.0 org.wso2.carbon.devicemgt org.wso2.carbon.policy.information.point - 2.0.14-SNAPSHOT + 2.0.16-SNAPSHOT bundle WSO2 Carbon - Policy Information Point WSO2 Carbon - Policy Information Point 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 5ed57d9e9f..8a54d3d981 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,14 +22,14 @@ org.wso2.carbon.devicemgt policy-mgt - 2.0.14-SNAPSHOT + 2.0.16-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.devicemgt org.wso2.carbon.policy.mgt.common - 2.0.14-SNAPSHOT + 2.0.16-SNAPSHOT bundle WSO2 Carbon - Policy Management Common WSO2 Carbon - Policy Management Common 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 d08f802af6..a61f6d8fdb 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,14 +22,14 @@ org.wso2.carbon.devicemgt policy-mgt - 2.0.14-SNAPSHOT + 2.0.16-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.devicemgt org.wso2.carbon.policy.mgt.core - 2.0.14-SNAPSHOT + 2.0.16-SNAPSHOT bundle WSO2 Carbon - Policy Management Core WSO2 Carbon - Policy Management Core diff --git a/components/policy-mgt/pom.xml b/components/policy-mgt/pom.xml index fa8bf4bf88..ef1d4979d0 100644 --- a/components/policy-mgt/pom.xml +++ b/components/policy-mgt/pom.xml @@ -23,13 +23,13 @@ org.wso2.carbon.devicemgt carbon-devicemgt - 2.0.14-SNAPSHOT + 2.0.16-SNAPSHOT ../../pom.xml 4.0.0 policy-mgt - 2.0.14-SNAPSHOT + 2.0.16-SNAPSHOT pom WSO2 Carbon - Policy Management Component http://wso2.org 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 8f22c1b7c9..5306b93ec5 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,14 +21,14 @@ org.wso2.carbon.devicemgt webapp-authenticator-framework - 2.0.14-SNAPSHOT + 2.0.16-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.devicemgt org.wso2.carbon.webapp.authenticator.framework - 2.0.14-SNAPSHOT + 2.0.16-SNAPSHOT bundle WSO2 Carbon - Web Application Authenticator Framework Bundle WSO2 Carbon - Web Application Authenticator Framework Bundle diff --git a/components/webapp-authenticator-framework/pom.xml b/components/webapp-authenticator-framework/pom.xml index f66a8402d4..3c36f84a76 100644 --- a/components/webapp-authenticator-framework/pom.xml +++ b/components/webapp-authenticator-framework/pom.xml @@ -22,14 +22,14 @@ org.wso2.carbon.devicemgt carbon-devicemgt - 2.0.14-SNAPSHOT + 2.0.16-SNAPSHOT ../../pom.xml 4.0.0 org.wso2.carbon.devicemgt webapp-authenticator-framework - 2.0.14-SNAPSHOT + 2.0.16-SNAPSHOT pom WSO2 Carbon - Webapp Authenticator Framework http://wso2.org 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 f28bce04cd..88c8b7047c 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,14 +21,14 @@ org.wso2.carbon.devicemgt apimgt-extensions-feature - 2.0.14-SNAPSHOT + 2.0.16-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.apimgt.application.extension.feature pom - 2.0.14-SNAPSHOT + 2.0.16-SNAPSHOT WSO2 Carbon - API Management Application Extension Feature http://wso2.org This feature contains an implementation of a api application registration, which takes care of subscription diff --git a/features/apimgt-extensions/org.wso2.carbon.apimgt.handler.server.feature/pom.xml b/features/apimgt-extensions/org.wso2.carbon.apimgt.handler.server.feature/pom.xml index 827f3ce889..03fa4e8c66 100644 --- a/features/apimgt-extensions/org.wso2.carbon.apimgt.handler.server.feature/pom.xml +++ b/features/apimgt-extensions/org.wso2.carbon.apimgt.handler.server.feature/pom.xml @@ -22,14 +22,14 @@ org.wso2.carbon.devicemgt apimgt-extensions-feature - 2.0.14-SNAPSHOT + 2.0.16-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.apimgt.handler.server.feature pom - 2.0.14-SNAPSHOT + 2.0.16-SNAPSHOT WSO2 Carbon - Device Management - APIM handler Server Feature http://wso2.org This feature contains the handler for the api authentications 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 16312dfa30..88a2f09f0e 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,14 +21,14 @@ org.wso2.carbon.devicemgt apimgt-extensions-feature - 2.0.14-SNAPSHOT + 2.0.16-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.apimgt.webapp.publisher.feature pom - 2.0.14-SNAPSHOT + 2.0.16-SNAPSHOT WSO2 Carbon - API Management Webapp Publisher Feature http://wso2.org This feature contains an implementation of a Tomcat lifecycle listener, which takes care of publishing diff --git a/features/apimgt-extensions/pom.xml b/features/apimgt-extensions/pom.xml index f18b297c26..1abfb6e9cc 100644 --- a/features/apimgt-extensions/pom.xml +++ b/features/apimgt-extensions/pom.xml @@ -22,14 +22,14 @@ org.wso2.carbon.devicemgt carbon-devicemgt - 2.0.14-SNAPSHOT + 2.0.16-SNAPSHOT ../../pom.xml 4.0.0 org.wso2.carbon.devicemgt apimgt-extensions-feature - 2.0.14-SNAPSHOT + 2.0.16-SNAPSHOT pom WSO2 Carbon - API Management Extensions Feature http://wso2.org 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 95b47dff79..af671ac7ea 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 - 2.0.14-SNAPSHOT + 2.0.16-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 96c261e161..6cfc083be2 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 - 2.0.14-SNAPSHOT + 2.0.16-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 df137c8b45..68439fb173 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,14 +22,14 @@ org.wso2.carbon.devicemgt certificate-mgt-feature - 2.0.14-SNAPSHOT + 2.0.16-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.certificate.mgt.server.feature pom - 2.0.14-SNAPSHOT + 2.0.16-SNAPSHOT WSO2 Carbon - Certificate Management Server Feature http://wso2.org This feature contains the core bundles required for back-end Certificate Management functionality diff --git a/features/certificate-mgt/pom.xml b/features/certificate-mgt/pom.xml index 788e87630b..a81ff5f12d 100644 --- a/features/certificate-mgt/pom.xml +++ b/features/certificate-mgt/pom.xml @@ -22,14 +22,14 @@ org.wso2.carbon.devicemgt carbon-devicemgt - 2.0.14-SNAPSHOT + 2.0.16-SNAPSHOT ../../pom.xml 4.0.0 org.wso2.carbon.devicemgt certificate-mgt-feature - 2.0.14-SNAPSHOT + 2.0.16-SNAPSHOT pom WSO2 Carbon - Certificate Management Feature http://wso2.org 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 ae6a64364b..b3a572ea7a 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,14 +22,14 @@ org.wso2.carbon.devicemgt device-mgt-extensions-feature - 2.0.14-SNAPSHOT + 2.0.16-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.device.mgt.extensions.device.type.deployer.feature pom - 2.0.14-SNAPSHOT + 2.0.16-SNAPSHOT WSO2 Carbon - Device Type Deployer Feature http://wso2.org WSO2 Carbon - Device Type Deployer Feature diff --git a/features/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.gcm.feature/pom.xml b/features/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.gcm.feature/pom.xml index a02248d5f8..4eae138b6b 100644 --- a/features/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.gcm.feature/pom.xml +++ b/features/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.gcm.feature/pom.xml @@ -22,14 +22,14 @@ org.wso2.carbon.devicemgt device-mgt-extensions-feature - 2.0.14-SNAPSHOT + 2.0.16-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.device.mgt.extensions.push.notification.provider.gcm.feature pom - 2.0.14-SNAPSHOT + 2.0.16-SNAPSHOT WSO2 Carbon - GCM Based Push Notification Provider Feature http://wso2.org WSO2 Carbon - MQTT Based Push Notification Provider Feature 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 be41639d2e..fc4ec610fc 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,14 +22,14 @@ org.wso2.carbon.devicemgt device-mgt-extensions-feature - 2.0.14-SNAPSHOT + 2.0.16-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.device.mgt.extensions.push.notification.provider.mqtt.feature pom - 2.0.14-SNAPSHOT + 2.0.16-SNAPSHOT WSO2 Carbon - MQTT Based Push Notification Provider Feature http://wso2.org WSO2 Carbon - MQTT Based Push Notification Provider Feature 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 2cebc2d0c3..f497ba8b0f 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,14 +22,14 @@ org.wso2.carbon.devicemgt device-mgt-extensions-feature - 2.0.14-SNAPSHOT + 2.0.16-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.device.mgt.extensions.push.notification.provider.xmpp.feature pom - 2.0.14-SNAPSHOT + 2.0.16-SNAPSHOT WSO2 Carbon - XMPP Based Push Notification Provider Feature http://wso2.org WSO2 Carbon - XMPP Based Push Notification Provider Feature diff --git a/features/device-mgt-extensions/pom.xml b/features/device-mgt-extensions/pom.xml index a4290fe4c4..35aaca0541 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 - 2.0.14-SNAPSHOT + 2.0.16-SNAPSHOT ../../pom.xml diff --git a/features/device-mgt/org.wso2.carbon.device.mgt.analytics.dashboard.feature/pom.xml b/features/device-mgt/org.wso2.carbon.device.mgt.analytics.dashboard.feature/pom.xml index b7eb5ddf71..4914a14a7d 100644 --- a/features/device-mgt/org.wso2.carbon.device.mgt.analytics.dashboard.feature/pom.xml +++ b/features/device-mgt/org.wso2.carbon.device.mgt.analytics.dashboard.feature/pom.xml @@ -3,13 +3,13 @@ org.wso2.carbon.devicemgt device-mgt-feature - 2.0.14-SNAPSHOT + 2.0.16-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.device.mgt.analytics.dashboard.feature - 2.0.14-SNAPSHOT + 2.0.16-SNAPSHOT pom WSO2 Carbon - Device Management Dashboard Analytics Feature WSO2 Carbon - Device Management Dashboard Analytics Feature diff --git a/features/device-mgt/org.wso2.carbon.device.mgt.analytics.data.publisher.feature/pom.xml b/features/device-mgt/org.wso2.carbon.device.mgt.analytics.data.publisher.feature/pom.xml index d93edaad59..2a0e264eb2 100644 --- a/features/device-mgt/org.wso2.carbon.device.mgt.analytics.data.publisher.feature/pom.xml +++ b/features/device-mgt/org.wso2.carbon.device.mgt.analytics.data.publisher.feature/pom.xml @@ -22,14 +22,14 @@ org.wso2.carbon.devicemgt device-mgt-feature - 2.0.14-SNAPSHOT + 2.0.16-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.device.mgt.analytics.data.publisher.feature pom - 2.0.14-SNAPSHOT + 2.0.16-SNAPSHOT WSO2 Carbon - Device Management Server Feature http://wso2.org This feature contains bundles related to device analytics data publisher 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 edb92f0643..6a370c6fa2 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 - 2.0.14-SNAPSHOT + 2.0.16-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 3453b77947..83ae359cb6 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,14 +4,14 @@ org.wso2.carbon.devicemgt device-mgt-feature - 2.0.14-SNAPSHOT + 2.0.16-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.device.mgt.extensions.feature pom - 2.0.14-SNAPSHOT + 2.0.16-SNAPSHOT WSO2 Carbon - Device Management Extensions Feature http://wso2.org This feature contains common extensions used by key device management functionalities 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 a79a6af48c..5e4240db15 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 - 2.0.14-SNAPSHOT + 2.0.16-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 e28fc52090..8785d64ade 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,14 +22,14 @@ org.wso2.carbon.devicemgt device-mgt-feature - 2.0.14-SNAPSHOT + 2.0.16-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.device.mgt.server.feature pom - 2.0.14-SNAPSHOT + 2.0.16-SNAPSHOT WSO2 Carbon - Device Management Server Feature http://wso2.org This feature contains the core bundles required for Back-end Device Management functionality diff --git a/features/device-mgt/org.wso2.carbon.device.mgt.ui.feature/pom.xml b/features/device-mgt/org.wso2.carbon.device.mgt.ui.feature/pom.xml index 5c96a49950..16474eef3f 100644 --- a/features/device-mgt/org.wso2.carbon.device.mgt.ui.feature/pom.xml +++ b/features/device-mgt/org.wso2.carbon.device.mgt.ui.feature/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt device-mgt-feature - 2.0.14-SNAPSHOT + 2.0.16-SNAPSHOT ../pom.xml diff --git a/features/device-mgt/pom.xml b/features/device-mgt/pom.xml index f40bec0704..043171fad0 100644 --- a/features/device-mgt/pom.xml +++ b/features/device-mgt/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt carbon-devicemgt - 2.0.14-SNAPSHOT + 2.0.16-SNAPSHOT ../../pom.xml diff --git a/features/dynamic-client-registration/org.wso2.carbon.dynamic.client.registration.server.feature/pom.xml b/features/dynamic-client-registration/org.wso2.carbon.dynamic.client.registration.server.feature/pom.xml index 3143350e22..edcf58ef63 100644 --- a/features/dynamic-client-registration/org.wso2.carbon.dynamic.client.registration.server.feature/pom.xml +++ b/features/dynamic-client-registration/org.wso2.carbon.dynamic.client.registration.server.feature/pom.xml @@ -23,14 +23,14 @@ org.wso2.carbon.devicemgt dynamic-client-registration-feature - 2.0.14-SNAPSHOT + 2.0.16-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.dynamic.client.registration.server.feature pom - 2.0.14-SNAPSHOT + 2.0.16-SNAPSHOT WSO2 Carbon - Dynamic Client Registration Server Feature http://wso2.org This feature contains dynamic client registration features diff --git a/features/dynamic-client-registration/pom.xml b/features/dynamic-client-registration/pom.xml index d5f10f9145..d52ccbd0bd 100644 --- a/features/dynamic-client-registration/pom.xml +++ b/features/dynamic-client-registration/pom.xml @@ -23,14 +23,14 @@ org.wso2.carbon.devicemgt carbon-devicemgt - 2.0.14-SNAPSHOT + 2.0.16-SNAPSHOT ../../pom.xml 4.0.0 org.wso2.carbon.devicemgt dynamic-client-registration-feature - 2.0.14-SNAPSHOT + 2.0.16-SNAPSHOT pom WSO2 Carbon - Dynamic Client Registration Feature http://wso2.org diff --git a/features/email-sender/org.wso2.carbon.email.sender.feature/pom.xml b/features/email-sender/org.wso2.carbon.email.sender.feature/pom.xml index ba9b1c90f0..ed5495efb9 100644 --- a/features/email-sender/org.wso2.carbon.email.sender.feature/pom.xml +++ b/features/email-sender/org.wso2.carbon.email.sender.feature/pom.xml @@ -22,14 +22,14 @@ org.wso2.carbon.devicemgt email-sender-feature - 2.0.14-SNAPSHOT + 2.0.16-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.email.sender.feature pom - 2.0.14-SNAPSHOT + 2.0.16-SNAPSHOT WSO2 Carbon - Email Sender Feature http://wso2.org This feature contains the core bundles required for email sender related functionality diff --git a/features/email-sender/pom.xml b/features/email-sender/pom.xml index 0af33900ed..30ce544dcc 100644 --- a/features/email-sender/pom.xml +++ b/features/email-sender/pom.xml @@ -22,14 +22,14 @@ org.wso2.carbon.devicemgt carbon-devicemgt - 2.0.14-SNAPSHOT + 2.0.16-SNAPSHOT ../../pom.xml 4.0.0 org.wso2.carbon.devicemgt email-sender-feature - 2.0.14-SNAPSHOT + 2.0.16-SNAPSHOT pom WSO2 Carbon - Email Sender Feature http://wso2.org 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 2ab7b73b2a..dafe2508da 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,14 +23,14 @@ org.wso2.carbon.devicemgt jwt-client-feature - 2.0.14-SNAPSHOT + 2.0.16-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.identity.jwt.client.extension.feature pom - 2.0.14-SNAPSHOT + 2.0.16-SNAPSHOT WSO2 Carbon - JWT Client Feature http://wso2.org This feature contains jwt client implementation from which we can get a access token using the jwt diff --git a/features/jwt-client/pom.xml b/features/jwt-client/pom.xml index 935f5ec0c0..18878a7993 100644 --- a/features/jwt-client/pom.xml +++ b/features/jwt-client/pom.xml @@ -23,13 +23,13 @@ org.wso2.carbon.devicemgt carbon-devicemgt - 2.0.14-SNAPSHOT + 2.0.16-SNAPSHOT ../../pom.xml 4.0.0 jwt-client-feature - 2.0.14-SNAPSHOT + 2.0.16-SNAPSHOT pom WSO2 Carbon - Dynamic Client Registration Feature http://wso2.org diff --git a/features/oauth-extensions/org.wso2.carbon.device.mgt.oauth.extensions.feature/pom.xml b/features/oauth-extensions/org.wso2.carbon.device.mgt.oauth.extensions.feature/pom.xml index 66ed3c6074..0c314a96ca 100644 --- a/features/oauth-extensions/org.wso2.carbon.device.mgt.oauth.extensions.feature/pom.xml +++ b/features/oauth-extensions/org.wso2.carbon.device.mgt.oauth.extensions.feature/pom.xml @@ -23,14 +23,14 @@ org.wso2.carbon.devicemgt oauth-extensions-feature - 2.0.14-SNAPSHOT + 2.0.16-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.device.mgt.oauth.extensions.feature pom - 2.0.14-SNAPSHOT + 2.0.16-SNAPSHOT WSO2 Carbon - Device Mgt OAuth Extensions Feature http://wso2.org This feature contains devicemgt related OAuth extensions diff --git a/features/oauth-extensions/pom.xml b/features/oauth-extensions/pom.xml index a6583de71c..d6305fd569 100644 --- a/features/oauth-extensions/pom.xml +++ b/features/oauth-extensions/pom.xml @@ -22,14 +22,14 @@ org.wso2.carbon.devicemgt carbon-devicemgt - 2.0.14-SNAPSHOT + 2.0.16-SNAPSHOT ../../pom.xml 4.0.0 org.wso2.carbon.devicemgt oauth-extensions-feature - 2.0.14-SNAPSHOT + 2.0.16-SNAPSHOT pom WSO2 Carbon - Device Management OAuth Extensions Feature http://wso2.org 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 fcb6958771..fc1e66d408 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,14 +23,14 @@ org.wso2.carbon.devicemgt policy-mgt-feature - 2.0.14-SNAPSHOT + 2.0.16-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.policy.mgt.server.feature pom - 2.0.14-SNAPSHOT + 2.0.16-SNAPSHOT WSO2 Carbon - Policy Management Server Feature http://wso2.org This feature contains the core bundles required for Back-end Device Management functionality diff --git a/features/policy-mgt/pom.xml b/features/policy-mgt/pom.xml index 2fac1907c0..2da4183d62 100644 --- a/features/policy-mgt/pom.xml +++ b/features/policy-mgt/pom.xml @@ -23,14 +23,14 @@ org.wso2.carbon.devicemgt carbon-devicemgt - 2.0.14-SNAPSHOT + 2.0.16-SNAPSHOT ../../pom.xml 4.0.0 org.wso2.carbon.devicemgt policy-mgt-feature - 2.0.14-SNAPSHOT + 2.0.16-SNAPSHOT pom WSO2 Carbon - Policy Management Feature http://wso2.org 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 8df4b9b38c..28f37886c1 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,14 +22,14 @@ org.wso2.carbon.devicemgt webapp-authenticator-framework-feature - 2.0.14-SNAPSHOT + 2.0.16-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.webapp.authenticator.framework.server.feature pom - 2.0.14-SNAPSHOT + 2.0.16-SNAPSHOT WSO2 Carbon - Webapp Authenticator Framework Server Feature http://wso2.org This feature contains the core bundles required for Back-end Device Management functionality diff --git a/features/webapp-authenticator-framework/pom.xml b/features/webapp-authenticator-framework/pom.xml index e18954bb28..5197994d7a 100644 --- a/features/webapp-authenticator-framework/pom.xml +++ b/features/webapp-authenticator-framework/pom.xml @@ -22,14 +22,14 @@ org.wso2.carbon.devicemgt carbon-devicemgt - 2.0.14-SNAPSHOT + 2.0.16-SNAPSHOT ../../pom.xml 4.0.0 org.wso2.carbon.devicemgt webapp-authenticator-framework-feature - 2.0.14-SNAPSHOT + 2.0.16-SNAPSHOT pom WSO2 Carbon - Webapp Authenticator Framework Feature http://wso2.org diff --git a/pom.xml b/pom.xml index 3600c91adc..1c40349604 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ org.wso2.carbon.devicemgt carbon-devicemgt pom - 2.0.14-SNAPSHOT + 2.0.16-SNAPSHOT WSO2 Carbon - Device Management - Parent http://wso2.org WSO2 Connected Device Manager Components @@ -1787,7 +1787,7 @@ 1.2.11.wso2v10 - 2.0.14-SNAPSHOT + 2.0.16-SNAPSHOT 4.4.8