mirror of
https://codeberg.org/PGPainless/cert-d-pgpainless.git
synced 2024-12-22 05:17:56 +01:00
Rename MultiImport task to Import
This commit is contained in:
parent
d0413f2169
commit
1efb2598a2
2 changed files with 8 additions and 8 deletions
|
@ -10,7 +10,7 @@ import pgp.cert_d.BaseDirectoryProvider;
|
||||||
import pgp.cert_d.SharedPGPCertificateDirectoryImpl;
|
import pgp.cert_d.SharedPGPCertificateDirectoryImpl;
|
||||||
import pgp.cert_d.cli.commands.Get;
|
import pgp.cert_d.cli.commands.Get;
|
||||||
import pgp.cert_d.cli.commands.Insert;
|
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.DatabaseSubkeyLookup;
|
||||||
import pgp.cert_d.jdbc.sqlite.SqliteSubkeyLookupDaoImpl;
|
import pgp.cert_d.jdbc.sqlite.SqliteSubkeyLookupDaoImpl;
|
||||||
import pgp.certificate_store.SubkeyLookup;
|
import pgp.certificate_store.SubkeyLookup;
|
||||||
|
@ -26,7 +26,7 @@ import java.sql.SQLException;
|
||||||
description = "Store and manage public OpenPGP certificates",
|
description = "Store and manage public OpenPGP certificates",
|
||||||
subcommands = {
|
subcommands = {
|
||||||
Insert.class,
|
Insert.class,
|
||||||
MultiImport.class,
|
Import.class,
|
||||||
Get.class,
|
Get.class,
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
|
@ -19,12 +19,12 @@ import picocli.CommandLine;
|
||||||
import java.io.ByteArrayInputStream;
|
import java.io.ByteArrayInputStream;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
|
||||||
@CommandLine.Command(name = "multi-import",
|
@CommandLine.Command(name = "import",
|
||||||
description = "Import or update multiple certificates")
|
description = "Import certificates into the store from stdin")
|
||||||
public class MultiImport implements Runnable {
|
public class Import implements Runnable {
|
||||||
|
|
||||||
private static final Logger LOGGER = LoggerFactory.getLogger(MultiImport.class);
|
private static final Logger LOGGER = LoggerFactory.getLogger(Import.class);
|
||||||
private final MergeCallback dummyMerge = new DefaultMergeCallback();
|
private final MergeCallback mergeCallback = new DefaultMergeCallback();
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
|
@ -33,7 +33,7 @@ public class MultiImport implements Runnable {
|
||||||
for (PGPPublicKeyRing cert : certificates) {
|
for (PGPPublicKeyRing cert : certificates) {
|
||||||
ByteArrayInputStream certIn = new ByteArrayInputStream(cert.getEncoded());
|
ByteArrayInputStream certIn = new ByteArrayInputStream(cert.getEncoded());
|
||||||
Certificate certificate = PGPCertDCli.getCertificateDirectory()
|
Certificate certificate = PGPCertDCli.getCertificateDirectory()
|
||||||
.insertCertificate(certIn, dummyMerge);
|
.insertCertificate(certIn, mergeCallback);
|
||||||
}
|
}
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
LOGGER.error("IO-Error.", e);
|
LOGGER.error("IO-Error.", e);
|
Loading…
Reference in a new issue