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

nl.vpro.sourcingservice.Configuration Maven / Gradle / Ivy

package nl.vpro.sourcingservice;

import org.checkerframework.checker.nullness.qual.Nullable;

public record Configuration(
    String baseUrl,
    @Nullable String callbackBaseUrl,
    String token,
    int chunkSize,
    String defaultEmail,
    int version) {

    public String cleanBaseUrl() {
        return  baseUrl.replaceAll("([^/])$","$1/");
    }

    public String callBackUrl(String mid) {
        if (callbackBaseUrl == null) {
            return null;
        } else {
            return callbackBaseUrl.formatted(mid);
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy