Merge "DeleteKeySender: Make all methods private which are only within the class"
This commit is contained in:
@@ -79,15 +79,26 @@ public class DeleteKeySender extends OutgoingEmail {
|
||||
}
|
||||
}
|
||||
|
||||
public String getEmail() {
|
||||
@Override
|
||||
protected void setupSoyContext() {
|
||||
super.setupSoyContext();
|
||||
soyContextEmailData.put("email", getEmail());
|
||||
soyContextEmailData.put("gpgKeyFingerprints", getGpgKeyFingerprints());
|
||||
soyContextEmailData.put("keyType", getKeyType());
|
||||
soyContextEmailData.put("sshKey", getSshKey());
|
||||
soyContextEmailData.put("userNameEmail", getUserNameEmailFor(user.getAccountId()));
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean supportsHtml() {
|
||||
return true;
|
||||
}
|
||||
|
||||
private String getEmail() {
|
||||
return user.getAccount().preferredEmail();
|
||||
}
|
||||
|
||||
public String getUserNameEmail() {
|
||||
return getUserNameEmailFor(user.getAccountId());
|
||||
}
|
||||
|
||||
public String getKeyType() {
|
||||
private String getKeyType() {
|
||||
if (sshKey != null) {
|
||||
return "SSH";
|
||||
} else if (gpgKeyFingerprints != null) {
|
||||
@@ -96,29 +107,14 @@ public class DeleteKeySender extends OutgoingEmail {
|
||||
throw new IllegalStateException("key type is not SSH or GPG");
|
||||
}
|
||||
|
||||
public String getSshKey() {
|
||||
private String getSshKey() {
|
||||
return (sshKey != null) ? sshKey.sshPublicKey() + "\n" : null;
|
||||
}
|
||||
|
||||
public String getGpgKeyFingerprints() {
|
||||
private String getGpgKeyFingerprints() {
|
||||
if (!gpgKeyFingerprints.isEmpty()) {
|
||||
return Joiner.on("\n").join(gpgKeyFingerprints);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void setupSoyContext() {
|
||||
super.setupSoyContext();
|
||||
soyContextEmailData.put("email", getEmail());
|
||||
soyContextEmailData.put("gpgKeyFingerprints", getGpgKeyFingerprints());
|
||||
soyContextEmailData.put("keyType", getKeyType());
|
||||
soyContextEmailData.put("sshKey", getSshKey());
|
||||
soyContextEmailData.put("userNameEmail", getUserNameEmail());
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean supportsHtml() {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user