public interface Context
BatchUpdate
.
A single update may span multiple changes, but they all belong to a single repo.
Modifier and Type | Method and Description |
---|---|
default AccountState |
getAccount()
Get the account of the user performing the update.
|
default Account.Id |
getAccountId()
Get the account ID of the user performing the update.
|
default IdentifiedUser |
getIdentifiedUser()
Get the identified user performing the update.
|
NotifyResolver.Result |
getNotify(Change.Id changeId)
Get the notification settings configured by the caller.
|
Project.NameKey |
getProject()
Get the project name this update operates on.
|
RepoView |
getRepoView()
Get a read-only view of the open repository for this project.
|
org.eclipse.jgit.revwalk.RevWalk |
getRevWalk()
Get a walk for this project.
|
java.util.TimeZone |
getTimeZone()
Get the time zone in which this update takes place.
|
CurrentUser |
getUser()
Get the user performing the update.
|
java.sql.Timestamp |
getWhen()
Get the timestamp at which this update takes place.
|
Project.NameKey getProject()
RepoView getRepoView() throws java.io.IOException
Will be opened lazily if necessary.
java.io.IOException
- if an error occurred opening the repo.org.eclipse.jgit.revwalk.RevWalk getRevWalk() throws java.io.IOException
The repository will be opened lazily if necessary; callers should not close the walk.
java.io.IOException
- if an error occurred opening the repo.java.sql.Timestamp getWhen()
java.util.TimeZone getTimeZone()
In the current implementation, this is always the time zone of the server.
CurrentUser getUser()
In the current implementation, this is always an IdentifiedUser
or InternalUser
.
NotifyResolver.Result getNotify(Change.Id changeId)
If there are multiple changes in a batch, they may have different settings. For example, WIP
changes may have reduced NotifyHandling
levels, and may be in a batch with non-WIP
changes.
changeId
- change IDdefault IdentifiedUser getIdentifiedUser()
Convenience method for getUser().asIdentifiedUser()
.
CurrentUser.asIdentifiedUser()
default AccountState getAccount()
Convenience method for getIdentifiedUser().getAccount()
.
CurrentUser.asIdentifiedUser()
default Account.Id getAccountId()
Convenience method for getUser().getAccountId()
CurrentUser.getAccountId()