Package io.tesler.core.service.impl
Class UserRoleService
- java.lang.Object
-
- io.tesler.core.service.impl.UserRoleService
-
@Service @Transactional public class UserRoleService extends Object
-
-
Constructor Summary
Constructors Constructor Description UserRoleService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getMainUserRole(List<String> intUserRoleKeyList)
Get the main role based on ESK groupsLOV
getMainUserRoleKey(User user)
Get the main user role (last active role)LOV
getMatchedRole(User user, String roleName)
List<SimpleDictionary>
getUserRoles(User user)
Get a list of user roles available for selectionvoid
updateMainUserRole(User user, LOV mainUserRole)
Update main role (main role is last role selected by user)void
upsertUserRoles(Long userId, List<String> intUserRoleKeyList)
Refresh the list of user roles
-
-
-
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
- UserintUserRoleKeyList
- 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
- usermainUserRole
- main role
-
-