<commit_before>package io.jenkins.blueocean.service.embedded.rest;

import com.google.common.collect.ImmutableMap;
import hudson.Extension;
import io.jenkins.blueocean.api.profile.CreateUserRequest;
import io.jenkins.blueocean.commons.ServiceException;
import io.jenkins.blueocean.commons.stapler.JsonBody;
import io.jenkins.blueocean.rest.sandbox.User;
import io.jenkins.blueocean.rest.sandbox.UserContainer;

/**
 *
 * @author <NAME>
 * @author <NAME>
 */
@Extension
public class UserContainerImpl extends UserContainer {
    @Override
    public User create(@JsonBody CreateUserRequest req) {
        throw new ServiceException.NotImplementedException("Not implemented yet");
    }

    @Override
    public User get(String name) {
        hudson.model.User user = hudson.model.User.get(name, false, ImmutableMap.of());
        if (user==null)     return null;
        return new UserImpl(user);
    }
}<commit_msg>To implement org membership I have to have this<commit_after>package io.jenkins.blueocean.service.embedded.rest;

import com.google.common.collect.ImmutableMap;
import hudson.Extension;
import hudson.util.AdaptedIterator;
import io.jenkins.blueocean.api.profile.CreateUserRequest;
import io.jenkins.blueocean.commons.ServiceException;
import io.jenkins.blueocean.commons.stapler.JsonBody;
import io.jenkins.blueocean.rest.sandbox.User;
import io.jenkins.blueocean.rest.sandbox.UserContainer;

import java.util.Iterator;

/**
 *
 * @author <NAME>
 * @author <NAME>
 */
@Extension
public class UserContainerImpl extends UserContainer {
    @Override
    public User create(@JsonBody CreateUserRequest req) {
        throw new ServiceException.NotImplementedException("Not implemented yet");
    }

    @Override
    public User get(String name) {
        hudson.model.User user = hudson.model.User.get(name, false, ImmutableMap.of());
        if (user==null)     return null;
        return new UserImpl(user);
    }

    /**
     * Iterates all the users in the system
     */
    @Override
    public Iterator<User> iterator() {
        return new AdaptedIterator<hudson.model.User, User>(hudson.model.User.getAll()) {
            @Override
            protected User adapt(hudson.model.User item) {
                return new UserImpl(item);
            }
        };
    }
}
{'fraction_non_alphanumeric': 0.10728303532490188, 'fraction_numerical': 0.0, 'mean_word_length': 3.5515873015873014, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7594975', 'n_tokens_mistral': 704, 'n_tokens_neox': 679, 'n_words': 143}