001/* 002 * SonarQube 003 * Copyright (C) 2009-2017 SonarSource SA 004 * mailto:info 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.security; 021 022/** 023 * This class is not intended to be subclassed by clients. 024 * 025 * @see ExternalUsersProvider 026 * @since 2.14 027 */ 028public final class UserDetails { 029 030 private String name = ""; 031 private String email = ""; 032 private String userId = ""; 033 034 public void setEmail(String email) { 035 this.email = email; 036 } 037 038 public String getEmail() { 039 return email; 040 } 041 042 public void setName(String name) { 043 this.name = name; 044 } 045 046 public String getName() { 047 return name; 048 } 049 050 /** 051 * @since 5.2 052 */ 053 public void setUserId(String userId) { 054 this.userId = userId; 055 } 056 057 /** 058 * @since 5.2 059 */ 060 public String getUserId() { 061 return userId; 062 } 063 064 @Override 065 public String toString() { 066 StringBuilder sb = new StringBuilder("UserDetails{"); 067 sb.append("name='").append(name).append('\''); 068 sb.append(", email='").append(email).append('\''); 069 sb.append(", userId='").append(userId).append('\''); 070 sb.append('}'); 071 return sb.toString(); 072 } 073}