Interface IUserService

  • All Known Implementing Classes:
    UserService

    public interface IUserService
    Service for user management.
    • Method Detail

      • register

        IFuture<java.lang.Void> register​(User user)
        Register a new user.
        Parameters:
        user - The new user.
      • login

        IFuture<java.lang.String> login​(User user)
        Login a user.
        Parameters:
        user - The user.
        Returns:
        The token for future access.
      • logout

        IFuture<java.lang.Boolean> logout​(java.lang.String usertoken)
        Logout a user.
        Parameters:
        usertoken - The user token.
        Returns:
        The token for future access.
      • getUser

        IFuture<User> getUser​(java.lang.String usertoken)
        Get a user per token.
        Parameters:
        usertoken - The user token.
        Returns:
        The user or null if none.
      • getUserByEmail

        IFuture<User> getUserByEmail​(java.lang.String email)
        Get a user per email.
        Parameters:
        email - The user email.
        Returns:
        The user.
      • addFollower

        IFuture<java.lang.Boolean> addFollower​(java.lang.String usertoken,
                                               User follower)
        Add a new follower.
        Parameters:
        user - The user.
        follower - The follower.
        Returns:
        True if changed.
      • removeFollower

        IFuture<java.lang.Boolean> removeFollower​(java.lang.String usertoken,
                                                  User follower)
        Remove a follower.
        Parameters:
        user - The user.
        follower - The follower.
        Returns:
        True if changed.
      • getFollowers

        IFuture<java.util.Collection<User>> getFollowers​(java.lang.String usertoken)
        Get the current followers.
        Parameters:
        user - The user.
        Returns:
        The followers.
      • addFollowed

        IFuture<java.lang.Boolean> addFollowed​(java.lang.String usertoken,
                                               User followed)
        Add a new followed user.
        Parameters:
        user - The user.
        followed - The followed user.
      • removeFollowed

        IFuture<java.lang.Boolean> removeFollowed​(java.lang.String usertoken,
                                                  User followed)
        Remove a followed user.
        Parameters:
        followed - The followed user.
      • getFolloweds

        IFuture<java.util.Collection<User>> getFolloweds​(java.lang.String usertoken)
        Get the current people that I follow.
        Parameters:
        usertoken - The user token.
        Returns:
        The users this user follows.
      • getAllUsers

        IFuture<java.util.Collection<User>> getAllUsers​(java.lang.String usertoken)
        Get all users.
        Returns:
        All users.