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

uk.gov.service.payments.commons.model.charge.ExternalMetadata Maven / Gradle / Ivy

There is a newer version: 1.0.20241120144934
Show newest version
package uk.gov.service.payments.commons.model.charge;

import uk.gov.service.payments.commons.api.validation.ValidExternalMetadata;

import java.util.Collections;
import java.util.HashMap;
import java.util.Map;

public class ExternalMetadata {

    public static final int MAX_KEY_VALUE_PAIRS = 15;
    public static final int MIN_KEY_LENGTH = 1;
    public static final int MAX_KEY_LENGTH = 30;
    public static final int MAX_VALUE_LENGTH = 100;

    @ValidExternalMetadata
    private final Map metadata;

    public ExternalMetadata(Map metadata) {
        this.metadata = new HashMap<>(metadata);
    }

    public Map getMetadata() {
        return Collections.unmodifiableMap(metadata);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy