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

com.emc.vipr.model.catalog.CompositeValidationError Maven / Gradle / Ivy

There is a newer version: 3.5.0.0
Show newest version
/*
 * Copyright (c) 2015 EMC Corporation
 * All Rights Reserved
 */
package com.emc.vipr.model.catalog;

import com.emc.vipr.model.catalog.ValidationError;

import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlElementWrapper;
import javax.xml.bind.annotation.XmlRootElement;

@XmlRootElement
public class CompositeValidationError extends ValidationError {

    private List errors;

    public CompositeValidationError() {
        super();
    }

    public CompositeValidationError(String error, String field) {
        super(error, field);

    }

    public void addValidationError(ValidationError error) {
        getErrors().add(error);
    }

    @XmlElementWrapper(name = "errors")
    @XmlElement(name = "error")
    public List getErrors() {
        if (errors == null) {
            errors = new ArrayList<>();
        }
        return errors;
    }

    public void setErrors(List errors) {
        this.errors = errors;
    }

    @Override
    public void setError(String error) {
    };

    @Override
    public void setField(String field) {
    };

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy