// entities
Mapping global = new DMRMapping()
.setAddress("/{selected.profile}/subsystem=undertow/server=default-server");
Container overview = new Container(ns, "httpServer", "Server", TemporalOperator.Choice, StereoTypes.EditorPanel);
Container attributes = new Container(ns, "server#attributes", "Attributes", Form);
Mapping attributesMapping = new DMRMapping()
.addAttributes("default-host", "servlet-container");
Container listener = new Container(ns, "listener", "Listener", Choice, Pages);
Container http = new Container(ns, "listener#http", "HTTP", Concurrency);
Container ajp = new Container(ns, "listener#ajp", "AJP", Concurrency);
Container https = new Container(ns, "listener#https", "HTTPS", Concurrency);
// structure & mapping
DMRMapping httpListenerCollection = new DMRMapping()
.setAddress("/{selected.profile}/subsystem=undertow/server=default-server/http-listener=*")
.addAttributes("entity.key", "enabled");
DMRMapping singleHttpListener = new DMRMapping()
.setAddress("/{selected.profile}/subsystem=undertow/server=default-server/http-listener={selected.entity}");
DMRMapping httpListenerTable = new DMRMapping()
.addAttributes("entity.key", "enabled");
DMRMapping ajpListenerCollection = new DMRMapping()
.setAddress("/{selected.profile}/subsystem=undertow/server=default-server/ajp-listener=*")
.addAttributes("entity.key", "enabled");
DMRMapping singleAjpListener = new DMRMapping()
.setAddress("/{selected.profile}/subsystem=undertow/server=default-server/ajp-listener={selected.entity}");
DMRMapping ajpListenerTable = new DMRMapping()
.addAttributes("entity.key", "enabled");
DMRMapping httpsListenerCollection = new DMRMapping()
.setAddress("/{selected.profile}/subsystem=undertow/server=default-server/https-listener=*")
.addAttributes("entity.key", "enabled");
DMRMapping singleHTTPSListener = new DMRMapping()
.setAddress("/{selected.profile}/subsystem=undertow/server=default-server/https-listener={selected.entity}");
DMRMapping httpsListenerTable = new DMRMapping()
.addAttributes("entity.key", "enabled", "security-realm");
InteractionUnit root = new Builder()
.start(overview)
// handler section
.start(listener)
// ------------------- HTTP --------------------
.start(http)
.mappedBy(httpListenerCollection)
.start(new Container<StereoTypes>(ns, "httptools", "Tools", Toolstrip))
.mappedBy(singleHttpListener)
.add(new Trigger(
QName.valueOf("org.jboss.httpListener:add"),
QName.valueOf("org.jboss.as:resource-operation#add"),
"Add"))
.mappedBy(httpListenerCollection)
.add(new Trigger(
QName.valueOf("org.jboss.httpListener:remove"),
QName.valueOf("org.jboss.as:resource-operation#remove"),
"Remove"))
.end()
.add(new Select(ns, "httpListener", "HTTPListenerSelection"))
.mappedBy(httpListenerTable)
.start(new Container(ns, "undertow#httpListenerConfig", "httpConfig", Choice))
.mappedBy(singleHttpListener)
.add(new Container(ns, "undertow#httpListenerAttributes", "Attributes", Form))
.mappedBy(new DMRMapping()
.addAttributes(
"worker", "enabled",
"socket-binding", "buffer-pool"
)
)
.end()
.end()
// ------------------- AJP --------------------
.start(ajp)
.mappedBy(ajpListenerCollection)
.start(new Container<StereoTypes>(ns, "ajptools", "Tools", Toolstrip))
.mappedBy(singleAjpListener)
.add(new Trigger(
QName.valueOf("org.jboss.ajpListener:add"),
QName.valueOf("org.jboss.as:resource-operation#add"),
"Add"))
.mappedBy(ajpListenerCollection)
.add(new Trigger(
QName.valueOf("org.jboss.ajpListener:remove"),
QName.valueOf("org.jboss.as:resource-operation#remove"),
"Remove"))
.end()
.add(new Select(ns, "ajpListener", "AJPListenerSelection"))
.mappedBy(ajpListenerTable)
.start(new Container(ns, "undertow#ajpListenerConfig", "ajpConfig", Choice))
.mappedBy(singleAjpListener)
.add(new Container(ns, "undertow#ajpListenerAttributes", "Attributes", Form))
.mappedBy(new DMRMapping()
.addAttributes(
"worker", "enabled",
"socket-binding", "buffer-pool"
)
)
.end()
.end()
// ------------------- HTTPS--------------------
.start(https)
.mappedBy(httpsListenerCollection)
.start(new Container<StereoTypes>(ns, "httpstools", "Tools", Toolstrip))
.mappedBy(singleHTTPSListener)
.add(new Trigger(
QName.valueOf("org.jboss.httpsListener:add"),
QName.valueOf("org.jboss.as:resource-operation#add"),
"Add"))
.mappedBy(httpsListenerCollection)
.add(new Trigger(
QName.valueOf("org.jboss.httpsListener:remove"),
QName.valueOf("org.jboss.as:resource-operation#remove"),
"Remove"))
.end()
.add(new Select(ns, "httpsListener", "HTTPSListenerSelection"))
.mappedBy(httpsListenerTable)
.start(new Container(ns, "undertow#httpsListenerConfig", "httpsConfig", Choice))
.mappedBy(singleHTTPSListener)
.add(new Container(ns, "undertow#httpsListenerAttributes", "Attributes", Form))
.mappedBy(new DMRMapping()
.addAttributes(
"worker", "enabled",
"socket-binding", "buffer-pool", "security-realm"
)