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

global.maplink.emission.schema.exception.EmissionViolation Maven / Gradle / Ivy

The newest version!
package global.maplink.emission.schema.exception;

import global.maplink.validations.ValidationViolation;
import lombok.Getter;
import lombok.ToString;

@Getter
@ToString
public class EmissionViolation implements ValidationViolation {

    private final String message;

    private EmissionViolation(final String field, final EmissionErrorType errorType) {
        this.message = String.format("%s: %s", errorType.getMessage(), field);
    }

    public static EmissionViolation of(final String field, final EmissionErrorType errorType) {
        return new EmissionViolation(field, errorType);
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy