public class DeviceRegistrationImpl extends Object implements DeviceRegistration
Modifier and Type | Field and Description |
---|---|
protected String |
applicationId |
protected String |
deviceOS |
protected DeviceServiceImpl |
deviceService |
protected boolean |
enabled |
protected String |
tenantId |
protected String |
token |
protected String |
tokenEncoding |
protected String |
userId |
Constructor and Description |
---|
DeviceRegistrationImpl(DeviceServiceImpl deviceService) |
Modifier and Type | Method and Description |
---|---|
DeviceRegistration |
applicationId(String applicationId)
The id of the application that this device is registered for.
|
DeviceRegistration |
deviceOS(String deviceOS)
The OS of the device.
|
DeviceRegistration |
disabled()
Register a disabled device.
|
String |
getApplicationId() |
String |
getDeviceOS() |
String |
getTenantId() |
String |
getToken() |
String |
getTokenEncoding() |
String |
getUserId() |
boolean |
isEnabled() |
Device |
register()
Perform the registration of the device.
|
DeviceRegistration |
tenantId(String tenantId)
The id of the tenant in which this device is registered in.
|
DeviceRegistration |
token(String token)
The token for the new device.
|
DeviceRegistration |
tokenEncoding(String tokenEncoding)
The encoding of the token.
|
DeviceRegistration |
userId(String userId)
The id of the user that this device is registered to.
|
protected final DeviceServiceImpl deviceService
protected String token
protected String tokenEncoding
protected boolean enabled
protected String deviceOS
protected String userId
protected String applicationId
protected String tenantId
public DeviceRegistrationImpl(DeviceServiceImpl deviceService)
public DeviceRegistration token(String token)
DeviceRegistration
token
in interface DeviceRegistration
token
- the tokenpublic DeviceRegistration tokenEncoding(String tokenEncoding)
DeviceRegistration
none
.tokenEncoding
in interface DeviceRegistration
tokenEncoding
- the encoding of the tokenDeviceTokenEncodings
public DeviceRegistration disabled()
DeviceRegistration
disabled
in interface DeviceRegistration
public DeviceRegistration deviceOS(String deviceOS)
DeviceRegistration
deviceOS
in interface DeviceRegistration
deviceOS
- the OS deviceDeviceOS
public DeviceRegistration userId(String userId)
DeviceRegistration
userId
in interface DeviceRegistration
userId
- the id of the userpublic DeviceRegistration applicationId(String applicationId)
DeviceRegistration
applicationId
in interface DeviceRegistration
applicationId
- the id of the applicationpublic DeviceRegistration tenantId(String tenantId)
DeviceRegistration
tenantId
in interface DeviceRegistration
tenantId
- the tenant idpublic Device register()
DeviceRegistration
DeviceRegistration.token(String)
and DeviceRegistration.deviceOS(String)
have been set.register
in interface DeviceRegistration
public String getToken()
public String getTokenEncoding()
public boolean isEnabled()
public String getDeviceOS()
public String getUserId()
public String getApplicationId()
public String getTenantId()
Copyright © 2019. All rights reserved.