Document GetPreferences / GetDiffPreferences / GetEditPreferences classes

Change-Id: I777c7aa74c7402f0a377c9e9d1f7981fb2ff5484
Signed-off-by: Edwin Kempin <ekempin@google.com>
This commit is contained in:
Edwin Kempin
2019-12-27 14:09:43 +01:00
committed by David Pursehouse
parent c61f8acce5
commit 4f07e3c8ee
3 changed files with 35 additions and 0 deletions

View File

@@ -34,6 +34,18 @@ import com.google.inject.Singleton;
import java.io.IOException;
import org.eclipse.jgit.errors.ConfigInvalidException;
/**
* REST endpoint to get the diff preferences of an account.
*
* <p>This REST endpoint handles {@code GET /accounts/<account-identifier>/preferences.diff}
* requests.
*
* <p>General preferences can be retrieved by {@link GetPreferences} and edit preferences can be
* retrieved by {@link GetEditPreferences}.
*
* <p>Default diff preferences that apply for all accounts can be retrieved by {@link
* com.google.gerrit.server.restapi.config.GetDiffPreferences}.
*/
@Singleton
public class GetDiffPreferences implements RestReadView<AccountResource> {
private final Provider<CurrentUser> self;

View File

@@ -34,6 +34,18 @@ import com.google.inject.Singleton;
import java.io.IOException;
import org.eclipse.jgit.errors.ConfigInvalidException;
/**
* REST endpoint to get the edit preferences of an account.
*
* <p>This REST endpoint handles {@code GET /accounts/<account-identifier>/preferences.edit}
* requests.
*
* <p>General preferences can be retrieved by {@link GetPreferences} and diff preferences can be
* retrieved by {@link GetDiffPreferences}.
*
* <p>Default edit preferences that apply for all accounts can be retrieved by {@link
* com.google.gerrit.server.restapi.config.GetEditPreferences}.
*/
@Singleton
public class GetEditPreferences implements RestReadView<AccountResource> {
private final Provider<CurrentUser> self;

View File

@@ -35,6 +35,17 @@ import com.google.inject.Inject;
import com.google.inject.Provider;
import com.google.inject.Singleton;
/**
* REST endpoint to get the general preferences of an account.
*
* <p>This REST endpoint handles {@code GET /accounts/<account-identifier>/preferences} requests.
*
* <p>Diff preferences can be retrieved by {@link GetDiffPreferences} and edit preferences can be
* retrieved by {@link GetEditPreferences}.
*
* <p>Default general preferences that apply for all accounts can be retrieved by {@link
* com.google.gerrit.server.restapi.config.GetPreferences}.
*/
@Singleton
public class GetPreferences implements RestReadView<AccountResource> {
private final Provider<CurrentUser> self;