|
|
@ -18,13 +18,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
package org.wso2.carbon.device.mgt.mobile.config;
|
|
|
|
package org.wso2.carbon.device.mgt.mobile.config;
|
|
|
|
|
|
|
|
|
|
|
|
import org.wso2.carbon.device.mgt.mobile.common.PluginTypeEnum;
|
|
|
|
|
|
|
|
import org.wso2.carbon.device.mgt.mobile.config.datasource.DataSourceConfigAdapter;
|
|
|
|
import org.wso2.carbon.device.mgt.mobile.config.datasource.DataSourceConfigAdapter;
|
|
|
|
import org.wso2.carbon.device.mgt.mobile.config.datasource.MobileDataSourceConfig;
|
|
|
|
import org.wso2.carbon.device.mgt.mobile.config.datasource.MobileDataSourceConfig;
|
|
|
|
|
|
|
|
|
|
|
|
import javax.xml.bind.annotation.XmlElement;
|
|
|
|
import javax.xml.bind.annotation.XmlElement;
|
|
|
|
import javax.xml.bind.annotation.XmlRootElement;
|
|
|
|
import javax.xml.bind.annotation.XmlRootElement;
|
|
|
|
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
|
|
|
|
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
|
|
|
|
|
|
|
|
import java.util.List;
|
|
|
|
import java.util.Map;
|
|
|
|
import java.util.Map;
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
@ -34,9 +34,10 @@ import java.util.Map;
|
|
|
|
public class MobileDeviceManagementRepository {
|
|
|
|
public class MobileDeviceManagementRepository {
|
|
|
|
|
|
|
|
|
|
|
|
private Map<String, MobileDataSourceConfig> mobileDataSourceConfigMap;
|
|
|
|
private Map<String, MobileDataSourceConfig> mobileDataSourceConfigMap;
|
|
|
|
|
|
|
|
private List<MobileDataSourceConfig> mobileDataSourceConfigs;
|
|
|
|
|
|
|
|
|
|
|
|
public MobileDataSourceConfig getMobileDataSourceConfig(PluginTypeEnum type) {
|
|
|
|
public MobileDataSourceConfig getMobileDataSourceConfig(String provider) {
|
|
|
|
return mobileDataSourceConfigMap.get(type.toString());
|
|
|
|
return mobileDataSourceConfigMap.get(provider);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@XmlElement(name = "DataSourceConfigurations")
|
|
|
|
@XmlElement(name = "DataSourceConfigurations")
|
|
|
@ -48,4 +49,9 @@ public class MobileDeviceManagementRepository {
|
|
|
|
public void setMobileDataSourceConfigMap(Map<String, MobileDataSourceConfig> mobileDataSourceConfigMap) {
|
|
|
|
public void setMobileDataSourceConfigMap(Map<String, MobileDataSourceConfig> mobileDataSourceConfigMap) {
|
|
|
|
this.mobileDataSourceConfigMap = mobileDataSourceConfigMap;
|
|
|
|
this.mobileDataSourceConfigMap = mobileDataSourceConfigMap;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public List<MobileDataSourceConfig> getMobileDataSourceConfigs() {
|
|
|
|
|
|
|
|
return (List<MobileDataSourceConfig>) mobileDataSourceConfigMap.values();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|