Sha256: 5769520671a0008387bbb518097f8df0c9c0dd18737993748191891259142f0f

Contents?: true

Size: 566 Bytes

Versions: 155

Compression:

Stored size: 566 Bytes

Contents

package org.embulk.config;

import java.util.Set;
import javax.validation.Validator;
import javax.validation.ConstraintViolation;

public class TaskValidator
{
    private final Validator validator;

    public TaskValidator(Validator validator)
    {
        this.validator = validator;
    }

    public <T> void validateModel(T model) throws TaskValidationException
    {
        Set<ConstraintViolation<T>> violations = validator.validate(model);
        if (!violations.isEmpty()) {
            throw new TaskValidationException(violations);
        }
    }
}

Version data entries

155 entries across 155 versions & 1 rubygems

Version Path
embulk-0.8.39 embulk-core/src/main/java/org/embulk/config/TaskValidator.java
embulk-0.8.39-java embulk-core/src/main/java/org/embulk/config/TaskValidator.java
embulk-0.8.38 embulk-core/src/main/java/org/embulk/config/TaskValidator.java
embulk-0.8.38-java embulk-core/src/main/java/org/embulk/config/TaskValidator.java
embulk-0.8.37 embulk-core/src/main/java/org/embulk/config/TaskValidator.java
embulk-0.8.37-java embulk-core/src/main/java/org/embulk/config/TaskValidator.java
embulk-0.8.36 embulk-core/src/main/java/org/embulk/config/TaskValidator.java
embulk-0.8.36-java embulk-core/src/main/java/org/embulk/config/TaskValidator.java
embulk-0.8.35 embulk-core/src/main/java/org/embulk/config/TaskValidator.java
embulk-0.8.35-java embulk-core/src/main/java/org/embulk/config/TaskValidator.java
embulk-0.8.34 embulk-core/src/main/java/org/embulk/config/TaskValidator.java
embulk-0.8.34-java embulk-core/src/main/java/org/embulk/config/TaskValidator.java
embulk-0.8.33 embulk-core/src/main/java/org/embulk/config/TaskValidator.java
embulk-0.8.33-java embulk-core/src/main/java/org/embulk/config/TaskValidator.java
embulk-0.8.32 embulk-core/src/main/java/org/embulk/config/TaskValidator.java
embulk-0.8.32-java embulk-core/src/main/java/org/embulk/config/TaskValidator.java
embulk-0.8.31 embulk-core/src/main/java/org/embulk/config/TaskValidator.java
embulk-0.8.31-java embulk-core/src/main/java/org/embulk/config/TaskValidator.java
embulk-0.8.30 embulk-core/src/main/java/org/embulk/config/TaskValidator.java
embulk-0.8.30-java embulk-core/src/main/java/org/embulk/config/TaskValidator.java