Fixing issues of previous PRs

revert-dabc3590
mharindu 9 years ago
parent 248f2f8a80
commit 17ad655f7d

@ -118,8 +118,8 @@ public class AndroidDeviceManager implements DeviceManager {
JAXBContext context = JAXBContext.newInstance(TenantConfiguration.class); JAXBContext context = JAXBContext.newInstance(TenantConfiguration.class);
Unmarshaller unmarshaller = context.createUnmarshaller(); Unmarshaller unmarshaller = context.createUnmarshaller();
return (TenantConfiguration) unmarshaller.unmarshal( return (TenantConfiguration) unmarshaller.unmarshal(
new StringReader(new String((byte[]) resource.getContent(), Charset new StringReader(new String((byte[]) resource.getContent(), Charset.
.forName(MobilePluginConstants.CHARSET_UTF8)))); forName(MobilePluginConstants.CHARSET_UTF8))));
} }
return new TenantConfiguration(); return new TenantConfiguration();
} catch (MobileDeviceMgtPluginException e) { } catch (MobileDeviceMgtPluginException e) {
@ -288,8 +288,8 @@ public class AndroidDeviceManager implements DeviceManager {
@Override @Override
public License getLicense(String languageCode) throws LicenseManagementException { public License getLicense(String languageCode) throws LicenseManagementException {
return licenseManager return licenseManager.
.getLicense(AndroidDeviceManagementService.DEVICE_TYPE_ANDROID, languageCode); getLicense(AndroidDeviceManagementService.DEVICE_TYPE_ANDROID, languageCode);
} }
@Override @Override
@ -320,8 +320,7 @@ public class AndroidDeviceManager implements DeviceManager {
"updating the details of Android device : " + device.getDeviceIdentifier()); "updating the details of Android device : " + device.getDeviceIdentifier());
} }
AndroidDAOFactory.beginTransaction(); AndroidDAOFactory.beginTransaction();
status = daoFactory.getMobileDeviceDAO() status = daoFactory.getMobileDeviceDAO().updateMobileDevice(existingMobileDevice);
.updateMobileDevice(existingMobileDevice);
AndroidDAOFactory.commitTransaction(); AndroidDAOFactory.commitTransaction();
} catch (MobileDeviceManagementDAOException e) { } catch (MobileDeviceManagementDAOException e) {
try { try {

@ -3,30 +3,30 @@
-- Table `AD_DEVICE` -- Table `AD_DEVICE`
-- ----------------------------------------------------- -- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `AD_DEVICE` ( CREATE TABLE IF NOT EXISTS `AD_DEVICE` (
`ANDROID_DEVICE_ID` VARCHAR(45) NOT NULL , `ANDROID_DEVICE_ID` VARCHAR(45) NOT NULL,
`GCM_TOKEN` VARCHAR(45) NULL DEFAULT NULL , `GCM_TOKEN` VARCHAR(45) NULL DEFAULT NULL,
`DEVICE_INFO` VARCHAR(8000) NULL DEFAULT NULL , `DEVICE_INFO` VARCHAR(8000) NULL DEFAULT NULL,
`IMEI` VARCHAR(45) NULL DEFAULT NULL , `IMEI` VARCHAR(45) NULL DEFAULT NULL,
`IMSI` VARCHAR(45) NULL DEFAULT NULL , `IMSI` VARCHAR(45) NULL DEFAULT NULL,
`OS_VERSION` VARCHAR(45) NULL DEFAULT NULL , `OS_VERSION` VARCHAR(45) NULL DEFAULT NULL,
`DEVICE_MODEL` VARCHAR(45) NULL DEFAULT NULL , `DEVICE_MODEL` VARCHAR(45) NULL DEFAULT NULL,
`VENDOR` VARCHAR(45) NULL DEFAULT NULL , `VENDOR` VARCHAR(45) NULL DEFAULT NULL,
`LATITUDE` VARCHAR(45) NULL DEFAULT NULL, `LATITUDE` VARCHAR(45) NULL DEFAULT NULL,
`LONGITUDE` VARCHAR(45) NULL DEFAULT NULL, `LONGITUDE` VARCHAR(45) NULL DEFAULT NULL,
`SERIAL` VARCHAR(45) NULL DEFAULT NULL, `SERIAL` VARCHAR(45) NULL DEFAULT NULL,
`MAC_ADDRESS` VARCHAR(45) NULL DEFAULT NULL, `MAC_ADDRESS` VARCHAR(45) NULL DEFAULT NULL,
`DEVICE_NAME` VARCHAR(100) NULL DEFAULT NULL, `DEVICE_NAME` VARCHAR(100) NULL DEFAULT NULL,
PRIMARY KEY (`ANDROID_DEVICE_ID`) ); PRIMARY KEY (`ANDROID_DEVICE_ID`));
-- ----------------------------------------------------- -- -----------------------------------------------------
-- Table `AD_FEATURE` -- Table `AD_FEATURE`
-- ----------------------------------------------------- -- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `AD_FEATURE` ( CREATE TABLE IF NOT EXISTS `AD_FEATURE` (
`ID` INT NOT NULL AUTO_INCREMENT , `ID` INT NOT NULL AUTO_INCREMENT,
`CODE` VARCHAR(45) NOT NULL, `CODE` VARCHAR(45) NOT NULL,
`NAME` VARCHAR(100) NULL , `NAME` VARCHAR(100) NULL,
`DESCRIPTION` VARCHAR(200) NULL , `DESCRIPTION` VARCHAR(200) NULL,
PRIMARY KEY (`ID`) ); PRIMARY KEY (`ID`));
-- ----------------------------------------------------- -- -----------------------------------------------------

@ -6,7 +6,7 @@ CREATE TABLE IF NOT EXISTS `WINDOWS_FEATURE` (
`CODE` VARCHAR(45) NOT NULL, `CODE` VARCHAR(45) NOT NULL,
`NAME` VARCHAR(100) NULL, `NAME` VARCHAR(100) NULL,
`DESCRIPTION` VARCHAR(200) NULL, `DESCRIPTION` VARCHAR(200) NULL,
PRIMARY KEY (`FEATURE_ID`) ); PRIMARY KEY (`FEATURE_ID`));
-- ----------------------------------------------------- -- -----------------------------------------------------
@ -16,12 +16,12 @@ CREATE TABLE IF NOT EXISTS `WINDOWS_FEATURE` (
CREATE TABLE IF NOT EXISTS `WINDOWS_DEVICE` ( CREATE TABLE IF NOT EXISTS `WINDOWS_DEVICE` (
`MOBILE_DEVICE_ID` VARCHAR(45) NOT NULL, `MOBILE_DEVICE_ID` VARCHAR(45) NOT NULL,
`CHANNEL_URI` VARCHAR(100) NULL DEFAULT NULL, `CHANNEL_URI` VARCHAR(100) NULL DEFAULT NULL,
`DEVICE_INFO` VARCHAR(8000) NULL DEFAULT NULL , `DEVICE_INFO` VARCHAR(8000) NULL DEFAULT NULL,
`IMEI` VARCHAR(45) NULL DEFAULT NULL , `IMEI` VARCHAR(45) NULL DEFAULT NULL,
`IMSI` VARCHAR(45) NULL DEFAULT NULL , `IMSI` VARCHAR(45) NULL DEFAULT NULL,
`OS_VERSION` VARCHAR(45) NULL DEFAULT NULL , `OS_VERSION` VARCHAR(45) NULL DEFAULT NULL,
`DEVICE_MODEL` VARCHAR(45) NULL DEFAULT NULL , `DEVICE_MODEL` VARCHAR(45) NULL DEFAULT NULL,
`VENDOR` VARCHAR(45) NULL DEFAULT NULL , `VENDOR` VARCHAR(45) NULL DEFAULT NULL,
`LATITUDE` VARCHAR(45) NULL DEFAULT NULL, `LATITUDE` VARCHAR(45) NULL DEFAULT NULL,
`LONGITUDE` VARCHAR(45) NULL DEFAULT NULL, `LONGITUDE` VARCHAR(45) NULL DEFAULT NULL,
`SERIAL` VARCHAR(45) NULL DEFAULT NULL, `SERIAL` VARCHAR(45) NULL DEFAULT NULL,

@ -3,13 +3,13 @@
-- ----------------------------------------------------- -- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `AD_DEVICE` ( CREATE TABLE IF NOT EXISTS `AD_DEVICE` (
`ANDROID_DEVICE_ID` VARCHAR(45) NOT NULL , `ANDROID_DEVICE_ID` VARCHAR(45) NOT NULL ,
`DEVICE_INFO` VARCHAR(500) NULL DEFAULT NULL , `DEVICE_INFO` VARCHAR(500) NULL DEFAULT NULL,
`GCM_TOKEN` VARCHAR(45) NULL DEFAULT NULL , `GCM_TOKEN` VARCHAR(45) NULL DEFAULT NULL,
`IMEI` VARCHAR(45) NULL DEFAULT NULL , `IMEI` VARCHAR(45) NULL DEFAULT NULL,
`IMSI` VARCHAR(45) NULL DEFAULT NULL , `IMSI` VARCHAR(45) NULL DEFAULT NULL,
`OS_VERSION` VARCHAR(45) NULL DEFAULT NULL , `OS_VERSION` VARCHAR(45) NULL DEFAULT NULL,
`DEVICE_MODEL` VARCHAR(45) NULL DEFAULT NULL , `DEVICE_MODEL` VARCHAR(45) NULL DEFAULT NULL,
`VENDOR` VARCHAR(45) NULL DEFAULT NULL , `VENDOR` VARCHAR(45) NULL DEFAULT NULL,
`LATITUDE` VARCHAR(45) NULL DEFAULT NULL, `LATITUDE` VARCHAR(45) NULL DEFAULT NULL,
`LONGITUDE` VARCHAR(45) NULL DEFAULT NULL, `LONGITUDE` VARCHAR(45) NULL DEFAULT NULL,
`SERIAL` VARCHAR(45) NULL DEFAULT NULL, `SERIAL` VARCHAR(45) NULL DEFAULT NULL,
@ -23,10 +23,10 @@ ENGINE = InnoDB;
-- Table `MBL_FEATURE` -- Table `MBL_FEATURE`
-- ----------------------------------------------------- -- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `AD_FEATURE` ( CREATE TABLE IF NOT EXISTS `AD_FEATURE` (
`ID` INT NOT NULL AUTO_INCREMENT , `ID` INT NOT NULL AUTO_INCREMENT,
`CODE` VARCHAR(45) NOT NULL, `CODE` VARCHAR(45) NOT NULL,
`NAME` VARCHAR(100) NULL , `NAME` VARCHAR(100) NULL,
`DESCRIPTION` VARCHAR(200) NULL , `DESCRIPTION` VARCHAR(200) NULL,
PRIMARY KEY (`ID`)) PRIMARY KEY (`ID`))
ENGINE = InnoDB; ENGINE = InnoDB;

@ -24,7 +24,7 @@ ENGINE = InnoDB;
-- ----------------------------------------------------- -- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `MBL_FEATURE` ( CREATE TABLE IF NOT EXISTS `MBL_FEATURE` (
`FEATURE_ID` INT NOT NULL AUTO_INCREMENT, `FEATURE_ID` INT NOT NULL AUTO_INCREMENT,
`DEVICE_TYPE` VARCHAR(45) NOT NULL , `DEVICE_TYPE` VARCHAR(45) NOT NULL,
`CODE` VARCHAR(45) NULL, `CODE` VARCHAR(45) NULL,
`NAME` VARCHAR(100) NULL, `NAME` VARCHAR(100) NULL,
`DESCRIPTION` VARCHAR(200) NULL, `DESCRIPTION` VARCHAR(200) NULL,

Loading…
Cancel
Save