Refactor add new mobile service module to as parent to agent module

4.x.x
manoj 10 years ago
parent 6703f590f3
commit 50a17eb33d

@ -23,29 +23,17 @@ import java.util.List;
public class Device {
private int id;
private String type;
private String description;
private String name;
private Long dateOfEnrolment;
private Long dateOfLastUpdate;
private String ownership;
private boolean status;
private int deviceTypeId;
private String deviceIdentifier;
private String owner;
private List<Feature> features;
private List<Device.Property> properties;
@XmlElement
@ -56,6 +44,7 @@ public class Device {
public void setId(int id) {
this.id = id;
}
@XmlElement
public String getDescription() {
return description;
@ -64,6 +53,7 @@ public class Device {
public void setDescription(String description) {
this.description = description;
}
@XmlElement
public String getName() {
return name;
@ -72,6 +62,7 @@ public class Device {
public void setName(String name) {
this.name = name;
}
@XmlElement
public Long getDateOfEnrolment() {
return dateOfEnrolment;
@ -80,6 +71,7 @@ public class Device {
public void setDateOfEnrolment(Long dateOfEnrolment) {
this.dateOfEnrolment = dateOfEnrolment;
}
@XmlElement
public Long getDateOfLastUpdate() {
return dateOfLastUpdate;
@ -88,6 +80,7 @@ public class Device {
public void setDateOfLastUpdate(Long dateOfLastUpdate) {
this.dateOfLastUpdate = dateOfLastUpdate;
}
@XmlElement
public String getOwnership() {
return ownership;
@ -96,6 +89,7 @@ public class Device {
public void setOwnership(String ownership) {
this.ownership = ownership;
}
@XmlElement
public boolean isStatus() {
return status;
@ -104,6 +98,7 @@ public class Device {
public void setStatus(boolean status) {
this.status = status;
}
@XmlElement
public int getDeviceTypeId() {
return deviceTypeId;
@ -112,6 +107,7 @@ public class Device {
public void setDeviceTypeId(int deviceTypeId) {
this.deviceTypeId = deviceTypeId;
}
@XmlElement
public String getDeviceIdentifier() {
return deviceIdentifier;
@ -120,6 +116,7 @@ public class Device {
public void setDeviceIdentifier(String deviceIdentifier) {
this.deviceIdentifier = deviceIdentifier;
}
@XmlElement
public String getOwner() {
return owner;
@ -128,6 +125,7 @@ public class Device {
public void setOwner(String owner) {
this.owner = owner;
}
@XmlElement
public List<Feature> getFeatures() {
return features;
@ -136,6 +134,7 @@ public class Device {
public void setFeatures(List<Feature> features) {
this.features = features;
}
@XmlElement
public String getType() {
return type;
@ -144,6 +143,7 @@ public class Device {
public void setType(String type) {
this.type = type;
}
@XmlElement
public List<Device.Property> getProperties() {
return properties;

@ -43,6 +43,11 @@ public class DeviceManagementRepository {
}
}
public void removeDeviceManagementProvider(DeviceManagerService provider) {
String deviceType = provider.getProviderType();
providers.remove(deviceType);
}
public DeviceManagerService getDeviceManagementProvider(String type) {
return providers.get(type);
}

@ -75,11 +75,8 @@ public class DeviceManagementServiceComponent {
}
setupDeviceManagementSchema(dsConfig);
}
BundleContext bundleContext = componentContext.getBundleContext();
bundleContext.registerService(DeviceManagementService.class.getName(),
new DeviceManagementService(), null);
bundleContext.registerService(DeviceManagementService.class.getName(), new DeviceManagementService(), null);
} catch (Throwable e) {
String msg = "Error occurred while initializing device management core bundle";
log.error(msg, e);
@ -118,6 +115,7 @@ public class DeviceManagementServiceComponent {
if (log.isDebugEnabled()) {
log.debug("Unsetting Device Management Service");
}
this.getPluginRepository().removeDeviceManagementProvider(deviceManager);
}
/**

@ -22,15 +22,14 @@
<parent>
<groupId>org.wso2.cdmserver</groupId>
<artifactId>wso2cdmserver-product</artifactId>
<artifactId>wso2cdmserver-product-mobileservices</artifactId>
<version>2.0.0-SNAPSHOT</version>
<relativePath>../../../../pom.xml</relativePath>
<relativePath>../../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.wso2.carbon</groupId>
<artifactId>cdm-android-api</artifactId>
<version>1.0.0-SNAPSHOT</version>
<name>JAX-RS Android API</name>
<description>JAX-RS Android API</description>
<packaging>war</packaging>

@ -18,9 +18,9 @@
//org.wso2.carbon....
package org.wso2.cdmserver.mobileservices.android;
import cdm.api.android.common.AndroidAgentException;
import cdm.api.android.util.AndroidAPIUtils;
import cdm.api.android.util.Message;
import org.wso2.cdmserver.mobileservices.android.common.AndroidAgentException;
import org.wso2.cdmserver.mobileservices.android.util.AndroidAPIUtils;
import org.wso2.cdmserver.mobileservices.android.util.Message;
import org.apache.commons.httpclient.HttpStatus;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

@ -18,9 +18,9 @@
package org.wso2.cdmserver.mobileservices.android;
import cdm.api.android.common.AndroidAgentException;
import cdm.api.android.util.AndroidAPIUtils;
import cdm.api.android.util.Message;
import org.wso2.cdmserver.mobileservices.android.common.AndroidAgentException;
import org.wso2.cdmserver.mobileservices.android.util.AndroidAPIUtils;
import org.wso2.cdmserver.mobileservices.android.util.Message;
import org.apache.commons.httpclient.HttpStatus;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

@ -51,9 +51,9 @@
</jaxrs:providers>
</jaxrs:server>
<bean id="deviceMgtServiceBean" class="cdm.api.android.Device"/>
<bean id="enrollmentServiceBean" class="cdm.api.android.Enrollment"/>
<bean id="deviceMgtServiceBean" class="org.wso2.cdmserver.mobileservices.android.Device"/>
<bean id="enrollmentServiceBean" class="org.wso2.cdmserver.mobileservices.android.Enrollment"/>
<bean id="jsonProvider" class="org.codehaus.jackson.jaxrs.JacksonJsonProvider"/>
<bean id="errorHandler" class="cdm.api.android.common.ErrorHandler"/>
<bean id="errorHandler" class="org.wso2.cdmserver.mobileservices.android.common.ErrorHandler"/>
</beans>

@ -22,13 +22,12 @@
<groupId>org.wso2.cdmserver</groupId>
<artifactId>wso2cdmserver-product</artifactId>
<version>2.0.0-SNAPSHOT</version>
<relativePath>../../../../pom.xml</relativePath>
<relativePath>../../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.wso2.carbon</groupId>
<artifactId>cdm-windows-api</artifactId>
<version>1.0.0-SNAPSHOT</version>
<name>JAX-RS Windows API</name>
<description>JAX-RS Windows API</description>
<packaging>war</packaging>

@ -34,11 +34,6 @@
<name>WSO2 Connected Device Manager (CDM) - Parent</name>
<modules>
<!--<module>modules/agents/android/jax-rs</module>-->
<module>modules/agents/windows/jax-rs</module>
<module>modules/agents/android/jax-rs</module>
<module>modules/p2-profile-gen</module>
<module>modules/distribution</module>
<module>modules/integration</module>
<module>modules/mobileservices</module>
</modules>
</project>

Loading…
Cancel
Save