Refactored code comments

revert-70aa11f8
harshanL 10 years ago
parent 0cd90fc349
commit 87d47c1d93

@ -35,12 +35,12 @@ public class DeviceManagementRepository {
public void addDeviceManagementProvider(DeviceManagerService provider) {
String deviceType = provider.getProviderType();
providers.put(deviceType, provider);
try {
DeviceManagerUtil.registerDeviceType(deviceType);
} catch (DeviceManagementException e) {
log.error("Exception occured while registering the device type.",e);
}
providers.put(deviceType, provider);
}
public DeviceManagerService getDeviceManagementProvider(String type) {

@ -51,7 +51,7 @@ public final class DeviceManagerUtil {
}
/**
* Resolve data source from the data source definition
* Resolve data source from the data source definition.
*
* @param config data source configuration
* @return data source resolved from the data source definition
@ -84,6 +84,12 @@ public final class DeviceManagerUtil {
return dataSource;
}
/**
* Adds a new device type to the database if it does not exists.
*
* @param deviceTypeName device type
* @return status of the operation
*/
public static boolean registerDeviceType(String deviceTypeName) throws DeviceManagementException{
boolean status = false;
try {

Loading…
Cancel
Save