public class DeviceMgtUtil extends Object
| Constructor and Description |
|---|
DeviceMgtUtil() |
| Modifier and Type | Method and Description |
|---|---|
static BadRequestException |
buildBadRequestException(String description)
Returns a new BadRequestException
|
static List<String> |
convertAPIScopesToScopeKeys(List<org.wso2.carbon.device.mgt.core.config.permission.Scope> scopes) |
static List<Scope> |
convertAPIScopestoScopes(List<org.wso2.carbon.device.mgt.core.config.permission.Scope> scopes) |
static org.wso2.carbon.device.mgt.common.policy.mgt.Profile |
convertProfile(Profile mdmProfile) |
static org.wso2.carbon.device.mgt.common.policy.mgt.ProfileFeature |
convertProfileFeature(ProfileFeature mdmProfileFeature) |
static List<org.wso2.carbon.device.mgt.core.config.permission.Scope> |
convertScopesListToAPIScopes(List<String> scopes,
String roleName) |
static <T> ErrorResponse |
getConstraintViolationErrorDTO(Set<javax.validation.ConstraintViolation<T>> violations) |
static ErrorResponse |
getErrorResponse(String message,
Long code,
String description)
Returns generic ErrorResponse.
|
public static org.wso2.carbon.device.mgt.common.policy.mgt.Profile convertProfile(Profile mdmProfile)
public static org.wso2.carbon.device.mgt.common.policy.mgt.ProfileFeature convertProfileFeature(ProfileFeature mdmProfileFeature)
public static List<org.wso2.carbon.device.mgt.core.config.permission.Scope> convertScopesListToAPIScopes(List<String> scopes, String roleName)
public static List<Scope> convertAPIScopestoScopes(List<org.wso2.carbon.device.mgt.core.config.permission.Scope> scopes)
public static List<String> convertAPIScopesToScopeKeys(List<org.wso2.carbon.device.mgt.core.config.permission.Scope> scopes)
public static BadRequestException buildBadRequestException(String description)
description - description of the exceptionpublic static ErrorResponse getErrorResponse(String message, Long code, String description)
message - specific error messagecode - description - public static <T> ErrorResponse getConstraintViolationErrorDTO(Set<javax.validation.ConstraintViolation<T>> violations)
Copyright © 2017 WSO2. All rights reserved.