public Dialog build()
{
String ns = "org.jboss.undertow";
// entities
Mapping global = new DMRMapping()
.setAddress("/{selected.profile}/subsystem=undertow");
Container overview = new Container(ns, "undertow", "Undertow Subsytem", Choice, StereoTypes.EditorPanel);
Container handler = new Container(ns, "handler", "Handler", Choice, Pages);
Container filter = new Container(ns, "filter", "Filter", Concurrency);
Container errorHandler = new Container(ns, "errorHandler", "Error Handler", Concurrency);
Container fileHandler = new Container(ns, "undertow#fileHandler", "File Handler", Concurrency);
/*Container attributes = new Container(ns, "undertow#basicAttributes", "Attributes",Form);
Mapping basicAttributesMapping = new DMRMapping()
.addAttributes(
"default-server", "instance-id",
"default-virtual-host", "default-servlet-container"
);*/
// structure & mapping
InteractionUnit root = new Builder()
.start(overview)
.mappedBy(global)
// handler section
.start(handler)
.start(fileHandler)
.add(new Select(ns, "fileHandler", "FileHandlerSelection"))
.mappedBy(
new DMRMapping()
.setAddress("/{selected.profile}/subsystem=undertow/configuration=handler/file=*")
.addAttributes("entity.key", "path")
)
.add(new Container(ns, "undertow#fileAttributes", "Attributes",Form))
.mappedBy(new DMRMapping()
.setAddress("/{selected.profile}/subsystem=undertow/configuration=handler/file={selected.entity}")
.addAttributes("path", "directory-listing", "cache-buffer-size", "cache-buffers")
)
.end()
.end()