class NifiRegistryRoleConfigProvider extends AbstractRdsRoleConfigProvider {

    @Override
    protected List<ApiClusterTemplateConfig> getRoleConfigs(String roleType, TemplatePreparationObject source) {
        String cdhVersion = source.getBlueprintView().getProcessor().getStackVersion() == null ?
                "" : source.getBlueprintView().getProcessor().getStackVersion();
        if (isVersionNewerOrEqualThanLimited(cdhVersion, CLOUDERAMANAGER_VERSION_7_0_1)) {
            RdsView nifiRegistryRdsView = getRdsView(source);
            switch (roleType) {
                case NifiRegistryRoles.NIFI_REGISTRY_SERVER:
                    return List.of(
                            config(DATABASE_URL, nifiRegistryRdsView.getConnectionURL()),
                            config(DRIVER_DIRECTORY, "/usr/share/java/"),
                            config(DRIVER_CLASS, nifiRegistryRdsView.getConnectionDriver()),
                            config(DATABASE_USER, nifiRegistryRdsView.getConnectionUserName()),
                            config(DATABASE_PASSWORD, nifiRegistryRdsView.getConnectionPassword())
                    );
                default:
                    return List.of();
            }
        }
        return List.of();
    }

}