org.wildfly.swarm.config.undertow.server.Host Maven / Gradle / Ivy
package org.wildfly.swarm.config.undertow.server;
import org.wildfly.config.runtime.Implicit;
import org.wildfly.config.runtime.ResourceType;
import org.wildfly.config.runtime.ModelNodeBinding;
import java.util.List;
import org.wildfly.config.runtime.Subresource;
import org.wildfly.swarm.config.undertow.server.host.FilterRef;
import org.wildfly.swarm.config.undertow.server.host.Location;
import org.wildfly.swarm.config.undertow.server.host.AccessLogSetting;
import org.wildfly.swarm.config.undertow.server.host.SingleSignOnSetting;
/**
* An Undertow host
*/
@ResourceType("host")
public class Host {
private String key;
private List alias;
private Integer defaultResponseCode;
private String defaultWebModule;
private Boolean disableConsoleRedirect;
private HostResources subresources = new HostResources();
private AccessLogSetting accessLogSetting;
private SingleSignOnSetting singleSignOnSetting;
public Host(String key) {
this.key = key;
}
public String getKey() {
return this.key;
}
/**
* Aliases for the host
*/
@ModelNodeBinding(detypedName = "alias")
public List alias() {
return this.alias;
}
/**
* Aliases for the host
*/
@SuppressWarnings("unchecked")
public Host alias(List value) {
this.alias = value;
return (Host) this;
}
/**
* If set, this will be response code sent back in case requested context does not exist on server.
*/
@ModelNodeBinding(detypedName = "default-response-code")
public Integer defaultResponseCode() {
return this.defaultResponseCode;
}
/**
* If set, this will be response code sent back in case requested context does not exist on server.
*/
@SuppressWarnings("unchecked")
public Host defaultResponseCode(Integer value) {
this.defaultResponseCode = value;
return (Host) this;
}
/**
* Default web module
*/
@ModelNodeBinding(detypedName = "default-web-module")
public String defaultWebModule() {
return this.defaultWebModule;
}
/**
* Default web module
*/
@SuppressWarnings("unchecked")
public Host defaultWebModule(String value) {
this.defaultWebModule = value;
return (Host) this;
}
/**
* if set to true, /console redirect wont be enabled for this host, default is false
*/
@ModelNodeBinding(detypedName = "disable-console-redirect")
public Boolean disableConsoleRedirect() {
return this.disableConsoleRedirect;
}
/**
* if set to true, /console redirect wont be enabled for this host, default is false
*/
@SuppressWarnings("unchecked")
public Host disableConsoleRedirect(Boolean value) {
this.disableConsoleRedirect = value;
return (Host) this;
}
public HostResources subresources() {
return this.subresources;
}
/**
* Add all org.wildfly.swarm.config.undertow.server.host.FilterRef objects to this subresource
* @return this
* @param value List of org.wildfly.swarm.config.undertow.server.host.FilterRef objects.
*/
@SuppressWarnings("unchecked")
public Host filterRefs(
List value) {
this.subresources.filterRefs.addAll(value);
return (Host) this;
}
/**
* Add the org.wildfly.swarm.config.undertow.server.host.FilterRef object to the list of subresources
* @param value The org.wildfly.swarm.config.undertow.server.host.FilterRef to add
* @return this
*/
@SuppressWarnings("unchecked")
public Host filterRef(FilterRef value) {
this.subresources.filterRefs.add(value);
return (Host) this;
}
/**
* Add all org.wildfly.swarm.config.undertow.server.host.Location objects to this subresource
* @return this
* @param value List of org.wildfly.swarm.config.undertow.server.host.Location objects.
*/
@SuppressWarnings("unchecked")
public Host locations(
List value) {
this.subresources.locations.addAll(value);
return (Host) this;
}
/**
* Add the org.wildfly.swarm.config.undertow.server.host.Location object to the list of subresources
* @param value The org.wildfly.swarm.config.undertow.server.host.Location to add
* @return this
*/
@SuppressWarnings("unchecked")
public Host location(Location value) {
this.subresources.locations.add(value);
return (Host) this;
}
/**
* Child mutators for Host
*/
public class HostResources {
/**
* Reference to filter
*/
private List filterRefs = new java.util.ArrayList<>();
/**
* Holds configuration of location resource
*/
private List locations = new java.util.ArrayList<>();
/**
* Get the list of org.wildfly.swarm.config.undertow.server.host.FilterRef resources
* @return the list of resources
*/
@Subresource
public List filterRefs() {
return this.filterRefs;
}
/**
* Get the list of org.wildfly.swarm.config.undertow.server.host.Location resources
* @return the list of resources
*/
@Subresource
public List locations() {
return this.locations;
}
}
/**
* The access log configuration for this virtual server.
*/
@Subresource
public AccessLogSetting accessLogSetting() {
return this.accessLogSetting;
}
/**
* The access log configuration for this virtual server.
*/
@SuppressWarnings("unchecked")
public Host accessLogSetting(AccessLogSetting value) {
this.accessLogSetting = value;
return (Host) this;
}
/**
* The SSO configuration for this virtual server.
*/
@Subresource
public SingleSignOnSetting singleSignOnSetting() {
return this.singleSignOnSetting;
}
/**
* The SSO configuration for this virtual server.
*/
@SuppressWarnings("unchecked")
public Host singleSignOnSetting(SingleSignOnSetting value) {
this.singleSignOnSetting = value;
return (Host) this;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy