Line data Source code
1 : // Copyright (C) 2008 The Android Open Source Project 2 : // 3 : // Licensed under the Apache License, Version 2.0 (the "License"); 4 : // you may not use this file except in compliance with the License. 5 : // You may obtain a copy of the License at 6 : // 7 : // http://www.apache.org/licenses/LICENSE-2.0 8 : // 9 : // Unless required by applicable law or agreed to in writing, software 10 : // distributed under the License is distributed on an "AS IS" BASIS, 11 : // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 : // See the License for the specific language governing permissions and 13 : // limitations under the License. 14 : 15 : package com.google.gerrit.entities; 16 : 17 : import java.time.Instant; 18 : 19 103 : public final class UserIdentity { 20 : /** Full name of the user. */ 21 : private String name; 22 : 23 : /** Email address (or user@host style string anyway). */ 24 : private String email; 25 : 26 : /** Username of the user. */ 27 : private String username; 28 : 29 : /** Time (in UTC) when the identity was constructed. */ 30 : private Instant when; 31 : 32 : /** Offset from UTC */ 33 : private int tz; 34 : 35 : /** If the user has a Gerrit account, their account identity. */ 36 : private Account.Id accountId; 37 : 38 : public String getName() { 39 103 : return name; 40 : } 41 : 42 : public void setName(String n) { 43 103 : name = n; 44 103 : } 45 : 46 : public String getEmail() { 47 103 : return email; 48 : } 49 : 50 : public void setEmail(String e) { 51 103 : email = e; 52 103 : } 53 : 54 : public String getUsername() { 55 0 : return username; 56 : } 57 : 58 : public Instant getDate() { 59 0 : return when; 60 : } 61 : 62 : public void setDate(Instant d) { 63 103 : when = d; 64 103 : } 65 : 66 : public int getTimeZone() { 67 0 : return tz; 68 : } 69 : 70 : public void setTimeZone(int offset) { 71 103 : tz = offset; 72 103 : } 73 : 74 : public Account.Id getAccount() { 75 103 : return accountId; 76 : } 77 : 78 : public void setAccount(Account.Id id) { 79 101 : accountId = id; 80 101 : } 81 : }