Devices Service

@Service
open class DevicesService

The DevicesService class is useful to manage all the device database operations

Author

N7ghtm4r3 - Tecknobit

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard
@Autowired
private open var devicesRepository: DevicesRepository
devicesRepository instance used to manage the database operations for the devices

Functions

Link copied to clipboard
Method used to delete a device if not referenced, so used, in any session registered in the system
Link copied to clipboard
open fun disconnectDevice(userId: String, deviceId: String)
Method used to disconnect a device from the session
Link copied to clipboard
open fun getDevices(page: Int, pageSize: Int, userId: String): PaginatedResponse<ConnectedDevice>
Method used to retrieve all the devices owned by the user
Link copied to clipboard
open fun storeDevice(userId: String, rawDevice: Array<Any>)
Method used to store a device
Link copied to clipboard
open fun updateLastLogin(userId: String, deviceId: String)
Method used to update the last login by a device in the specified session