ListProfiles: Add shortcut methods generateKey() and encrypt()

This commit is contained in:
Paul Schaub 2023-04-18 18:04:23 +02:00
parent d8cac7b9d7
commit 78ecf2f554
Signed by: vanitasvitae
GPG key ID: 62BEE9264BF17311

View file

@ -22,4 +22,22 @@ public interface ListProfiles {
*/
List<Profile> subcommand(String command);
/**
* Return a list of {@link Profile Profiles} supported by the {@link GenerateKey} implementation.
*
* @return profiles
*/
default List<Profile> generateKey() {
return subcommand("generate-key");
}
/**
* Return a list of {@link Profile Profiles} supported by the {@link Encrypt} implementation.
*
* @return profiles
*/
default List<Profile> encrypt() {
return subcommand("encrypt");
}
}