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

io.gravitee.apim.common.mapper.TrustStoreMapperImpl Maven / Gradle / Ivy

There is a newer version: 4.6.0
Show newest version
package io.gravitee.apim.common.mapper;

import io.gravitee.definition.model.v4.ssl.pkcs12.PKCS12TrustStore;
import io.gravitee.node.vertx.client.ssl.jks.JKSTrustStore;
import io.gravitee.node.vertx.client.ssl.none.NoneTrustStore;
import io.gravitee.node.vertx.client.ssl.pem.PEMTrustStore;
import javax.annotation.processing.Generated;

@Generated(
    value = "org.mapstruct.ap.MappingProcessor",
    date = "2024-10-24T18:11:40+0000",
    comments = "version: 1.6.0.Beta2, compiler: javac, environment: Java 17.0.8 (Eclipse Adoptium)"
)
public class TrustStoreMapperImpl implements TrustStoreMapper {

    @Override
    public PEMTrustStore map(io.gravitee.definition.model.v4.ssl.pem.PEMTrustStore trustStore) {
        if ( trustStore == null ) {
            return null;
        }

        PEMTrustStore.PEMTrustStoreBuilder pEMTrustStore = PEMTrustStore.builder();

        pEMTrustStore.path( trustStore.getPath() );
        pEMTrustStore.content( trustStore.getContent() );

        return pEMTrustStore.build();
    }

    @Override
    public JKSTrustStore map(io.gravitee.definition.model.v4.ssl.jks.JKSTrustStore trustStore) {
        if ( trustStore == null ) {
            return null;
        }

        JKSTrustStore.JKSTrustStoreBuilder jKSTrustStore = JKSTrustStore.builder();

        jKSTrustStore.path( trustStore.getPath() );
        jKSTrustStore.content( trustStore.getContent() );
        jKSTrustStore.password( trustStore.getPassword() );
        jKSTrustStore.alias( trustStore.getAlias() );

        return jKSTrustStore.build();
    }

    @Override
    public io.gravitee.node.vertx.client.ssl.pkcs12.PKCS12TrustStore map(PKCS12TrustStore trustStore) {
        if ( trustStore == null ) {
            return null;
        }

        io.gravitee.node.vertx.client.ssl.pkcs12.PKCS12TrustStore.PKCS12TrustStoreBuilder pKCS12TrustStore = io.gravitee.node.vertx.client.ssl.pkcs12.PKCS12TrustStore.builder();

        pKCS12TrustStore.path( trustStore.getPath() );
        pKCS12TrustStore.content( trustStore.getContent() );
        pKCS12TrustStore.password( trustStore.getPassword() );
        pKCS12TrustStore.alias( trustStore.getAlias() );

        return pKCS12TrustStore.build();
    }

    @Override
    public NoneTrustStore map(io.gravitee.definition.model.v4.ssl.none.NoneTrustStore trustStore) {
        if ( trustStore == null ) {
            return null;
        }

        NoneTrustStore.NoneTrustStoreBuilder noneTrustStore = NoneTrustStore.builder();

        return noneTrustStore.build();
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy