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 390bb2dca46..1b59cfe4fd4 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 @@ -15,6 +15,22 @@ * specific language governing permissions and limitations * under the License. * + * + * Copyright (c) 2019, Entgra (pvt) Ltd. (http://entgra.io) All Rights Reserved. + * + * Entgra (pvt) Ltd. licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. */ package org.wso2.carbon.device.mgt.jaxrs.service.api; @@ -31,15 +47,23 @@ import io.swagger.annotations.ApiResponses; import io.swagger.annotations.ResponseHeader; import org.wso2.carbon.apimgt.annotations.api.Scope; import org.wso2.carbon.apimgt.annotations.api.Scopes; +import org.wso2.carbon.device.mgt.common.Feature; +import org.wso2.carbon.device.mgt.common.configuration.mgt.PlatformConfiguration; import org.wso2.carbon.device.mgt.core.dto.DeviceType; import org.wso2.carbon.device.mgt.jaxrs.beans.DeviceTypeList; import org.wso2.carbon.device.mgt.jaxrs.beans.ErrorResponse; import org.wso2.carbon.device.mgt.jaxrs.util.Constants; import javax.validation.constraints.Size; -import javax.ws.rs.*; +import javax.ws.rs.Consumes; +import javax.ws.rs.GET; +import javax.ws.rs.HeaderParam; +import javax.ws.rs.Path; +import javax.ws.rs.PathParam; +import javax.ws.rs.Produces; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Response; +import java.util.List; @SwaggerDefinition( info = @Info( @@ -62,13 +86,19 @@ import javax.ws.rs.core.Response; name = "Getting the Supported Device Platforms", description = "Getting the Supported Device Platforms", key = "perm:device-types:types", - permissions = {"/device-mgt/devices/owning-device/view"} + permissions = {"/device-mgt/device-type/view"} ), @Scope( name = "Get Feature Details of a Device Type", description = "Get Feature Details of a Device Type", key = "perm:device-types:features", - permissions = {"/device-mgt/devices/owning-device/view"} + permissions = {"/device-mgt/device-type/features/view"} + ), + @Scope( + name = "Get Config Details of a Device Type", + description = "Get Config Details of a Device Type", + key = "perm:device-types:configs", + permissions = {"/device-mgt/device-type/config/view"} ) } ) @@ -84,7 +114,7 @@ public interface DeviceTypeManagementService { produces = MediaType.APPLICATION_JSON, httpMethod = "GET", value = "Getting the Supported Device Platforms", - notes = "Get the list of device platforms supported by WSO2 EMM.", + notes = "Get the list of device platforms supported by Entgra IoTS.", tags = "Device Type Management", extensions = { @Extension(properties = { @@ -133,18 +163,71 @@ public interface DeviceTypeManagementService { name = "If-Modified-Since", value = "Checks if the requested variant was modified, since the specified date-time.\n" + "Provide the value in the following format: EEE, d MMM yyyy HH:mm:ss Z.\n" + - "Example: Mon, 05 Jan 2014 15:10:00 +0200", - required = false) + "Example: Mon, 05 Jan 2014 15:10:00 +0200" + ) @HeaderParam("If-Modified-Since") String ifModifiedSince); + @GET + @Path("/{type}") + @ApiOperation( + produces = MediaType.APPLICATION_JSON, + httpMethod = "GET", + value = "Getting Details of a Device Type", + notes = "Get the details of a device by searching via the device type and the tenant domain.", + response = DeviceType.class, + tags = "Device Type Management", + extensions = { + @Extension(properties = { + @ExtensionProperty(name = Constants.SCOPE, value = "perm:device-types:types") + }) + } + ) + @ApiResponses(value = { + @ApiResponse(code = 200, message = "OK. \n Successfully fetched the device type.", + response = DeviceType.class, + responseContainer = "List", + responseHeaders = { + @ResponseHeader( + name = "Content-Type", + description = "The content type of the body") + }), + @ApiResponse( + code = 304, + message = "Not Modified. Empty body because the client already has the latest version of the " + + "requested resource.\n"), + @ApiResponse( + code = 401, + message = "Unauthorized.\n The unauthorized access to the requested resource.", + response = ErrorResponse.class), + @ApiResponse( + code = 404, + message = "Not Found.\n The specified device does not exist", + 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) + }) + Response getDeviceTypeByName( + @ApiParam( + name = "type", + value = "The device type name, such as ios, android, windows or fire-alarm.", + required = true) + @PathParam("type") + @Size(min = 2, max = 45) + String type); + @GET @Path("/{type}/features") @ApiOperation( produces = MediaType.APPLICATION_JSON, httpMethod = "GET", value = "Get Feature Details of a Device Type", - notes = "The features in WSO2 EMM enables you to carry out many operations on a given device platform. " + + notes = "The features in Entgra IoTS enables you to carry out many operations on a given device platform. " + "Using this REST API you can get the features that can be carried out on a preferred device type," + " such as iOS, Android or Windows.", tags = "Device Type Management", @@ -202,108 +285,78 @@ public interface DeviceTypeManagementService { name = "If-Modified-Since", value = "Checks if the requested variant was modified, since the specified date-time.\n" + "Provide the value in the following format: EEE, d MMM yyyy HH:mm:ss Z.\n" + - "Example: Mon, 05 Jan 2014 15:10:00 +0200", - required = false) + "Example: Mon, 05 Jan 2014 15:10:00 +0200" + ) @HeaderParam("If-Modified-Since") String ifModifiedSince); @GET - @Path("/all/{type}") + @Path("/{type}/configs") @ApiOperation( produces = MediaType.APPLICATION_JSON, httpMethod = "GET", - value = "Getting Details of a Device Type", - notes = "Get the details of a device by searching via the device type and the tenant domain.", - response = DeviceType.class, - tags = "Device Type Management Administrative Service", + value = "Get Configuration Details of a Device Type", + notes = "The features in Entgra IoTS enables you to carry out many operations on a given device platform. " + + "Using this REST API you can get platform configurations that can be carried out on a preferred " + + "device type, such as iOS, Android or Windows.", + tags = "Device Type Management", extensions = { @Extension(properties = { - @ExtensionProperty(name = Constants.SCOPE, value = "perm:device-types:types") + @ExtensionProperty(name = Constants.SCOPE, value = "perm:device-types:configs") }) } ) - @ApiResponses(value = { - @ApiResponse(code = 200, message = "OK. \n Successfully fetched the device type.", - response = DeviceType.class, - responseContainer = "List", - responseHeaders = { - @ResponseHeader( - name = "Content-Type", - description = "The content type of the body") - }), - @ApiResponse( - code = 304, - message = "Not Modified. Empty body because the client already has the latest version of the " + - "requested resource.\n"), - @ApiResponse( - code = 401, - message = "Unauthorized.\n The unauthorized access to the requested resource.", - response = ErrorResponse.class), - @ApiResponse( - code = 404, - message = "Not Found.\n The specified device does not exist", - 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) - }) - Response getDeviceTypeByName( + @ApiResponses( + value = { + @ApiResponse( + code = 200, + message = "OK. \n Successfully fetched configurations.", + response = PlatformConfiguration.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 = 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 " + + "list of supported device types.", + response = ErrorResponse.class) + } + ) + Response getConfigs( @ApiParam( name = "type", value = "The device type name, such as ios, android, windows or fire-alarm.", required = true) @PathParam("type") @Size(min = 2, max = 45) - String type); - - @GET - @Path("/all") - @ApiOperation( - produces = MediaType.APPLICATION_JSON, - httpMethod = "GET", - value = "Retrieve device types information", - notes = "Retrieve device types information.", - response = DeviceType.class, - tags = "Device Type Management Administrative Service", - extensions = { - @Extension(properties = { - @ExtensionProperty(name = Constants.SCOPE, value = "perm:device-types:types") - }) - } - ) - @ApiResponses(value = { - @ApiResponse(code = 200, message = "OK. \n Successfully fetched the device type.", - response = DeviceType.class, - responseContainer = "List", - responseHeaders = { - @ResponseHeader( - name = "Content-Type", - description = "The content type of the body") - }), - @ApiResponse( - code = 304, - message = "Not Modified. Empty body because the client already has the latest version of the " + - "requested resource.\n"), - @ApiResponse( - code = 401, - message = "Unauthorized.\n The unauthorized access to the requested resource.", - response = ErrorResponse.class), - @ApiResponse( - code = 404, - message = "Not Found.\n The specified device does not exist", - 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) - }) - Response getDeviceTypes(); + String type, + @ApiParam( + name = "If-Modified-Since", + value = "Checks if the requested variant was modified, since the specified date-time.\n" + + "Provide the value in the following format: EEE, d MMM yyyy HH:mm:ss Z.\n" + + "Example: Mon, 05 Jan 2014 15:10:00 +0200" + ) + @HeaderParam("If-Modified-Since") + String ifModifiedSince); } diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/admin/DeviceTypeManagementAdminService.java b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/admin/DeviceTypeManagementAdminService.java index aa90b5b3042..d669b2c3099 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/admin/DeviceTypeManagementAdminService.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/admin/DeviceTypeManagementAdminService.java @@ -15,6 +15,23 @@ * specific language governing permissions and limitations * under the License. * + * + * Copyright (c) 2019, Entgra (pvt) Ltd. (https://entgra.io) All Rights Reserved. + * + * Entgra (pvt) Ltd. licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * */ package org.wso2.carbon.device.mgt.jaxrs.service.api.admin; @@ -31,7 +48,7 @@ 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.configuration.mgt.PlatformConfiguration; import org.wso2.carbon.device.mgt.core.dto.DeviceType; import org.wso2.carbon.device.mgt.jaxrs.beans.DeviceTypeList; import org.wso2.carbon.device.mgt.jaxrs.beans.ErrorResponse; @@ -40,12 +57,11 @@ import org.wso2.carbon.device.mgt.jaxrs.util.Constants; import javax.validation.constraints.Size; import javax.ws.rs.Consumes; import javax.ws.rs.GET; -import javax.ws.rs.HeaderParam; import javax.ws.rs.POST; import javax.ws.rs.PUT; 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; @@ -73,10 +89,22 @@ import javax.ws.rs.core.Response; @Scopes( scopes = { @Scope( - name = "Getting Details of a Device", - description = "Getting Details of a Device", + name = "Manage a Device Type", + description = "Add, Edit or View a Device Type", key = "perm:admin:device-type", permissions = {"/device-mgt/admin/device-type"} + ), + @Scope( + name = "Getting Details of a Device Type", + description = "Getting Details of a Device Type", + key = "perm:admin:device-type:view", + permissions = {"/device-mgt/admin/device-type/view"} + ), + @Scope( + name = "Add Device Type Config", + description = "Add Platform Config of a Device Type", + key = "perm:admin:device-type:configs", + permissions = {"/device-mgt/admin/device-type/config"} ) } ) @@ -88,10 +116,10 @@ public interface DeviceTypeManagementAdminService { httpMethod = "GET", value = "Getting the Supported Device Type with Meta Definition", notes = "Get the list of device types supported by WSO2 IoT.", - tags = "Device Type Management", + tags = "Device Type Management Administrative Service", extensions = { @Extension(properties = { - @ExtensionProperty(name = Constants.SCOPE, value = "perm:admin:device-type") + @ExtensionProperty(name = Constants.SCOPE, value = "perm:admin:device-type:view") }) } ) @@ -133,6 +161,59 @@ public interface DeviceTypeManagementAdminService { ) Response getDeviceTypes(); + @GET + @Path("/{type}") + @ApiOperation( + produces = MediaType.APPLICATION_JSON, + httpMethod = "GET", + value = "Getting Details of a Device Type", + notes = "Get the details of a device by searching via the device type and the tenant domain.", + response = DeviceType.class, + tags = "Device Type Management Administrative Service", + extensions = { + @Extension(properties = { + @ExtensionProperty(name = Constants.SCOPE, value = "perm:admin:device-type:view") + }) + } + ) + @ApiResponses(value = { + @ApiResponse(code = 200, message = "OK. \n Successfully fetched the device type.", + response = DeviceType.class, + responseContainer = "List", + responseHeaders = { + @ResponseHeader( + name = "Content-Type", + description = "The content type of the body") + }), + @ApiResponse( + code = 304, + message = "Not Modified. Empty body because the client already has the latest version of the " + + "requested resource.\n"), + @ApiResponse( + code = 401, + message = "Unauthorized.\n The unauthorized access to the requested resource.", + response = ErrorResponse.class), + @ApiResponse( + code = 404, + message = "Not Found.\n The specified device does not exist", + 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) + }) + Response getDeviceTypeByName( + @ApiParam( + name = "type", + value = "The device type name, such as ios, android, windows or fire-alarm.", + required = true) + @PathParam("type") + @Size(min = 2, max = 45) + String type); + @POST @ApiOperation( produces = MediaType.APPLICATION_JSON, @@ -179,6 +260,7 @@ public interface DeviceTypeManagementAdminService { required = true)DeviceType deviceType); @PUT + @Path("/{type}") @ApiOperation( produces = MediaType.APPLICATION_JSON, httpMethod = "PUT", @@ -219,9 +301,73 @@ public interface DeviceTypeManagementAdminService { message = "Internal Server Error. \n Server error occurred while fetching the device list.", response = ErrorResponse.class) }) - Response updateDeviceType(@ApiParam( - name = "type", + Response updateDeviceType( + @ApiParam( + name = "type", + value = "The device type name, such as ios, android, windows or fire-alarm.", + required = true) + @PathParam("type") + @Size(min = 2, max = 45) + String name, + @ApiParam( + name = "deviceType", value = "The device type such as ios, android, windows or fire-alarm.", required = true) DeviceType deviceType); + @POST + @Path("/{type}/configs") + @ApiOperation( + produces = MediaType.APPLICATION_JSON, + httpMethod = "POST", + value = "Add Configuration Details", + notes = "Add Configuration Details of a Device Type.", + tags = "Device Type Management Administrative Service", + extensions = { + @Extension(properties = { + @ExtensionProperty(name = Constants.SCOPE, value = "perm:admin:device-type:configs") + }) + } + ) + @ApiResponses(value = { + @ApiResponse(code = 200, message = "OK. \n Successfully added the device type config.", + responseHeaders = { + @ResponseHeader( + name = "Content-Type", + description = "The content type of the body") + }), + @ApiResponse( + code = 304, + message = "Not Modified. Empty body because the client already has the latest version of the " + + "requested resource.\n"), + @ApiResponse( + code = 401, + message = "Unauthorized.\n The unauthorized access to the requested resource.", + response = ErrorResponse.class), + @ApiResponse( + code = 404, + message = "Not Found.\n The specified device does not exist", + 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) + }) + Response addDeviceTypePlatformConfig( + @ApiParam( + name = "type", + value = "The device type name, such as ios, android, windows or fire-alarm.", + required = true) + @PathParam("type") + @Size(min = 2, max = 45) + String type, + @ApiParam( + name = "config", + value = "Platform configuration of specified device type.", + required = true) + PlatformConfiguration config); + + } 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 10aa8538fa8..5c69f0bd4d4 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 @@ -25,6 +25,7 @@ import org.wso2.carbon.context.CarbonContext; import org.wso2.carbon.device.mgt.common.Device; import org.wso2.carbon.device.mgt.common.DeviceIdentifier; import org.wso2.carbon.device.mgt.common.DeviceManagementException; +import org.wso2.carbon.device.mgt.common.DeviceTypeNotFoundException; import org.wso2.carbon.device.mgt.common.EnrolmentInfo; import org.wso2.carbon.device.mgt.common.Feature; import org.wso2.carbon.device.mgt.common.FeatureManager; @@ -506,18 +507,22 @@ public class DeviceManagementServiceImpl implements DeviceManagementService { @PathParam("type") @Size(max = 45) String type, @PathParam("id") @Size(max = 45) String id, @HeaderParam("If-Modified-Since") String ifModifiedSince) { - List features; + List features = new ArrayList<>(); DeviceManagementProviderService dms; try { RequestValidationUtil.validateDeviceIdentifier(type, id); dms = DeviceMgtAPIUtils.getDeviceManagementService(); - FeatureManager fm = dms.getFeatureManager(type); - if (fm == null) { + FeatureManager fm; + try { + fm = dms.getFeatureManager(type); + } catch (DeviceTypeNotFoundException e) { return Response.status(Response.Status.NOT_FOUND).entity( - new ErrorResponse.ErrorResponseBuilder().setMessage("No feature manager is " + - "registered with the given type '" + type + "'").build()).build(); + new ErrorResponse.ErrorResponseBuilder() + .setMessage("No device type found with name '" + type + "'").build()).build(); + } + if (fm != null) { + features = fm.getFeatures(); } - features = fm.getFeatures(); } catch (DeviceManagementException e) { String msg = "Error occurred while retrieving the list of features of '" + type + "' device, which " + "carries the id '" + id + "'"; diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/DeviceTypeManagementServiceImpl.java b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/DeviceTypeManagementServiceImpl.java index 5fdc06a5015..e9129c4c6eb 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/DeviceTypeManagementServiceImpl.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/DeviceTypeManagementServiceImpl.java @@ -15,22 +15,39 @@ * specific language governing permissions and limitations * under the License. * + * + * Copyright (c) 2019, Entgra (pvt) Ltd. (http://entgra.io) All Rights Reserved. + * + * Entgra (pvt) Ltd. licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * */ package org.wso2.carbon.device.mgt.jaxrs.service.impl; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.wso2.carbon.device.mgt.common.DeviceManagementException; +import org.wso2.carbon.device.mgt.common.DeviceTypeNotFoundException; import org.wso2.carbon.device.mgt.common.Feature; import org.wso2.carbon.device.mgt.common.FeatureManager; +import org.wso2.carbon.device.mgt.common.configuration.mgt.PlatformConfiguration; import org.wso2.carbon.device.mgt.common.push.notification.PushNotificationConfig; import org.wso2.carbon.device.mgt.common.type.mgt.DeviceTypeMetaDefinition; import org.wso2.carbon.device.mgt.core.dto.DeviceType; import org.wso2.carbon.device.mgt.core.service.DeviceManagementProviderService; -import org.wso2.carbon.device.mgt.jaxrs.beans.DeviceTypeList; import org.wso2.carbon.device.mgt.jaxrs.beans.ErrorResponse; import org.wso2.carbon.device.mgt.jaxrs.service.api.DeviceTypeManagementService; -import org.wso2.carbon.device.mgt.jaxrs.service.impl.util.RequestValidationUtil; import org.wso2.carbon.device.mgt.jaxrs.util.DeviceMgtAPIUtils; import javax.validation.constraints.Size; @@ -38,7 +55,6 @@ import javax.ws.rs.GET; import javax.ws.rs.HeaderParam; import javax.ws.rs.Path; import javax.ws.rs.PathParam; -import javax.ws.rs.QueryParam; import javax.ws.rs.core.Response; import java.util.ArrayList; import java.util.List; @@ -51,50 +67,6 @@ public class DeviceTypeManagementServiceImpl implements DeviceTypeManagementServ @GET @Override public Response getDeviceTypes(@HeaderParam("If-Modified-Since") String ifModifiedSince) { - List deviceTypes; - try { - deviceTypes = DeviceMgtAPIUtils.getDeviceManagementService().getAvailableDeviceTypes(); - - DeviceTypeList deviceTypeList = new DeviceTypeList(); - deviceTypeList.setCount(deviceTypes.size()); - deviceTypeList.setList(deviceTypes); - return Response.status(Response.Status.OK).entity(deviceTypeList).build(); - } catch (DeviceManagementException e) { - String msg = "Error occurred while fetching the list of device types."; - log.error(msg, e); - return Response.serverError().entity( - new ErrorResponse.ErrorResponseBuilder().setMessage(msg).build()).build(); - } - } - - @GET - @Override - @Path("/{type}/features") - public Response getFeatures(@PathParam("type") @Size(max = 45) String type, @HeaderParam("If-Modified-Since") String ifModifiedSince) { - List features; - DeviceManagementProviderService dms; - try { - dms = DeviceMgtAPIUtils.getDeviceManagementService(); - FeatureManager fm = dms.getFeatureManager(type); - if (fm == null) { - return Response.status(Response.Status.NOT_FOUND).entity( - new ErrorResponse.ErrorResponseBuilder().setMessage("No feature manager is " + - "registered with the given type '" + type + "'").build()).build(); - } - features = fm.getFeatures(); - } catch (DeviceManagementException e) { - String msg = "Error occurred while retrieving the list of features of '" + type + "' device type"; - log.error(msg, e); - return Response.serverError().entity( - new ErrorResponse.ErrorResponseBuilder().setMessage(msg).build()).build(); - } - return Response.status(Response.Status.OK).entity(features).build(); - } - - @Override - @GET - @Path("/config") - public Response getDeviceTypes() { try { List deviceTypes = DeviceMgtAPIUtils.getDeviceManagementService().getDeviceTypes(); List filteredDeviceTypes = new ArrayList<>(); @@ -111,8 +83,8 @@ public class DeviceTypeManagementServiceImpl implements DeviceTypeManagementServ @Override @GET - @Path("/config/{type}") - public Response getDeviceTypeByName(@PathParam("type") String type) { + @Path("/{type}") + public Response getDeviceTypeByName(@PathParam("type") @Size(min = 2, max = 45) String type) { if (type != null && type.length() > 0) { try { DeviceType deviceType = DeviceMgtAPIUtils.getDeviceManagementService().getDeviceType(type); @@ -120,7 +92,7 @@ public class DeviceTypeManagementServiceImpl implements DeviceTypeManagementServ String msg = "Device type does not exist, " + type; return Response.status(Response.Status.NO_CONTENT).entity(msg).build(); } - return Response.status(Response.Status.OK).entity(deviceType).build(); + return Response.status(Response.Status.OK).entity(clearMetaEntryInfo(deviceType)).build(); } catch (DeviceManagementException e) { String msg = "Error occurred at server side while fetching device type."; log.error(msg, e); @@ -131,10 +103,62 @@ public class DeviceTypeManagementServiceImpl implements DeviceTypeManagementServ } } + @GET + @Override + @Path("/{type}/features") + public Response getFeatures(@PathParam("type") @Size(max = 45) String type, + @HeaderParam("If-Modified-Since") String ifModifiedSince) { + List features = new ArrayList<>(); + DeviceManagementProviderService dms; + try { + dms = DeviceMgtAPIUtils.getDeviceManagementService(); + FeatureManager fm; + try { + fm = dms.getFeatureManager(type); + } catch (DeviceTypeNotFoundException e) { + return Response.status(Response.Status.NOT_FOUND).entity( + new ErrorResponse.ErrorResponseBuilder() + .setMessage("No device type found with name '" + type + "'").build()).build(); + } + if (fm != null) { + features = fm.getFeatures(); + } + } catch (DeviceManagementException e) { + String msg = "Error occurred while retrieving the list of features of '" + type + "' device type"; + log.error(msg, e); + return Response.serverError().entity( + new ErrorResponse.ErrorResponseBuilder().setMessage(msg).build()).build(); + } + return Response.status(Response.Status.OK).entity(features).build(); + } + + @GET + @Override + @Path("/{type}/configs") + public Response getConfigs(@PathParam("type") @Size(min = 2, max = 45) String type, + @HeaderParam("If-Modified-Since") String ifModifiedSince) { + PlatformConfiguration platformConfiguration; + try { + platformConfiguration = DeviceMgtAPIUtils.getDeviceManagementService().getConfiguration(type); + if (platformConfiguration == null) { + platformConfiguration = new PlatformConfiguration(); + platformConfiguration.setType(type); + platformConfiguration.setConfiguration(new ArrayList<>()); + } + } catch (DeviceManagementException e) { + String msg = "Error occurred while retrieving the '" + type + "' platform configuration"; + log.error(msg, e); + return Response.serverError().entity( + new ErrorResponse.ErrorResponseBuilder().setMessage(msg).build()).build(); + } + return Response.status(Response.Status.OK).entity(platformConfiguration).build(); + } + /** * This cleans up the configs that should not be exposed to iot users. - * @param deviceType - * @return + * + * @param deviceType device type retrieved from service layer. + * @return sanitized device type. */ private DeviceType clearMetaEntryInfo(DeviceType deviceType) { DeviceTypeMetaDefinition metaDefinition = deviceType.getDeviceTypeMetaDefinition(); diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/admin/DeviceTypeManagementAdminServiceImpl.java b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/admin/DeviceTypeManagementAdminServiceImpl.java index 57c0b7cde62..d7f659871db 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/admin/DeviceTypeManagementAdminServiceImpl.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/admin/DeviceTypeManagementAdminServiceImpl.java @@ -15,13 +15,31 @@ * specific language governing permissions and limitations * under the License. * + * + * Copyright (c) 2019, Entgra (pvt) Ltd. (https://entgra.io) All Rights Reserved. + * + * Entgra (pvt) Ltd. licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * */ + package org.wso2.carbon.device.mgt.jaxrs.service.impl.admin; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.wso2.carbon.device.mgt.common.DeviceManagementException; -import org.wso2.carbon.device.mgt.common.InvalidConfigurationException; +import org.wso2.carbon.device.mgt.common.configuration.mgt.PlatformConfiguration; import org.wso2.carbon.device.mgt.common.spi.DeviceManagementService; import org.wso2.carbon.device.mgt.core.dto.DeviceType; import org.wso2.carbon.device.mgt.jaxrs.beans.ErrorResponse; @@ -33,6 +51,7 @@ import javax.ws.rs.GET; import javax.ws.rs.POST; import javax.ws.rs.PUT; import javax.ws.rs.Path; +import javax.ws.rs.PathParam; import javax.ws.rs.Produces; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Response; @@ -63,6 +82,28 @@ public class DeviceTypeManagementAdminServiceImpl implements DeviceTypeManagemen } } + @Override + @GET + @Path("/{type}") + public Response getDeviceTypeByName(@PathParam("type") String type) { + if (type != null && type.length() > 0) { + try { + DeviceType deviceType = DeviceMgtAPIUtils.getDeviceManagementService().getDeviceType(type); + if (deviceType == null) { + String msg = "Device type does not exist, " + type; + return Response.status(Response.Status.NO_CONTENT).entity(msg).build(); + } + return Response.status(Response.Status.OK).entity(deviceType).build(); + } catch (DeviceManagementException e) { + String msg = "Error occurred at server side while fetching device type."; + log.error(msg, e); + return Response.serverError().entity(msg).build(); + } + } else { + return Response.status(Response.Status.BAD_REQUEST).build(); + } + } + @Override @POST public Response addDeviceType(DeviceType deviceType) { @@ -81,8 +122,8 @@ public class DeviceTypeManagementAdminServiceImpl implements DeviceTypeManagemen DeviceMgtAPIUtils.getDeviceManagementService().registerDeviceType(httpDeviceTypeManagerService); return Response.status(Response.Status.OK).build(); } else { - return Response.status(Response.Status.BAD_REQUEST).entity("Device type name does not match the pattern " - + DEVICETYPE_REGEX_PATTERN).build(); + return Response.status(Response.Status.BAD_REQUEST).entity("Device type name does not match " + + "the pattern " + DEVICETYPE_REGEX_PATTERN).build(); } } catch (DeviceManagementException e) { String msg = "Error occurred at server side while adding a device type."; @@ -96,11 +137,15 @@ public class DeviceTypeManagementAdminServiceImpl implements DeviceTypeManagemen @Override @PUT - public Response updateDeviceType(DeviceType deviceType) { + public Response updateDeviceType(String type, DeviceType deviceType) { if (deviceType != null && deviceType.getDeviceTypeMetaDefinition() != null) { + if (deviceType.getName() == null || !deviceType.getName().equals(type)) { + return Response.status(Response.Status.BAD_REQUEST).entity("Type name mismatch. Expected: '" + type + + "' Found: '"+ deviceType.getName() + "'").build(); + } try { - if (DeviceMgtAPIUtils.getDeviceManagementService().getDeviceType(deviceType.getName()) == null) { - String msg = "Device type does not exist, " + deviceType.getName(); + if (DeviceMgtAPIUtils.getDeviceManagementService().getDeviceType(type) == null) { + String msg = "Device type does not exist, " + type; return Response.status(Response.Status.BAD_REQUEST).entity(msg).build(); } DeviceManagementService httpDeviceTypeManagerService = DeviceMgtAPIUtils.getDeviceTypeGeneratorService() @@ -116,4 +161,22 @@ public class DeviceTypeManagementAdminServiceImpl implements DeviceTypeManagemen return Response.status(Response.Status.BAD_REQUEST).build(); } } + + @Override + public Response addDeviceTypePlatformConfig(String type, PlatformConfiguration platformConfiguration) { + boolean isSaved; + if (platformConfiguration.getType() == null || !platformConfiguration.getType().equals(type)) { + return Response.status(Response.Status.BAD_REQUEST).entity("Type name mismatch. Expected: '" + type + + "' Found: '"+ platformConfiguration.getType() + "'").build(); + } + try { + isSaved = DeviceMgtAPIUtils.getDeviceManagementService().saveConfiguration(platformConfiguration); + } catch (DeviceManagementException e) { + String msg = "Error occurred while retrieving the Android tenant configuration"; + log.error(msg, e); + return Response.serverError().entity( + new ErrorResponse.ErrorResponseBuilder().setMessage(msg).build()).build(); + } + return Response.status(isSaved ? Response.Status.OK : Response.Status.BAD_REQUEST).build(); + } } 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 e1e2c46e8ca..7a2013037a5 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 @@ -66,7 +66,7 @@ - + diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/test/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/DeviceManagementServiceImplTest.java b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/test/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/DeviceManagementServiceImplTest.java index c8549711fc2..51aeaabde64 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/test/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/DeviceManagementServiceImplTest.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/test/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/DeviceManagementServiceImplTest.java @@ -34,6 +34,7 @@ import org.wso2.carbon.context.CarbonContext; import org.wso2.carbon.device.mgt.common.Device; import org.wso2.carbon.device.mgt.common.DeviceIdentifier; import org.wso2.carbon.device.mgt.common.DeviceManagementException; +import org.wso2.carbon.device.mgt.common.DeviceTypeNotFoundException; import org.wso2.carbon.device.mgt.common.EnrolmentInfo; import org.wso2.carbon.device.mgt.common.PaginationRequest; import org.wso2.carbon.device.mgt.common.app.mgt.ApplicationManagementException; @@ -437,26 +438,15 @@ public class DeviceManagementServiceImplTest { Assert.assertEquals(response.getStatus(), Response.Status.OK.getStatusCode()); } - @Test(description = "Testing getting device features when feature manager is not registered for the device type") - public void testGetFeaturesOfDeviceWhenFeatureManagerIsNotRegistered() throws DeviceManagementException { - PowerMockito.stub(PowerMockito.method(DeviceMgtAPIUtils.class, "getDeviceManagementService")) - .toReturn(this.deviceManagementProviderService); - Mockito.when(this.deviceManagementProviderService.getFeatureManager(Mockito.anyString())).thenReturn(null); - Response response = this.deviceManagementService - .getFeaturesOfDevice(TEST_DEVICE_TYPE, UUID.randomUUID().toString(), null); - Assert.assertEquals(response.getStatus(), Response.Status.NOT_FOUND.getStatusCode()); - Mockito.reset(this.deviceManagementProviderService); - } - @Test(description = "Testing getting device features when unable to get the feature manager") - public void testGetFeaturesException() throws DeviceManagementException { + public void testGetFeaturesException() throws DeviceTypeNotFoundException { PowerMockito.stub(PowerMockito.method(DeviceMgtAPIUtils.class, "getDeviceManagementService")) .toReturn(this.deviceManagementProviderService); Mockito.when(this.deviceManagementProviderService.getFeatureManager(Mockito.anyString())) - .thenThrow(new DeviceManagementException()); + .thenThrow(new DeviceTypeNotFoundException()); Response response = this.deviceManagementService .getFeaturesOfDevice(TEST_DEVICE_TYPE, UUID.randomUUID().toString(), null); - Assert.assertEquals(response.getStatus(), Response.Status.INTERNAL_SERVER_ERROR.getStatusCode()); + Assert.assertEquals(response.getStatus(), Response.Status.NOT_FOUND.getStatusCode()); Mockito.reset(this.deviceManagementProviderService); } diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/test/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/DeviceTypeManagementAdminServiceTest.java b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/test/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/DeviceTypeManagementAdminServiceTest.java index 0d275ea52d8..1b8910507db 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/test/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/DeviceTypeManagementAdminServiceTest.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/test/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/DeviceTypeManagementAdminServiceTest.java @@ -171,7 +171,7 @@ public class DeviceTypeManagementAdminServiceTest { PowerMockito.stub(PowerMockito.method(DeviceMgtAPIUtils.class, "getDeviceTypeGeneratorService")) .toReturn(this.deviceTypeGeneratorService); DeviceType deviceType = DeviceMgtAPITestHelper.getDummyDeviceType(TEST_DEVICE_TYPE, TEST_DEVICE_TYPE_ID); - Response response = this.deviceTypeManagementAdminService.updateDeviceType(deviceType); + Response response = this.deviceTypeManagementAdminService.updateDeviceType(TEST_DEVICE_TYPE, deviceType); Assert.assertNotNull(response, "The response should not be null"); Assert.assertEquals(response.getStatus(), Response.Status.OK.getStatusCode(), "The Response Status code should be 200."); @@ -185,7 +185,7 @@ public class DeviceTypeManagementAdminServiceTest { .toReturn(this.deviceTypeGeneratorService); Mockito.when(deviceManagementProviderService.getDeviceType(Mockito.anyString())).thenReturn(null); DeviceType deviceType = DeviceMgtAPITestHelper.getDummyDeviceType(TEST_DEVICE_TYPE, TEST_DEVICE_TYPE_ID); - Response response = this.deviceTypeManagementAdminService.updateDeviceType(deviceType); + Response response = this.deviceTypeManagementAdminService.updateDeviceType(TEST_DEVICE_TYPE, deviceType); Assert.assertNotNull(response, "The response should not be null"); Assert.assertEquals(response.getStatus(), Response.Status.BAD_REQUEST.getStatusCode(), "The Response Status code should be 400."); @@ -196,7 +196,7 @@ public class DeviceTypeManagementAdminServiceTest { public void testUpdateDeviceTypeWithNullDeviceType() { PowerMockito.stub(PowerMockito.method(DeviceMgtAPIUtils.class, "getDeviceManagementService")) .toReturn(this.deviceManagementProviderService); - Response response = this.deviceTypeManagementAdminService.updateDeviceType(null); + Response response = this.deviceTypeManagementAdminService.updateDeviceType(TEST_DEVICE_TYPE, null); Assert.assertNotNull(response, "The response should not be null"); Assert.assertEquals(response.getStatus(), Response.Status.BAD_REQUEST.getStatusCode(), "The Response Status code should be 400."); @@ -210,7 +210,7 @@ public class DeviceTypeManagementAdminServiceTest { Mockito.when(this.deviceManagementProviderService.getDeviceType(Mockito.anyString())) .thenThrow(new DeviceManagementException()); DeviceType deviceType = DeviceMgtAPITestHelper.getDummyDeviceType(TEST_DEVICE_TYPE, TEST_DEVICE_TYPE_ID); - Response response = this.deviceTypeManagementAdminService.updateDeviceType(deviceType); + Response response = this.deviceTypeManagementAdminService.updateDeviceType(TEST_DEVICE_TYPE, deviceType); Assert.assertNotNull(response, "The response should not be null"); Assert.assertEquals(response.getStatus(), Response.Status.INTERNAL_SERVER_ERROR.getStatusCode(), "The Response Status code should be 500."); diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/test/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/DeviceTypeManagementServiceTest.java b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/test/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/DeviceTypeManagementServiceTest.java index 9629afb07ab..7143108184b 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/test/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/DeviceTypeManagementServiceTest.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/test/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/DeviceTypeManagementServiceTest.java @@ -89,7 +89,7 @@ public class DeviceTypeManagementServiceTest { PowerMockito.stub(PowerMockito.method(DeviceMgtAPIUtils.class, "getDeviceManagementService")) .toReturn(this.deviceManagementProviderService); Mockito.when(this.deviceManagementProviderService.getDeviceTypes()).thenThrow(new DeviceManagementException()); - Response response = this.deviceTypeManagementService.getDeviceTypes(); + Response response = this.deviceTypeManagementService.getDeviceTypes(MODIFIED_SINCE); Assert.assertNotNull(response, "The response object is null."); Assert.assertEquals(response.getStatus(), Response.Status.INTERNAL_SERVER_ERROR.getStatusCode(), "The response status should be 500."); @@ -100,7 +100,7 @@ public class DeviceTypeManagementServiceTest { public void testExistingDeviceTypesModifiedError() throws Exception { PowerMockito.stub(PowerMockito.method(DeviceMgtAPIUtils.class, "getDeviceManagementService")) .toReturn(this.deviceManagementProviderService); - Mockito.when(this.deviceManagementProviderService.getAvailableDeviceTypes()).thenThrow(new + Mockito.when(this.deviceManagementProviderService.getDeviceTypes()).thenThrow(new DeviceManagementException()); Response response = this.deviceTypeManagementService.getDeviceTypes(MODIFIED_SINCE); Assert.assertNotNull(response, "The response object is null."); @@ -142,8 +142,9 @@ public class DeviceTypeManagementServiceTest { Mockito.when(this.deviceManagementProviderService.getFeatureManager(Mockito.anyString())).thenReturn(null); Response response = this.deviceTypeManagementService.getFeatures(TEST_DEVICE_TYPE, MODIFIED_SINCE); Assert.assertNotNull(response, "The response object is null."); - Assert.assertEquals(response.getStatus(), Response.Status.NOT_FOUND.getStatusCode(), - "The response status should be 404."); + Assert.assertEquals(response.getStatus(), Response.Status.OK.getStatusCode(), + "The response status should be 200."); + Assert.assertEquals(response.getEntity().toString(), "[]", "The response should be []."); Mockito.reset(deviceManagementProviderService); } @@ -151,7 +152,7 @@ public class DeviceTypeManagementServiceTest { public void testGetDeviceTypes() throws Exception { PowerMockito.stub(PowerMockito.method(DeviceMgtAPIUtils.class, "getDeviceManagementService")) .toReturn(this.deviceManagementProviderService); - Response response = this.deviceTypeManagementService.getDeviceTypes(); + Response response = this.deviceTypeManagementService.getDeviceTypes(MODIFIED_SINCE); Assert.assertNotNull(response, "The response object is null."); Assert.assertEquals(response.getStatus(), Response.Status.OK.getStatusCode(), "The response status should be 200."); @@ -163,7 +164,7 @@ public class DeviceTypeManagementServiceTest { .toReturn(this.deviceManagementProviderService); List deviceTypes = DeviceMgtAPITestHelper.getDummyDeviceTypeList(5); Mockito.when(this.deviceManagementProviderService.getDeviceTypes()).thenReturn(deviceTypes); - Response response = this.deviceTypeManagementService.getDeviceTypes(); + Response response = this.deviceTypeManagementService.getDeviceTypes(MODIFIED_SINCE); Assert.assertNotNull(response, "The response object is null."); Assert.assertEquals(response.getStatus(), Response.Status.OK.getStatusCode(), "The response state should be 200"); diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/DeviceTypeNotFoundException.java b/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/DeviceTypeNotFoundException.java new file mode 100644 index 00000000000..d8034cc8cff --- /dev/null +++ b/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/DeviceTypeNotFoundException.java @@ -0,0 +1,44 @@ +/* + * Copyright (c) 2019, Entgra (pvt) Ltd. (http://entgra.io) All Rights Reserved. + * + * Entgra (pvt) Ltd. licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. + * you may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.wso2.carbon.device.mgt.common; + +public class DeviceTypeNotFoundException extends Exception { + + private static final long serialVersionUID = 3821589758650454161L; + + public DeviceTypeNotFoundException(String msg, Exception nestedEx) { + super(msg, nestedEx); + } + + public DeviceTypeNotFoundException(String message, Throwable cause) { + super(message, cause); + } + + public DeviceTypeNotFoundException(String msg) { + super(msg); + } + + public DeviceTypeNotFoundException() { + super(); + } + + public DeviceTypeNotFoundException(Throwable cause) { + super(cause); + } + +} diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/service/DeviceManagementProviderService.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/service/DeviceManagementProviderService.java index 291a636678b..7d3c0fdf525 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/service/DeviceManagementProviderService.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/service/DeviceManagementProviderService.java @@ -496,7 +496,7 @@ public interface DeviceManagementProviderService { void sendRegistrationEmail(EmailMetaInfo metaInfo) throws DeviceManagementException, ConfigurationManagementException; - FeatureManager getFeatureManager(String deviceType) throws DeviceManagementException; + FeatureManager getFeatureManager(String deviceType) throws DeviceTypeNotFoundException; /** * Proxy method to get the tenant configuration of a given platform. diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/service/DeviceManagementProviderServiceImpl.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/service/DeviceManagementProviderServiceImpl.java index a763b701c33..ecb7463be27 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/service/DeviceManagementProviderServiceImpl.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/service/DeviceManagementProviderServiceImpl.java @@ -39,6 +39,7 @@ import org.wso2.carbon.device.mgt.common.DeviceManager; import org.wso2.carbon.device.mgt.common.DeviceNotFoundException; import org.wso2.carbon.device.mgt.common.DeviceNotification; import org.wso2.carbon.device.mgt.common.DevicePropertyNotification; +import org.wso2.carbon.device.mgt.common.DeviceTypeNotFoundException; import org.wso2.carbon.device.mgt.common.EnrolmentInfo; import org.wso2.carbon.device.mgt.common.FeatureManager; import org.wso2.carbon.device.mgt.common.InitialOperationConfig; @@ -172,14 +173,14 @@ public class DeviceManagementProviderServiceImpl implements DeviceManagementProv } @Override - public FeatureManager getFeatureManager(String deviceType) throws DeviceManagementException { + public FeatureManager getFeatureManager(String deviceType) throws DeviceTypeNotFoundException { DeviceManager deviceManager = this.getDeviceManager(deviceType); if (deviceManager == null) { if (log.isDebugEnabled()) { log.debug("Device Manager associated with the device type '" + deviceType + "' is null. " + "Therefore, not attempting method 'getFeatureManager'"); } - return null; + throw new DeviceTypeNotFoundException("Device type '" + deviceType + "' not found."); } return deviceManager.getFeatureManager(); } diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/api/data-tables-invoker-api.jag b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/api/data-tables-invoker-api.jag index 146abcf0d06..4271f463bd5 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/api/data-tables-invoker-api.jag +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/api/data-tables-invoker-api.jag @@ -59,10 +59,10 @@ if (uriMatcher.match("/{context}/api/data-tables/invoker/filters")) { result.deviceTypes = []; var deviceTypesRes = deviceModule.getDeviceTypes(); if (deviceTypesRes.status === "success") { - var deviceTypes = deviceTypesRes["content"]["deviceTypes"]; + var deviceTypes = deviceTypesRes["content"]; for (i = 0; i < deviceTypes.length; i++) { - var deviceTypeName = deviceTypes[i]; - var deviceTypeLabel = deviceTypeName; + var deviceTypeName = deviceTypes[i].name; + var deviceTypeLabel = deviceTypeName.charAt(0).toUpperCase() + deviceTypeName.slice(1); var configs = utility.getDeviceTypeConfig(deviceTypeLabel); if (configs) { if (configs[DTYPE_CONF_DEVICE_TYPE_KEY][DTYPE_CONF_DEVICE_TYPE_LABEL_KEY]) { 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 ffe9bcaa863..8e74ac0232d 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 @@ -136,6 +136,7 @@ "perm:groups:devices-remove", "perm:groups:devices-add", "perm:groups:assign", + "perm:device-types:configs", "perm:device-types:features", "perm:device-types:types", "perm:applications:install", @@ -154,6 +155,8 @@ "perm:device-types:events", "perm:device-types:events:view", "perm:admin:device-type", + "perm:admin:device-type:view", + "perm:admin:device-type:configs", "perm:device:enroll", "perm:geo-service:analytics-view", "perm:geo-service:alerts-manage", 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 16be67eb431..ca8fa6dbd82 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 @@ -303,7 +303,7 @@ deviceModule = function () { } return serviceInvokers.XMLHttp.get( url, function (responsePayload) { - return parse(responsePayload["responseText"])["count"]; + return parse(responsePayload["responseText"]).length; }, function (responsePayload) { log.error(responsePayload["responseText"]); diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.devices/devices.js b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.devices/devices.js index c973d079851..41afed6ae9f 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.devices/devices.js +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.devices/devices.js @@ -56,12 +56,12 @@ function onRequest(context) { var typesListResponse = deviceModule.getDeviceTypes(); var deviceTypes = []; if (typesListResponse["status"] == "success") { - var data = typesListResponse.content.deviceTypes; + var data = typesListResponse.content; if (data) { for (var i = 0; i < data.length; i++) { - var config = utility.getDeviceTypeConfig(data[i]); + var config = utility.getDeviceTypeConfig(data[i].name); var category = "iot"; - var label = data[i]; + var label = data[i].name; var analyticsEnabled = "false"; var groupingEnabled = "true"; var analyticsView = null; @@ -75,10 +75,10 @@ function onRequest(context) { } deviceTypes.push({ - "type": data[i], + "type": data[i].name, "category": category, "label": label, - "thumb": utility.getDeviceThumb(data[i]), + "thumb": utility.getDeviceThumb(data[i].name), "analyticsEnabled": analyticsEnabled, "groupingEnabled": groupingEnabled, "analyticsView" : analyticsView diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.default.device.type.type-view/public/images/thumb.png b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.default.device.type.type-view/public/images/thumb.png index 71e5c0c28b8..109ed11017a 100644 Binary files a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.default.device.type.type-view/public/images/thumb.png and b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.default.device.type.type-view/public/images/thumb.png differ diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.types.listing/listing.js b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.types.listing/listing.js index 9b0cdacddbc..23ee3e59d01 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.types.listing/listing.js +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.types.listing/listing.js @@ -28,14 +28,14 @@ function onRequest(context) { var utility = require("/app/modules/utility.js").utility; var typesListResponse = deviceModule.getDeviceTypes(); if (typesListResponse["status"] == "success") { - var deviceTypes = typesListResponse.content.deviceTypes; + var deviceTypes = typesListResponse.content; if (deviceTypes) { if (deviceTypes.length > 0){ viewModel.hasDeviceTypes = true; } var deviceTypesList = [], virtualDeviceTypesList = []; for (var i = 0; i < deviceTypes.length; i++) { - var deviceType = deviceTypes[i]; + var deviceType = deviceTypes[i].name; var deviceTypeLabel = deviceType; var configs = utility.getDeviceTypeConfig(deviceTypeLabel); var deviceCategory = "device"; diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.view/public/templates/applications-list.hbs b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.view/public/templates/applications-list.hbs index 8fba28621b7..2f6af71aa66 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.view/public/templates/applications-list.hbs +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.view/public/templates/applications-list.hbs @@ -3,7 +3,7 @@ {{#each applications}} {{#equal platform "android"}}{{/equal}} - {{#equal platform "ios"}}{{/equal}} + {{#equal platform "ios"}}{{/equal}} {{#equal platform "windows"}}{{/equal}} {{name}} diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.dynamic.platform.configuration/configuration.hbs b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.dynamic.platform.configuration/configuration.hbs new file mode 100644 index 00000000000..b4c64f7fd52 --- /dev/null +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.dynamic.platform.configuration/configuration.hbs @@ -0,0 +1,41 @@ +{{! + 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"}} + +{{/zone}} diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.dynamic.platform.configuration/configuration.json b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.dynamic.platform.configuration/configuration.json new file mode 100644 index 00000000000..fd259012978 --- /dev/null +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.dynamic.platform.configuration/configuration.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.platform.configuration/configuration.hbs b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.platform.configuration/configuration.hbs index 1d42bd01d80..597b38ce182 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.platform.configuration/configuration.hbs +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.platform.configuration/configuration.hbs @@ -15,6 +15,11 @@ specific language governing permissions and limitations under the License. }} + +{{#zone "topCss"}} + {{css "css/platform-configuration.css"}} +{{/zone}} + {{#zone "content"}} {{#if isAuthorized}}
@@ -37,7 +42,7 @@
-
+
{{#unless isCloud}} @@ -63,7 +68,11 @@ - + {{#if unitName}} + + {{else}} + + {{/if}} {{label}} Configurations @@ -124,7 +133,11 @@ {{#each deviceTypes}} {{/each}} diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.platform.configuration/configuration.js b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.platform.configuration/configuration.js index 361579554ff..4fc10b836f4 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.platform.configuration/configuration.js +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.platform.configuration/configuration.js @@ -14,6 +14,23 @@ * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. + * + * + * Copyright (c) 2019, Entgra (pvt) Ltd. (http://entgra.io) All Rights Reserved. + * + * Entgra (pvt) Ltd. licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. */ function onRequest(context) { @@ -29,23 +46,23 @@ function onRequest(context) { var deviceTypesArray = []; var typesListResponse = deviceModule.getDeviceTypes(); if (typesListResponse["status"] == "success") { - var data = typesListResponse["content"].deviceTypes; + var data = typesListResponse["content"]; if (data) { for (var i = 0; i < data.length; i++) { - var deviceTypeName = data[i]; + var deviceTypeName = data[i].name; + var deviceTypeLabel = deviceTypeName.charAt(0).toUpperCase() + deviceTypeName.slice(1);; var configUnitName = utility.getTenantedDeviceUnitName(deviceTypeName, "platform.configuration"); if (configUnitName) { var deviceTypeConfig = utility.getDeviceTypeConfig(deviceTypeName); - var deviceTypeLabel = deviceTypeName; if (deviceTypeConfig) { deviceTypeLabel = deviceTypeConfig.deviceType.label; } - deviceTypesArray.push({ - name: deviceTypeName, - label: deviceTypeLabel, - unitName: configUnitName - }); } + deviceTypesArray.push({ + name: deviceTypeName, + label: deviceTypeLabel, + unitName: configUnitName + }); } } } diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.platform.configuration/public/js/platform-configuration.js b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.platform.configuration/public/js/platform-configuration.js index 45f753b4eda..d3a2152b06a 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.platform.configuration/public/js/platform-configuration.js +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.platform.configuration/public/js/platform-configuration.js @@ -16,6 +16,8 @@ * under the License. */ +var configRowId = 0; + $(document).ready(function () { var configParams = { @@ -41,25 +43,25 @@ $(document).ready(function () { } invokerUtil.get( - "/api/device-mgt/v1.0/configuration", - function (data) { - data = JSON.parse(data); - if (data && data.configuration) { - for (var i = 0; i < data.configuration.length; i++) { - var config = data.configuration[i]; - if (config.name == configParams["NOTIFIER_FREQUENCY"]) { - $("input#monitoring-config-frequency").val(config.value / 1000); - } + "/api/device-mgt/v1.0/configuration", + function (data) { + data = JSON.parse(data); + if (data && data.configuration) { + for (var i = 0; i < data.configuration.length; i++) { + var config = data.configuration[i]; + if (config.name == configParams["NOTIFIER_FREQUENCY"]) { + $("input#monitoring-config-frequency").val(config.value / 1000); } } - }, function (data) { - console.log(data); - }); + } + }, function (data) { + console.log(data); + }); /** * Following click function would execute * when a user clicks on "Save" button - * on General platform configuration page in WSO2 EMM Console. + * on General platform configuration page in Entgra devicemgt Console. */ $("button#save-general-btn").click(function () { var notifierFrequency = $("input#monitoring-config-frequency").val(); @@ -87,33 +89,33 @@ $(document).ready(function () { var addConfigAPI = "/api/device-mgt/v1.0/configuration"; invokerUtil.put( - addConfigAPI, - addConfigFormData, - function (data, textStatus, jqXHR) { - data = jqXHR.status; - if (data == 200) { - $("#config-save-form").addClass("hidden"); - $("#record-created-msg").removeClass("hidden"); - } else if (data == 500) { - $(errorMsg).text("Exception occurred at backend."); - } else if (data == 403) { - $(errorMsg).text("Action was not permitted."); - } else { - $(errorMsg).text("An unexpected error occurred."); - } - - $(errorMsgWrapper).removeClass("hidden"); - }, function (data) { - data = data.status; - if (data == 500) { - $(errorMsg).text("Exception occurred at backend."); - } else if (data == 403) { - $(errorMsg).text("Action was not permitted."); - } else { - $(errorMsg).text("An unexpected error occurred."); - } - $(errorMsgWrapper).removeClass("hidden"); + addConfigAPI, + addConfigFormData, + function (data, textStatus, jqXHR) { + data = jqXHR.status; + if (data == 200) { + $("#config-save-form").addClass("hidden"); + $("#record-created-msg").removeClass("hidden"); + } else if (data == 500) { + $(errorMsg).text("Exception occurred at backend."); + } else if (data == 403) { + $(errorMsg).text("Action was not permitted."); + } else { + $(errorMsg).text("An unexpected error occurred."); + } + + $(errorMsgWrapper).removeClass("hidden"); + }, function (data) { + data = data.status; + if (data == 500) { + $(errorMsg).text("Exception occurred at backend."); + } else if (data == 403) { + $(errorMsg).text("Action was not permitted."); + } else { + $(errorMsg).text("An unexpected error occurred."); } + $(errorMsgWrapper).removeClass("hidden"); + } ); } }); @@ -154,3 +156,121 @@ var artifactGeoUpload = function () { showPopup(); }, contentType); }; + +var loadDynamicDeviceTypeConfig = function (deviceType) { + var configAPI = '/api/device-mgt/v1.0/device-types/' + deviceType + '/configs'; + invokerUtil.get( + configAPI, + function (data) { + data = JSON.parse(data); + var fieldWrapper = "#" + deviceType + "-config-field-wrapper"; + $(fieldWrapper).html(""); + if (data.configuration) { + var config; + var i; + for (i = 0; i < data.configuration.length; i++) { + config = data.configuration[i]; + onDynamicConfigAddNew(deviceType, config.name, config.value); + } + } + $(fieldWrapper).append( + '
' + + '
' + + '' + + '
' + + '
' + + '' + + '
' + + '' + + '
' + ); + }, function (data) { + console.log(data); + } + ); +}; + +var onDynamicConfigSubmit = function (deviceType) { + + var errorMsgWrapper = "#" + deviceType + "-config-error-msg"; + var errorMsg = "#" + deviceType + "-config-error-msg span"; + + var addConfigFormData = {}; + var configList = []; + + $('.' + deviceType + '-config-row').each(function () { + var configName = $(this).find("." + deviceType + "-config-name").val(); + var configVal = $(this).find("." + deviceType + "-config-value").val(); + if (configName && configName.trim() !== "" && configVal && configVal.trim() !== "") { + var configurationEntry = {}; + configurationEntry.name = configName.trim(); + configurationEntry.contentType = "text"; + configurationEntry.value = configVal.trim(); + configList.push(configurationEntry); + } + }); + + addConfigFormData.type = deviceType; + addConfigFormData.configuration = configList; + + var addConfigAPI = '/api/device-mgt/v1.0/admin/device-types/' + deviceType + '/configs'; + + invokerUtil.post( + addConfigAPI, + addConfigFormData, + function (data, textStatus, jqXHR) { + data = jqXHR.status; + if (data == 200) { + $("#config-save-form").addClass("hidden"); + $("#record-created-msg").removeClass("hidden"); + } else if (data == 500) { + $(errorMsg).text("Exception occurred at backend."); + } else if (data == 400) { + $(errorMsg).text("Configurations cannot be empty."); + } else { + $(errorMsg).text("An unexpected error occurred."); + } + + $(errorMsgWrapper).removeClass("hidden"); + }, function (data) { + data = data.status; + if (data == 500) { + $(errorMsg).text("Exception occurred at backend."); + } else if (data == 403) { + $(errorMsg).text("Action was not permitted."); + } else { + $(errorMsg).text("An unexpected error occurred."); + } + $(errorMsgWrapper).removeClass("hidden"); + } + ); +}; + +var onDynamicConfigAddNew = function (deviceType, name, value) { + $("#" + deviceType + "-config-field-wrapper").append( + '
' + + '
' + + '' + + '
' + + '
' + + '' + + '
' + + '' + + '
' + ); +}; + +var onDynamicConfigRemove = function (deviceType, rawId) { + $("#" + deviceType + "-config-row-" + rawId).remove() +}; \ 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.policy.create/create.js b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.policy.create/create.js index db1d8169a23..94f0b1235b2 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.policy.create/create.js +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.policy.create/create.js @@ -50,7 +50,7 @@ function onRequest(context) { types.isAuthorizedViewGroups = userModule.isAuthorized("/permission/admin/device-mgt/groups/view"); types["types"] = []; - var typesListResponse = deviceModule.getDeviceTypesConfig(); + var typesListResponse = deviceModule.getDeviceTypes(); if (typesListResponse["status"] == "success") { for (var type in typesListResponse["content"]) { var content = {}; diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.ui.navbar.nav-menu/nav-menu.hbs b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.ui.navbar.nav-menu/nav-menu.hbs index b071abf81d8..8c80bd6fc77 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.ui.navbar.nav-menu/nav-menu.hbs +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.ui.navbar.nav-menu/nav-menu.hbs @@ -118,7 +118,7 @@ {{/if}} {{#if iosPluginFlag}}
  • - + DEP Configurations
  • diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.ui.navbar.nav-menu/nav-menu.js b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.ui.navbar.nav-menu/nav-menu.js index 5bbd9926bf1..3fce92e8e7c 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.ui.navbar.nav-menu/nav-menu.js +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.ui.navbar.nav-menu/nav-menu.js @@ -27,8 +27,8 @@ function onRequest(context) { return options.fn(this); } }); + var utility = require("/app/modules/utility.js").utility; var userModule = require("/app/modules/business-controllers/user.js")["userModule"]; - var deviceModule = require("/app/modules/business-controllers/device.js")["deviceModule"]; var mdmProps = require("/app/modules/conf-reader/main.js")["conf"]; var constants = require("/app/modules/constants.js"); var uiPermissions = userModule.getUIPermissions(); @@ -43,15 +43,10 @@ function onRequest(context) { "device-mgt": [] }; - var typesListResponse = deviceModule.getDeviceTypesConfig(); - var temp = []; - temp = typesListResponse["content"]; var iosPluginFlag = false; - temp.forEach(function(element) { - if (element["name"] == "ios") { - iosPluginFlag = true; - } - }); + if (utility.getTenantedDeviceUnitName("ios", "type-view")) { + iosPluginFlag = true; + } context["iosPluginFlag"] = iosPluginFlag; // following context.link value comes here based on the value passed at the point diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/uuf-template-app/app/units/uuf.unit.theme/public/lib/font-wso2-1.3.0/css/font-wso2.css b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/uuf-template-app/app/units/uuf.unit.theme/public/lib/font-wso2-1.3.0/css/font-wso2.css index 870013db199..c6544d6f2eb 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/uuf-template-app/app/units/uuf.unit.theme/public/lib/font-wso2-1.3.0/css/font-wso2.css +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/uuf-template-app/app/units/uuf.unit.theme/public/lib/font-wso2-1.3.0/css/font-wso2.css @@ -1,1506 +1,1506 @@ -/*! -~ Copyright (c) WSO2 Inc. (http://wso2.com) All Rights Reserved. -~ -~ Licensed 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. -*/ - - -@font-face { - font-family:"font-wso2"; - src:local("font-wso2"), url("../fonts/font-wso2.eot?6563fa91278f239ef8c827d90a165223"); - src:local("font-wso2"), +/*! +~ Copyright (c) WSO2 Inc. (http://wso2.com) All Rights Reserved. +~ +~ Licensed 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. +*/ + + +@font-face { + font-family:"font-wso2"; + src:local("font-wso2"), url("../fonts/font-wso2.eot?6563fa91278f239ef8c827d90a165223"); + src:local("font-wso2"), url("../fonts/font-wso2.eot?#iefix") format("embedded-opentype"), url("../fonts/font-wso2.woff2?6563fa91278f239ef8c827d90a165223") format("woff2"), url("../fonts/font-wso2.woff?6563fa91278f239ef8c827d90a165223") format("woff"), url("../fonts/font-wso2.ttf?6563fa91278f239ef8c827d90a165223") format("truetype"), - url("../fonts/font-wso2.svg?6563fa91278f239ef8c827d90a165223#font-wso2") format("svg"); - font-weight:normal; - font-style:normal; -} - -.fw, [class^="fw-"], [class*=" fw-"] { - font: normal normal normal 14px/1 font-wso2; - display: inline-block; - font-weight: normal; - font-style: normal; - font-size: inherit; - font-variant: normal; - speak: none; - text-decoration: inherit; - - /* Better Font Rendering =========== */ - text-transform: none; - text-rendering: auto; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; -} - - -/* ======================================================================== - * font options - * ======================================================================== */ - -.fw-lg { - font-size: 1.33333333em; - line-height: 0.75em; - vertical-align: -15%; -} -.fw-2x { - font-size: 2em; -} -.fw-3x { - font-size: 3em; -} -.fw-4x { - font-size: 4em; -} -.fw-5x { - font-size: 5em; -} -.fw-fw { - width: 1.28571429em; - text-align: center; -} -.fw-ul { - padding-left: 0; - margin-left: 2.14285714em; - list-style-type: none; -} -.fw-ul > li { - position: relative; -} -.fw-li { - position: absolute; - left: -2.14285714em; - width: 2.14285714em; - top: 0.14285714em; - text-align: center; -} -.fw-li.fw-lg { - left: -1.85714286em; -} -.fw-border { - padding: .2em .25em .15em; - border: solid 0.08em #eeeeee; - border-radius: .1em; -} -.fw-background { - background: #888; - border-radius: .3em; - padding: .4em .50em .45em; -} -.fw-pull-left { - float: left; -} -.fw-pull-right { - float: right; -} -.fw.fw-pull-left { - margin-right: .3em; -} -.fw.fw-pull-right { - margin-left: .3em; -} -.fw-spin { - -webkit-animation: fw-spin 2s infinite linear; - animation: fw-spin 2s infinite linear; -} -@-webkit-keyframes fw-spin { - 0% { - -webkit-transform: rotate(0deg); - transform: rotate(0deg); - } - 100% { - -webkit-transform: rotate(359deg); - transform: rotate(359deg); - } -} -@keyframes fw-spin { - 0% { - -webkit-transform: rotate(0deg); - transform: rotate(0deg); - } - 100% { - -webkit-transform: rotate(359deg); - transform: rotate(359deg); - } -} -.fw-pulse { - -webkit-animation: fw-pulse 2s ease-out infinite; - animation: fw-pulse 2s ease-out infinite; -} -@-webkit-keyframes fw-pulse { - 0%, 30% { - opacity: 0.3; - } - 40% { - opacity: 1; - } - 100% { - opacity: 0.3; - } -} -@keyframes fw-pulse { - 0%, 30% { - opacity: 0.3; - } - 40% { - opacity: 1; - } - 100% { - opacity: 0.3; - } -} -.fw-rotate-90 { - filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=1); - -webkit-transform: rotate(90deg); - -ms-transform: rotate(90deg); - transform: rotate(90deg); -} -.fw-rotate-180 { - filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=2); - -webkit-transform: rotate(180deg); - -ms-transform: rotate(180deg); - transform: rotate(180deg); -} -.fw-rotate-270 { - filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=3); - -webkit-transform: rotate(270deg); - -ms-transform: rotate(270deg); - transform: rotate(270deg); -} -.fw-flip-horizontal { - filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1); - -webkit-transform: scale(-1, 1); - -ms-transform: scale(-1, 1); - transform: scale(-1, 1); -} -.fw-flip-vertical { - filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1); - -webkit-transform: scale(1, -1); - -ms-transform: scale(1, -1); - transform: scale(1, -1); -} -:root .fw-rotate-90, -:root .fw-rotate-180, -:root .fw-rotate-270, -:root .fw-flip-horizontal, -:root .fw-flip-vertical { - filter: none; -} -.fw-stack, -.fw-helper { - position: relative; - display: inline-block; - width: 2em; - height: 2em; - line-height: 1.85em; - vertical-align: middle; -} -.fw-stack-1x, -.fw-stack-2x, -.fw-helper:before, -.fw-helper:after { - position: absolute; - left: 0; - width: 100%; - text-align: center; -} -.fw-stack-1x, -.fw-helper:before { - line-height: inherit; -} -.fw-stack-2x, -.fw-helper:after { - font-size: 1.9em; -} -.fw-helper-slash:before { - font-size: 1.4em; -} -.fw-helper-circle:before, -.fw-helper-square:before { - z-index: 1; -} -.fw-helper-circle-outline:after { - content: "\e61f"; -} -.fw-helper-circle:after { - content: "\e61a"; -} -.fw-helper-square-outline:after { - content: "\e6b2"; -} -.fw-helper-square:after { - content: "\e6b1"; -} -.fw-helper-slash:after { - content: "\e6e1"; -} -.fw-stack > .fw-stack { - position: absolute; - font-size: 0.5em; -} -.fw-stack > .fw-stack.fw-move-top { - top: -0.2em; -} -.fw-stack > .fw-stack.fw-move-bottom { - bottom: -0.2em; -} -.fw-stack > .fw.stack.fw-move-left { - left: -0.5em; -} -.fw-stack > .fw-stack.fw-move-right { - right: -0.5em; -} -.fw-inverse:before, -.fw-helper-inverse:after, -.fw-number { - color: #ffffff; -} -.fw-shadow:before, -.fw-helper-shadow:after { - text-shadow: #ffffff 1px 1px 0; -} -.fw-stroke:before, -.fw-helper-stroke:after { - text-shadow: -2px -2px 0 #ffffff, - 2px -2px 0 #ffffff, - -2px 2px 0 #ffffff, - 2px 2px 0 #ffffff; -} -.fw-number { - line-height: 2em; - font-family: Arial, Helvetica, sans-serif; -} - - -/* ======================================================================== - * font icons - * ======================================================================== */ - -.fw-abort:before { - content:"\e72a"; -} - -.fw-action-invoke:before { - content:"\e6fe"; -} - -.fw-action:before { - content:"\e709"; -} - -.fw-activate:before { - content:"\e6cf"; -} - -.fw-add:before { - content:"\e615"; -} - -.fw-airplay:before { - content:"\e600"; -} - -.fw-alarm:before { - content:"\e6c2"; -} - -.fw-alert:before { - content:"\e6be"; -} - -.fw-analytics-extensions:before { - content:"\e6e2"; -} - -.fw-android-logcat:before { - content:"\e72c"; -} - -.fw-android-sense:before { - content:"\e72d"; -} - -.fw-android:before { - content:"\e606"; -} - -.fw-annotation:before { - content:"\e6e6"; -} - -.fw-api:before { - content:"\e601"; -} - -.fw-apn:before { - content:"\e602"; -} - -.fw-apple:before { - content:"\e604"; -} - -.fw-application:before { - content:"\e608"; -} - -.fw-arduino:before { - content:"\e6ab"; -} - -.fw-assign:before { - content:"\e6ff"; -} - -.fw-ballerina-service:before { - content:"\e729"; -} - -.fw-ballerina:before { - content:"\e728"; -} - -.fw-bar-chart:before { - content:"\e690"; -} - -.fw-battery:before { - content:"\e60a"; -} - -.fw-blank-document:before { - content:"\e60c"; -} - -.fw-block:before { - content:"\e695"; -} - -.fw-bookmark:before { - content:"\e60d"; -} - -.fw-bpel:before { - content:"\e60e"; -} - -.fw-bpmn:before { - content:"\e60f"; -} - -.fw-break:before { - content:"\e721"; -} - -.fw-bug:before { - content:"\e611"; -} - -.fw-build:before { - content:"\e6c1"; -} - -.fw-calendar:before { - content:"\e612"; -} - -.fw-camera:before { - content:"\e613"; -} - -.fw-cancel:before { - content:"\e618"; -} - -.fw-carbon:before { - content:"\e6c5"; -} - -.fw-chat:before { - content:"\e65b"; -} - -.fw-check:before { - content:"\e617"; -} - -.fw-checklist:before { - content:"\e619"; -} - -.fw-circle-outline:before { - content:"\e61f"; -} - -.fw-circle:before { - content:"\e61a"; -} - -.fw-clear:before { - content:"\e61b"; -} - -.fw-clock:before { - content:"\e61d"; -} - -.fw-cloud:before { - content:"\e61e"; -} - -.fw-code-view:before { - content:"\e70e"; -} - -.fw-code:before { - content:"\e6f1"; -} - -.fw-comment:before { - content:"\e710"; -} - -.fw-compare:before { - content:"\e610"; -} - -.fw-computer:before { - content:"\e653"; -} - -.fw-configarations:before { - content:"\e609"; -} - -.fw-connector:before { - content:"\e700"; -} - -.fw-console:before { - content:"\e71d"; -} - -.fw-constant:before { - content:"\e701"; -} - -.fw-contact:before { - content:"\e620"; -} - -.fw-contract:before { - content:"\e614"; -} - -.fw-copy:before { - content:"\e621"; -} - -.fw-cut:before { - content:"\e6f2"; -} - -.fw-dashboard:before { - content:"\e622"; -} - -.fw-database:before { - content:"\e623"; -} - -.fw-delete:before { - content:"\e624"; -} - -.fw-depend:before { - content:"\e6c6"; -} - -.fw-deploy:before { - content:"\e625"; -} - -.fw-deprecate:before { - content:"\e6cb"; -} - -.fw-design-view:before { - content:"\e70f"; -} - -.fw-devices:before { - content:"\e704"; -} - -.fw-dgm-action-invoke:before { - content:"\e712"; -} - -.fw-dgm-action:before { - content:"\e711"; -} - -.fw-dgm-connector:before { - content:"\e6f4"; -} - -.fw-dgm-constant-definition:before { - content:"\e6f5"; -} - -.fw-dgm-fork:before { - content:"\e6e7"; -} - -.fw-dgm-header:before { - content:"\e6e8"; -} - -.fw-dgm-if-else:before { - content:"\e6e9"; -} - -.fw-dgm-import:before { - content:"\e717"; -} - -.fw-dgm-lifeline:before { - content:"\e6ea"; -} - -.fw-dgm-logger:before { - content:"\e6eb"; -} - -.fw-dgm-resource:before { - content:"\e6f6"; -} - -.fw-dgm-service:before { - content:"\e6f7"; -} - -.fw-dgm-try-catch:before { - content:"\e6ec"; -} - -.fw-dgm-type-convertor:before { - content:"\e6f8"; -} - -.fw-dgm-type:before { - content:"\e6f9"; -} - -.fw-dgm-while:before { - content:"\e707"; -} - -.fw-dial-up:before { - content:"\e627"; -} - -.fw-disabled:before { - content:"\e6d1"; -} - -.fw-display:before { - content:"\e626"; -} - -.fw-docker:before { - content:"\e70c"; -} - -.fw-document:before { - content:"\e628"; -} - -.fw-down-arrow:before { - content:"\e689"; -} - -.fw-down:before { - content:"\e685"; -} - -.fw-download:before { - content:"\e65f"; -} - -.fw-dss:before { - content:"\e62a"; -} - -.fw-ebook:before { - content:"\e62b"; -} - -.fw-edit:before { - content:"\e62c"; -} - -.fw-ellipsis:before { - content:"\e629"; -} - -.fw-endpoint:before { - content:"\e62d"; -} - -.fw-enterprise:before { - content:"\e6b6"; -} - -.fw-error:before { - content:"\e630"; -} - -.fw-esb-connector:before { - content:"\e6e3"; -} - -.fw-expand:before { - content:"\e61c"; -} - -.fw-export:before { - content:"\e631"; -} - -.fw-extensions:before { - content:"\e6e4"; -} - -.fw-facebook:before { - content:"\e6d3"; -} - -.fw-factory-reset:before { - content:"\e632"; -} - -.fw-fan:before { - content:"\e678"; -} - -.fw-faq:before { - content:"\e62f"; -} - -.fw-file-browse:before { - content:"\e633"; -} - -.fw-filter:before { - content:"\e634"; -} - -.fw-folder-open:before { - content:"\e70b"; -} - -.fw-folder:before { - content:"\e62e"; -} - -.fw-fork-join:before { - content:"\e720"; -} - -.fw-format:before { - content:"\e6fa"; -} - -.fw-forum:before { - content:"\e636"; -} - -.fw-function-invoke:before { - content:"\e713"; -} - -.fw-function:before { - content:"\e6fb"; -} - -.fw-gadget:before { - content:"\e637"; -} - -.fw-geo-fence-inbound:before { - content:"\e72e"; -} - -.fw-geo-fence-outbound:before { - content:"\e72f"; -} - -.fw-github:before { - content:"\e6d4"; -} - -.fw-globe:before { - content:"\e697"; -} - -.fw-google-docs:before { - content:"\e6d6"; -} - -.fw-google-drive:before { - content:"\e6da"; -} - -.fw-google-plus:before { - content:"\e6d9"; -} - -.fw-google-sheets:before { - content:"\e6d7"; -} - -.fw-google-slides:before { - content:"\e6d8"; -} - -.fw-google:before { - content:"\e6d5"; -} - -.fw-grid:before { - content:"\e638"; -} - -.fw-grip:before { - content:"\e6b7"; -} - -.fw-group:before { - content:"\e6af"; -} - -.fw-hardware:before { - content:"\e6a9"; -} - -.fw-hdd:before { - content:"\e639"; -} - -.fw-heart:before { - content:"\e6c3"; -} - -.fw-hide:before { - content:"\e6d2"; -} - -.fw-home:before { - content:"\e63a"; -} - -.fw-hour-glass:before { - content:"\e63b"; -} - -.fw-html:before { - content:"\e69d"; -} - -.fw-http:before { - content:"\e705"; -} - -.fw-image:before { - content:"\e70a"; -} - -.fw-import:before { - content:"\e63c"; -} - -.fw-incoming-call:before { - content:"\e63d"; -} - -.fw-info:before { - content:"\e63e"; -} - -.fw-instagram:before { - content:"\e6db"; -} - -.fw-invitation:before { - content:"\e63f"; -} - -.fw-invoke:before { - content:"\e6ed"; -} - -.fw-is-connector:before { - content:"\e6e5"; -} - -.fw-iterate:before { - content:"\e71f"; -} - -.fw-jaggery:before { - content:"\e640"; -} - -.fw-java-spring:before { - content:"\e644"; -} - -.fw-java:before { - content:"\e641"; -} - -.fw-javaee:before { - content:"\e642"; -} - -.fw-javascript:before { - content:"\e643"; -} - -.fw-jaxrs:before { - content:"\e645"; -} - -.fw-jaxws:before { - content:"\e6c7"; -} - -.fw-jquery:before { - content:"\e646"; -} - -.fw-key:before { - content:"\e647"; -} - -.fw-laptop:before { - content:"\e648"; -} - -.fw-layout:before { - content:"\e6bf"; -} - -.fw-ldap:before { - content:"\e649"; -} - -.fw-left-arrow:before { - content:"\e68a"; -} - -.fw-left:before { - content:"\e686"; -} - -.fw-lifecycle:before { - content:"\e64a"; -} - -.fw-light:before { - content:"\e680"; -} - -.fw-linkedin:before { - content:"\e6dc"; -} - -.fw-list-sort:before { - content:"\e64d"; -} - -.fw-list:before { - content:"\e64c"; -} - -.fw-loader:before { - content:"\e6b4"; -} - -.fw-loader2:before { - content:"\e6ba"; -} - -.fw-loader3:before { - content:"\e6bb"; -} - -.fw-loader4:before { - content:"\e6bc"; -} - -.fw-loader5:before { - content:"\e6bd"; -} - -.fw-lock:before { - content:"\e64e"; -} - -.fw-logical:before { - content:"\e702"; -} - -.fw-mail:before { - content:"\e64f"; -} - -.fw-main-function:before { - content:"\e706"; -} - -.fw-map-location:before { - content:"\e650"; -} - -.fw-menu:before { - content:"\e651"; -} - -.fw-message:before { - content:"\e635"; -} - -.fw-micro-services:before { - content:"\e6ce"; -} - -.fw-minus:before, .fw-hyphen:before, .fw-dash:before { - content:"\e616"; -} - -.fw-mobile:before { - content:"\e652"; -} - -.fw-ms-document:before { - content:"\e654"; -} - -.fw-mute:before { - content:"\e655"; -} - -.fw-nodejs:before { - content:"\e656"; -} - -.fw-notification:before { - content:"\e60b"; -} - -.fw-organization:before { - content:"\e6ac"; -} - -.fw-own:before { - content:"\e6c8"; -} - -.fw-package:before { - content:"\e6fd"; -} - -.fw-pages:before { - content:"\e6c0"; -} - -.fw-paste:before { - content:"\e658"; -} - -.fw-pdf:before { - content:"\e659"; -} - -.fw-pending:before { - content:"\e727"; -} - -.fw-php:before { - content:"\e6c9"; -} - -.fw-pie-chart:before { - content:"\e65a"; -} - -.fw-pinterest:before { - content:"\e6dd"; -} - -.fw-policy:before { - content:"\e67d"; -} - -.fw-polygon:before { - content:"\e70d"; -} - -.fw-prototype:before { - content:"\e6cc"; -} - -.fw-proxy:before { - content:"\e699"; -} - -.fw-public:before { - content:"\e6ad"; -} - -.fw-publish:before { - content:"\e65c"; -} - -.fw-question:before { - content:"\e6b0"; -} - -.fw-raspberry:before { - content:"\e6aa"; -} - -.fw-redo:before { - content:"\e65d"; -} - -.fw-refresh:before { - content:"\e692"; -} - -.fw-register:before { - content:"\e65e"; -} - -.fw-rename:before { - content:"\e6fc"; -} - -.fw-reply:before { - content:"\e714"; -} - -.fw-resource:before { - content:"\e660"; -} - -.fw-rest-api:before { - content:"\e661"; -} - -.fw-rest-service:before { - content:"\e662"; -} - -.fw-resume:before { - content:"\e71e"; -} - -.fw-retire:before { - content:"\e6cd"; -} - -.fw-return:before { - content:"\e715"; -} - -.fw-retweet:before { - content:"\e6b9"; -} - -.fw-right-arrow:before { - content:"\e68b"; -} - -.fw-right:before { - content:"\e687"; -} - -.fw-ringing:before { - content:"\e694"; -} - -.fw-rules:before { - content:"\e664"; -} - -.fw-run:before { - content:"\e708"; -} - -.fw-save:before { - content:"\e665"; -} - -.fw-scep:before { - content:"\e666"; -} - -.fw-schema:before { - content:"\e667"; -} - -.fw-search:before { - content:"\e668"; -} - -.fw-security-policy:before { - content:"\e67e"; -} - -.fw-security:before { - content:"\e669"; -} - -.fw-send:before, .fw-paper-rocket:before { - content:"\e66a"; -} - -.fw-sequence:before { - content:"\e66b"; -} - -.fw-server:before { - content:"\e66c"; -} - -.fw-service-provider:before { - content:"\e66e"; -} - -.fw-service:before, .fw-cogwheels:before, .fw-gears:before, .fw-sprockets:before { - content:"\e66d"; -} - -.fw-settings:before, .fw-cogwheel:before, .fw-gear:before, .fw-sprocket:before { - content:"\e66f"; -} - -.fw-share:before { - content:"\e670"; -} - -.fw-shell:before { - content:"\e730"; -} - -.fw-shortcut:before { - content:"\e725"; -} - -.fw-sign-in:before { - content:"\e671"; -} - -.fw-sign-out:before { - content:"\e6b8"; -} - -.fw-skype:before { - content:"\e6de"; -} - -.fw-slash:before { - content:"\e6e1"; -} - -.fw-soap:before { - content:"\e672"; -} - -.fw-sort-down:before { - content:"\e663"; -} - -.fw-sort-up:before { - content:"\e64b"; -} - -.fw-sort:before { - content:"\e673"; -} - -.fw-speed-alert:before { - content:"\e731"; -} - -.fw-square-outline:before { - content:"\e6b2"; -} - -.fw-square:before { - content:"\e6b1"; -} - -.fw-star:before { - content:"\e674"; -} - -.fw-start:before { - content:"\e718"; -} - -.fw-statistics:before { - content:"\e675"; -} - -.fw-stepin:before { - content:"\e719"; -} - -.fw-stepout:before { - content:"\e71a"; -} - -.fw-stepover:before { - content:"\e71b"; -} - -.fw-stop:before { - content:"\e71c"; -} - -.fw-store:before, .fw-cart:before { - content:"\e676"; -} - -.fw-struct:before { - content:"\e716"; -} - -.fw-subscribe:before { - content:"\e677"; -} - -.fw-success:before { - content:"\e657"; -} - -.fw-swagger:before { - content:"\e679"; -} - -.fw-sync:before { - content:"\e6b3"; -} - -.fw-table:before { - content:"\e6c4"; -} - -.fw-tag:before { - content:"\e67a"; -} - -.fw-task:before { - content:"\e67b"; -} - -.fw-text:before { - content:"\e67c"; -} - -.fw-theme:before { - content:"\e726"; -} - -.fw-throttling-policy:before { - content:"\e67f"; -} - -.fw-throw:before { - content:"\e722"; -} - -.fw-tiles:before { - content:"\e681"; -} - -.fw-transaction:before { - content:"\e72b"; -} - -.fw-try-catch:before { - content:"\e703"; -} - -.fw-twitter:before { - content:"\e6df"; -} - -.fw-type-converter:before { - content:"\e6f3"; -} - -.fw-uncheck:before { - content:"\e682"; -} - -.fw-undo:before { - content:"\e683"; -} - -.fw-ungroup:before { - content:"\e6b5"; -} - -.fw-unmute:before { - content:"\e6ae"; -} - -.fw-up-arrow:before { - content:"\e688"; -} - -.fw-up:before { - content:"\e684"; -} - -.fw-upload:before { - content:"\e68c"; -} - -.fw-uri:before { - content:"\e68d"; -} - -.fw-usb-drive:before { - content:"\e68e"; -} - -.fw-use:before { - content:"\e6ca"; -} - -.fw-user:before { - content:"\e68f"; -} - -.fw-variable:before { - content:"\e6ee"; -} - -.fw-view:before { - content:"\e691"; -} - -.fw-vpn:before { - content:"\e603"; -} - -.fw-wadl:before { - content:"\e6a1"; -} - -.fw-war:before { - content:"\e69e"; -} - -.fw-warning:before { - content:"\e693"; -} - -.fw-web-app:before { - content:"\e696"; -} - -.fw-web-clip:before { - content:"\e698"; -} - -.fw-web-service:before { - content:"\e69a"; -} - -.fw-website:before { - content:"\e69b"; -} - -.fw-wifi:before { - content:"\e607"; -} - -.fw-windows:before { - content:"\e605"; -} - -.fw-worker-invoke:before { - content:"\e723"; -} - -.fw-worker-reply:before { - content:"\e724"; -} - -.fw-worker:before { - content:"\e6ef"; -} - -.fw-wsdl:before { - content:"\e6a0"; -} - -.fw-wso2-logo:before { - content:"\e6a7"; -} - -.fw-wso2:before { - content:"\e6a8"; -} - -.fw-xacml:before { - content:"\e69f"; -} - -.fw-xml:before { - content:"\e69c"; -} - -.fw-xq:before { - content:"\e6a2"; -} - -.fw-xsd:before { - content:"\e6a3"; -} - -.fw-xslt:before { - content:"\e6a4"; -} - -.fw-youtube:before { - content:"\e6e0"; -} - -.fw-zoom-in:before { - content:"\e6a5"; -} - -.fw-zoom-out:before { - content:"\e6a6"; -} - + url("../fonts/font-wso2.svg?6563fa91278f239ef8c827d90a165223#font-wso2") format("svg"); + font-weight:normal; + font-style:normal; +} + +.fw, [class^="fw-"], [class*=" fw-"] { + font: normal normal normal 14px/1 font-wso2; + display: inline-block; + font-weight: normal; + font-style: normal; + font-size: inherit; + font-variant: normal; + speak: none; + text-decoration: inherit; + + /* Better Font Rendering =========== */ + text-transform: none; + text-rendering: auto; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} + + +/* ======================================================================== + * font options + * ======================================================================== */ + +.fw-lg { + font-size: 1.33333333em; + line-height: 0.75em; + vertical-align: -15%; +} +.fw-2x { + font-size: 2em; +} +.fw-3x { + font-size: 3em; +} +.fw-4x { + font-size: 4em; +} +.fw-5x { + font-size: 5em; +} +.fw-fw { + width: 1.28571429em; + text-align: center; +} +.fw-ul { + padding-left: 0; + margin-left: 2.14285714em; + list-style-type: none; +} +.fw-ul > li { + position: relative; +} +.fw-li { + position: absolute; + left: -2.14285714em; + width: 2.14285714em; + top: 0.14285714em; + text-align: center; +} +.fw-li.fw-lg { + left: -1.85714286em; +} +.fw-border { + padding: .2em .25em .15em; + border: solid 0.08em #eeeeee; + border-radius: .1em; +} +.fw-background { + background: #888; + border-radius: .3em; + padding: .4em .50em .45em; +} +.fw-pull-left { + float: left; +} +.fw-pull-right { + float: right; +} +.fw.fw-pull-left { + margin-right: .3em; +} +.fw.fw-pull-right { + margin-left: .3em; +} +.fw-spin { + -webkit-animation: fw-spin 2s infinite linear; + animation: fw-spin 2s infinite linear; +} +@-webkit-keyframes fw-spin { + 0% { + -webkit-transform: rotate(0deg); + transform: rotate(0deg); + } + 100% { + -webkit-transform: rotate(359deg); + transform: rotate(359deg); + } +} +@keyframes fw-spin { + 0% { + -webkit-transform: rotate(0deg); + transform: rotate(0deg); + } + 100% { + -webkit-transform: rotate(359deg); + transform: rotate(359deg); + } +} +.fw-pulse { + -webkit-animation: fw-pulse 2s ease-out infinite; + animation: fw-pulse 2s ease-out infinite; +} +@-webkit-keyframes fw-pulse { + 0%, 30% { + opacity: 0.3; + } + 40% { + opacity: 1; + } + 100% { + opacity: 0.3; + } +} +@keyframes fw-pulse { + 0%, 30% { + opacity: 0.3; + } + 40% { + opacity: 1; + } + 100% { + opacity: 0.3; + } +} +.fw-rotate-90 { + filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=1); + -webkit-transform: rotate(90deg); + -ms-transform: rotate(90deg); + transform: rotate(90deg); +} +.fw-rotate-180 { + filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=2); + -webkit-transform: rotate(180deg); + -ms-transform: rotate(180deg); + transform: rotate(180deg); +} +.fw-rotate-270 { + filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=3); + -webkit-transform: rotate(270deg); + -ms-transform: rotate(270deg); + transform: rotate(270deg); +} +.fw-flip-horizontal { + filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1); + -webkit-transform: scale(-1, 1); + -ms-transform: scale(-1, 1); + transform: scale(-1, 1); +} +.fw-flip-vertical { + filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1); + -webkit-transform: scale(1, -1); + -ms-transform: scale(1, -1); + transform: scale(1, -1); +} +:root .fw-rotate-90, +:root .fw-rotate-180, +:root .fw-rotate-270, +:root .fw-flip-horizontal, +:root .fw-flip-vertical { + filter: none; +} +.fw-stack, +.fw-helper { + position: relative; + display: inline-block; + width: 2em; + height: 2em; + line-height: 1.85em; + vertical-align: middle; +} +.fw-stack-1x, +.fw-stack-2x, +.fw-helper:before, +.fw-helper:after { + position: absolute; + left: 0; + width: 100%; + text-align: center; +} +.fw-stack-1x, +.fw-helper:before { + line-height: inherit; +} +.fw-stack-2x, +.fw-helper:after { + font-size: 1.9em; +} +.fw-helper-slash:before { + font-size: 1.4em; +} +.fw-helper-circle:before, +.fw-helper-square:before { + z-index: 1; +} +.fw-helper-circle-outline:after { + content: "\e61f"; +} +.fw-helper-circle:after { + content: "\e61a"; +} +.fw-helper-square-outline:after { + content: "\e6b2"; +} +.fw-helper-square:after { + content: "\e6b1"; +} +.fw-helper-slash:after { + content: "\e6e1"; +} +.fw-stack > .fw-stack { + position: absolute; + font-size: 0.5em; +} +.fw-stack > .fw-stack.fw-move-top { + top: -0.2em; +} +.fw-stack > .fw-stack.fw-move-bottom { + bottom: -0.2em; +} +.fw-stack > .fw.stack.fw-move-left { + left: -0.5em; +} +.fw-stack > .fw-stack.fw-move-right { + right: -0.5em; +} +.fw-inverse:before, +.fw-helper-inverse:after, +.fw-number { + color: #ffffff; +} +.fw-shadow:before, +.fw-helper-shadow:after { + text-shadow: #ffffff 1px 1px 0; +} +.fw-stroke:before, +.fw-helper-stroke:after { + text-shadow: -2px -2px 0 #ffffff, + 2px -2px 0 #ffffff, + -2px 2px 0 #ffffff, + 2px 2px 0 #ffffff; +} +.fw-number { + line-height: 2em; + font-family: Arial, Helvetica, sans-serif; +} + + +/* ======================================================================== + * font icons + * ======================================================================== */ + +.fw-abort:before { + content:"\e72a"; +} + +.fw-action-invoke:before { + content:"\e6fe"; +} + +.fw-action:before { + content:"\e709"; +} + +.fw-activate:before { + content:"\e6cf"; +} + +.fw-add:before { + content:"\e615"; +} + +.fw-airplay:before { + content:"\e600"; +} + +.fw-alarm:before { + content:"\e6c2"; +} + +.fw-alert:before { + content:"\e6be"; +} + +.fw-analytics-extensions:before { + content:"\e6e2"; +} + +.fw-android-logcat:before { + content:"\e72c"; +} + +.fw-android-sense:before { + content:"\e72d"; +} + +.fw-android:before { + content:"\e606"; +} + +.fw-annotation:before { + content:"\e6e6"; +} + +.fw-api:before { + content:"\e601"; +} + +.fw-apn:before { + content:"\e602"; +} + +.fw-ios:before { + content:"\e604"; +} + +.fw-application:before { + content:"\e608"; +} + +.fw-arduino:before { + content:"\e6ab"; +} + +.fw-assign:before { + content:"\e6ff"; +} + +.fw-ballerina-service:before { + content:"\e729"; +} + +.fw-ballerina:before { + content:"\e728"; +} + +.fw-bar-chart:before { + content:"\e690"; +} + +.fw-battery:before { + content:"\e60a"; +} + +.fw-blank-document:before { + content:"\e60c"; +} + +.fw-block:before { + content:"\e695"; +} + +.fw-bookmark:before { + content:"\e60d"; +} + +.fw-bpel:before { + content:"\e60e"; +} + +.fw-bpmn:before { + content:"\e60f"; +} + +.fw-break:before { + content:"\e721"; +} + +.fw-bug:before { + content:"\e611"; +} + +.fw-build:before { + content:"\e6c1"; +} + +.fw-calendar:before { + content:"\e612"; +} + +.fw-camera:before { + content:"\e613"; +} + +.fw-cancel:before { + content:"\e618"; +} + +.fw-carbon:before { + content:"\e6c5"; +} + +.fw-chat:before { + content:"\e65b"; +} + +.fw-check:before { + content:"\e617"; +} + +.fw-checklist:before { + content:"\e619"; +} + +.fw-circle-outline:before { + content:"\e61f"; +} + +.fw-circle:before { + content:"\e61a"; +} + +.fw-clear:before { + content:"\e61b"; +} + +.fw-clock:before { + content:"\e61d"; +} + +.fw-cloud:before { + content:"\e61e"; +} + +.fw-code-view:before { + content:"\e70e"; +} + +.fw-code:before { + content:"\e6f1"; +} + +.fw-comment:before { + content:"\e710"; +} + +.fw-compare:before { + content:"\e610"; +} + +.fw-computer:before { + content:"\e653"; +} + +.fw-configarations:before { + content:"\e609"; +} + +.fw-connector:before { + content:"\e700"; +} + +.fw-console:before { + content:"\e71d"; +} + +.fw-constant:before { + content:"\e701"; +} + +.fw-contact:before { + content:"\e620"; +} + +.fw-contract:before { + content:"\e614"; +} + +.fw-copy:before { + content:"\e621"; +} + +.fw-cut:before { + content:"\e6f2"; +} + +.fw-dashboard:before { + content:"\e622"; +} + +.fw-database:before { + content:"\e623"; +} + +.fw-delete:before { + content:"\e624"; +} + +.fw-depend:before { + content:"\e6c6"; +} + +.fw-deploy:before { + content:"\e625"; +} + +.fw-deprecate:before { + content:"\e6cb"; +} + +.fw-design-view:before { + content:"\e70f"; +} + +.fw-devices:before { + content:"\e704"; +} + +.fw-dgm-action-invoke:before { + content:"\e712"; +} + +.fw-dgm-action:before { + content:"\e711"; +} + +.fw-dgm-connector:before { + content:"\e6f4"; +} + +.fw-dgm-constant-definition:before { + content:"\e6f5"; +} + +.fw-dgm-fork:before { + content:"\e6e7"; +} + +.fw-dgm-header:before { + content:"\e6e8"; +} + +.fw-dgm-if-else:before { + content:"\e6e9"; +} + +.fw-dgm-import:before { + content:"\e717"; +} + +.fw-dgm-lifeline:before { + content:"\e6ea"; +} + +.fw-dgm-logger:before { + content:"\e6eb"; +} + +.fw-dgm-resource:before { + content:"\e6f6"; +} + +.fw-dgm-service:before { + content:"\e6f7"; +} + +.fw-dgm-try-catch:before { + content:"\e6ec"; +} + +.fw-dgm-type-convertor:before { + content:"\e6f8"; +} + +.fw-dgm-type:before { + content:"\e6f9"; +} + +.fw-dgm-while:before { + content:"\e707"; +} + +.fw-dial-up:before { + content:"\e627"; +} + +.fw-disabled:before { + content:"\e6d1"; +} + +.fw-display:before { + content:"\e626"; +} + +.fw-docker:before { + content:"\e70c"; +} + +.fw-document:before { + content:"\e628"; +} + +.fw-down-arrow:before { + content:"\e689"; +} + +.fw-down:before { + content:"\e685"; +} + +.fw-download:before { + content:"\e65f"; +} + +.fw-dss:before { + content:"\e62a"; +} + +.fw-ebook:before { + content:"\e62b"; +} + +.fw-edit:before { + content:"\e62c"; +} + +.fw-ellipsis:before { + content:"\e629"; +} + +.fw-endpoint:before { + content:"\e62d"; +} + +.fw-enterprise:before { + content:"\e6b6"; +} + +.fw-error:before { + content:"\e630"; +} + +.fw-esb-connector:before { + content:"\e6e3"; +} + +.fw-expand:before { + content:"\e61c"; +} + +.fw-export:before { + content:"\e631"; +} + +.fw-extensions:before { + content:"\e6e4"; +} + +.fw-facebook:before { + content:"\e6d3"; +} + +.fw-factory-reset:before { + content:"\e632"; +} + +.fw-fan:before { + content:"\e678"; +} + +.fw-faq:before { + content:"\e62f"; +} + +.fw-file-browse:before { + content:"\e633"; +} + +.fw-filter:before { + content:"\e634"; +} + +.fw-folder-open:before { + content:"\e70b"; +} + +.fw-folder:before { + content:"\e62e"; +} + +.fw-fork-join:before { + content:"\e720"; +} + +.fw-format:before { + content:"\e6fa"; +} + +.fw-forum:before { + content:"\e636"; +} + +.fw-function-invoke:before { + content:"\e713"; +} + +.fw-function:before { + content:"\e6fb"; +} + +.fw-gadget:before { + content:"\e637"; +} + +.fw-geo-fence-inbound:before { + content:"\e72e"; +} + +.fw-geo-fence-outbound:before { + content:"\e72f"; +} + +.fw-github:before { + content:"\e6d4"; +} + +.fw-globe:before { + content:"\e697"; +} + +.fw-google-docs:before { + content:"\e6d6"; +} + +.fw-google-drive:before { + content:"\e6da"; +} + +.fw-google-plus:before { + content:"\e6d9"; +} + +.fw-google-sheets:before { + content:"\e6d7"; +} + +.fw-google-slides:before { + content:"\e6d8"; +} + +.fw-google:before { + content:"\e6d5"; +} + +.fw-grid:before { + content:"\e638"; +} + +.fw-grip:before { + content:"\e6b7"; +} + +.fw-group:before { + content:"\e6af"; +} + +.fw-hardware:before { + content:"\e6a9"; +} + +.fw-hdd:before { + content:"\e639"; +} + +.fw-heart:before { + content:"\e6c3"; +} + +.fw-hide:before { + content:"\e6d2"; +} + +.fw-home:before { + content:"\e63a"; +} + +.fw-hour-glass:before { + content:"\e63b"; +} + +.fw-html:before { + content:"\e69d"; +} + +.fw-http:before { + content:"\e705"; +} + +.fw-image:before { + content:"\e70a"; +} + +.fw-import:before { + content:"\e63c"; +} + +.fw-incoming-call:before { + content:"\e63d"; +} + +.fw-info:before { + content:"\e63e"; +} + +.fw-instagram:before { + content:"\e6db"; +} + +.fw-invitation:before { + content:"\e63f"; +} + +.fw-invoke:before { + content:"\e6ed"; +} + +.fw-is-connector:before { + content:"\e6e5"; +} + +.fw-iterate:before { + content:"\e71f"; +} + +.fw-jaggery:before { + content:"\e640"; +} + +.fw-java-spring:before { + content:"\e644"; +} + +.fw-java:before { + content:"\e641"; +} + +.fw-javaee:before { + content:"\e642"; +} + +.fw-javascript:before { + content:"\e643"; +} + +.fw-jaxrs:before { + content:"\e645"; +} + +.fw-jaxws:before { + content:"\e6c7"; +} + +.fw-jquery:before { + content:"\e646"; +} + +.fw-key:before { + content:"\e647"; +} + +.fw-laptop:before { + content:"\e648"; +} + +.fw-layout:before { + content:"\e6bf"; +} + +.fw-ldap:before { + content:"\e649"; +} + +.fw-left-arrow:before { + content:"\e68a"; +} + +.fw-left:before { + content:"\e686"; +} + +.fw-lifecycle:before { + content:"\e64a"; +} + +.fw-light:before { + content:"\e680"; +} + +.fw-linkedin:before { + content:"\e6dc"; +} + +.fw-list-sort:before { + content:"\e64d"; +} + +.fw-list:before { + content:"\e64c"; +} + +.fw-loader:before { + content:"\e6b4"; +} + +.fw-loader2:before { + content:"\e6ba"; +} + +.fw-loader3:before { + content:"\e6bb"; +} + +.fw-loader4:before { + content:"\e6bc"; +} + +.fw-loader5:before { + content:"\e6bd"; +} + +.fw-lock:before { + content:"\e64e"; +} + +.fw-logical:before { + content:"\e702"; +} + +.fw-mail:before { + content:"\e64f"; +} + +.fw-main-function:before { + content:"\e706"; +} + +.fw-map-location:before { + content:"\e650"; +} + +.fw-menu:before { + content:"\e651"; +} + +.fw-message:before { + content:"\e635"; +} + +.fw-micro-services:before { + content:"\e6ce"; +} + +.fw-minus:before, .fw-hyphen:before, .fw-dash:before { + content:"\e616"; +} + +.fw-mobile:before { + content:"\e652"; +} + +.fw-ms-document:before { + content:"\e654"; +} + +.fw-mute:before { + content:"\e655"; +} + +.fw-nodejs:before { + content:"\e656"; +} + +.fw-notification:before { + content:"\e60b"; +} + +.fw-organization:before { + content:"\e6ac"; +} + +.fw-own:before { + content:"\e6c8"; +} + +.fw-package:before { + content:"\e6fd"; +} + +.fw-pages:before { + content:"\e6c0"; +} + +.fw-paste:before { + content:"\e658"; +} + +.fw-pdf:before { + content:"\e659"; +} + +.fw-pending:before { + content:"\e727"; +} + +.fw-php:before { + content:"\e6c9"; +} + +.fw-pie-chart:before { + content:"\e65a"; +} + +.fw-pinterest:before { + content:"\e6dd"; +} + +.fw-policy:before { + content:"\e67d"; +} + +.fw-polygon:before { + content:"\e70d"; +} + +.fw-prototype:before { + content:"\e6cc"; +} + +.fw-proxy:before { + content:"\e699"; +} + +.fw-public:before { + content:"\e6ad"; +} + +.fw-publish:before { + content:"\e65c"; +} + +.fw-question:before { + content:"\e6b0"; +} + +.fw-raspberry:before { + content:"\e6aa"; +} + +.fw-redo:before { + content:"\e65d"; +} + +.fw-refresh:before { + content:"\e692"; +} + +.fw-register:before { + content:"\e65e"; +} + +.fw-rename:before { + content:"\e6fc"; +} + +.fw-reply:before { + content:"\e714"; +} + +.fw-resource:before { + content:"\e660"; +} + +.fw-rest-api:before { + content:"\e661"; +} + +.fw-rest-service:before { + content:"\e662"; +} + +.fw-resume:before { + content:"\e71e"; +} + +.fw-retire:before { + content:"\e6cd"; +} + +.fw-return:before { + content:"\e715"; +} + +.fw-retweet:before { + content:"\e6b9"; +} + +.fw-right-arrow:before { + content:"\e68b"; +} + +.fw-right:before { + content:"\e687"; +} + +.fw-ringing:before { + content:"\e694"; +} + +.fw-rules:before { + content:"\e664"; +} + +.fw-run:before { + content:"\e708"; +} + +.fw-save:before { + content:"\e665"; +} + +.fw-scep:before { + content:"\e666"; +} + +.fw-schema:before { + content:"\e667"; +} + +.fw-search:before { + content:"\e668"; +} + +.fw-security-policy:before { + content:"\e67e"; +} + +.fw-security:before { + content:"\e669"; +} + +.fw-send:before, .fw-paper-rocket:before { + content:"\e66a"; +} + +.fw-sequence:before { + content:"\e66b"; +} + +.fw-server:before { + content:"\e66c"; +} + +.fw-service-provider:before { + content:"\e66e"; +} + +.fw-service:before, .fw-cogwheels:before, .fw-gears:before, .fw-sprockets:before { + content:"\e66d"; +} + +.fw-settings:before, .fw-cogwheel:before, .fw-gear:before, .fw-sprocket:before { + content:"\e66f"; +} + +.fw-share:before { + content:"\e670"; +} + +.fw-shell:before { + content:"\e730"; +} + +.fw-shortcut:before { + content:"\e725"; +} + +.fw-sign-in:before { + content:"\e671"; +} + +.fw-sign-out:before { + content:"\e6b8"; +} + +.fw-skype:before { + content:"\e6de"; +} + +.fw-slash:before { + content:"\e6e1"; +} + +.fw-soap:before { + content:"\e672"; +} + +.fw-sort-down:before { + content:"\e663"; +} + +.fw-sort-up:before { + content:"\e64b"; +} + +.fw-sort:before { + content:"\e673"; +} + +.fw-speed-alert:before { + content:"\e731"; +} + +.fw-square-outline:before { + content:"\e6b2"; +} + +.fw-square:before { + content:"\e6b1"; +} + +.fw-star:before { + content:"\e674"; +} + +.fw-start:before { + content:"\e718"; +} + +.fw-statistics:before { + content:"\e675"; +} + +.fw-stepin:before { + content:"\e719"; +} + +.fw-stepout:before { + content:"\e71a"; +} + +.fw-stepover:before { + content:"\e71b"; +} + +.fw-stop:before { + content:"\e71c"; +} + +.fw-store:before, .fw-cart:before { + content:"\e676"; +} + +.fw-struct:before { + content:"\e716"; +} + +.fw-subscribe:before { + content:"\e677"; +} + +.fw-success:before { + content:"\e657"; +} + +.fw-swagger:before { + content:"\e679"; +} + +.fw-sync:before { + content:"\e6b3"; +} + +.fw-table:before { + content:"\e6c4"; +} + +.fw-tag:before { + content:"\e67a"; +} + +.fw-task:before { + content:"\e67b"; +} + +.fw-text:before { + content:"\e67c"; +} + +.fw-theme:before { + content:"\e726"; +} + +.fw-throttling-policy:before { + content:"\e67f"; +} + +.fw-throw:before { + content:"\e722"; +} + +.fw-tiles:before { + content:"\e681"; +} + +.fw-transaction:before { + content:"\e72b"; +} + +.fw-try-catch:before { + content:"\e703"; +} + +.fw-twitter:before { + content:"\e6df"; +} + +.fw-type-converter:before { + content:"\e6f3"; +} + +.fw-uncheck:before { + content:"\e682"; +} + +.fw-undo:before { + content:"\e683"; +} + +.fw-ungroup:before { + content:"\e6b5"; +} + +.fw-unmute:before { + content:"\e6ae"; +} + +.fw-up-arrow:before { + content:"\e688"; +} + +.fw-up:before { + content:"\e684"; +} + +.fw-upload:before { + content:"\e68c"; +} + +.fw-uri:before { + content:"\e68d"; +} + +.fw-usb-drive:before { + content:"\e68e"; +} + +.fw-use:before { + content:"\e6ca"; +} + +.fw-user:before { + content:"\e68f"; +} + +.fw-variable:before { + content:"\e6ee"; +} + +.fw-view:before { + content:"\e691"; +} + +.fw-vpn:before { + content:"\e603"; +} + +.fw-wadl:before { + content:"\e6a1"; +} + +.fw-war:before { + content:"\e69e"; +} + +.fw-warning:before { + content:"\e693"; +} + +.fw-web-app:before { + content:"\e696"; +} + +.fw-web-clip:before { + content:"\e698"; +} + +.fw-web-service:before { + content:"\e69a"; +} + +.fw-website:before { + content:"\e69b"; +} + +.fw-wifi:before { + content:"\e607"; +} + +.fw-windows:before { + content:"\e605"; +} + +.fw-worker-invoke:before { + content:"\e723"; +} + +.fw-worker-reply:before { + content:"\e724"; +} + +.fw-worker:before { + content:"\e6ef"; +} + +.fw-wsdl:before { + content:"\e6a0"; +} + +.fw-wso2-logo:before { + content:"\e6a7"; +} + +.fw-wso2:before { + content:"\e6a8"; +} + +.fw-xacml:before { + content:"\e69f"; +} + +.fw-xml:before { + content:"\e69c"; +} + +.fw-xq:before { + content:"\e6a2"; +} + +.fw-xsd:before { + content:"\e6a3"; +} + +.fw-xslt:before { + content:"\e6a4"; +} + +.fw-youtube:before { + content:"\e6e0"; +} + +.fw-zoom-in:before { + content:"\e6a5"; +} + +.fw-zoom-out:before { + content:"\e6a6"; +} + diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/uuf-template-app/app/units/uuf.unit.theme/public/lib/font-wso2-1.3.0/css/font-wso2.min.css b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/uuf-template-app/app/units/uuf.unit.theme/public/lib/font-wso2-1.3.0/css/font-wso2.min.css index 6c3d742e3b4..8d2a487bef7 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/uuf-template-app/app/units/uuf.unit.theme/public/lib/font-wso2-1.3.0/css/font-wso2.min.css +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/uuf-template-app/app/units/uuf.unit.theme/public/lib/font-wso2-1.3.0/css/font-wso2.min.css @@ -1,15 +1,15 @@ -/*! -~ Copyright (c) WSO2 Inc. (http://wso2.com) All Rights Reserved. -~ -~ Licensed 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. -*/.fw-fw,.fw-li{text-align:center}@font-face{font-family:font-wso2;src:local("font-wso2"),url(../fonts/font-wso2.eot?6563fa91278f239ef8c827d90a165223);src:local("font-wso2"),url(../fonts/font-wso2.eot?#iefix) format("embedded-opentype"),url(../fonts/font-wso2.woff2?6563fa91278f239ef8c827d90a165223) format("woff2"),url(../fonts/font-wso2.woff?6563fa91278f239ef8c827d90a165223) format("woff"),url(../fonts/font-wso2.ttf?6563fa91278f239ef8c827d90a165223) format("truetype"),url(../fonts/font-wso2.svg?6563fa91278f239ef8c827d90a165223#font-wso2) format("svg");font-weight:400;font-style:normal}.fw,[class*=" fw-"],[class^=fw-]{font:normal normal normal 14px/1 font-wso2;display:inline-block;font-weight:400;font-style:normal;font-size:inherit;font-variant:normal;speak:none;text-decoration:inherit;text-transform:none;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.fw-lg{font-size:1.33333333em;line-height:.75em;vertical-align:-15%}.fw-2x{font-size:2em}.fw-3x{font-size:3em}.fw-4x{font-size:4em}.fw-5x{font-size:5em}.fw-fw{width:1.28571429em}.fw-ul{padding-left:0;margin-left:2.14285714em;list-style-type:none}.fw-ul>li{position:relative}.fw-li{position:absolute;left:-2.14285714em;width:2.14285714em;top:.14285714em}.fw-li.fw-lg{left:-1.85714286em}.fw-border{padding:.2em .25em .15em;border:.08em solid #eee;border-radius:.1em}.fw-background{background:#888;border-radius:.3em;padding:.4em .5em .45em}.fw-pull-left{float:left}.fw-pull-right{float:right}.fw.fw-pull-left{margin-right:.3em}.fw.fw-pull-right{margin-left:.3em}.fw-spin{-webkit-animation:fw-spin 2s infinite linear;animation:fw-spin 2s infinite linear}@-webkit-keyframes fw-spin{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes fw-spin{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.fw-pulse{-webkit-animation:fw-pulse 2s ease-out infinite;animation:fw-pulse 2s ease-out infinite}@-webkit-keyframes fw-pulse{0%,100%,30%{opacity:.3}40%{opacity:1}}@keyframes fw-pulse{0%,100%,30%{opacity:.3}40%{opacity:1}}.fw-rotate-90{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=1);-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg)}.fw-rotate-180{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2);-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.fw-rotate-270{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=3);-webkit-transform:rotate(270deg);-ms-transform:rotate(270deg);transform:rotate(270deg)}.fw-flip-horizontal{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1);-webkit-transform:scale(-1,1);-ms-transform:scale(-1,1);transform:scale(-1,1)}.fw-flip-vertical{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1);-webkit-transform:scale(1,-1);-ms-transform:scale(1,-1);transform:scale(1,-1)}:root .fw-flip-horizontal,:root .fw-flip-vertical,:root .fw-rotate-180,:root .fw-rotate-270,:root .fw-rotate-90{filter:none}.fw-helper,.fw-stack{position:relative;display:inline-block;width:2em;height:2em;line-height:1.85em;vertical-align:middle}.fw-helper:after,.fw-helper:before,.fw-stack-1x,.fw-stack-2x{position:absolute;left:0;width:100%;text-align:center}.fw-helper:before,.fw-stack-1x{line-height:inherit}.fw-helper:after,.fw-stack-2x{font-size:1.9em}.fw-helper-slash:before{font-size:1.4em}.fw-helper-circle:before,.fw-helper-square:before{z-index:1}.fw-helper-circle-outline:after{content:"\e61f"}.fw-helper-circle:after{content:"\e61a"}.fw-helper-square-outline:after{content:"\e6b2"}.fw-helper-square:after{content:"\e6b1"}.fw-helper-slash:after{content:"\e6e1"}.fw-stack>.fw-stack{position:absolute;font-size:.5em}.fw-stack>.fw-stack.fw-move-top{top:-.2em}.fw-stack>.fw-stack.fw-move-bottom{bottom:-.2em}.fw-stack>.fw.stack.fw-move-left{left:-.5em}.fw-stack>.fw-stack.fw-move-right{right:-.5em}.fw-helper-inverse:after,.fw-inverse:before,.fw-number{color:#fff}.fw-helper-shadow:after,.fw-shadow:before{text-shadow:#fff 1px 1px 0}.fw-helper-stroke:after,.fw-stroke:before{text-shadow:-2px -2px 0 #fff,2px -2px 0 #fff,-2px 2px 0 #fff,2px 2px 0 #fff}.fw-number{line-height:2em;font-family:Arial,Helvetica,sans-serif}.fw-abort:before{content:"\e72a"}.fw-action-invoke:before{content:"\e6fe"}.fw-action:before{content:"\e709"}.fw-activate:before{content:"\e6cf"}.fw-add:before{content:"\e615"}.fw-airplay:before{content:"\e600"}.fw-alarm:before{content:"\e6c2"}.fw-alert:before{content:"\e6be"}.fw-analytics-extensions:before{content:"\e6e2"}.fw-android-logcat:before{content:"\e72c"}.fw-android-sense:before{content:"\e72d"}.fw-android:before{content:"\e606"}.fw-annotation:before{content:"\e6e6"}.fw-api:before{content:"\e601"}.fw-apn:before{content:"\e602"}.fw-apple:before{content:"\e604"}.fw-application:before{content:"\e608"}.fw-arduino:before{content:"\e6ab"}.fw-assign:before{content:"\e6ff"}.fw-ballerina-service:before{content:"\e729"}.fw-ballerina:before{content:"\e728"}.fw-bar-chart:before{content:"\e690"}.fw-battery:before{content:"\e60a"}.fw-blank-document:before{content:"\e60c"}.fw-block:before{content:"\e695"}.fw-bookmark:before{content:"\e60d"}.fw-bpel:before{content:"\e60e"}.fw-bpmn:before{content:"\e60f"}.fw-break:before{content:"\e721"}.fw-bug:before{content:"\e611"}.fw-build:before{content:"\e6c1"}.fw-calendar:before{content:"\e612"}.fw-camera:before{content:"\e613"}.fw-cancel:before{content:"\e618"}.fw-carbon:before{content:"\e6c5"}.fw-chat:before{content:"\e65b"}.fw-check:before{content:"\e617"}.fw-checklist:before{content:"\e619"}.fw-circle-outline:before{content:"\e61f"}.fw-circle:before{content:"\e61a"}.fw-clear:before{content:"\e61b"}.fw-clock:before{content:"\e61d"}.fw-cloud:before{content:"\e61e"}.fw-code-view:before{content:"\e70e"}.fw-code:before{content:"\e6f1"}.fw-comment:before{content:"\e710"}.fw-compare:before{content:"\e610"}.fw-computer:before{content:"\e653"}.fw-configarations:before{content:"\e609"}.fw-connector:before{content:"\e700"}.fw-console:before{content:"\e71d"}.fw-constant:before{content:"\e701"}.fw-contact:before{content:"\e620"}.fw-contract:before{content:"\e614"}.fw-copy:before{content:"\e621"}.fw-cut:before{content:"\e6f2"}.fw-dashboard:before{content:"\e622"}.fw-database:before{content:"\e623"}.fw-delete:before{content:"\e624"}.fw-depend:before{content:"\e6c6"}.fw-deploy:before{content:"\e625"}.fw-deprecate:before{content:"\e6cb"}.fw-design-view:before{content:"\e70f"}.fw-devices:before{content:"\e704"}.fw-dgm-action-invoke:before{content:"\e712"}.fw-dgm-action:before{content:"\e711"}.fw-dgm-connector:before{content:"\e6f4"}.fw-dgm-constant-definition:before{content:"\e6f5"}.fw-dgm-fork:before{content:"\e6e7"}.fw-dgm-header:before{content:"\e6e8"}.fw-dgm-if-else:before{content:"\e6e9"}.fw-dgm-import:before{content:"\e717"}.fw-dgm-lifeline:before{content:"\e6ea"}.fw-dgm-logger:before{content:"\e6eb"}.fw-dgm-resource:before{content:"\e6f6"}.fw-dgm-service:before{content:"\e6f7"}.fw-dgm-try-catch:before{content:"\e6ec"}.fw-dgm-type-convertor:before{content:"\e6f8"}.fw-dgm-type:before{content:"\e6f9"}.fw-dgm-while:before{content:"\e707"}.fw-dial-up:before{content:"\e627"}.fw-disabled:before{content:"\e6d1"}.fw-display:before{content:"\e626"}.fw-docker:before{content:"\e70c"}.fw-document:before{content:"\e628"}.fw-down-arrow:before{content:"\e689"}.fw-down:before{content:"\e685"}.fw-download:before{content:"\e65f"}.fw-dss:before{content:"\e62a"}.fw-ebook:before{content:"\e62b"}.fw-edit:before{content:"\e62c"}.fw-ellipsis:before{content:"\e629"}.fw-endpoint:before{content:"\e62d"}.fw-enterprise:before{content:"\e6b6"}.fw-error:before{content:"\e630"}.fw-esb-connector:before{content:"\e6e3"}.fw-expand:before{content:"\e61c"}.fw-export:before{content:"\e631"}.fw-extensions:before{content:"\e6e4"}.fw-facebook:before{content:"\e6d3"}.fw-factory-reset:before{content:"\e632"}.fw-fan:before{content:"\e678"}.fw-faq:before{content:"\e62f"}.fw-file-browse:before{content:"\e633"}.fw-filter:before{content:"\e634"}.fw-folder-open:before{content:"\e70b"}.fw-folder:before{content:"\e62e"}.fw-fork-join:before{content:"\e720"}.fw-format:before{content:"\e6fa"}.fw-forum:before{content:"\e636"}.fw-function-invoke:before{content:"\e713"}.fw-function:before{content:"\e6fb"}.fw-gadget:before{content:"\e637"}.fw-geo-fence-inbound:before{content:"\e72e"}.fw-geo-fence-outbound:before{content:"\e72f"}.fw-github:before{content:"\e6d4"}.fw-globe:before{content:"\e697"}.fw-google-docs:before{content:"\e6d6"}.fw-google-drive:before{content:"\e6da"}.fw-google-plus:before{content:"\e6d9"}.fw-google-sheets:before{content:"\e6d7"}.fw-google-slides:before{content:"\e6d8"}.fw-google:before{content:"\e6d5"}.fw-grid:before{content:"\e638"}.fw-grip:before{content:"\e6b7"}.fw-group:before{content:"\e6af"}.fw-hardware:before{content:"\e6a9"}.fw-hdd:before{content:"\e639"}.fw-heart:before{content:"\e6c3"}.fw-hide:before{content:"\e6d2"}.fw-home:before{content:"\e63a"}.fw-hour-glass:before{content:"\e63b"}.fw-html:before{content:"\e69d"}.fw-http:before{content:"\e705"}.fw-image:before{content:"\e70a"}.fw-import:before{content:"\e63c"}.fw-incoming-call:before{content:"\e63d"}.fw-info:before{content:"\e63e"}.fw-instagram:before{content:"\e6db"}.fw-invitation:before{content:"\e63f"}.fw-invoke:before{content:"\e6ed"}.fw-is-connector:before{content:"\e6e5"}.fw-iterate:before{content:"\e71f"}.fw-jaggery:before{content:"\e640"}.fw-java-spring:before{content:"\e644"}.fw-java:before{content:"\e641"}.fw-javaee:before{content:"\e642"}.fw-javascript:before{content:"\e643"}.fw-jaxrs:before{content:"\e645"}.fw-jaxws:before{content:"\e6c7"}.fw-jquery:before{content:"\e646"}.fw-key:before{content:"\e647"}.fw-laptop:before{content:"\e648"}.fw-layout:before{content:"\e6bf"}.fw-ldap:before{content:"\e649"}.fw-left-arrow:before{content:"\e68a"}.fw-left:before{content:"\e686"}.fw-lifecycle:before{content:"\e64a"}.fw-light:before{content:"\e680"}.fw-linkedin:before{content:"\e6dc"}.fw-list-sort:before{content:"\e64d"}.fw-list:before{content:"\e64c"}.fw-loader:before{content:"\e6b4"}.fw-loader2:before{content:"\e6ba"}.fw-loader3:before{content:"\e6bb"}.fw-loader4:before{content:"\e6bc"}.fw-loader5:before{content:"\e6bd"}.fw-lock:before{content:"\e64e"}.fw-logical:before{content:"\e702"}.fw-mail:before{content:"\e64f"}.fw-main-function:before{content:"\e706"}.fw-map-location:before{content:"\e650"}.fw-menu:before{content:"\e651"}.fw-message:before{content:"\e635"}.fw-micro-services:before{content:"\e6ce"}.fw-dash:before,.fw-hyphen:before,.fw-minus:before{content:"\e616"}.fw-mobile:before{content:"\e652"}.fw-ms-document:before{content:"\e654"}.fw-mute:before{content:"\e655"}.fw-nodejs:before{content:"\e656"}.fw-notification:before{content:"\e60b"}.fw-organization:before{content:"\e6ac"}.fw-own:before{content:"\e6c8"}.fw-package:before{content:"\e6fd"}.fw-pages:before{content:"\e6c0"}.fw-paste:before{content:"\e658"}.fw-pdf:before{content:"\e659"}.fw-pending:before{content:"\e727"}.fw-php:before{content:"\e6c9"}.fw-pie-chart:before{content:"\e65a"}.fw-pinterest:before{content:"\e6dd"}.fw-policy:before{content:"\e67d"}.fw-polygon:before{content:"\e70d"}.fw-prototype:before{content:"\e6cc"}.fw-proxy:before{content:"\e699"}.fw-public:before{content:"\e6ad"}.fw-publish:before{content:"\e65c"}.fw-question:before{content:"\e6b0"}.fw-raspberry:before{content:"\e6aa"}.fw-redo:before{content:"\e65d"}.fw-refresh:before{content:"\e692"}.fw-register:before{content:"\e65e"}.fw-rename:before{content:"\e6fc"}.fw-reply:before{content:"\e714"}.fw-resource:before{content:"\e660"}.fw-rest-api:before{content:"\e661"}.fw-rest-service:before{content:"\e662"}.fw-resume:before{content:"\e71e"}.fw-retire:before{content:"\e6cd"}.fw-return:before{content:"\e715"}.fw-retweet:before{content:"\e6b9"}.fw-right-arrow:before{content:"\e68b"}.fw-right:before{content:"\e687"}.fw-ringing:before{content:"\e694"}.fw-rules:before{content:"\e664"}.fw-run:before{content:"\e708"}.fw-save:before{content:"\e665"}.fw-scep:before{content:"\e666"}.fw-schema:before{content:"\e667"}.fw-search:before{content:"\e668"}.fw-security-policy:before{content:"\e67e"}.fw-security:before{content:"\e669"}.fw-paper-rocket:before,.fw-send:before{content:"\e66a"}.fw-sequence:before{content:"\e66b"}.fw-server:before{content:"\e66c"}.fw-service-provider:before{content:"\e66e"}.fw-cogwheels:before,.fw-gears:before,.fw-service:before,.fw-sprockets:before{content:"\e66d"}.fw-cogwheel:before,.fw-gear:before,.fw-settings:before,.fw-sprocket:before{content:"\e66f"}.fw-share:before{content:"\e670"}.fw-shell:before{content:"\e730"}.fw-shortcut:before{content:"\e725"}.fw-sign-in:before{content:"\e671"}.fw-sign-out:before{content:"\e6b8"}.fw-skype:before{content:"\e6de"}.fw-slash:before{content:"\e6e1"}.fw-soap:before{content:"\e672"}.fw-sort-down:before{content:"\e663"}.fw-sort-up:before{content:"\e64b"}.fw-sort:before{content:"\e673"}.fw-speed-alert:before{content:"\e731"}.fw-square-outline:before{content:"\e6b2"}.fw-square:before{content:"\e6b1"}.fw-star:before{content:"\e674"}.fw-start:before{content:"\e718"}.fw-statistics:before{content:"\e675"}.fw-stepin:before{content:"\e719"}.fw-stepout:before{content:"\e71a"}.fw-stepover:before{content:"\e71b"}.fw-stop:before{content:"\e71c"}.fw-cart:before,.fw-store:before{content:"\e676"}.fw-struct:before{content:"\e716"}.fw-subscribe:before{content:"\e677"}.fw-success:before{content:"\e657"}.fw-swagger:before{content:"\e679"}.fw-sync:before{content:"\e6b3"}.fw-table:before{content:"\e6c4"}.fw-tag:before{content:"\e67a"}.fw-task:before{content:"\e67b"}.fw-text:before{content:"\e67c"}.fw-theme:before{content:"\e726"}.fw-throttling-policy:before{content:"\e67f"}.fw-throw:before{content:"\e722"}.fw-tiles:before{content:"\e681"}.fw-transaction:before{content:"\e72b"}.fw-try-catch:before{content:"\e703"}.fw-twitter:before{content:"\e6df"}.fw-type-converter:before{content:"\e6f3"}.fw-uncheck:before{content:"\e682"}.fw-undo:before{content:"\e683"}.fw-ungroup:before{content:"\e6b5"}.fw-unmute:before{content:"\e6ae"}.fw-up-arrow:before{content:"\e688"}.fw-up:before{content:"\e684"}.fw-upload:before{content:"\e68c"}.fw-uri:before{content:"\e68d"}.fw-usb-drive:before{content:"\e68e"}.fw-use:before{content:"\e6ca"}.fw-user:before{content:"\e68f"}.fw-variable:before{content:"\e6ee"}.fw-view:before{content:"\e691"}.fw-vpn:before{content:"\e603"}.fw-wadl:before{content:"\e6a1"}.fw-war:before{content:"\e69e"}.fw-warning:before{content:"\e693"}.fw-web-app:before{content:"\e696"}.fw-web-clip:before{content:"\e698"}.fw-web-service:before{content:"\e69a"}.fw-website:before{content:"\e69b"}.fw-wifi:before{content:"\e607"}.fw-windows:before{content:"\e605"}.fw-worker-invoke:before{content:"\e723"}.fw-worker-reply:before{content:"\e724"}.fw-worker:before{content:"\e6ef"}.fw-wsdl:before{content:"\e6a0"}.fw-wso2-logo:before{content:"\e6a7"}.fw-wso2:before{content:"\e6a8"}.fw-xacml:before{content:"\e69f"}.fw-xml:before{content:"\e69c"}.fw-xq:before{content:"\e6a2"}.fw-xsd:before{content:"\e6a3"}.fw-xslt:before{content:"\e6a4"}.fw-youtube:before{content:"\e6e0"}.fw-zoom-in:before{content:"\e6a5"}.fw-zoom-out:before{content:"\e6a6"} \ No newline at end of file +/*! +~ Copyright (c) WSO2 Inc. (http://wso2.com) All Rights Reserved. +~ +~ Licensed 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. +*/.fw-fw,.fw-li{text-align:center}@font-face{font-family:font-wso2;src:local("font-wso2"),url(../fonts/font-wso2.eot?6563fa91278f239ef8c827d90a165223);src:local("font-wso2"),url(../fonts/font-wso2.eot?#iefix) format("embedded-opentype"),url(../fonts/font-wso2.woff2?6563fa91278f239ef8c827d90a165223) format("woff2"),url(../fonts/font-wso2.woff?6563fa91278f239ef8c827d90a165223) format("woff"),url(../fonts/font-wso2.ttf?6563fa91278f239ef8c827d90a165223) format("truetype"),url(../fonts/font-wso2.svg?6563fa91278f239ef8c827d90a165223#font-wso2) format("svg");font-weight:400;font-style:normal}.fw,[class*=" fw-"],[class^=fw-]{font:normal normal normal 14px/1 font-wso2;display:inline-block;font-weight:400;font-style:normal;font-size:inherit;font-variant:normal;speak:none;text-decoration:inherit;text-transform:none;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.fw-lg{font-size:1.33333333em;line-height:.75em;vertical-align:-15%}.fw-2x{font-size:2em}.fw-3x{font-size:3em}.fw-4x{font-size:4em}.fw-5x{font-size:5em}.fw-fw{width:1.28571429em}.fw-ul{padding-left:0;margin-left:2.14285714em;list-style-type:none}.fw-ul>li{position:relative}.fw-li{position:absolute;left:-2.14285714em;width:2.14285714em;top:.14285714em}.fw-li.fw-lg{left:-1.85714286em}.fw-border{padding:.2em .25em .15em;border:.08em solid #eee;border-radius:.1em}.fw-background{background:#888;border-radius:.3em;padding:.4em .5em .45em}.fw-pull-left{float:left}.fw-pull-right{float:right}.fw.fw-pull-left{margin-right:.3em}.fw.fw-pull-right{margin-left:.3em}.fw-spin{-webkit-animation:fw-spin 2s infinite linear;animation:fw-spin 2s infinite linear}@-webkit-keyframes fw-spin{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes fw-spin{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.fw-pulse{-webkit-animation:fw-pulse 2s ease-out infinite;animation:fw-pulse 2s ease-out infinite}@-webkit-keyframes fw-pulse{0%,100%,30%{opacity:.3}40%{opacity:1}}@keyframes fw-pulse{0%,100%,30%{opacity:.3}40%{opacity:1}}.fw-rotate-90{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=1);-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg)}.fw-rotate-180{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2);-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.fw-rotate-270{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=3);-webkit-transform:rotate(270deg);-ms-transform:rotate(270deg);transform:rotate(270deg)}.fw-flip-horizontal{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1);-webkit-transform:scale(-1,1);-ms-transform:scale(-1,1);transform:scale(-1,1)}.fw-flip-vertical{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1);-webkit-transform:scale(1,-1);-ms-transform:scale(1,-1);transform:scale(1,-1)}:root .fw-flip-horizontal,:root .fw-flip-vertical,:root .fw-rotate-180,:root .fw-rotate-270,:root .fw-rotate-90{filter:none}.fw-helper,.fw-stack{position:relative;display:inline-block;width:2em;height:2em;line-height:1.85em;vertical-align:middle}.fw-helper:after,.fw-helper:before,.fw-stack-1x,.fw-stack-2x{position:absolute;left:0;width:100%;text-align:center}.fw-helper:before,.fw-stack-1x{line-height:inherit}.fw-helper:after,.fw-stack-2x{font-size:1.9em}.fw-helper-slash:before{font-size:1.4em}.fw-helper-circle:before,.fw-helper-square:before{z-index:1}.fw-helper-circle-outline:after{content:"\e61f"}.fw-helper-circle:after{content:"\e61a"}.fw-helper-square-outline:after{content:"\e6b2"}.fw-helper-square:after{content:"\e6b1"}.fw-helper-slash:after{content:"\e6e1"}.fw-stack>.fw-stack{position:absolute;font-size:.5em}.fw-stack>.fw-stack.fw-move-top{top:-.2em}.fw-stack>.fw-stack.fw-move-bottom{bottom:-.2em}.fw-stack>.fw.stack.fw-move-left{left:-.5em}.fw-stack>.fw-stack.fw-move-right{right:-.5em}.fw-helper-inverse:after,.fw-inverse:before,.fw-number{color:#fff}.fw-helper-shadow:after,.fw-shadow:before{text-shadow:#fff 1px 1px 0}.fw-helper-stroke:after,.fw-stroke:before{text-shadow:-2px -2px 0 #fff,2px -2px 0 #fff,-2px 2px 0 #fff,2px 2px 0 #fff}.fw-number{line-height:2em;font-family:Arial,Helvetica,sans-serif}.fw-abort:before{content:"\e72a"}.fw-action-invoke:before{content:"\e6fe"}.fw-action:before{content:"\e709"}.fw-activate:before{content:"\e6cf"}.fw-add:before{content:"\e615"}.fw-airplay:before{content:"\e600"}.fw-alarm:before{content:"\e6c2"}.fw-alert:before{content:"\e6be"}.fw-analytics-extensions:before{content:"\e6e2"}.fw-android-logcat:before{content:"\e72c"}.fw-android-sense:before{content:"\e72d"}.fw-android:before{content:"\e606"}.fw-annotation:before{content:"\e6e6"}.fw-api:before{content:"\e601"}.fw-apn:before{content:"\e602"}.fw-ios:before{content:"\e604"}.fw-application:before{content:"\e608"}.fw-arduino:before{content:"\e6ab"}.fw-assign:before{content:"\e6ff"}.fw-ballerina-service:before{content:"\e729"}.fw-ballerina:before{content:"\e728"}.fw-bar-chart:before{content:"\e690"}.fw-battery:before{content:"\e60a"}.fw-blank-document:before{content:"\e60c"}.fw-block:before{content:"\e695"}.fw-bookmark:before{content:"\e60d"}.fw-bpel:before{content:"\e60e"}.fw-bpmn:before{content:"\e60f"}.fw-break:before{content:"\e721"}.fw-bug:before{content:"\e611"}.fw-build:before{content:"\e6c1"}.fw-calendar:before{content:"\e612"}.fw-camera:before{content:"\e613"}.fw-cancel:before{content:"\e618"}.fw-carbon:before{content:"\e6c5"}.fw-chat:before{content:"\e65b"}.fw-check:before{content:"\e617"}.fw-checklist:before{content:"\e619"}.fw-circle-outline:before{content:"\e61f"}.fw-circle:before{content:"\e61a"}.fw-clear:before{content:"\e61b"}.fw-clock:before{content:"\e61d"}.fw-cloud:before{content:"\e61e"}.fw-code-view:before{content:"\e70e"}.fw-code:before{content:"\e6f1"}.fw-comment:before{content:"\e710"}.fw-compare:before{content:"\e610"}.fw-computer:before{content:"\e653"}.fw-configarations:before{content:"\e609"}.fw-connector:before{content:"\e700"}.fw-console:before{content:"\e71d"}.fw-constant:before{content:"\e701"}.fw-contact:before{content:"\e620"}.fw-contract:before{content:"\e614"}.fw-copy:before{content:"\e621"}.fw-cut:before{content:"\e6f2"}.fw-dashboard:before{content:"\e622"}.fw-database:before{content:"\e623"}.fw-delete:before{content:"\e624"}.fw-depend:before{content:"\e6c6"}.fw-deploy:before{content:"\e625"}.fw-deprecate:before{content:"\e6cb"}.fw-design-view:before{content:"\e70f"}.fw-devices:before{content:"\e704"}.fw-dgm-action-invoke:before{content:"\e712"}.fw-dgm-action:before{content:"\e711"}.fw-dgm-connector:before{content:"\e6f4"}.fw-dgm-constant-definition:before{content:"\e6f5"}.fw-dgm-fork:before{content:"\e6e7"}.fw-dgm-header:before{content:"\e6e8"}.fw-dgm-if-else:before{content:"\e6e9"}.fw-dgm-import:before{content:"\e717"}.fw-dgm-lifeline:before{content:"\e6ea"}.fw-dgm-logger:before{content:"\e6eb"}.fw-dgm-resource:before{content:"\e6f6"}.fw-dgm-service:before{content:"\e6f7"}.fw-dgm-try-catch:before{content:"\e6ec"}.fw-dgm-type-convertor:before{content:"\e6f8"}.fw-dgm-type:before{content:"\e6f9"}.fw-dgm-while:before{content:"\e707"}.fw-dial-up:before{content:"\e627"}.fw-disabled:before{content:"\e6d1"}.fw-display:before{content:"\e626"}.fw-docker:before{content:"\e70c"}.fw-document:before{content:"\e628"}.fw-down-arrow:before{content:"\e689"}.fw-down:before{content:"\e685"}.fw-download:before{content:"\e65f"}.fw-dss:before{content:"\e62a"}.fw-ebook:before{content:"\e62b"}.fw-edit:before{content:"\e62c"}.fw-ellipsis:before{content:"\e629"}.fw-endpoint:before{content:"\e62d"}.fw-enterprise:before{content:"\e6b6"}.fw-error:before{content:"\e630"}.fw-esb-connector:before{content:"\e6e3"}.fw-expand:before{content:"\e61c"}.fw-export:before{content:"\e631"}.fw-extensions:before{content:"\e6e4"}.fw-facebook:before{content:"\e6d3"}.fw-factory-reset:before{content:"\e632"}.fw-fan:before{content:"\e678"}.fw-faq:before{content:"\e62f"}.fw-file-browse:before{content:"\e633"}.fw-filter:before{content:"\e634"}.fw-folder-open:before{content:"\e70b"}.fw-folder:before{content:"\e62e"}.fw-fork-join:before{content:"\e720"}.fw-format:before{content:"\e6fa"}.fw-forum:before{content:"\e636"}.fw-function-invoke:before{content:"\e713"}.fw-function:before{content:"\e6fb"}.fw-gadget:before{content:"\e637"}.fw-geo-fence-inbound:before{content:"\e72e"}.fw-geo-fence-outbound:before{content:"\e72f"}.fw-github:before{content:"\e6d4"}.fw-globe:before{content:"\e697"}.fw-google-docs:before{content:"\e6d6"}.fw-google-drive:before{content:"\e6da"}.fw-google-plus:before{content:"\e6d9"}.fw-google-sheets:before{content:"\e6d7"}.fw-google-slides:before{content:"\e6d8"}.fw-google:before{content:"\e6d5"}.fw-grid:before{content:"\e638"}.fw-grip:before{content:"\e6b7"}.fw-group:before{content:"\e6af"}.fw-hardware:before{content:"\e6a9"}.fw-hdd:before{content:"\e639"}.fw-heart:before{content:"\e6c3"}.fw-hide:before{content:"\e6d2"}.fw-home:before{content:"\e63a"}.fw-hour-glass:before{content:"\e63b"}.fw-html:before{content:"\e69d"}.fw-http:before{content:"\e705"}.fw-image:before{content:"\e70a"}.fw-import:before{content:"\e63c"}.fw-incoming-call:before{content:"\e63d"}.fw-info:before{content:"\e63e"}.fw-instagram:before{content:"\e6db"}.fw-invitation:before{content:"\e63f"}.fw-invoke:before{content:"\e6ed"}.fw-is-connector:before{content:"\e6e5"}.fw-iterate:before{content:"\e71f"}.fw-jaggery:before{content:"\e640"}.fw-java-spring:before{content:"\e644"}.fw-java:before{content:"\e641"}.fw-javaee:before{content:"\e642"}.fw-javascript:before{content:"\e643"}.fw-jaxrs:before{content:"\e645"}.fw-jaxws:before{content:"\e6c7"}.fw-jquery:before{content:"\e646"}.fw-key:before{content:"\e647"}.fw-laptop:before{content:"\e648"}.fw-layout:before{content:"\e6bf"}.fw-ldap:before{content:"\e649"}.fw-left-arrow:before{content:"\e68a"}.fw-left:before{content:"\e686"}.fw-lifecycle:before{content:"\e64a"}.fw-light:before{content:"\e680"}.fw-linkedin:before{content:"\e6dc"}.fw-list-sort:before{content:"\e64d"}.fw-list:before{content:"\e64c"}.fw-loader:before{content:"\e6b4"}.fw-loader2:before{content:"\e6ba"}.fw-loader3:before{content:"\e6bb"}.fw-loader4:before{content:"\e6bc"}.fw-loader5:before{content:"\e6bd"}.fw-lock:before{content:"\e64e"}.fw-logical:before{content:"\e702"}.fw-mail:before{content:"\e64f"}.fw-main-function:before{content:"\e706"}.fw-map-location:before{content:"\e650"}.fw-menu:before{content:"\e651"}.fw-message:before{content:"\e635"}.fw-micro-services:before{content:"\e6ce"}.fw-dash:before,.fw-hyphen:before,.fw-minus:before{content:"\e616"}.fw-mobile:before{content:"\e652"}.fw-ms-document:before{content:"\e654"}.fw-mute:before{content:"\e655"}.fw-nodejs:before{content:"\e656"}.fw-notification:before{content:"\e60b"}.fw-organization:before{content:"\e6ac"}.fw-own:before{content:"\e6c8"}.fw-package:before{content:"\e6fd"}.fw-pages:before{content:"\e6c0"}.fw-paste:before{content:"\e658"}.fw-pdf:before{content:"\e659"}.fw-pending:before{content:"\e727"}.fw-php:before{content:"\e6c9"}.fw-pie-chart:before{content:"\e65a"}.fw-pinterest:before{content:"\e6dd"}.fw-policy:before{content:"\e67d"}.fw-polygon:before{content:"\e70d"}.fw-prototype:before{content:"\e6cc"}.fw-proxy:before{content:"\e699"}.fw-public:before{content:"\e6ad"}.fw-publish:before{content:"\e65c"}.fw-question:before{content:"\e6b0"}.fw-raspberry:before{content:"\e6aa"}.fw-redo:before{content:"\e65d"}.fw-refresh:before{content:"\e692"}.fw-register:before{content:"\e65e"}.fw-rename:before{content:"\e6fc"}.fw-reply:before{content:"\e714"}.fw-resource:before{content:"\e660"}.fw-rest-api:before{content:"\e661"}.fw-rest-service:before{content:"\e662"}.fw-resume:before{content:"\e71e"}.fw-retire:before{content:"\e6cd"}.fw-return:before{content:"\e715"}.fw-retweet:before{content:"\e6b9"}.fw-right-arrow:before{content:"\e68b"}.fw-right:before{content:"\e687"}.fw-ringing:before{content:"\e694"}.fw-rules:before{content:"\e664"}.fw-run:before{content:"\e708"}.fw-save:before{content:"\e665"}.fw-scep:before{content:"\e666"}.fw-schema:before{content:"\e667"}.fw-search:before{content:"\e668"}.fw-security-policy:before{content:"\e67e"}.fw-security:before{content:"\e669"}.fw-paper-rocket:before,.fw-send:before{content:"\e66a"}.fw-sequence:before{content:"\e66b"}.fw-server:before{content:"\e66c"}.fw-service-provider:before{content:"\e66e"}.fw-cogwheels:before,.fw-gears:before,.fw-service:before,.fw-sprockets:before{content:"\e66d"}.fw-cogwheel:before,.fw-gear:before,.fw-settings:before,.fw-sprocket:before{content:"\e66f"}.fw-share:before{content:"\e670"}.fw-shell:before{content:"\e730"}.fw-shortcut:before{content:"\e725"}.fw-sign-in:before{content:"\e671"}.fw-sign-out:before{content:"\e6b8"}.fw-skype:before{content:"\e6de"}.fw-slash:before{content:"\e6e1"}.fw-soap:before{content:"\e672"}.fw-sort-down:before{content:"\e663"}.fw-sort-up:before{content:"\e64b"}.fw-sort:before{content:"\e673"}.fw-speed-alert:before{content:"\e731"}.fw-square-outline:before{content:"\e6b2"}.fw-square:before{content:"\e6b1"}.fw-star:before{content:"\e674"}.fw-start:before{content:"\e718"}.fw-statistics:before{content:"\e675"}.fw-stepin:before{content:"\e719"}.fw-stepout:before{content:"\e71a"}.fw-stepover:before{content:"\e71b"}.fw-stop:before{content:"\e71c"}.fw-cart:before,.fw-store:before{content:"\e676"}.fw-struct:before{content:"\e716"}.fw-subscribe:before{content:"\e677"}.fw-success:before{content:"\e657"}.fw-swagger:before{content:"\e679"}.fw-sync:before{content:"\e6b3"}.fw-table:before{content:"\e6c4"}.fw-tag:before{content:"\e67a"}.fw-task:before{content:"\e67b"}.fw-text:before{content:"\e67c"}.fw-theme:before{content:"\e726"}.fw-throttling-policy:before{content:"\e67f"}.fw-throw:before{content:"\e722"}.fw-tiles:before{content:"\e681"}.fw-transaction:before{content:"\e72b"}.fw-try-catch:before{content:"\e703"}.fw-twitter:before{content:"\e6df"}.fw-type-converter:before{content:"\e6f3"}.fw-uncheck:before{content:"\e682"}.fw-undo:before{content:"\e683"}.fw-ungroup:before{content:"\e6b5"}.fw-unmute:before{content:"\e6ae"}.fw-up-arrow:before{content:"\e688"}.fw-up:before{content:"\e684"}.fw-upload:before{content:"\e68c"}.fw-uri:before{content:"\e68d"}.fw-usb-drive:before{content:"\e68e"}.fw-use:before{content:"\e6ca"}.fw-user:before{content:"\e68f"}.fw-variable:before{content:"\e6ee"}.fw-view:before{content:"\e691"}.fw-vpn:before{content:"\e603"}.fw-wadl:before{content:"\e6a1"}.fw-war:before{content:"\e69e"}.fw-warning:before{content:"\e693"}.fw-web-app:before{content:"\e696"}.fw-web-clip:before{content:"\e698"}.fw-web-service:before{content:"\e69a"}.fw-website:before{content:"\e69b"}.fw-wifi:before{content:"\e607"}.fw-windows:before{content:"\e605"}.fw-worker-invoke:before{content:"\e723"}.fw-worker-reply:before{content:"\e724"}.fw-worker:before{content:"\e6ef"}.fw-wsdl:before{content:"\e6a0"}.fw-wso2-logo:before{content:"\e6a7"}.fw-wso2:before{content:"\e6a8"}.fw-xacml:before{content:"\e69f"}.fw-xml:before{content:"\e69c"}.fw-xq:before{content:"\e6a2"}.fw-xsd:before{content:"\e6a3"}.fw-xslt:before{content:"\e6a4"}.fw-youtube:before{content:"\e6e0"}.fw-zoom-in:before{content:"\e6a5"}.fw-zoom-out:before{content:"\e6a6"} \ No newline at end of file diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.v09.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/DeviceManagementServiceImpl.java b/components/device-mgt/org.wso2.carbon.device.mgt.v09.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/DeviceManagementServiceImpl.java index d6269cc7c8e..a57da167bd0 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.v09.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/DeviceManagementServiceImpl.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.v09.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/DeviceManagementServiceImpl.java @@ -26,6 +26,7 @@ import org.wso2.carbon.context.CarbonContext; import org.wso2.carbon.device.mgt.common.Device; import org.wso2.carbon.device.mgt.common.DeviceIdentifier; import org.wso2.carbon.device.mgt.common.DeviceManagementException; +import org.wso2.carbon.device.mgt.common.DeviceTypeNotFoundException; import org.wso2.carbon.device.mgt.common.EnrolmentInfo; import org.wso2.carbon.device.mgt.common.Feature; import org.wso2.carbon.device.mgt.common.FeatureManager; @@ -499,7 +500,14 @@ public class DeviceManagementServiceImpl implements DeviceManagementService { try { RequestValidationUtil.validateDeviceIdentifier(type, id); dms = DeviceMgtAPIUtils.getDeviceManagementService(); - FeatureManager fm = dms.getFeatureManager(type); + FeatureManager fm; + try { + fm = dms.getFeatureManager(type); + } catch (DeviceTypeNotFoundException e) { + return Response.status(Response.Status.NOT_FOUND).entity( + new ErrorResponse.ErrorResponseBuilder().setMessage("No feature manager is " + + "registered with the given type '" + type + "'").build()).build(); + } if (fm == null) { return Response.status(Response.Status.NOT_FOUND).entity( new ErrorResponse.ErrorResponseBuilder().setMessage("No feature manager is " + diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.v09.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/DeviceTypeManagementServiceImpl.java b/components/device-mgt/org.wso2.carbon.device.mgt.v09.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/DeviceTypeManagementServiceImpl.java index 1fb5c0c37a8..fa812a775e0 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.v09.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/DeviceTypeManagementServiceImpl.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.v09.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/DeviceTypeManagementServiceImpl.java @@ -22,6 +22,7 @@ package org.wso2.carbon.device.mgt.jaxrs.service.impl; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.wso2.carbon.device.mgt.common.DeviceManagementException; +import org.wso2.carbon.device.mgt.common.DeviceTypeNotFoundException; import org.wso2.carbon.device.mgt.common.Feature; import org.wso2.carbon.device.mgt.common.FeatureManager; import org.wso2.carbon.device.mgt.common.push.notification.PushNotificationConfig; @@ -76,11 +77,18 @@ public class DeviceTypeManagementServiceImpl implements DeviceTypeManagementServ DeviceManagementProviderService dms; try { dms = DeviceMgtAPIUtils.getDeviceManagementService(); - FeatureManager fm = dms.getFeatureManager(type); + FeatureManager fm; + try { + fm = dms.getFeatureManager(type); + } catch (DeviceTypeNotFoundException e) { + return Response.status(Response.Status.NOT_FOUND).entity( + new ErrorResponse.ErrorResponseBuilder().setMessage("No feature manager is " + + "registered with the given type '" + type + "'").build()).build(); + } if (fm == null) { return Response.status(Response.Status.NOT_FOUND).entity( new ErrorResponse.ErrorResponseBuilder().setMessage("No feature manager is " + - "registered with the given type '" + type + "'").build()).build(); + "registered with the given type '" + type + "'").build()).build(); } features = fm.getFeatures(); } catch (DeviceManagementException e) { diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.v09.api/src/test/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/DeviceManagementServiceImplTest.java b/components/device-mgt/org.wso2.carbon.device.mgt.v09.api/src/test/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/DeviceManagementServiceImplTest.java index e1935904ae5..c1732254aad 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.v09.api/src/test/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/DeviceManagementServiceImplTest.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.v09.api/src/test/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/DeviceManagementServiceImplTest.java @@ -31,9 +31,9 @@ import org.testng.annotations.BeforeClass; import org.testng.annotations.ObjectFactory; import org.testng.annotations.Test; import org.wso2.carbon.context.CarbonContext; -import org.wso2.carbon.device.mgt.common.Device; import org.wso2.carbon.device.mgt.common.DeviceIdentifier; import org.wso2.carbon.device.mgt.common.DeviceManagementException; +import org.wso2.carbon.device.mgt.common.DeviceTypeNotFoundException; import org.wso2.carbon.device.mgt.common.EnrolmentInfo; import org.wso2.carbon.device.mgt.common.PaginationRequest; import org.wso2.carbon.device.mgt.common.app.mgt.ApplicationManagementException; @@ -437,7 +437,7 @@ public class DeviceManagementServiceImplTest { } @Test(description = "Testing getting device features when feature manager is not registered for the device type") - public void testGetFeaturesOfDeviceWhenFeatureManagerIsNotRegistered() throws DeviceManagementException { + public void testGetFeaturesOfDeviceWhenFeatureManagerIsNotRegistered() throws DeviceTypeNotFoundException { PowerMockito.stub(PowerMockito.method(DeviceMgtAPIUtils.class, "getDeviceManagementService")) .toReturn(this.deviceManagementProviderService); Mockito.when(this.deviceManagementProviderService.getFeatureManager(Mockito.anyString())).thenReturn(null); @@ -448,14 +448,14 @@ public class DeviceManagementServiceImplTest { } @Test(description = "Testing getting device features when unable to get the feature manager") - public void testGetFeaturesException() throws DeviceManagementException { + public void testGetFeaturesException() throws DeviceTypeNotFoundException { PowerMockito.stub(PowerMockito.method(DeviceMgtAPIUtils.class, "getDeviceManagementService")) .toReturn(this.deviceManagementProviderService); Mockito.when(this.deviceManagementProviderService.getFeatureManager(Mockito.anyString())) - .thenThrow(new DeviceManagementException()); + .thenThrow(new DeviceTypeNotFoundException()); Response response = this.deviceManagementService .getFeaturesOfDevice(TEST_DEVICE_TYPE, UUID.randomUUID().toString(), null); - Assert.assertEquals(response.getStatus(), Response.Status.INTERNAL_SERVER_ERROR.getStatusCode()); + Assert.assertEquals(response.getStatus(), Response.Status.NOT_FOUND.getStatusCode()); Mockito.reset(this.deviceManagementProviderService); }