Interface UserService

  • All Known Implementing Classes:
    UserServiceImpl

    public interface UserService
    Identity User based Operations
    Author:
    Jeremy Unruh
    • Method Detail

      • get

        User get​(String userId)
        Gets the detailed User information by ID
        Parameters:
        userId - the user id
        Returns:
        the user
      • getByName

        User getByName​(String userName)
        API added by @ Sandeep Kumar Singh Gets detailed information about a specified user by name
        Parameters:
        userName - the user name
        Returns:
        the user
      • list

        List<? extends User> list()
        Lists current users
        Returns:
        List of User
      • listTenantUsers

        List<? extends User> listTenantUsers​(String tenantId)
        List users who are associated with the given tenant identifier
        Parameters:
        tenantId - the tenant id
        Returns:
        List of User
      • create

        User create​(String tenantId,
                    String name,
                    String password,
                    String email,
                    boolean enabled)
        Creates a new User
        Parameters:
        tenantId - the tenant id
        name - the name of the user
        password - the password for the user
        email - the email address of the user
        enabled - if true the user will be immediately enabled
        Returns:
        the newly created user
      • create

        User create​(User user)
        Creates a User
        Parameters:
        user - the user to create
        Returns:
        the newly created user
      • delete

        ActionResponse delete​(String userId)
        Deletes a user by ID
        Parameters:
        userId - the user id
        Returns:
        the action response
      • enableUser

        User enableUser​(String userId,
                        boolean enabled)
        Enables/Disables a user by ID
        Parameters:
        userId - the user id
        enabled - true to enable the user
        Returns:
        the updated User
      • update

        User update​(User user)
        Updates a User
        Parameters:
        user - the user
        Returns:
        the updated user
      • changePassword

        ActionResponse changePassword​(String userId,
                                      String password)
        Changes a password for the specified user by ID
        Parameters:
        userId - the user id
        password - the new password
        Returns:
        the action response
      • listRoles

        List<? extends Role> listRoles​(String userId)
        Lists global roles for a specified user. Excludes tenant roles
        Parameters:
        userId - the user id
        Returns:
        List of Role
      • listRoles

        List<? extends Role> listRoles​(User user)
        Lists global roles for a specified user. Excludes tenant roles.
        Parameters:
        user - the user
        Returns:
        List of Role
      • listRolesOnTenant

        List<? extends Role> listRolesOnTenant​(String userId,
                                               String tenantId)
        Lists the tenant roles for a specified user.
        Parameters:
        userId - the user id
        tenantId - the tenant id
        Returns:
        List of Role
      • listRolesOnCurrentTenant

        List<? extends Role> listRolesOnCurrentTenant​(User user)
        List roles on current tenant (default tenant for the given user)
        Parameters:
        user - the user
        Returns:
        List of Role