Package org.useware.kernel.model.structure

Examples of org.useware.kernel.model.structure.Container


        // entities
        Mapping global = new DMRMapping()
                .setAddress("/{selected.profile}/subsystem=undertow/servlet-container=default/setting=jsp");


        Container overview = new Container(ns, "servletContainer", "Servlet Container", TemporalOperator.Choice, StereoTypes.EditorPanel);


        Container attributes = new Container(ns, "servletContainer#attributes", "JSP Settings", Form);
        Mapping attributesMapping = new DMRMapping()
                .addAttributes(
                        "trim-spaces", "smap",
                        "development", "keep-generated",
                        "recompile-on-fail","check-interval",
View Full Code Here


        // 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()
View Full Code Here

        void addInteractionUnitRow(InteractionUnit interactionUnit)
        {
            String id = interactionUnit.getId().toString();
            String name = interactionUnit.getLabel() == null ? interactionUnit.getId().getLocalPart() : interactionUnit.getLabel();

            Container container = this.container.isEmpty() ? null : this.container.peek();
            String parentId = container != null ? container.getId().toString() : null;

            // default activation
            BranchActivation activation = new BranchActivation();
            dialog.getInterfaceModel().accept(activation);
            Map<Integer,QName> activeItems = activation.getActiveItems();
View Full Code Here

    int max = 0;

    @Override
    public void startVisit(Container container) {

        Container prev = null;
        if(!stack.isEmpty())
            prev = stack.peek();

        stack.push(container);

        if(null==prev)
        {
            // the topmost element is always active
            activeItems.put(0, container.getId());
        }
        else if(prev.getTemporalOperator().isScopeBoundary()
                && !pastPivot)
        {
            // select first child and skip the remaining ones
            QName activeChild = activeItems.get(stack.size()-1);
            if(null==activeChild)
View Full Code Here

        void addInteractionUnitRow(InteractionUnit interactionUnit)
        {
            String id = interactionUnit.getId().toString();
            String name = interactionUnit.getLabel() == null ? interactionUnit.getId().getLocalPart() : interactionUnit.getLabel();

            Container container = this.container.isEmpty() ? null : this.container.peek();
            String parentId = container != null ? container.getId().toString() : null;

            // default activation
            BranchActivation activation = new BranchActivation();
            dialog.getInterfaceModel().accept(activation);
            Map<Integer,QName> activeItems = activation.getActiveItems();
View Full Code Here

        // UI
        InteractionUnit root = new Builder()
                .start(new Container<StereoTypes>(namespace, "datasources", "Datasources", Choice, EditorPanel))
                .mappedBy(datasourceCollection)

                    .start(new Container(namespace, "regularDS", "Regular", Concurrency))


                        // TODO: support anonymous trigger id's? This would reduce the verbosity of these declarations.
                        // Might be derived from the surrounding scope of the interaction unit. I.e. dialog ID + UUID

                        .start(new Container<StereoTypes>(namespace, "tools", "Tools", Toolstrip))
                            .mappedBy(singleDataSource)
                            .add(new Trigger(
                                    QName.valueOf("org.jboss.datasource:add"),
                                    QName.valueOf("org.jboss.as:resource-operation#add"),
                                    "Add"))
                                    .mappedBy(datasourceCollection)

                            .add(new Trigger(
                                    QName.valueOf("org.jboss.datasource:remove"),
                                    QName.valueOf("org.jboss.as:resource-operation#remove"),
                                    "Remove"))
                            .add(new Trigger(
                                    QName.valueOf("org.jboss.datasource:enable"),
                                    QName.valueOf("org.jboss.as:resource-operation#enable"),
                                    "Enable"))

                            .add(new Trigger(
                                    QName.valueOf("org.jboss.datasource:disable"),
                                    QName.valueOf("org.jboss.as:resource-operation#disable"),
                                    "Disable"))
                        .end()


                        .add(new Select(namespace, "list", "List"))
                            .mappedBy(tableMapping)

                        .start(new Container(namespace, "details", "Details", Choice))
                            .mappedBy(singleDataSource)
                                .add(new Container<StereoTypes>(namespace, "datasource#basicAttributes", "Attributes", Form))
                                    .mappedBy(basicAttributesMapping)
                                .add(new Container<StereoTypes>(namespace, "datasource#connectionAttributes", "Connection", Form))
                                    .mappedBy(connectionAttributesMapping)
                        .end()
                    .end()

                    .start(new Container(namespace, "xsDS", "XA", Concurrency))
                    .end()

                .end()

                .build();
View Full Code Here

        // 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",  Choice, Pages);
        Container errorHandler = new Container(ns, "errorHandler", "Error Handler", Choice, Pages);
        Container fileHandler = new Container(ns, "undertow#fileHandler", "File Handler", Concurrency);


        // structure & mapping
        InteractionUnit root = new Builder()
                .start(overview)
                    .mappedBy(global)

                    .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}")
                                   )
                        .end()
                    .end()


                    .start(errorHandler)
                        .start(new Container(ns, "undertow#error", "Error Pages", Concurrency))
                            .add(new Select(ns, "errorHandler", "ErrorHandlerSelection"))
                                .mappedBy(
                                    new DMRMapping()
                                        .setAddress("/{selected.profile}/subsystem=undertow/configuration=error-handler/error-page=*")
                                        .addAttributes("entity.key", "path")
                                )
                            .add(new Container(ns, "undertow#errorHandlerAttributes", "Attributes",Form))
                                .mappedBy(new DMRMapping()
                                    .setAddress("/{selected.profile}/subsystem=undertow/configuration=error-handler/error-page={selected.entity}")
                                )
                        .end()
                    .end()


                    .start(filter)
                        .start(new Container(ns, "undertow#basicAuth", "Basic Auth", Concurrency))
                            .add(new Select(ns, "undertow#basicAuthSelection", "BasicAuthSelection"))
                               .mappedBy(
                                   new DMRMapping()
                                    .setAddress("/{selected.profile}/subsystem=undertow/configuration=filter/basic-auth=*")
                                    .addAttributes("entity.key")
                                    )
                            .add(new Container(ns, "undertow#filterAuthAttributes", "Attributes",Form))
                                .mappedBy(new DMRMapping()
                                    .setAddress("/{selected.profile}/subsystem=undertow/configuration=filter/basic-auth={selected.entity}")
                                   )
                        .end()

                        .start(new Container(ns, "undertow#connectionLimit", "Connection Limit", Concurrency))
                            .add(new Select(ns, "undertow#connectionLimitSelection", "connectionLimitSelection"))
                               .mappedBy(
                                   new DMRMapping()
                                        .setAddress("/{selected.profile}/subsystem=undertow/configuration=filter/connection-limit=*")
                                        .addAttributes("entity.key")
                                    )
                            .add(new Container(ns, "undertow#connectionLimitAttributes", "Attributes",Form))
                                .mappedBy(new DMRMapping()
                                  .setAddress("/{selected.profile}/subsystem=undertow/configuration=filter/connection-limit={selected.entity}")
                               )
                        .end()

View Full Code Here

        // entities
        Mapping global = new DMRMapping()
                .setAddress("/{selected.profile}/subsystem=undertow/servlet-container=default/setting=jsp");


        Container overview = new Container(ns, "servletContainer", "Servlet Container", TemporalOperator.Concurrency);


        Container attributes = new Container(ns, "servletContainer#attributes", "Servlet Container", Form);

        Container jsp = new Container(ns, "servletContainer#jsp", "JSP Settings", Form);
        Container other = new Container(ns, "servletContainer#other", "Other", Form);

        Mapping attributesMapping = new DMRMapping()
                .addAttributes(
                        "development", "disabled"
                );

        // structure & mapping
        DMRMapping jspAtts = new DMRMapping()
                .addAttributes(
                        "trim-spaces",
                        "recompile-on-fail", "check-interval",
                        "modification-test-interval",
                        "display-source-fragment", "error-on-use-bean-invalid-class-attribute",
                        "java-encoding", "tag-pooling",
                        "generate-strings-as-char-arrays"
                );

        DMRMapping otherAtts = new DMRMapping()
                .addAttributes(
                        "smap",
                        "keep-generated",
                        "scratch-dir",
                        "display-source-fragment", "error-on-use-bean-invalid-class-attribute",
                        "target-vm",
                        "x-powered-by", "dump-smap",
                        "mapped-file",
                        "source-vm"

                );

        InteractionUnit root = new Builder()
                .start(overview)
                    .mappedBy(global)
                    .add(attributes).mappedBy(attributesMapping)
                        .start(new Container(ns, "details", "Details", Choice))
                            .add(jsp).mappedBy(jspAtts)
                            .add(other).mappedBy(otherAtts)
                        .end()
                .end()
                .build();
View Full Code Here

        // 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"
                                             )
View Full Code Here

        // 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",  Choice, Pages);
        Container errorHandler = new Container(ns, "errorHandler", "Error Handler", Choice, Pages);
        Container fileHandler = new Container(ns, "undertow#fileHandler", "File Handler", Concurrency);


        // structure & mapping
        InteractionUnit root = new Builder()
                .start(overview)
                    .mappedBy(global)

                    .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}")
                                   )
                        .end()
                    .end()


                    /*.start(errorHandler)
                        .start(new Container(ns, "undertow#error", "Error Pages", Concurrency))
                            .add(new Select(ns, "errorHandler", "ErrorHandlerSelection"))
                                .mappedBy(
                                    new DMRMapping()
                                        .setAddress("/{selected.profile}/subsystem=undertow/configuration=error-handler/error-page=*")
                                        .addAttributes("entity.key", "path")
                                )
                            .add(new Container(ns, "undertow#errorHandlerAttributes", "Attributes",Form))
                                .mappedBy(new DMRMapping()
                                    .setAddress("/{selected.profile}/subsystem=undertow/configuration=error-handler/error-page={selected.entity}")
                                )
                        .end()
                    .end()  */


                    .start(filter)
                        .start(new Container(ns, "undertow#basicAuth", "Basic Auth", Concurrency))
                            .add(new Select(ns, "undertow#basicAuthSelection", "BasicAuthSelection"))
                               .mappedBy(
                                   new DMRMapping()
                                    .setAddress("/{selected.profile}/subsystem=undertow/configuration=filter/basic-auth=*")
                                    .addAttributes("entity.key")
                                    )
                            .add(new Container(ns, "undertow#filterAuthAttributes", "Attributes",Form))
                                .mappedBy(new DMRMapping()
                                    .setAddress("/{selected.profile}/subsystem=undertow/configuration=filter/basic-auth={selected.entity}")
                                   )
                        .end()

                        .start(new Container(ns, "undertow#connectionLimit", "Connection Limit", Concurrency))
                            .add(new Select(ns, "undertow#connectionLimitSelection", "connectionLimitSelection"))
                               .mappedBy(
                                   new DMRMapping()
                                        .setAddress("/{selected.profile}/subsystem=undertow/configuration=filter/connection-limit=*")
                                        .addAttributes("entity.key")
                                    )
                            .add(new Container(ns, "undertow#connectionLimitAttributes", "Attributes",Form))
                                .mappedBy(new DMRMapping()
                                  .setAddress("/{selected.profile}/subsystem=undertow/configuration=filter/connection-limit={selected.entity}")
                               )
                        .end()

View Full Code Here

TOP

Related Classes of org.useware.kernel.model.structure.Container

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.