Search in sources :

Example 1 with UserInformationProvider

use of org.wso2.carbon.identity.user.export.core.service.UserInformationProvider in project identity-governance by wso2-extensions.

the class UserInformationServiceImpl method getRetainedUserInformation.

@Override
public Map<String, Object> getRetainedUserInformation(String username, String userStoreDomain, int tenantId) throws UserExportException {
    Map<String, Object> userInformation = new HashMap<>();
    for (UserInformationProvider userInformationProvider : userInformationProviders) {
        if (userInformationProvider.isEnabled()) {
            UserInformationDTO retainedUserInformation = userInformationProvider.getRetainedUserInformation(username, userStoreDomain, tenantId);
            if (retainedUserInformation != null && retainedUserInformation.isInformationAvailable()) {
                String type = userInformationProvider.getType();
                userInformation.put(type, retainedUserInformation.getData());
            }
        }
    }
    return userInformation;
}
Also used : HashMap(java.util.HashMap) UserInformationProvider(org.wso2.carbon.identity.user.export.core.service.UserInformationProvider) UserInformationDTO(org.wso2.carbon.identity.user.export.core.dto.UserInformationDTO)

Aggregations

HashMap (java.util.HashMap)1 UserInformationDTO (org.wso2.carbon.identity.user.export.core.dto.UserInformationDTO)1 UserInformationProvider (org.wso2.carbon.identity.user.export.core.service.UserInformationProvider)1