use of com.sequenceiq.mock.swagger.model.ApiExternalUserMapping in project cloudbreak by hortonworks.
the class ExternalUserMappingsResourceOperation method updateExternalUserMapping.
public ResponseEntity<ApiExternalUserMapping> updateExternalUserMapping(String mockUuid, String uuid, @Valid ApiExternalUserMapping body) {
ClouderaManagerDto dto = clouderaManagerStoreService.read(mockUuid);
ApiExternalUserMapping user = getUser(dto, uuid);
user.setAuthRoles(body.getAuthRoles());
return responseCreatorComponent.exec(body);
}
use of com.sequenceiq.mock.swagger.model.ApiExternalUserMapping in project cloudbreak by hortonworks.
the class ExternalUserMappingsResourceOperation method createExternalUserMappings.
public ResponseEntity<ApiExternalUserMappingList> createExternalUserMappings(String mockUuid, @Valid ApiExternalUserMappingList body) {
ClouderaManagerDto dto = clouderaManagerStoreService.read(mockUuid);
List<ApiExternalUserMapping> items = body.getItems();
items.forEach(u -> u.uuid(UUID.randomUUID().toString()));
dto.getExternalUsers().addAll(items);
return responseCreatorComponent.exec(body);
}
Aggregations