// SPDX-FileCopyrightText: 2023 Paul Schaub // // SPDX-License-Identifier: Apache-2.0 package org.pgpainless.sop; import java.util.List; import sop.Profile; import sop.exception.SOPGPException; import sop.operation.ListProfiles; import javax.annotation.Nonnull; /** * Implementation of the
list-profiles
operation using PGPainless. * */ public class ListProfilesImpl implements ListProfiles { @Override @Nonnull public List subcommand(@Nonnull String command) { switch (command) { case "generate-key": return GenerateKeyImpl.SUPPORTED_PROFILES; case "encrypt": return EncryptImpl.SUPPORTED_PROFILES; default: throw new SOPGPException.UnsupportedProfile(command); } } }