Search in sources :

Example 1 with BlueUser

use of io.jenkins.blueocean.rest.model.BlueUser in project blueocean-plugin by jenkinsci.

the class UserSearch method search.

@Override
public Pageable<BlueUser> search(Query q) {
    List<BlueUser> users = new ArrayList<>();
    BlueOrganization organization = getOrganization(q);
    if (organization == null) {
        organization = OrganizationFactory.getInstance().list().iterator().next();
    }
    for (hudson.model.User u : hudson.model.User.getAll()) {
        users.add(new UserImpl(organization, u));
    }
    return Pageables.wrap(users);
}
Also used : BlueOrganization(io.jenkins.blueocean.rest.model.BlueOrganization) BlueUser(io.jenkins.blueocean.rest.model.BlueUser) ArrayList(java.util.ArrayList)

Aggregations

BlueOrganization (io.jenkins.blueocean.rest.model.BlueOrganization)1 BlueUser (io.jenkins.blueocean.rest.model.BlueUser)1 ArrayList (java.util.ArrayList)1