public class BatchUploadUtility extends Object
| Constructor and Description |
|---|
BatchUploadUtility() |
| Modifier and Type | Method and Description |
|---|---|
static String |
getEndpointUrl(String environmentHostname,
String endpoint)
Constructs the full endpoint URL for the given environment hostname and endpoint path.
|
static Collection<X509Certificate> |
loadCertificatesFromPemFile(String certFilePath)
Loads X509 certificates from a PEM file.
|
static org.bouncycastle.openpgp.PGPPublicKey |
readPGPPublicKey(String filePath)
Reads a PGP public key from the specified file.
|
static void |
validateBatchApiJKSInputs(File inputFile,
String environmentHostname,
String pgpEncryptionCertPath,
String keystorePath,
String truststorePath)
Validates the input parameters for batch API using JKS keystore.
|
static void |
validateBatchApiKeysInputs(File inputFile,
String environmentHostname,
org.bouncycastle.openpgp.PGPPublicKey pgpPublicKey,
PrivateKey clientPrivateKey,
X509Certificate clientCert,
Collection<X509Certificate> serverTrustCert)
Validates the input parameters for batch API using direct key and certificate objects.
|
static void |
validateBatchApiP12Inputs(File inputFile,
String environmentHostname,
String pgpEncryptionCertPath,
String clientCertP12FilePath,
String serverTrustCertPath)
Validates the input parameters for batch API using P12 client certificate.
|
public static Collection<X509Certificate> loadCertificatesFromPemFile(String certFilePath) throws CertificateException, IOException
certFilePath - The file path to the PEM certificate file.CertificateException - If the certificate cannot be parsed or is invalid.IOException - If the file cannot be read or does not exist.public static org.bouncycastle.openpgp.PGPPublicKey readPGPPublicKey(String filePath) throws IOException, org.bouncycastle.openpgp.PGPException
filePath - The file path to the PGP public key.IOException - If an I/O error occurs.org.bouncycastle.openpgp.PGPException - If a PGP error occurs or no encryption key is found.IllegalArgumentException - If the file path is null or empty.public static String getEndpointUrl(String environmentHostname, String endpoint)
environmentHostname - The environment hostname (with or without protocol prefix).endpoint - The endpoint path to append.public static void validateBatchApiJKSInputs(File inputFile, String environmentHostname, String pgpEncryptionCertPath, String keystorePath, String truststorePath) throws Exception
inputFile - The input CSV file for batch upload.environmentHostname - The environment hostname.pgpEncryptionCertPath - The path to the PGP encryption certificate.keystorePath - The path to the keystore file.truststorePath - The path to the truststore file.Exception - If any validation fails.public static void validateBatchApiP12Inputs(File inputFile, String environmentHostname, String pgpEncryptionCertPath, String clientCertP12FilePath, String serverTrustCertPath) throws Exception
inputFile - The input CSV file for batch upload.environmentHostname - The environment hostname.pgpEncryptionCertPath - The path to the PGP encryption certificate.clientCertP12FilePath - The path to the client certificate P12 file.serverTrustCertPath - The path to the server trust certificate.Exception - If any validation fails.public static void validateBatchApiKeysInputs(File inputFile, String environmentHostname, org.bouncycastle.openpgp.PGPPublicKey pgpPublicKey, PrivateKey clientPrivateKey, X509Certificate clientCert, Collection<X509Certificate> serverTrustCert) throws Exception
inputFile - The input CSV file for batch upload.environmentHostname - The environment hostname.pgpPublicKey - The PGP public key object.clientPrivateKey - The client private key.clientCert - The client X509 certificate.serverTrustCert - The server trust X509 certificate.Exception - If any validation fails.Copyright © 2026. All rights reserved.