public class VersionedAuthorizedKeys extends VersionedMetaData
# INVALID
.
To keep the sequence numbers intact when a key is deleted, a
# DELETED
line is inserted at the position where the key was
deleted.
Other comment lines are ignored on read, and are not written back when the
file is modified.Modifier and Type | Class and Description |
---|---|
static class |
VersionedAuthorizedKeys.Accessor |
static interface |
VersionedAuthorizedKeys.Factory |
static class |
VersionedAuthorizedKeys.SimpleSshKeyCreator |
VersionedMetaData.BatchMetaDataUpdate, VersionedMetaData.PathInfo
inserter, newTree, reader, revision
Constructor and Description |
---|
VersionedAuthorizedKeys(SshKeyCreator sshKeyCreator,
com.google.gerrit.reviewdb.client.Account.Id accountId) |
Modifier and Type | Method and Description |
---|---|
protected String |
getRefName() |
protected void |
onLoad()
Set up the metadata, parsing any state from the loaded revision.
|
protected boolean |
onSave(org.eclipse.jgit.lib.CommitBuilder commit)
Save any changes to the metadata in a commit.
|
void |
setKeys(Collection<com.google.gerrit.reviewdb.client.AccountSshKey> newKeys)
Sets new SSH keys.
|
commit, commitToNewRef, getObjectId, getPathInfos, getRevision, load, load, load, load, load, openUpdate, readConfig, readFile, readTree, readUTF8, saveConfig, saveFile, saveUTF8, set, set, set
@Inject public VersionedAuthorizedKeys(SshKeyCreator sshKeyCreator, com.google.gerrit.reviewdb.client.Account.Id accountId)
protected String getRefName()
getRefName
in class VersionedMetaData
protected void onLoad() throws IOException
VersionedMetaData
onLoad
in class VersionedMetaData
IOException
protected boolean onSave(org.eclipse.jgit.lib.CommitBuilder commit) throws IOException
VersionedMetaData
onSave
in class VersionedMetaData
IOException
public void setKeys(Collection<com.google.gerrit.reviewdb.client.AccountSshKey> newKeys)
newKeys
- the new public SSH keys