use of org.wso2.carbon.user.core.profile.ProfileConfiguration in project carbon-identity-framework by wso2.
the class MockRealm method init.
@Override
public void init(RealmConfiguration realmConfiguration, Map<String, ClaimMapping> claimMappingMap, Map<String, ProfileConfiguration> map1, int tenantId) throws UserStoreException {
this.realmConfiguration = realmConfiguration;
this.tenantId = tenantId;
DataSource dataSource = MockInitialContextFactory.initializeDatasource(UM_DB_JNDI_NAME, this.getClass(), new String[] { UM_DB_SQL_FILE });
userStoreManager = new MockUserStoreManager(dataSource);
((MockUserStoreManager) this.userStoreManager).setRealmConfiguration(this.realmConfiguration);
claimManager = new MockClaimManager(claimMappingMap);
((MockUserStoreManager) this.userStoreManager).setClaimManager(this.claimManager);
HybridRoleManager hybridRoleManager = new MockHybridRoleManager(dataSource, tenantId, realmConfiguration, this);
((MockUserStoreManager) this.userStoreManager).setHybridRoleManager(hybridRoleManager);
}
use of org.wso2.carbon.user.core.profile.ProfileConfiguration in project carbon-identity-framework by wso2.
the class UserProfileAdmin method getAvailableProfileConfiguration.
private String[] getAvailableProfileConfiguration(ProfileConfigurationManager profileAdmin) throws UserStoreException {
ProfileConfiguration[] configurations;
String[] profileNames = new String[0];
try {
configurations = (ProfileConfiguration[]) profileAdmin.getAllProfiles();
} catch (org.wso2.carbon.user.api.UserStoreException e) {
throw new UserStoreException(e);
}
if (configurations != null) {
profileNames = new String[configurations.length];
for (int i = 0; i < configurations.length; i++) {
profileNames[i] = configurations[i].getProfileName();
}
}
return profileNames;
}
Aggregations