Refactored device info

4.x.x
mharindu 10 years ago
commit 847eb073b9

@ -122,6 +122,7 @@ public interface DeviceManager {
* @param device Updated device information related data
* @throws DeviceManagementException If some unusual behaviour is observed while updating the device info
*/
boolean updateDeviceInfo(DeviceIdentifier deviceIdentifier, Device device) throws DeviceManagementException;
/**

@ -83,7 +83,7 @@
org.wso2.carbon.identity.oauth.stub,
org.wso2.carbon.identity.oauth.stub.dto,
org.wso2.carbon.ndatasource.core,
org.wso2.carbon.device.mgt.user.core,
org.wso2.carbon.device.mgt.user.core.*,
org.wso2.carbon.device.mgt.user.common,
</Import-Package>
<Export-Package>

@ -138,9 +138,8 @@ public class DeviceManagementServiceProviderImpl implements DeviceManagementServ
this.getPluginRepository().getDeviceManagementProvider(deviceId.getType());
boolean status = dms.disenrollDevice(deviceId);
try {
org.wso2.carbon.device.mgt.core.dto.Device device = this.getDeviceDAO().getDevice(deviceId);
device.setStatus(Status.INACTIVE);
this.getDeviceDAO().updateDevice(device);
int deviceID = Integer.parseInt(deviceId.getId());
this.getDeviceDAO().updateDeviceStatus(deviceID, Status.INACTIVE);
} catch (DeviceManagementDAOException e) {
throw new DeviceManagementException("Error occurred while modifying the device " +
"'" + deviceId.getId() + "'", e);

@ -24,6 +24,8 @@ import org.osgi.service.component.ComponentContext;
import org.wso2.carbon.apimgt.impl.APIManagerConfigurationService;
import org.wso2.carbon.core.ServerStartupObserver;
import org.wso2.carbon.device.mgt.common.DeviceManagementException;
import org.wso2.carbon.device.mgt.common.app.mgt.AppManagerConnector;
import org.wso2.carbon.device.mgt.common.app.mgt.AppManagerConnectorException;
import org.wso2.carbon.device.mgt.common.license.mgt.License;
import org.wso2.carbon.device.mgt.common.license.mgt.LicenseManagementException;
import org.wso2.carbon.device.mgt.common.license.mgt.LicenseManager;
@ -37,8 +39,6 @@ import org.wso2.carbon.device.mgt.core.api.mgt.APIPublisherService;
import org.wso2.carbon.device.mgt.core.api.mgt.APIPublisherServiceImpl;
import org.wso2.carbon.device.mgt.core.api.mgt.APIRegistrationStartupObserver;
import org.wso2.carbon.device.mgt.core.app.mgt.AppManagementServiceImpl;
import org.wso2.carbon.device.mgt.common.app.mgt.AppManagerConnector;
import org.wso2.carbon.device.mgt.common.app.mgt.AppManagerConnectorException;
import org.wso2.carbon.device.mgt.core.app.mgt.RemoteAppManagerConnector;
import org.wso2.carbon.device.mgt.core.app.mgt.config.AppManagementConfig;
import org.wso2.carbon.device.mgt.core.app.mgt.config.AppManagementConfigurationManager;
@ -55,9 +55,11 @@ import org.wso2.carbon.device.mgt.core.service.DeviceManagementService;
import org.wso2.carbon.device.mgt.core.service.DeviceManagementServiceImpl;
import org.wso2.carbon.device.mgt.core.util.DeviceManagementSchemaInitializer;
import org.wso2.carbon.device.mgt.user.core.UserManager;
import org.wso2.carbon.user.core.service.RealmService;
import org.wso2.carbon.device.mgt.user.core.service.UserManagementService;
import org.wso2.carbon.ndatasource.core.DataSourceService;
import org.wso2.carbon.registry.core.service.RegistryService;
import org.wso2.carbon.user.core.service.RealmService;
import java.util.ArrayList;
import java.util.List;
@ -93,9 +95,9 @@ import java.util.List;
* policy="dynamic"
* bind="setDataSourceService"
* unbind="unsetDataSourceService"
* @scr.reference name="org.wso2.carbon.device.mgt.usermanager.service"
* @scr.reference name="org.wso2.carbon.device.mgt.user.core.usermanager"
* interface="org.wso2.carbon.device.mgt.user.core.UserManager"
* cardinality="1..1"
* cardinality="1..1
* policy="dynamic"
* bind="setUserManager"
* unbind="unsetUserManager"

@ -22,6 +22,8 @@ import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.osgi.framework.BundleContext;
import org.osgi.service.component.ComponentContext;
import org.wso2.carbon.device.mgt.core.config.DeviceConfigurationManager;
import org.wso2.carbon.device.mgt.core.config.DeviceManagementConfig;
import org.wso2.carbon.device.mgt.core.email.sender.EmailServiceProviderImpl;
import org.wso2.carbon.device.mgt.core.service.EmailService;
import org.wso2.carbon.device.mgt.core.service.EmailServiceImpl;
@ -48,6 +50,9 @@ public class EmailServiceComponent {
log.debug("Initializing email service bundle");
}
DeviceConfigurationManager.getInstance().initConfig();
DeviceManagementConfig config =
DeviceConfigurationManager.getInstance().getDeviceManagementConfig();
/* Initializing Email Service Configurations */
EmailService emailServiceProvider = new EmailServiceProviderImpl();

@ -101,6 +101,7 @@ public class DeviceManagementServiceImpl implements DeviceManagementService {
public boolean updateDeviceInfo(DeviceIdentifier deviceIdentifier, Device device) throws DeviceManagementException {
return DeviceManagementDataHolder.getInstance().getDeviceManagementProvider().
updateDeviceInfo(deviceIdentifier, device);
}
@Override

@ -55,8 +55,8 @@ public class DeviceMgtUserServiceComponent {
}
/* Registering User Management service */
BundleContext bundleContext = componentContext.getBundleContext();
bundleContext.registerService(UserManager.class,
new UserManagementService(), null);
bundleContext.registerService(org.wso2.carbon.device.mgt.user.core.UserManager.class,
new org.wso2.carbon.device.mgt.user.core.service.UserManagementService(), null);
if (log.isDebugEnabled()) {
log.debug("User management core bundle has been successfully initialized");
}

@ -1078,16 +1078,6 @@
<enabled>false</enabled>
</releases>
</repository>
<repository>
<id>wso2-staging</id>
<name>WSO2 Staging Repository</name>
<url>http://maven.wso2.org/nexus/content/repositories/orgwso2carbonapimgt-009/</url>
<releases>
<enabled>true</enabled>
<updatePolicy>daily</updatePolicy>
<checksumPolicy>ignore</checksumPolicy>
</releases>
</repository>
</repositories>
<properties>

Loading…
Cancel
Save