merged changes to master

revert-70aa11f8
harshanL 10 years ago
commit d09b37b4ce

@ -34,4 +34,13 @@ public final class DeviceManagementConstants {
public static final String SECURE_VAULT_NS = "http://org.wso2.securevault/configuration";
}
public static class MobileDeviceTypes {
private MobileDeviceTypes() {
throw new AssertionError();
}
public final static String MOBILE_DEVICE_TYPE_ANDROID = "android";
public final static String MOBILE_DEVICE_TYPE_IOS = "ios";
public final static String MOBILE_DEVICE_TYPE_WINDOWS = "windows";
}
}

@ -1,33 +0,0 @@
/*
* Copyright (c) 2014, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.wso2.carbon.device.mgt.mobile.impl;
/**
* Constants used by Mobile device Management classes.
*/
public final class MobileDeviceManagementConstants {
public static class PlatformTypes {
private PlatformTypes() {
throw new AssertionError();
}
public final static String MOBILE_DEVICE_TYPE_ANDROID = "android";
public final static String MOBILE_DEVICE_TYPE_IOS = "ios";
public final static String MOBILE_DEVICE_TYPE_WINDOWS = "windows";
}
}

@ -18,9 +18,9 @@ package org.wso2.carbon.device.mgt.mobile.impl.android;
import org.wso2.carbon.device.mgt.common.Device;
import org.wso2.carbon.device.mgt.common.DeviceIdentifier;
import org.wso2.carbon.device.mgt.common.DeviceManagementConstants;
import org.wso2.carbon.device.mgt.common.DeviceManagementException;
import org.wso2.carbon.device.mgt.common.spi.DeviceManagerService;
import org.wso2.carbon.device.mgt.mobile.impl.MobileDeviceManagementConstants;
import java.util.List;
@ -31,7 +31,7 @@ public class AndroidDeviceManagerService implements DeviceManagerService {
@Override
public String getProviderType() {
return MobileDeviceManagementConstants.PlatformTypes.MOBILE_DEVICE_TYPE_ANDROID;
return DeviceManagementConstants.MobileDeviceTypes.MOBILE_DEVICE_TYPE_ANDROID;
}
@Override

@ -18,9 +18,9 @@ package org.wso2.carbon.device.mgt.mobile.impl.ios;
import org.wso2.carbon.device.mgt.common.Device;
import org.wso2.carbon.device.mgt.common.DeviceIdentifier;
import org.wso2.carbon.device.mgt.common.DeviceManagementConstants;
import org.wso2.carbon.device.mgt.common.DeviceManagementException;
import org.wso2.carbon.device.mgt.common.spi.DeviceManagerService;
import org.wso2.carbon.device.mgt.mobile.impl.MobileDeviceManagementConstants;
import java.util.List;
@ -31,7 +31,7 @@ public class IOSDeviceManagerService implements DeviceManagerService {
@Override
public String getProviderType() {
return MobileDeviceManagementConstants.PlatformTypes.MOBILE_DEVICE_TYPE_IOS;
return DeviceManagementConstants.MobileDeviceTypes.MOBILE_DEVICE_TYPE_IOS;
}
@Override

@ -18,9 +18,9 @@ package org.wso2.carbon.device.mgt.mobile.impl.windows;
import org.wso2.carbon.device.mgt.common.Device;
import org.wso2.carbon.device.mgt.common.DeviceIdentifier;
import org.wso2.carbon.device.mgt.common.DeviceManagementConstants;
import org.wso2.carbon.device.mgt.common.DeviceManagementException;
import org.wso2.carbon.device.mgt.common.spi.DeviceManagerService;
import org.wso2.carbon.device.mgt.mobile.impl.MobileDeviceManagementConstants;
import java.util.List;
@ -31,7 +31,7 @@ public class WindowsDeviceManagerService implements DeviceManagerService {
@Override
public String getProviderType() {
return MobileDeviceManagementConstants.PlatformTypes.MOBILE_DEVICE_TYPE_WINDOWS;
return DeviceManagementConstants.MobileDeviceTypes.MOBILE_DEVICE_TYPE_WINDOWS;
}
@Override

@ -160,11 +160,6 @@
<artifactId>org.wso2.carbon.device.mgt.core</artifactId>
<version>2.0.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.wso2.carbon</groupId>
<artifactId>org.wso2.carbon.device.mgt.mobile.impl</artifactId>
<version>2.0.0-SNAPSHOT</version>
</dependency>
</dependencies>
<properties>
<cxf.version>2.6.1</cxf.version>

@ -19,7 +19,7 @@ package cdm.api.android.util;
import com.google.gson.JsonObject;
import org.wso2.carbon.device.mgt.common.Device;
import org.wso2.carbon.device.mgt.common.DeviceIdentifier;
import org.wso2.carbon.device.mgt.mobile.impl.MobileDeviceManagementConstants;
import org.wso2.carbon.device.mgt.common.DeviceManagementConstants;
/**
@ -29,7 +29,7 @@ public class AndroidAPIUtil {
public static Device convertToDeviceObject(JsonObject json){
Device device = new Device();
device.setType(MobileDeviceManagementConstants.PlatformTypes.MOBILE_DEVICE_TYPE_ANDROID);
device.setType(DeviceManagementConstants.MobileDeviceTypes.MOBILE_DEVICE_TYPE_ANDROID);
device.setName("Test Device");
device.setOwner("harshan");
return device;
@ -38,7 +38,7 @@ public class AndroidAPIUtil {
public static DeviceIdentifier convertToDeviceIdentifierObject(String deviceId){
DeviceIdentifier identifier = new DeviceIdentifier();
identifier.setId(deviceId);
identifier.setType(MobileDeviceManagementConstants.PlatformTypes.MOBILE_DEVICE_TYPE_ANDROID);
identifier.setType(DeviceManagementConstants.MobileDeviceTypes.MOBILE_DEVICE_TYPE_ANDROID);
return identifier;
}
}

Loading…
Cancel
Save