From 1476036b89b411bbbfb557547d147f3dbbcc26af Mon Sep 17 00:00:00 2001 From: prabathabey Date: Tue, 9 Dec 2014 17:56:24 +0530 Subject: [PATCH] cleaning up constants --- .../impl/MobileDeviceManagementConstants.java | 13 +++++++++---- .../impl/android/AndroidDeviceManagerService.java | 2 +- .../mobile/impl/ios/IOSDeviceManagerService.java | 2 +- .../impl/windows/WindowsDeviceManagerService.java | 2 +- 4 files changed, 12 insertions(+), 7 deletions(-) diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/src/main/java/org/wso2/carbon/device/mgt/mobile/impl/MobileDeviceManagementConstants.java b/components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/src/main/java/org/wso2/carbon/device/mgt/mobile/impl/MobileDeviceManagementConstants.java index 66cb6c34e65..a0b5933cf3e 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/src/main/java/org/wso2/carbon/device/mgt/mobile/impl/MobileDeviceManagementConstants.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/src/main/java/org/wso2/carbon/device/mgt/mobile/impl/MobileDeviceManagementConstants.java @@ -19,10 +19,15 @@ package org.wso2.carbon.device.mgt.mobile.impl; /** * Constants used by Mobile device Management classes. */ -public class MobileDeviceManagementConstants { +public final class MobileDeviceManagementConstants { - 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"; + 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"; + } } diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/src/main/java/org/wso2/carbon/device/mgt/mobile/impl/android/AndroidDeviceManagerService.java b/components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/src/main/java/org/wso2/carbon/device/mgt/mobile/impl/android/AndroidDeviceManagerService.java index 599da59c424..f7dc5987ead 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/src/main/java/org/wso2/carbon/device/mgt/mobile/impl/android/AndroidDeviceManagerService.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/src/main/java/org/wso2/carbon/device/mgt/mobile/impl/android/AndroidDeviceManagerService.java @@ -31,7 +31,7 @@ public class AndroidDeviceManagerService implements DeviceManagerService { @Override public String getProviderType() { - return MobileDeviceManagementConstants.MOBILE_DEVICE_TYPE_ANDROID; + return MobileDeviceManagementConstants.PlatformTypes.MOBILE_DEVICE_TYPE_ANDROID; } @Override diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/src/main/java/org/wso2/carbon/device/mgt/mobile/impl/ios/IOSDeviceManagerService.java b/components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/src/main/java/org/wso2/carbon/device/mgt/mobile/impl/ios/IOSDeviceManagerService.java index 6e15c47bd91..7252a13adae 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/src/main/java/org/wso2/carbon/device/mgt/mobile/impl/ios/IOSDeviceManagerService.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/src/main/java/org/wso2/carbon/device/mgt/mobile/impl/ios/IOSDeviceManagerService.java @@ -31,7 +31,7 @@ public class IOSDeviceManagerService implements DeviceManagerService { @Override public String getProviderType() { - return MobileDeviceManagementConstants.MOBILE_DEVICE_TYPE_IOS; + return MobileDeviceManagementConstants.PlatformTypes.MOBILE_DEVICE_TYPE_IOS; } @Override diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/src/main/java/org/wso2/carbon/device/mgt/mobile/impl/windows/WindowsDeviceManagerService.java b/components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/src/main/java/org/wso2/carbon/device/mgt/mobile/impl/windows/WindowsDeviceManagerService.java index b4711f4e8a6..93b40d392c5 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/src/main/java/org/wso2/carbon/device/mgt/mobile/impl/windows/WindowsDeviceManagerService.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/src/main/java/org/wso2/carbon/device/mgt/mobile/impl/windows/WindowsDeviceManagerService.java @@ -31,7 +31,7 @@ public class WindowsDeviceManagerService implements DeviceManagerService { @Override public String getProviderType() { - return MobileDeviceManagementConstants.MOBILE_DEVICE_TYPE_WINDOWS; + return MobileDeviceManagementConstants.PlatformTypes.MOBILE_DEVICE_TYPE_WINDOWS; } @Override