org.wso2.carbon.mdm.services.android.util

## Class AndroidDeviceUtils

- java.lang.Object
- - org.wso2.carbon.mdm.services.android.util.AndroidDeviceUtils

-     public class AndroidDeviceUtils
      extends Object

  Util class for holding Android device related util methods.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `AndroidDeviceUtils()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static BadRequestException` | `buildBadRequestException(String description)` Returns a new BadRequestException
    `String` | `convertErrorMapIntoErrorMessage(List<String> errorDeviceIdList)`
    `static <T> ErrorResponse` | `getConstraintViolationErrorDTO(Set<javax.validation.ConstraintViolation<T>> violations)`
    `static ErrorResponse` | `getErrorResponse(String message, Long code, String description)` Returns generic ErrorResponse.
    `static boolean` | `isValidDeviceIdentifier(org.wso2.carbon.device.mgt.common.DeviceIdentifier deviceIdentifier)`
    `DeviceIDHolder` | `validateDeviceIdentifiers(List<String> deviceIDs)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### AndroidDeviceUtils

          public AndroidDeviceUtils()

  - ### Method Detail

    - #### validateDeviceIdentifiers

          public DeviceIDHolder validateDeviceIdentifiers(List<String> deviceIDs)

    - #### convertErrorMapIntoErrorMessage

          public String convertErrorMapIntoErrorMessage(List<String> errorDeviceIdList)

    - #### isValidDeviceIdentifier

          public static boolean isValidDeviceIdentifier(org.wso2.carbon.device.mgt.common.DeviceIdentifier deviceIdentifier)
                                                 throws org.wso2.carbon.device.mgt.common.DeviceManagementException

      Throws:
        `org.wso2.carbon.device.mgt.common.DeviceManagementException`

    - #### buildBadRequestException

          public static BadRequestException buildBadRequestException(String description)

      Returns a new BadRequestException
      Parameters:
        `description` - description of the exception
      Returns:
        a new BadRequestException with the specified details as a response DTO

    - #### getErrorResponse

          public static ErrorResponse getErrorResponse(String message,
                                       Long code,
                                       String description)

      Returns generic ErrorResponse.
      Parameters:
        `message` - specific error message
        `code` -
        `description` -
      Returns:
        generic Response with error specific details.

    - #### getConstraintViolationErrorDTO

          public static <T> ErrorResponse getConstraintViolationErrorDTO(Set<javax.validation.ConstraintViolation<T>> violations)

Copyright © 2017 WSO2. All rights reserved.