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

uk.co.codera.ci.tooling.application.SvnConfiguration Maven / Gradle / Ivy

Go to download

Reponsible for wiring together the DropWizard configuration and application. Builds the runnable jar.

There is a newer version: 0.2.4
Show newest version
package uk.co.codera.ci.tooling.application;

import org.hibernate.validator.constraints.NotEmpty;

import com.fasterxml.jackson.annotation.JsonProperty;

public class SvnConfiguration {

    public static final int DEFAULT_PORT = 80;

    @NotEmpty
    @JsonProperty
    private String host;

    @JsonProperty
    private Integer port;

    public SvnConfiguration() {
        super();
    }

    private SvnConfiguration(Builder builder) {
        this();
        this.host = builder.host;
        this.port = builder.port;
    }

    public static Builder someSvnConfiguration() {
        return new Builder();
    }

    public String getHost() {
        return this.host;
    }

    public int getPort() {
        return this.port == null ? DEFAULT_PORT : this.port.intValue();
    }

    public static class Builder {

        private String host;
        private Integer port;

        private Builder() {
            super();
        }

        public Builder host(String host) {
            this.host = host;
            return this;
        }

        public Builder port(Integer port) {
            this.port = port;
            return this;
        }

        public SvnConfiguration build() {
            return new SvnConfiguration(this);
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy