Create pluin level databases

revert-dabc3590
manoj 10 years ago
parent 2ece5764d3
commit 1c13180e56

@ -60,7 +60,7 @@
javax.xml.bind.*,
javax.naming,
javax.sql,
javax.xml.bind.annotation,
javax.xml.bind.annotation.*,
javax.xml.parsers,
org.w3c.dom,
org.wso2.carbon.core,

@ -33,8 +33,8 @@ public abstract class AbstractMobileOperationManager implements OperationManager
}
@Override
public boolean addOperation(Operation operation,
List<DeviceIdentifier> devices) throws OperationManagementException {
public boolean addOperation(Operation operation, List<DeviceIdentifier> devices) throws
OperationManagementException {
return true;
}

@ -75,8 +75,5 @@ public class MobileDeviceConfigurationManager {
return currentMobileDeviceConfig;
}
public MobileDataSourceConfig getMobileDataSourceConfig() {
return currentMobileDeviceConfig.getMobileDeviceMgtRepository().getMobileDataSourceConfig();
}
}

@ -18,13 +18,13 @@
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.MobileDataSourceConfig;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
import java.util.List;
import java.util.Map;
/**
@ -34,12 +34,13 @@ import java.util.Map;
public class MobileDeviceManagementRepository {
private Map<String, MobileDataSourceConfig> mobileDataSourceConfigMap;
private List<MobileDataSourceConfig> mobileDataSourceConfigs;
public MobileDataSourceConfig getMobileDataSourceConfig(PluginTypeEnum type) {
return mobileDataSourceConfigMap.get(type.toString());
public MobileDataSourceConfig getMobileDataSourceConfig(String provider) {
return mobileDataSourceConfigMap.get(provider);
}
@XmlElement(name="DataSourceConfigurations")
@XmlElement(name = "DataSourceConfigurations")
@XmlJavaTypeAdapter(DataSourceConfigAdapter.class)
public Map<String, MobileDataSourceConfig> getMobileDataSourceConfigMap() {
return mobileDataSourceConfigMap;
@ -48,4 +49,9 @@ public class MobileDeviceManagementRepository {
public void setMobileDataSourceConfigMap(Map<String, MobileDataSourceConfig> mobileDataSourceConfigMap) {
this.mobileDataSourceConfigMap = mobileDataSourceConfigMap;
}
public List<MobileDataSourceConfig> getMobileDataSourceConfigs() {
return (List<MobileDataSourceConfig>) mobileDataSourceConfigMap.values();
}
}

@ -25,7 +25,8 @@ import javax.xml.bind.annotation.XmlRootElement;
/**
* Class for holding data source configuration in mobile-config.xml at parsing with JAXB.
*/
@XmlRootElement(name = "DataSourceConfiguration") public class MobileDataSourceConfig {
@XmlRootElement(name = "DataSourceConfiguration")
public class MobileDataSourceConfig {
private JNDILookupDefinition jndiLookupDefinition;
private String type;

@ -1,9 +1,3 @@
package org.wso2.carbon.device.mgt.mobile.config.datasource;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import java.util.List;
/*
* Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
*
@ -21,10 +15,19 @@ import java.util.List;
* specific language governing permissions and limitations
* under the License.
*/
package org.wso2.carbon.device.mgt.mobile.config.datasource;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import java.util.List;
@XmlRootElement(name = "DataSourceConfigurations")
@XmlAccessorType(XmlAccessType.FIELD)
public class MobileDataSourceConfigurations {
@XmlElement(name = "DataSourceConfigurations", nillable = true)
@XmlElement(name = "DataSourceConfiguration", nillable = true)
private List<MobileDataSourceConfig> mobileDataSourceConfigs;
public List<MobileDataSourceConfig> getMobileDataSourceConfigs() {

@ -34,17 +34,13 @@ import java.util.List;
*/
public class WindowsDeviceManager implements DeviceManager {
<<<<<<< HEAD:components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/src/main/java/org/wso2/carbon/device/mgt/mobile/impl/windows/WindowsDeviceManagerService.java
private static final Log log = LogFactory.getLog(WindowsDeviceManagerService.class);
private MobileDeviceManagementDAOFactory mobileDeviceManagementDAOFactory;
public WindowsDeviceManagerService() {
public WindowsDeviceManager() {
mobileDeviceManagementDAOFactory = new MobileDeviceManagementDAOFactory(DeviceManagementConstants
.MobileDeviceTypes.MOBILE_DEVICE_TYPE_WINDOWS);
}
=======
private static final Log log = LogFactory.getLog(WindowsDeviceManager.class);
>>>>>>> 2c5cc4c28de5586b7450887d02c49a4c9973b40a:components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/src/main/java/org/wso2/carbon/device/mgt/mobile/impl/windows/WindowsDeviceManager.java
@Override
public String getProviderType() {

@ -19,24 +19,23 @@
<MobileDeviceMgtConfiguration>
<ManagementRepository>
<DataSourceConfiguration>
<DataSourceConfigurations>
<DataSourceConfiguration type="ios">
<JndiLookupDefinition>
<Name>jdbc/MobileDM_DS</Name>
<Name>jdbc/MobileIOSDM_DS</Name>
</JndiLookupDefinition>
</DataSourceConfiguration>
<DataSourceConfiguration type="android">
<JndiLookupDefinition>
<Name>jdbc/MobileAndroidDM_DS</Name>
</JndiLookupDefinition>
</DataSourceConfiguration>
<DataSourceConfiguration type="windows">
<JndiLookupDefinition>
<Name>jdbc/MobileWindowsDM_DS</Name>
</JndiLookupDefinition>
</DataSourceConfiguration>
</DataSourceConfigurations>
</ManagementRepository>
<APIPublisher>
<APIs>
<MalformedAPI>
<Name>enrollment</Name>
<Owner>admin</Owner>
<Context>enrollment</Context>
<Version>1.0.0</Version>
<Endpoint>http://localhost:9763/</Endpoint>
<Transports>http,https</Transports>
</MalformedAPI>
</APIs>
</APIPublisher>
</MobileDeviceMgtConfiguration>

@ -19,7 +19,6 @@
<MobileDeviceMgtConfiguration>
<ManagementRepository>
<DataSourceConfigurations>
<DataSourceConfiguration type="ios">
<JndiLookupDefinition>

Loading…
Cancel
Save