Package com.google.gerrit.server.util
Class AttentionSetUtil
- java.lang.Object
- 
- com.google.gerrit.server.util.AttentionSetUtil
 
- 
 public class AttentionSetUtil extends Object Common helpers for dealing with attention set data structures.
- 
- 
Method SummaryAll Methods Static Methods Concrete Methods Modifier and Type Method Description static com.google.common.collect.ImmutableSet<AttentionSetUpdate>additionsOnly(Collection<AttentionSetUpdate> updates)Returns only updates where the user was added.static Account.IdresolveAccount(AccountResolver accountResolver, ChangeNotes changeNotes, String user)Returns theAccount.Idofuserif the user is active on the change, and exists.static voidvalidateInput(AttentionSetInput input)Validates the input for AttentionSetInput.
 
- 
- 
- 
Method Detail- 
additionsOnlypublic static com.google.common.collect.ImmutableSet<AttentionSetUpdate> additionsOnly(Collection<AttentionSetUpdate> updates) Returns only updates where the user was added.
 - 
validateInputpublic static void validateInput(AttentionSetInput input) throws BadRequestException Validates the input for AttentionSetInput. This must be called for all inputs that relate to adding or removing attention set entries, except forRemoveFromAttentionSet.- Throws:
- BadRequestException
 
 - 
resolveAccountpublic static Account.Id resolveAccount(AccountResolver accountResolver, ChangeNotes changeNotes, String user) throws org.eclipse.jgit.errors.ConfigInvalidException, IOException, BadRequestException Returns theAccount.Idofuserif the user is active on the change, and exists. If the user doesn't exist or is not active on the change, the same exception is thrown to disallow probing for account existence based on exception type.- Throws:
- org.eclipse.jgit.errors.ConfigInvalidException
- IOException
- BadRequestException
 
 
- 
 
-