use of org.wso2.carbon.identity.user.store.configuration.dto.UserStorePersistanceDTO in project carbon-identity-framework by wso2.
the class AbstractUserStoreDAO method getUserStorePersistanceDTO.
private UserStorePersistanceDTO getUserStorePersistanceDTO(UserStoreDTO userStoreDTO, String userStoreProperties) {
UserStorePersistanceDTO userStorePersistanceDTO = new UserStorePersistanceDTO();
userStorePersistanceDTO.setUserStoreDTO(userStoreDTO);
userStorePersistanceDTO.setUserStoreProperties(userStoreProperties);
return userStorePersistanceDTO;
}
use of org.wso2.carbon.identity.user.store.configuration.dto.UserStorePersistanceDTO in project carbon-identity-framework by wso2.
the class AbstractUserStoreDAO method addUserStore.
@Override
public void addUserStore(UserStoreDTO userStoreDTO) throws IdentityUserStoreMgtException {
UserStorePersistanceDTO userStorePersistanceDTO = getUserStorePersistanceDTO(userStoreDTO, getUserStoreProperties(userStoreDTO, userStoreDTO.getDomainId()));
doAddUserStore(userStorePersistanceDTO);
}
use of org.wso2.carbon.identity.user.store.configuration.dto.UserStorePersistanceDTO in project carbon-identity-framework by wso2.
the class AbstractUserStoreDAO method getUserStores.
@Override
public UserStoreDTO[] getUserStores() throws IdentityUserStoreMgtException {
UserStorePersistanceDTO[] userStorePersistanceDTOS = doGetAllUserStores();
List<UserStoreDTO> userStoreDTOs = new ArrayList<>();
for (UserStorePersistanceDTO userStorePersistanceDTO : userStorePersistanceDTOS) {
userStoreDTOs.add(userStorePersistanceDTO.getUserStoreDTO());
}
return userStoreDTOs.toArray(new UserStoreDTO[userStoreDTOs.size()]);
}
use of org.wso2.carbon.identity.user.store.configuration.dto.UserStorePersistanceDTO in project carbon-identity-framework by wso2.
the class DatabaseBasedUserStoreDAOImpl method getUserStorePersistanceDTOs.
private void getUserStorePersistanceDTOs(List<UserStorePersistanceDTO> userStorePersistanceDTOs, RealmConfiguration realmConfiguration, String userStorePorpertyValues) {
UserStorePersistanceDTO userStorePersistanceDTO = new UserStorePersistanceDTO();
userStorePersistanceDTO.setUserStoreDTO(getUserStoreDTO(realmConfiguration));
userStorePersistanceDTO.setUserStoreProperties(userStorePorpertyValues);
userStorePersistanceDTOs.add(userStorePersistanceDTO);
}
use of org.wso2.carbon.identity.user.store.configuration.dto.UserStorePersistanceDTO in project carbon-identity-framework by wso2.
the class DatabaseBasedUserStoreDAOImpl method addRealmToSecondaryUserStoreManager.
private void addRealmToSecondaryUserStoreManager(UserStorePersistanceDTO userStorePersistanceDTO) throws UserStoreException, XMLStreamException {
UserRealm userRealm = (UserRealm) CarbonContext.getThreadLocalCarbonContext().getUserRealm();
AbstractUserStoreManager primaryUSM = (AbstractUserStoreManager) userRealm.getUserStoreManager();
InputStream targetStream = new ByteArrayInputStream(userStorePersistanceDTO.getUserStoreProperties().getBytes());
RealmConfiguration realmConfiguration = getRealmConfiguration(userStorePersistanceDTO.getUserStoreDTO().getDomainId(), targetStream);
primaryUSM.addSecondaryUserStoreManager(realmConfiguration, userRealm);
}
Aggregations