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 StringapplicationIdprotected StringdeviceOSprotected DeviceServiceImpldeviceServiceprotected booleanenabledprotected StringtenantIdprotected Stringtokenprotected StringtokenEncodingprotected StringuserId
-
Constructor Summary
Constructors Constructor Description DeviceRegistrationImpl(DeviceServiceImpl deviceService)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DeviceRegistrationapplicationId(String applicationId)The id of the application that this device is registered for.DeviceRegistrationdeviceOS(String deviceOS)The OS of the device.DeviceRegistrationdisabled()Register a disabled device.StringgetApplicationId()StringgetDeviceOS()StringgetTenantId()StringgetToken()StringgetTokenEncoding()StringgetUserId()booleanisEnabled()Deviceregister()Perform the registration of the device.DeviceRegistrationtenantId(String tenantId)The id of the tenant in which this device is registered in.DeviceRegistrationtoken(String token)The token for the new device.DeviceRegistrationtokenEncoding(String tokenEncoding)The encoding of the token.DeviceRegistrationuserId(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:DeviceRegistrationThe token for the new device. This is a mandatory field.- Specified by:
tokenin interfaceDeviceRegistration- Parameters:
token- the token
-
tokenEncoding
public DeviceRegistration tokenEncoding(String tokenEncoding)
Description copied from interface:DeviceRegistrationThe encoding of the token. By default it isnone.- Specified by:
tokenEncodingin interfaceDeviceRegistration- Parameters:
tokenEncoding- the encoding of the token- See Also:
DeviceTokenEncodings
-
disabled
public DeviceRegistration disabled()
Description copied from interface:DeviceRegistrationRegister a disabled device. By default an enabled device is registered.- Specified by:
disabledin interfaceDeviceRegistration
-
deviceOS
public DeviceRegistration deviceOS(String deviceOS)
Description copied from interface:DeviceRegistrationThe OS of the device. This is a mandatory field.- Specified by:
deviceOSin interfaceDeviceRegistration- Parameters:
deviceOS- the OS device- See Also:
DeviceOS
-
userId
public DeviceRegistration userId(String userId)
Description copied from interface:DeviceRegistrationThe id of the user that this device is registered to.- Specified by:
userIdin interfaceDeviceRegistration- Parameters:
userId- the id of the user
-
applicationId
public DeviceRegistration applicationId(String applicationId)
Description copied from interface:DeviceRegistrationThe id of the application that this device is registered for.- Specified by:
applicationIdin interfaceDeviceRegistration- Parameters:
applicationId- the id of the application
-
tenantId
public DeviceRegistration tenantId(String tenantId)
Description copied from interface:DeviceRegistrationThe id of the tenant in which this device is registered in.- Specified by:
tenantIdin interfaceDeviceRegistration- Parameters:
tenantId- the tenant id
-
register
public Device register()
Description copied from interface:DeviceRegistrationPerform the registration of the device. Make sure that the mandatory fieldsDeviceRegistration.token(String)andDeviceRegistration.deviceOS(String)have been set.- Specified by:
registerin 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()
-
-