Package org.cyclos.services.users
Interface FcmTokenService
-
- All Superinterfaces:
Service
- All Known Subinterfaces:
FcmTokenServiceLocal
public interface FcmTokenService extends Service
Service implementing the Firebase Cloud Messaging registration tokens of a user
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidassign(@NotNull String token)Assigns the given registration token to the logged user.voidremove(@NotNull String token, @NotNull Set<Long> users)Removed a token from the given users.voidreplace(@NotNull String oldToken, @NotNull String newToken)Replace a token with it's new value.
-
-
-
Method Detail
-
assign
void assign(@NotNull @NotNull String token) throws FrameworkExceptionAssigns the given registration token to the logged user. If the token was already assigned then the used date is updated- Parameters:
token- the FCM registration token- Throws:
FrameworkException
-
remove
void remove(@NotNull @NotNull String token, @NotNull @NotNull Set<Long> users) throws FrameworkExceptionRemoved a token from the given users. Can be invoked as guest.- Parameters:
token- the FCM registration token to be removedusers- the set of users from whom the token will be removed- Throws:
FrameworkException
-
replace
void replace(@NotNull @NotNull String oldToken, @NotNull @NotNull String newToken) throws FrameworkExceptionReplace a token with it's new value. Can be invoked as guest.- Parameters:
oldToken- the existing tokennewToken- the new token value- Throws:
FrameworkException
-
-