Examples of DMRMapping


Examples of org.jboss.as.console.mbui.model.mapping.DMRMapping

    public Dialog build()
    {
        String namespace = "org.jboss.datasource";

        // maps to a collection of datasources
        DMRMapping datasourceCollection = new DMRMapping()
                .setAddress("/{selected.profile}/subsystem=datasources/data-source=*");

        // maps to a specific datasource
        DMRMapping singleDataSource = new DMRMapping()
                .setAddress("/{selected.profile}/subsystem=datasources/data-source={selected.entity}");

        Mapping tableMapping = new DMRMapping()
                .addAttributes("entity.key","jndi-name", "enabled");

        Mapping basicAttributesMapping = new DMRMapping()
                .addAttributes("entity.key", "jndi-name", "enabled", "datasource-class", "driver-name", "share-prepared-statements",
                        "prepared-statements-cache-size");

        Mapping connectionAttributesMapping = new DMRMapping()
                .addAttributes("connection-url", "new-connection-sql", "transaction-isolation", "jta", "use-ccm");

        // UI
        InteractionUnit root = new Builder()
                .start(new Container<StereoTypes>(namespace, "datasources", "Datasources", Choice, EditorPanel))
View Full Code Here

Examples of org.jboss.as.console.mbui.model.mapping.DMRMapping

    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",  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()

                    .end()
View Full Code Here

Examples of org.jboss.as.console.mbui.model.mapping.DMRMapping

                    if (!context.has(MODEL_DESCRIPTIONS))
                    {
                        context.set(MODEL_DESCRIPTIONS, new HashMap<QName, ModelNode>());
                    }

                    DMRMapping mapping = (DMRMapping) visitor.stepReference.get(step).findMapping(DMR);
                    context.<Map>get(MODEL_DESCRIPTIONS).put(mapping.getCorrelationId(), description);
                }
                callback.onSuccess();
            }
        });
    }
View Full Code Here

Examples of org.jboss.as.console.mbui.model.mapping.DMRMapping

            InteractionCoordinator coordinator = context.get(ContextKey.COORDINATOR);

            final StatementContext delegate = coordinator.getDialogState().getContext(interactionUnit.getId());
            assert delegate != null : "StatementContext not provided";

            DMRMapping mapping = (DMRMapping) interactionUnit.findMapping(DMR, new Predicate<DMRMapping>()
            {
                @Override
                public boolean appliesTo(final DMRMapping candidate)
                {
                    // the read-resource operation only needs the address of a resource
                    // hence we can skip mapping without address declarations (i.e. just attributes)
                    return candidate.getAddress() != null;
                }
            });
            if (mapping != null)
            {
                String address = mapping.getResolvedAddress();
                if (!resolvedAdresses.contains(address))
                {
                    AddressMapping addressMapping = AddressMapping.fromString(address);
                    ModelNode op = addressMapping.asResource(new DelegatingStatementContext()
                    {
View Full Code Here

Examples of org.jboss.as.console.mbui.model.mapping.DMRMapping

            String operationName = output.getId().getSuffix();
            if(operationName==null)
                throw new IllegalArgumentException("Illegal operation name mapping: "+ output.getId()+ " (suffix required)");

            DMRMapping mapping = interactionUnit.findMapping(DMR);
            String address = mapping.getResolvedAddress();

            if (!resolvedOperations.contains(output.getId()))
            {
                AddressMapping addressMapping = AddressMapping.fromString(address);
                ModelNode op = addressMapping.asResource(new DelegatingStatementContext()
View Full Code Here

Examples of org.jboss.as.console.mbui.model.mapping.DMRMapping

    }

    private void init() {
        unit = dialog.findUnit(getJustification());

        DMRMapping mapping = (DMRMapping) unit.findMapping(MappingType.DMR);
        address = AddressMapping.fromString(mapping.getResolvedAddress());

    }
View Full Code Here

Examples of org.jboss.as.console.mbui.model.mapping.DMRMapping

        final ModelNode operationDescription = context.getOperationDescriptions().get(output.getId());

        assert operationDescription!=null : "Operation meta data required for "+output.getId() + " on "+context.getUnit().getId();

        final List<Property> parameterMetaData = operationDescription.get("request-properties").asPropertyList();
        DMRMapping mapping = (DMRMapping) unit.findMapping(MappingType.DMR);
        String address = mapping.getAddress();

        Delegation delegation = null;

        if(parameterMetaData.isEmpty())
        {
View Full Code Here

Examples of org.jboss.as.console.mbui.model.mapping.DMRMapping

    public Dialog build()
    {
        String ns = "org.jboss.undertow.servlet";

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

Examples of org.jboss.as.console.mbui.model.mapping.DMRMapping

    public Dialog build()
    {
        String ns = "org.jboss.undertow.server";

        // 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

Examples of org.jboss.as.console.mbui.model.mapping.DMRMapping

    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",  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()

                    .end()
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.