Search in sources :

Example 1 with UserClaimDTO

use of com.wso2telco.core.userprofile.dto.UserClaimDTO 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);
}
Also used : UserRoleDTO(com.wso2telco.core.userprofile.dto.UserRoleDTO) UserClaimDTO(com.wso2telco.core.userprofile.dto.UserClaimDTO) UserClaimProsser(com.wso2telco.core.userprofile.prosser.UserClaimProsser) UserRolePermission(com.wso2telco.core.userprofile.permission.impl.UserRolePermission)

Example 2 with UserClaimDTO

use of com.wso2telco.core.userprofile.dto.UserClaimDTO in project core-util by WSO2Telco.

the class UserClaimProsser method getUserClaims.

public UserClaimDTO getUserClaims(String userName) {
    UserClaimDTO userClaimDTO = null;
    Map<ClaimName, String> userClaims = getUserClaimsByUserName(userName);
    if (!userClaims.isEmpty()) {
        userClaimDTO = new UserClaimDTO();
        userClaimDTO = fillUserClaimDTO(userClaims, userClaimDTO);
    }
    return userClaimDTO;
}
Also used : ClaimName(com.wso2telco.core.userprofile.util.ClaimName) UserClaimDTO(com.wso2telco.core.userprofile.dto.UserClaimDTO)

Aggregations

UserClaimDTO (com.wso2telco.core.userprofile.dto.UserClaimDTO)2 UserRoleDTO (com.wso2telco.core.userprofile.dto.UserRoleDTO)1 UserRolePermission (com.wso2telco.core.userprofile.permission.impl.UserRolePermission)1 UserClaimProsser (com.wso2telco.core.userprofile.prosser.UserClaimProsser)1 ClaimName (com.wso2telco.core.userprofile.util.ClaimName)1