All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.ca.apim.gateway.cagatewayconfig.PluginUtils Maven / Gradle / Ivy

The newest version!
package com.ca.apim.gateway.cagatewayconfig;

import com.ca.apim.gateway.cagatewayconfig.beans.BundleConfig;

import java.io.File;

public final class PluginUtils {
    public static BundleConfig toBundleConfig(GatewayDeveloperPluginConfig gatewaySourceConfig) {
        final File configPath = gatewaySourceConfig.getEnvConfig().getIncludeFolder().getAsFile().getOrNull();
        return new BundleConfig.Builder()
                .configPath(configPath != null ? configPath.getPath() : null)
                .keepEncryptedSecrets(gatewaySourceConfig.getKeepEncryptedSecrets().get())
                .keepPrivateKeys(true) // keep private-keys in the bundle if they exist in the project
                .p12Passphrase(gatewaySourceConfig.getP12Passphrase().getOrNull())
                .build();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy