uk.co.codera.ci.tooling.application.SvnConfiguration Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of codera-ci-tooling-application Show documentation
Show all versions of codera-ci-tooling-application Show documentation
Reponsible for wiring together the DropWizard configuration and application. Builds the runnable jar.
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