use of com.wso2telco.core.userprofile.dto.UserRoleDTO in project core-util by WSO2Telco.
the class UserProfileRetriever method getUserProfile.
public UserProfileDTO getUserProfile(String userName) throws BusinessException {
log.debug("retrieve user profile for user : " + userName);
UserRoleDTO userRoleDTO = userRoleRetriever.getUserRoles(userName);
UserRolePermission uiPermissionBuilder = UserRolePermissionFactory.getInstance().getUserRolePermissionExecuter(UserRolePermissionType.UI_PERMISSION);
Map<String, Object> uiPermissionTree = uiPermissionBuilder.build(userName);
UserClaimProsser userClaimRetriever = new UserClaimProsser();
UserClaimDTO userClaimDTO = userClaimRetriever.getUserClaims(userName);
return fillUserProfileDTO(userName, userRoleDTO, uiPermissionTree, userClaimDTO);
}
use of com.wso2telco.core.userprofile.dto.UserRoleDTO in project core-util by WSO2Telco.
the class UserRoleProsser method getUserRoles.
public UserRoleDTO getUserRoles(String userName) {
UserRoleDTO userRoleDTO = null;
List<String> currentUserRoleList = getRolesByUserName(userName);
if (!currentUserRoleList.isEmpty()) {
String[] userRoles = new String[currentUserRoleList.size()];
userRoles = currentUserRoleList.toArray(userRoles);
userRoleDTO = new UserRoleDTO();
userRoleDTO = fillUserRoleDTO(userRoles, userRoleDTO);
}
return userRoleDTO;
}
Aggregations