From b96d561ef0c138980219532207c68b1e796ea0e9 Mon Sep 17 00:00:00 2001 From: manoj Date: Fri, 23 Jan 2015 11:02:25 +0530 Subject: [PATCH] License Manaproduct/modules/mobileservices/agents/android/jax-rs/src/main/java/org/wso2/cdmserver/mobileservices/android/util/AndroidAPIUtils.javagement --- .../java/org/wso2/cdmserver/mobileservices/android/Device.java | 1 + .../org/wso2/cdmserver/mobileservices/android/Operation.java | 2 ++ .../cdmserver/mobileservices/android/util/AndroidAPIUtils.java | 2 ++ 3 files changed, 5 insertions(+) diff --git a/product/modules/mobileservices/agents/android/jax-rs/src/main/java/org/wso2/cdmserver/mobileservices/android/Device.java b/product/modules/mobileservices/agents/android/jax-rs/src/main/java/org/wso2/cdmserver/mobileservices/android/Device.java index 037d5cf30..84a514f2a 100644 --- a/product/modules/mobileservices/agents/android/jax-rs/src/main/java/org/wso2/cdmserver/mobileservices/android/Device.java +++ b/product/modules/mobileservices/agents/android/jax-rs/src/main/java/org/wso2/cdmserver/mobileservices/android/Device.java @@ -137,6 +137,7 @@ public class Device { @Produces("text/plain") public String getLicense() { //TODO: need to implement fetch license from core + // AndroidAPIUtils.getDeviceManagementService().updateDeviceInfo(device); return "License Agreement"; } } diff --git a/product/modules/mobileservices/agents/android/jax-rs/src/main/java/org/wso2/cdmserver/mobileservices/android/Operation.java b/product/modules/mobileservices/agents/android/jax-rs/src/main/java/org/wso2/cdmserver/mobileservices/android/Operation.java index 425536497..9136e9f47 100644 --- a/product/modules/mobileservices/agents/android/jax-rs/src/main/java/org/wso2/cdmserver/mobileservices/android/Operation.java +++ b/product/modules/mobileservices/agents/android/jax-rs/src/main/java/org/wso2/cdmserver/mobileservices/android/Operation.java @@ -79,6 +79,8 @@ public class Operation { Message responseMsg = new Message(); try { dmService = AndroidAPIUtils.getDeviceManagementService(); + + //TODO: need to complete getOperation logic boolean result = dmService.getOperationManager("").addOperation(null, null); if (result) { Response.status(HttpStatus.SC_OK); diff --git a/product/modules/mobileservices/agents/android/jax-rs/src/main/java/org/wso2/cdmserver/mobileservices/android/util/AndroidAPIUtils.java b/product/modules/mobileservices/agents/android/jax-rs/src/main/java/org/wso2/cdmserver/mobileservices/android/util/AndroidAPIUtils.java index 9ac3ec057..9696a1470 100644 --- a/product/modules/mobileservices/agents/android/jax-rs/src/main/java/org/wso2/cdmserver/mobileservices/android/util/AndroidAPIUtils.java +++ b/product/modules/mobileservices/agents/android/jax-rs/src/main/java/org/wso2/cdmserver/mobileservices/android/util/AndroidAPIUtils.java @@ -20,6 +20,7 @@ import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.wso2.carbon.context.PrivilegedCarbonContext; import org.wso2.carbon.device.mgt.common.*; +import org.wso2.carbon.device.mgt.core.LicenseManager; import org.wso2.carbon.device.mgt.core.service.DeviceManagementService; import org.wso2.carbon.utils.multitenancy.MultitenantConstants; @@ -56,4 +57,5 @@ public class AndroidAPIUtils { PrivilegedCarbonContext.endTenantFlow(); return dmService; } + }