Rename MultiImport task to Import

This commit is contained in:
Paul Schaub 2022-07-04 13:05:32 +02:00
parent d0413f2169
commit 1efb2598a2
Signed by: vanitasvitae
GPG key ID: 62BEE9264BF17311
2 changed files with 8 additions and 8 deletions

View file

@ -10,7 +10,7 @@ import pgp.cert_d.BaseDirectoryProvider;
import pgp.cert_d.SharedPGPCertificateDirectoryImpl;
import pgp.cert_d.cli.commands.Get;
import pgp.cert_d.cli.commands.Insert;
import pgp.cert_d.cli.commands.MultiImport;
import pgp.cert_d.cli.commands.Import;
import pgp.cert_d.jdbc.sqlite.DatabaseSubkeyLookup;
import pgp.cert_d.jdbc.sqlite.SqliteSubkeyLookupDaoImpl;
import pgp.certificate_store.SubkeyLookup;
@ -26,7 +26,7 @@ import java.sql.SQLException;
description = "Store and manage public OpenPGP certificates",
subcommands = {
Insert.class,
MultiImport.class,
Import.class,
Get.class,
}
)

View file

@ -19,12 +19,12 @@ import picocli.CommandLine;
import java.io.ByteArrayInputStream;
import java.io.IOException;
@CommandLine.Command(name = "multi-import",
description = "Import or update multiple certificates")
public class MultiImport implements Runnable {
@CommandLine.Command(name = "import",
description = "Import certificates into the store from stdin")
public class Import implements Runnable {
private static final Logger LOGGER = LoggerFactory.getLogger(MultiImport.class);
private final MergeCallback dummyMerge = new DefaultMergeCallback();
private static final Logger LOGGER = LoggerFactory.getLogger(Import.class);
private final MergeCallback mergeCallback = new DefaultMergeCallback();
@Override
public void run() {
@ -33,7 +33,7 @@ public class MultiImport implements Runnable {
for (PGPPublicKeyRing cert : certificates) {
ByteArrayInputStream certIn = new ByteArrayInputStream(cert.getEncoded());
Certificate certificate = PGPCertDCli.getCertificateDirectory()
.insertCertificate(certIn, dummyMerge);
.insertCertificate(certIn, mergeCallback);
}
} catch (IOException e) {
LOGGER.error("IO-Error.", e);