Class DeviceRegistrationImpl
- java.lang.Object
-
- com.flowable.engage.engine.impl.notification.push.DeviceRegistrationImpl
-
- All Implemented Interfaces:
DeviceRegistration
public class DeviceRegistrationImpl extends Object implements DeviceRegistration
- Author:
- Filip Hrisafov
-
-
Field Summary
Fields Modifier and Type Field 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 Summary
Constructors Constructor Description DeviceRegistrationImpl(DeviceServiceImpl deviceService)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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.
-
-
-
Field Detail
-
deviceService
protected final DeviceServiceImpl deviceService
-
token
protected String token
-
tokenEncoding
protected String tokenEncoding
-
enabled
protected boolean enabled
-
deviceOS
protected String deviceOS
-
userId
protected String userId
-
applicationId
protected String applicationId
-
tenantId
protected String tenantId
-
-
Constructor Detail
-
DeviceRegistrationImpl
public DeviceRegistrationImpl(DeviceServiceImpl deviceService)
-
-
Method Detail
-
token
public DeviceRegistration token(String token)
Description copied from interface:DeviceRegistration
The token for the new device. This is a mandatory field.- Specified by:
token
in interfaceDeviceRegistration
- Parameters:
token
- the token
-
tokenEncoding
public DeviceRegistration tokenEncoding(String tokenEncoding)
Description copied from interface:DeviceRegistration
The encoding of the token. By default it isnone
.- Specified by:
tokenEncoding
in interfaceDeviceRegistration
- Parameters:
tokenEncoding
- the encoding of the token- See Also:
DeviceTokenEncodings
-
disabled
public DeviceRegistration disabled()
Description copied from interface:DeviceRegistration
Register a disabled device. By default an enabled device is registered.- Specified by:
disabled
in interfaceDeviceRegistration
-
deviceOS
public DeviceRegistration deviceOS(String deviceOS)
Description copied from interface:DeviceRegistration
The OS of the device. This is a mandatory field.- Specified by:
deviceOS
in interfaceDeviceRegistration
- Parameters:
deviceOS
- the OS device- See Also:
DeviceOS
-
userId
public DeviceRegistration userId(String userId)
Description copied from interface:DeviceRegistration
The id of the user that this device is registered to.- Specified by:
userId
in interfaceDeviceRegistration
- Parameters:
userId
- the id of the user
-
applicationId
public DeviceRegistration applicationId(String applicationId)
Description copied from interface:DeviceRegistration
The id of the application that this device is registered for.- Specified by:
applicationId
in interfaceDeviceRegistration
- Parameters:
applicationId
- the id of the application
-
tenantId
public DeviceRegistration tenantId(String tenantId)
Description copied from interface:DeviceRegistration
The id of the tenant in which this device is registered in.- Specified by:
tenantId
in interfaceDeviceRegistration
- Parameters:
tenantId
- the tenant id
-
register
public Device register()
Description copied from interface:DeviceRegistration
Perform the registration of the device. Make sure that the mandatory fieldsDeviceRegistration.token(String)
andDeviceRegistration.deviceOS(String)
have been set.- Specified by:
register
in interfaceDeviceRegistration
- Returns:
- the newly registered device
-
getToken
public String getToken()
-
getTokenEncoding
public String getTokenEncoding()
-
isEnabled
public boolean isEnabled()
-
getDeviceOS
public String getDeviceOS()
-
getUserId
public String getUserId()
-
getApplicationId
public String getApplicationId()
-
getTenantId
public String getTenantId()
-
-