mirror of
https://repository.entgra.net/community/device-mgt-core.git
synced 2025-10-06 02:01:45 +00:00
Remove delete device type from DB when un register plugin
This commit is contained in:
parent
a774bc89aa
commit
f4b8e4bb74
@ -45,12 +45,6 @@ public class DeviceManagementRepository {
|
||||
|
||||
public void removeDeviceManagementProvider(DeviceMgtService provider) throws DeviceManagementException {
|
||||
String deviceType = provider.getProviderType();
|
||||
try {
|
||||
DeviceManagerUtil.unregisterDeviceType(deviceType);
|
||||
} catch (DeviceManagementException e) {
|
||||
throw new DeviceManagementException("Error occurred while removing device management provider '" +
|
||||
deviceType + "'", e);
|
||||
}
|
||||
providers.remove(deviceType);
|
||||
}
|
||||
|
||||
|
||||
@ -142,7 +142,7 @@ public final class DeviceManagerUtil {
|
||||
try {
|
||||
DeviceTypeDAO deviceTypeDAO = DeviceManagementDAOFactory.getDeviceTypeDAO();
|
||||
DeviceType deviceType = deviceTypeDAO.getDeviceType(typeName);
|
||||
if (deviceType == null) {
|
||||
if (deviceType != null) {
|
||||
DeviceType dt = new DeviceType();
|
||||
dt.setName(typeName);
|
||||
deviceTypeDAO.removeDeviceType(typeName);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user