|
|
|
@ -55,6 +55,11 @@ public class DefaultTbDeviceService extends AbstractTbEntityService implements T |
|
|
|
private final DeviceCredentialsService deviceCredentialsService; |
|
|
|
private final ClaimDevicesService claimDevicesService; |
|
|
|
|
|
|
|
@Override |
|
|
|
public Device save(Device device, String accessToken, User user) throws Exception { |
|
|
|
return save(device, accessToken, NameConflictStrategy.DEFAULT, user); |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public Device save(Device device, String accessToken, NameConflictStrategy nameConflictStrategy, User user) throws Exception { |
|
|
|
ActionType actionType = device.getId() == null ? ActionType.ADDED : ActionType.UPDATED; |
|
|
|
@ -72,6 +77,11 @@ public class DefaultTbDeviceService extends AbstractTbEntityService implements T |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public Device saveDeviceWithCredentials(Device device, DeviceCredentials credentials, User user) throws ThingsboardException { |
|
|
|
return saveDeviceWithCredentials(device, credentials, NameConflictStrategy.DEFAULT, user); |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public Device saveDeviceWithCredentials(Device device, DeviceCredentials credentials, NameConflictStrategy nameConflictStrategy, User user) throws ThingsboardException { |
|
|
|
ActionType actionType = device.getId() == null ? ActionType.ADDED : ActionType.UPDATED; |
|
|
|
|