Package org.cxbox.core.service.impl
Class UserRoleService
- java.lang.Object
-
- org.cxbox.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 StringgetMainUserRole(List<String> intUserRoleKeyList)Get the main role based on ESK groupsorg.cxbox.api.data.dictionary.LOVgetMainUserRoleKey(User user)Get the main user role (last active role)org.cxbox.api.data.dictionary.LOVgetMatchedRole(User user, String roleName)List<org.cxbox.api.data.dictionary.SimpleDictionary>getUserRoles(User user)Get a list of user roles available for selectionvoidupdateMainUserRole(User user, org.cxbox.api.data.dictionary.LOV mainUserRole)Update main role (main role is last role selected by user)voidupsertUserRoles(Long userId, List<String> intUserRoleKeyList)Refresh the list of user roles
-
-
-
Method Detail
-
getMainUserRoleKey
public org.cxbox.api.data.dictionary.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<org.cxbox.api.data.dictionary.SimpleDictionary> getUserRoles(User user)
Get a list of user roles available for selection- Parameters:
user- User- Returns:
- List
-
updateMainUserRole
public void updateMainUserRole(User user, org.cxbox.api.data.dictionary.LOV mainUserRole)
Update main role (main role is last role selected by user)- Parameters:
user- usermainUserRole- main role
-
-