LCOV - code coverage report
Current view: top level - server/account - AccountDirectory.java (source / functions) Hit Total Coverage
Test: _coverage_report.dat Lines: 12 12 100.0 %
Date: 2022-11-19 15:00:39 Functions: 2 2 100.0 %

          Line data    Source code
       1             : // Copyright (C) 2013 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.server.account;
      16             : 
      17             : import com.google.gerrit.extensions.common.AccountInfo;
      18             : import com.google.gerrit.server.data.AccountAttribute;
      19             : import com.google.gerrit.server.permissions.PermissionBackendException;
      20             : import java.util.Set;
      21             : 
      22             : /**
      23             :  * Directory of user account information.
      24             :  *
      25             :  * <p>Implementations supply data to Gerrit about user accounts.
      26             :  */
      27         150 : public abstract class AccountDirectory {
      28             :   /** Fields to be populated for SSH or REST API response. */
      29         150 :   public enum FillOptions {
      30             :     /** Full name or username. */
      31         150 :     NAME,
      32             : 
      33             :     /** Preferred email address to contact the user at. */
      34         150 :     EMAIL,
      35             : 
      36             :     /** All secondary email addresses of the user. */
      37         150 :     SECONDARY_EMAILS,
      38             : 
      39             :     /** User profile images. */
      40         150 :     AVATARS,
      41             : 
      42             :     /** Unique user identity to login to Gerrit, may be deprecated. */
      43         150 :     USERNAME,
      44             : 
      45             :     /** Numeric account ID, may be deprecated. */
      46         150 :     ID,
      47             : 
      48             :     /** The user-settable status of this account (e.g. busy, OOO, available) */
      49         150 :     STATUS,
      50             : 
      51             :     /** The state of the account (e.g. active or inactive) */
      52         150 :     STATE,
      53             : 
      54             :     /** Human friendly display name presented in the web interface chosen by the user. */
      55         150 :     DISPLAY_NAME,
      56             : 
      57             :     /** Tags such as weather the account is a service user. */
      58         150 :     TAGS
      59             :   }
      60             : 
      61             :   public abstract void fillAccountInfo(Iterable<? extends AccountInfo> in, Set<FillOptions> options)
      62             :       throws PermissionBackendException;
      63             : 
      64             :   public abstract void fillAccountAttributeInfo(Iterable<? extends AccountAttribute> in);
      65             : }

Generated by: LCOV version 1.16+git.20220603.dfeb750