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.Concurrency);


        Container attributes = new Container(ns, "servletContainer#attributes", "Common", 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)
                        .start(new Container(ns, "details", "Details", Choice))
                            .add(attributes).mappedBy(attributesMapping)
                            .add(jsp).mappedBy(jspAtts)
                            .add(other).mappedBy(otherAtts)
                        .end()
                .end()
View Full Code Here


                .addAttributes("process-id-uuid", "process-id-socket-binding");

        Mapping recoveryMapping = new DMRMapping()
                .addAttributes("recovery-listener", "socket-binding");

        Container overview = new Container(ns, "transactionManager", "TransactionManager");

        Container basicAttributes = new Container(ns, "transactionManager#basicAttributes", "Attributes",Form);

        Container details = new Container(ns, "configGroups", "Details", Choice);

        Container processAttributes = new Container(ns, "transactionManager#processAttributes", "Process ID",Form);

        Container recoveryAttributes = new Container(ns, "transactionManager#recoveryAttributes", "Recovery",Form);

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

        Mapping bufferPoolMapping = new DMRMapping()
                .setAddress("/{selected.profile}/subsystem=io/buffer-pool=*")
                .addAttributes("entity.key");

        // top level containers
        Container overview = new Container(ns, "io-subsystem", "IO Subsystem", EditorPanel);
        Container editors = new Container(ns, "editors", "Editors", Choice);

        // worker master detail
        Select workerList = new Select(ns, "worker", "Worker");
        Container workerDetails = new Container(ns, "workerDetails", "Details", Form);

        // buffer pool master detail
        Select bufferList = new Select(ns, "buffer", "Buffer Pool");
        Container bufferDetails = new Container(ns, "bufferDetails", "Details", Form);

        DMRMapping workerInstance = new DMRMapping().setAddress("/{selected.profile}/subsystem=io/worker={selected.entity}");
        DMRMapping bufferInstance = new DMRMapping().setAddress("/{selected.profile}/subsystem=io/buffer-pool={selected.entity}");

        // structure & mapping

        InteractionUnit root = new Builder()
                .start(overview).mappedBy(global)
                    .start(editors)
                        .start(new Container(ns,"workers", "Worker"))


                .start(new Container<StereoTypes>(ns, "worker-tools", "Tools", Toolstrip))
                    .mappedBy(workerInstance)
                    .add(new Trigger(
                            QName.valueOf(ns+".worker:add"),
                            QName.valueOf("org.jboss.as:resource-operation#add"),
                            "Add"))
                            .mappedBy(workerMapping)

                    .add(new Trigger(
                            QName.valueOf(ns+"worker:remove"),
                            QName.valueOf("org.jboss.as:resource-operation#remove"),
                            "Remove"))
                .end()

                .add(workerList).mappedBy(workerMapping)
                            .add(workerDetails).mappedBy(workerInstance)
                        .end()
                        .start(new Container(ns,"buffers", "Buffer Pools"))

                .start(new Container<StereoTypes>(ns, "buffer-tools", "Tools", Toolstrip))
                    .mappedBy(bufferInstance)
                        .add(new Trigger(
                                QName.valueOf(ns+".buffer:add"),
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

        // 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)
                                .add(new Container<StereoTypes>(namespace, "datasource#securityAttributes", "Security", Form))
                                                    .mappedBy(securityAttributesMapping)
                        .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

        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

        el.setAttribute("id", unit.getId().getLocalPart());
        el.setAttribute("label", unit.getLabel());

        if(unit instanceof Container)
        {
            Container container = (Container)unit;
            if(container.getTemporalOperator()!=null) {
                el.setAttribute("operator", container.getTemporalOperator().toString());
            }
        }
        else if(unit instanceof Trigger)
        {
            Trigger trigger = (Trigger)unit;
View Full Code Here

        String label = ParseUtils.IDOrLabel(node);

        if("container".equals(name))
        {
            String op = ParseUtils.failSafe(node.getAttributes().getNamedItem("operator"), TemporalOperator.Concurrency.toString());
            unit = new Container(
                    id.getNamespaceURI(), id.getLocalPart(),
                    label,
                    TemporalOperator.valueOf(op)
            );
View Full Code Here

    public InteractionUnit fromXML(Node node) {

        String label = ParseUtils.IDOrLabel(node);

        QName id = new QName(node.getNamespaceURI(), node.getAttributes().getNamedItem("id").getNodeValue());
        Container form = new Container(
                id.getNamespaceURI(), id.getLocalPart(),
                label,
                StereoTypes.PullDown);
        return form;
    }
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.