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

com.github.nagyesta.lowkeyvault.mapper.v7_2.key.KeyEntityToV72KeyVersionItemModelConverter Maven / Gradle / Ivy

The newest version!
package com.github.nagyesta.lowkeyvault.mapper.v7_2.key;

import com.github.nagyesta.lowkeyvault.mapper.common.registry.KeyConverterRegistry;
import com.github.nagyesta.lowkeyvault.service.key.ReadOnlyKeyVaultKeyEntity;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.lang.NonNull;

import java.net.URI;

public class KeyEntityToV72KeyVersionItemModelConverter extends KeyEntityToV72KeyItemModelConverter {

    @Autowired
    public KeyEntityToV72KeyVersionItemModelConverter(@NonNull final KeyConverterRegistry registry) {
        super(registry);
    }

    @Override
    protected void register(final KeyConverterRegistry registry) {
        registry.registerVersionedItemConverter(this);
    }

    @Override
    protected String convertKeyId(final ReadOnlyKeyVaultKeyEntity source, final URI vaultUri) {
        return source.getId().asUri(vaultUri).toString();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy