Class UserRoleService


  • @Service
    @Transactional
    public class UserRoleService
    extends Object
    • Constructor Detail

      • UserRoleService

        public UserRoleService()
    • Method Detail

      • getMainUserRoleKey

        public LOV getMainUserRoleKey​(User user)
        Get the main user role (last active role)
        Parameters:
        user - User
        Returns:
        LOV
      • upsertUserRoles

        public void upsertUserRoles​(Long userId,
                                    List<String> intUserRoleKeyList)
        Refresh the list of user roles
        Parameters:
        userId - User
        intUserRoleKeyList - List of roles based on ESK groups
      • getMainUserRole

        public String getMainUserRole​(List<String> intUserRoleKeyList)
        Get the main role based on ESK groups
        Parameters:
        intUserRoleKeyList - List of roles based on ESK groups
        Returns:
        String
      • getUserRoles

        public List<SimpleDictionary> getUserRoles​(User user)
        Get a list of user roles available for selection
        Parameters:
        user - User
        Returns:
        List
      • updateMainUserRole

        public void updateMainUserRole​(User user,
                                       LOV mainUserRole)
        Update main role (main role is last role selected by user)
        Parameters:
        user - user
        mainUserRole - main role
      • getMatchedRole

        public LOV getMatchedRole​(User user,
                                  String roleName)