001/*
002 * SonarQube
003 * Copyright (C) 2009-2016 SonarSource SA
004 * mailto:contact AT sonarsource DOT com
005 *
006 * This program is free software; you can redistribute it and/or
007 * modify it under the terms of the GNU Lesser General Public
008 * License as published by the Free Software Foundation; either
009 * version 3 of the License, or (at your option) any later version.
010 *
011 * This program is distributed in the hope that it will be useful,
012 * but WITHOUT ANY WARRANTY; without even the implied warranty of
013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
014 * Lesser General Public License for more details.
015 *
016 * You should have received a copy of the GNU Lesser General Public License
017 * along with this program; if not, write to the Free Software Foundation,
018 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
019 */
020package org.sonar.api.user;
021
022import org.sonar.api.server.ServerSide;
023
024import javax.annotation.CheckForNull;
025
026import java.util.List;
027import java.util.Map;
028
029/**
030 * @since 3.6
031 */
032@ServerSide
033public interface RubyUserService {
034
035  @CheckForNull
036  User findByLogin(String login);
037
038  /**
039   * Search for users
040   * <br>
041   * Optional parameters are:
042   * <ul>
043   *   <li><code>s</code> to match all the logins or names containing this search query</li>
044   *   <li><code>logins</code>, as an array of strings (['simon', 'julien']) or a comma-separated list of logins ('simon,julien')</li>
045   *   <li><code>includeDeactivated</code> as a boolean. By Default deactivated users are excluded from query.</li>
046   * </ul>
047   */
048  List<User> find(Map<String, Object> params);
049}