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

org.bsc.mojo.configuration.DeployStateInfo Maven / Gradle / Ivy

Go to download

plugin that document a project (using maven site style) and send result to a live confluence site [http://www.atlassian.com/software/confluence/]

There is a newer version: 8.0-beta1
Show newest version
package org.bsc.mojo.configuration;

import java.nio.file.Path;
import java.util.Objects;
import java.util.Optional;

import static java.util.Optional.ofNullable;

public class DeployStateInfo {

    private Path outdir = null;
    private boolean active;

    /**
     * @return the active
     */
    public boolean isActive() {
        return active;
    }

    /**
     * @param active the active to set
     */
    public void setActive(boolean active) {
        this.active = active;
    }

    /**
     * @param outdir the basedir to set
     */
    public void setOutdir(java.io.File outdir) {
        if( outdir != null ) {
            this.outdir = outdir.toPath();
        }
    }

    public Path getOutdir() {
        Objects.requireNonNull( outdir, "outdir is null!");
        return outdir;
    }

    /**
     * @return the _outdir
     */
    public Optional optOutdir() {
        return ofNullable(outdir);
    }

    public DeployStateInfo() {
        this(true);
    }

    public DeployStateInfo(boolean active) {
        this.active = active;
    }

    /**
     *
     */
    @Override
    public String toString() {
        final String dir = optOutdir().map( p -> p.toString()).orElse("");

        return new StringBuilder()
                .append("DeployStateInfo").append("\n\t")
                .append("active=").append(active).append("\n\t")
                .append("outdir=").append(dir).append("\n")
                .toString();
    }


}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy