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

## Class AndroidAPIUtils

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

-     public class AndroidAPIUtils
      extends Object

  AndroidAPIUtil class provides utility functions used by Android REST-API classes.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `AndroidAPIUtils()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static org.wso2.carbon.device.mgt.common.DeviceIdentifier` | `convertToDeviceIdentifierObject(String deviceId)`
    `static Map<String,DeviceState>` | `createDeviceStatusData(List<org.wso2.carbon.analytics.datasource.commons.Record> records)`
    `static List<DeviceState>` | `getAllEventsForDevice(String tableName, String query)`
    `static org.wso2.carbon.analytics.api.AnalyticsDataAPI` | `getAnalyticsDataAPI()`
    `static org.wso2.carbon.device.mgt.core.app.mgt.ApplicationManagementProviderService` | `getApplicationManagerService()`
    `static String` | `getAuthenticatedUser()`
    `static org.wso2.carbon.device.mgt.core.service.DeviceManagementProviderService` | `getDeviceManagementService()`
    `static org.wso2.carbon.device.mgt.analytics.data.publisher.service.EventsPublisherService` | `getEventPublisherService()`
    `static org.wso2.carbon.device.mgt.common.notification.mgt.NotificationManagementService` | `getNotificationManagementService()`
    `static javax.ws.rs.core.Response` | `getOperationResponse(List<String> deviceIDs, org.wso2.carbon.device.mgt.common.operation.mgt.Operation operation)`
    `static List<? extends org.wso2.carbon.device.mgt.common.operation.mgt.Operation>` | `getPendingOperations(org.wso2.carbon.device.mgt.common.DeviceIdentifier deviceIdentifier)`
    `static org.wso2.carbon.policy.mgt.core.PolicyManagerService` | `getPolicyManagerService()`
    `static javax.ws.rs.core.MediaType` | `getResponseMediaType(String acceptHeader)`
    `static List<DeviceState>` | `getSortedDeviceStateData(Map<String,DeviceState> sensorDatas, List<org.wso2.carbon.analytics.dataservice.commons.SearchResultEntry> searchResults)`
    `static void` | `updateOperation(String deviceId, org.wso2.carbon.device.mgt.common.operation.mgt.Operation operation)`

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

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

- - ### Constructor Detail

    - #### AndroidAPIUtils

          public AndroidAPIUtils()

  - ### Method Detail

    - #### convertToDeviceIdentifierObject

          public static org.wso2.carbon.device.mgt.common.DeviceIdentifier convertToDeviceIdentifierObject(String deviceId)

    - #### getAuthenticatedUser

          public static String getAuthenticatedUser()

    - #### getDeviceManagementService

          public static org.wso2.carbon.device.mgt.core.service.DeviceManagementProviderService getDeviceManagementService()

    - #### getResponseMediaType

          public static javax.ws.rs.core.MediaType getResponseMediaType(String acceptHeader)

    - #### getOperationResponse

          public static javax.ws.rs.core.Response getOperationResponse(List<String> deviceIDs,
                                                       org.wso2.carbon.device.mgt.common.operation.mgt.Operation operation)
                                                                throws org.wso2.carbon.device.mgt.common.DeviceManagementException,
                                                                       org.wso2.carbon.device.mgt.common.operation.mgt.OperationManagementException,
                                                                       org.wso2.carbon.device.mgt.common.InvalidDeviceException

      Throws:
        `org.wso2.carbon.device.mgt.common.DeviceManagementException`
        `org.wso2.carbon.device.mgt.common.operation.mgt.OperationManagementException`
        `org.wso2.carbon.device.mgt.common.InvalidDeviceException`

    - #### getPolicyManagerService

          public static org.wso2.carbon.policy.mgt.core.PolicyManagerService getPolicyManagerService()

    - #### getApplicationManagerService

          public static org.wso2.carbon.device.mgt.core.app.mgt.ApplicationManagementProviderService getApplicationManagerService()

    - #### getNotificationManagementService

          public static org.wso2.carbon.device.mgt.common.notification.mgt.NotificationManagementService getNotificationManagementService()

    - #### getEventPublisherService

          public static org.wso2.carbon.device.mgt.analytics.data.publisher.service.EventsPublisherService getEventPublisherService()

    - #### getAnalyticsDataAPI

          public static org.wso2.carbon.analytics.api.AnalyticsDataAPI getAnalyticsDataAPI()

    - #### getAllEventsForDevice

          public static List<DeviceState> getAllEventsForDevice(String tableName,
                                                String query)
                                                         throws org.wso2.carbon.analytics.datasource.commons.exception.AnalyticsException

      Throws:
        `org.wso2.carbon.analytics.datasource.commons.exception.AnalyticsException`

    - #### createDeviceStatusData

          public static Map<String,DeviceState> createDeviceStatusData(List<org.wso2.carbon.analytics.datasource.commons.Record> records)

    - #### getSortedDeviceStateData

          public static List<DeviceState> getSortedDeviceStateData(Map<String,DeviceState> sensorDatas,
                                                   List<org.wso2.carbon.analytics.dataservice.commons.SearchResultEntry> searchResults)

    - #### updateOperation

          public static void updateOperation(String deviceId,
                             org.wso2.carbon.device.mgt.common.operation.mgt.Operation operation)
                                      throws org.wso2.carbon.device.mgt.common.operation.mgt.OperationManagementException,
                                             org.wso2.carbon.device.mgt.common.policy.mgt.monitor.PolicyComplianceException,
                                             org.wso2.carbon.device.mgt.common.app.mgt.ApplicationManagementException

      Throws:
        `org.wso2.carbon.device.mgt.common.operation.mgt.OperationManagementException`
        `org.wso2.carbon.device.mgt.common.policy.mgt.monitor.PolicyComplianceException`
        `org.wso2.carbon.device.mgt.common.app.mgt.ApplicationManagementException`

    - #### getPendingOperations

          public static List<? extends org.wso2.carbon.device.mgt.common.operation.mgt.Operation> getPendingOperations(org.wso2.carbon.device.mgt.common.DeviceIdentifier deviceIdentifier)
                                                                                                                throws org.wso2.carbon.device.mgt.common.operation.mgt.OperationManagementException

      Throws:
        `org.wso2.carbon.device.mgt.common.operation.mgt.OperationManagementException`

Copyright © 2017 WSO2. All rights reserved.