org.wso2.carbon.device.mgt.mobile.windows.api.operations.util

## Class OperationHandler

- java.lang.Object
- - org.wso2.carbon.device.mgt.mobile.windows.api.operations.util.OperationHandler

-     public class OperationHandler
      extends Object

  This class is used to handle pending operations of the device.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `OperationHandler()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `dataWipe(StatusTag status, SyncmlDocument syncmlDocument, org.wso2.carbon.device.mgt.common.DeviceIdentifier deviceIdentifier)` Update the status of the DataWipe operation.
    `void` | `generateComplianceFeatureStatus(SyncmlDocument syncmlDocument)` Generate Compliance Features.
    `List<Profile>` | `generateDeviceOperationStatusObject(SyncmlDocument syncmlDocument)` Generate status of the features that have been activated on the device.
    `List<? extends org.wso2.carbon.device.mgt.common.operation.mgt.Operation>` | `getPendingOperations(SyncmlDocument syncmlDocument)` Get pending operations.
    `void` | `ring(StatusTag status, SyncmlDocument syncmlDocument, org.wso2.carbon.device.mgt.common.DeviceIdentifier deviceIdentifier)` Update status of the ring operation.
    `org.wso2.carbon.device.mgt.common.policy.mgt.monitor.ComplianceFeature` | `setComplianceFeatures(org.wso2.carbon.device.mgt.common.policy.mgt.ProfileFeature activeFeature, Profile deviceFeature)` Set compliance of the feature according to the device status for the specific feature.
    `void` | `updateDeviceInfo(SyncmlDocument syncmlDocument)`
    `void` | `updateDeviceInfoStatus(org.wso2.carbon.device.mgt.common.DeviceIdentifier deviceIdentifier)`
    `void` | `updateDeviceLocationStatus(SyncmlDocument syncmlDocument)`
    `void` | `updateDeviceOperations(StatusTag status, SyncmlDocument syncmlDocument, org.wso2.carbon.device.mgt.common.DeviceIdentifier deviceIdentifier)` Update the operations using device status payload.
    `void` | `updateLockOperation(StatusTag status, SyncmlDocument syncmlDocument, org.wso2.carbon.device.mgt.common.DeviceIdentifier deviceIdentifier)` Update Status of the lock operation.
    `static void` | `updateStatus(String deviceId, List<? extends org.wso2.carbon.device.mgt.common.operation.mgt.Operation> operations)` Update operation statuses.
    `void` | `UpdateUriOperations(SyncmlDocument syncmlDocument)` Update the completed/Error status of the operation which have the URI of the operation code in the syncml payload.

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

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

- - ### Constructor Detail

    - #### OperationHandler

          public OperationHandler()

  - ### Method Detail

    - #### updateDeviceOperations

          public void updateDeviceOperations(StatusTag status,
                                    SyncmlDocument syncmlDocument,
                                    org.wso2.carbon.device.mgt.common.DeviceIdentifier deviceIdentifier)
                                      throws org.wso2.carbon.device.mgt.common.operation.mgt.OperationManagementException

      Update the operations using device status payload.
      Parameters:
        `status` - Client side status for the specific operations.
        `syncmlDocument` - syncml payload for operation status which parse through the syncml engine.
        `deviceIdentifier` - specific device identifier for each device.
      Throws:
        `org.wso2.carbon.device.mgt.common.operation.mgt.OperationManagementException`

    - #### updateStatus

          public static void updateStatus(String deviceId,
                          List<? extends org.wso2.carbon.device.mgt.common.operation.mgt.Operation> operations)
                                   throws org.wso2.carbon.device.mgt.common.operation.mgt.OperationManagementException

      Update operation statuses.
      Parameters:
        `deviceId` - specific device Id.
        `operations` - operation list to be update.
      Throws:
        `org.wso2.carbon.device.mgt.common.operation.mgt.OperationManagementException`

    - #### updateLockOperation

          public void updateLockOperation(StatusTag status,
                                 SyncmlDocument syncmlDocument,
                                 org.wso2.carbon.device.mgt.common.DeviceIdentifier deviceIdentifier)
                                   throws org.wso2.carbon.device.mgt.common.operation.mgt.OperationManagementException

      Update Status of the lock operation.
      Parameters:
        `status` - Status of the operation.
        `syncmlDocument` - parsed syncml payload.
        `deviceIdentifier` - Device Id.
      Throws:
        `org.wso2.carbon.device.mgt.common.operation.mgt.OperationManagementException`

    - #### ring

          public void ring(StatusTag status,
                  SyncmlDocument syncmlDocument,
                  org.wso2.carbon.device.mgt.common.DeviceIdentifier deviceIdentifier)
                    throws org.wso2.carbon.device.mgt.common.operation.mgt.OperationManagementException

      Update status of the ring operation.
      Parameters:
        `status` - Ring status of the device.
        `syncmlDocument` - Parsed syncml payload from the syncml engine.
        `deviceIdentifier` - specific device id to be update.
      Throws:
        `org.wso2.carbon.device.mgt.common.operation.mgt.OperationManagementException`

    - #### dataWipe

          public void dataWipe(StatusTag status,
                      SyncmlDocument syncmlDocument,
                      org.wso2.carbon.device.mgt.common.DeviceIdentifier deviceIdentifier)
                        throws org.wso2.carbon.device.mgt.common.operation.mgt.OperationManagementException

      Update the status of the DataWipe operation.
      Parameters:
        `status` - Status of the data wipe.
        `syncmlDocument` - Parsed syncml payload from the syncml engine.
        `deviceIdentifier` - specific device id to be wiped.
      Throws:
        `org.wso2.carbon.device.mgt.common.operation.mgt.OperationManagementException`

    - #### updateDeviceInfoStatus

          public void updateDeviceInfoStatus(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`

    - #### updateDeviceLocationStatus

          public void updateDeviceLocationStatus(SyncmlDocument syncmlDocument)
                                          throws org.wso2.carbon.device.mgt.common.operation.mgt.OperationManagementException

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

    - #### getPendingOperations

          public List<? extends org.wso2.carbon.device.mgt.common.operation.mgt.Operation> getPendingOperations(SyncmlDocument syncmlDocument)
                                                                                                         throws org.wso2.carbon.device.mgt.common.operation.mgt.OperationManagementException,
                                                                                                                WindowsOperationException

      Get pending operations.
      Parameters:
        `syncmlDocument` - SyncmlDocument object which creates from the syncml engine using syncml payload
      Returns:
        Return list of pending operations.
      Throws:
        `org.wso2.carbon.device.mgt.common.operation.mgt.OperationManagementException`
        `WindowsOperationException`

    - #### setComplianceFeatures

          public org.wso2.carbon.device.mgt.common.policy.mgt.monitor.ComplianceFeature setComplianceFeatures(org.wso2.carbon.device.mgt.common.policy.mgt.ProfileFeature activeFeature,
                                                                                                     Profile deviceFeature)

      Set compliance of the feature according to the device status for the specific feature.
      Parameters:
        `activeFeature` - Features to be applied on the device.
        `deviceFeature` - Actual features applied on the device.
      Returns:
        Returns setting up compliance feature.

    - #### UpdateUriOperations

          public void UpdateUriOperations(SyncmlDocument syncmlDocument)
                                   throws org.wso2.carbon.device.mgt.common.operation.mgt.OperationManagementException,
                                          WindowsOperationException

      Update the completed/Error status of the operation which have the URI of the operation code in the syncml payload.
      Parameters:
        `syncmlDocument` - SyncmlDocument object generated from the the syncml engine.
      Throws:
        `org.wso2.carbon.device.mgt.common.operation.mgt.OperationManagementException`
        `WindowsOperationException`

    - #### generateDeviceOperationStatusObject

          public List<Profile> generateDeviceOperationStatusObject(SyncmlDocument syncmlDocument)
                                                            throws WindowsOperationException

      Generate status of the features that have been activated on the device.
      Parameters:
        `syncmlDocument` - syncmlDocument object pasrsed from the syncml engine.
      Returns:
        device statuses for the activated features
      Throws:
        `WindowsOperationException`

    - #### generateComplianceFeatureStatus

          public void generateComplianceFeatureStatus(SyncmlDocument syncmlDocument)
                                               throws WindowsOperationException

      Generate Compliance Features.
      Parameters:
        `syncmlDocument` - syncmlDocument object parsed from the syncml engine.
      Throws:
        `WindowsOperationException`

    - #### updateDeviceInfo

          public void updateDeviceInfo(SyncmlDocument syncmlDocument)
                                throws WindowsOperationException

      Throws:
        `WindowsOperationException`

Copyright © 2017 WSO2. All rights reserved.