Class UserServiceImpl

    • Constructor Detail

      • UserServiceImpl

        public UserServiceImpl()
    • Method Detail

      • list

        public List<? extends User> list()
        Description copied from interface: UserService
        Lists current users
        Specified by:
        list in interface UserService
        Returns:
        List of User
      • get

        public User get​(String userId)
        Description copied from interface: UserService
        Gets the detailed User information by ID
        Specified by:
        get in interface UserService
        Parameters:
        userId - the user id
        Returns:
        the user
      • listTenantUsers

        public List<? extends User> listTenantUsers​(String tenantId)
        Description copied from interface: UserService
        List users who are associated with the given tenant identifier
        Specified by:
        listTenantUsers in interface UserService
        Parameters:
        tenantId - the tenant id
        Returns:
        List of User
      • create

        public User create​(String tenantId,
                           String name,
                           String password,
                           String email,
                           boolean enabled)
        Description copied from interface: UserService
        Creates a new User
        Specified by:
        create in interface UserService
        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

        public User create​(User user)
        Description copied from interface: UserService
        Creates a User
        Specified by:
        create in interface UserService
        Parameters:
        user - the user to create
        Returns:
        the newly created user
      • enableUser

        public User enableUser​(String userId,
                               boolean enabled)
        Description copied from interface: UserService
        Enables/Disables a user by ID
        Specified by:
        enableUser in interface UserService
        Parameters:
        userId - the user id
        enabled - true to enable the user
        Returns:
        the updated User
      • update

        public User update​(User user)
        Description copied from interface: UserService
        Updates a User
        Specified by:
        update in interface UserService
        Parameters:
        user - the user
        Returns:
        the updated user
      • changePassword

        public ActionResponse changePassword​(String userId,
                                             String password)
        Description copied from interface: UserService
        Changes a password for the specified user by ID
        Specified by:
        changePassword in interface UserService
        Parameters:
        userId - the user id
        password - the new password
        Returns:
        the action response
      • listRoles

        public List<? extends Role> listRoles​(String userId)
        Description copied from interface: UserService
        Lists global roles for a specified user. Excludes tenant roles
        Specified by:
        listRoles in interface UserService
        Parameters:
        userId - the user id
        Returns:
        List of Role
      • listRoles

        public List<? extends Role> listRoles​(User user)
        Description copied from interface: UserService
        Lists global roles for a specified user. Excludes tenant roles.
        Specified by:
        listRoles in interface UserService
        Parameters:
        user - the user
        Returns:
        List of Role
      • listRolesOnTenant

        public List<? extends Role> listRolesOnTenant​(String userId,
                                                      String tenantId)
        Description copied from interface: UserService
        Lists the tenant roles for a specified user.
        Specified by:
        listRolesOnTenant in interface UserService
        Parameters:
        userId - the user id
        tenantId - the tenant id
        Returns:
        List of Role
      • listRolesOnCurrentTenant

        public List<? extends Role> listRolesOnCurrentTenant​(User user)
        Description copied from interface: UserService
        List roles on current tenant (default tenant for the given user)
        Specified by:
        listRolesOnCurrentTenant in interface UserService
        Parameters:
        user - the user
        Returns:
        List of Role
      • getByName

        public User getByName​(String userName)
        Description copied from interface: UserService
        API added by @ Sandeep Kumar Singh Gets detailed information about a specified user by name
        Specified by:
        getByName in interface UserService
        Parameters:
        userName - the user name
        Returns:
        the user