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

com.azure.security.keyvault.certificates.implementation.CertificateIssuerHelper Maven / Gradle / Ivy

There is a newer version: 4.6.7
Show newest version
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
package com.azure.security.keyvault.certificates.implementation;

import com.azure.security.keyvault.certificates.implementation.models.IssuerBundle;
import com.azure.security.keyvault.certificates.models.CertificateIssuer;

public final class CertificateIssuerHelper {
    private static CertificateIssuerAccessor accessor;

    public interface CertificateIssuerAccessor {
        CertificateIssuer createCertificateIssuer(IssuerBundle impl);
        IssuerBundle getImpl(CertificateIssuer certificateIssuer);
    }

    public static CertificateIssuer createCertificateIssuer(IssuerBundle impl) {
        if (accessor == null) {
            new CertificateIssuer("");
        }

        assert accessor != null;
        return accessor.createCertificateIssuer(impl);
    }

    public static IssuerBundle getIssuerBundle(CertificateIssuer certificateIssuer) {
        if (accessor == null) {
            new CertificateIssuer("");
        }

        assert accessor != null;
        return accessor.getImpl(certificateIssuer);
    }

    public static void setAccessor(CertificateIssuerAccessor accessor) {
        CertificateIssuerHelper.accessor = accessor;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy