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

net.wouterdanes.docker.maven.DockerPluginError Maven / Gradle / Ivy

package net.wouterdanes.docker.maven;

import com.google.common.base.Optional;

import net.wouterdanes.docker.remoteapi.exception.DockerException;

/**
 * This class holds plugin execution errors that are tested for in the verify goal of this plugin.
 * This class is immutable and should be initialized via the constructor.
 */
public class DockerPluginError {

    private final String pluginGoal;
    private final String message;
    private final Optional exception;

    public DockerPluginError(final String pluginGoal, final String message, final DockerException exception) {
        this(pluginGoal, message, Optional.of(exception));
    }

    public DockerPluginError(final String pluginGoal, final String message) {
        this(pluginGoal, message, Optional.absent());
    }

    public DockerPluginError(final String pluginGoal, final String message, final Optional exception) {
        this.pluginGoal = pluginGoal;
        this.message = message;
        this.exception = exception;
    }

    public String getPluginGoal() {
        return pluginGoal;
    }

    public String getMessage() {
        return message;
    }

    public Optional getException() {
        return exception;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy