Examples of DMRMapping


Examples of org.jboss.mbui.model.mapping.as7.DMRMapping

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

        // entities
        Mapping global = new DMRMapping()
                .setAddress("/{selected.profile}/subsystem=transactions");

        Mapping basicAttributesMapping = new DMRMapping()
                .addAttributes(
                        "enable-statistics", "enable-tsm-status", "jts", "default-timeout",
                        "node-identifier", "use-hornetq-store");

        Mapping processMapping = new DMRMapping()
                .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);
View Full Code Here

Examples of org.jboss.mbui.model.mapping.as7.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.mbui.model.mapping.as7.DMRMapping

        {
            this.panel = new VerticalPanel();
            this.table = new ModelNodeCellTable(5);
            this.interactionUnit = interactionUnit;

            DMRMapping DMRMapping = this.interactionUnit.findMapping(MappingType.DMR);

            List<ResourceAttribute> attributes = DMRMapping.getAttributes();
            for (ResourceAttribute attribute : attributes)
            {
                final String attributeKey = attribute.getLabel() != null ? attribute.getLabel() : attribute.getName();
                // TODO: How doe we resolve the column names?
                // See "entity.key" usage as well
View Full Code Here

Examples of org.jboss.mbui.model.mapping.as7.DMRMapping

    private Dialog build()
    {
        String namespace = "org.jboss.security.domain";

        // Mappings
        DMRMapping securityDomainsCollection = new DMRMapping()
                .setAddress("/{selected.profile}/subsystem=security/security-domain=*");

        // maps to a specific security domain
        DMRMapping singleSecurityDomain = new DMRMapping()
                .setAddress("/{selected.profile}/subsystem=security/security-domain={selected.entity}");

        Mapping tableMapping = new DMRMapping()
                .addAttributes("entity.key");

        Mapping attributesMapping = new DMRMapping()
                .addAttributes("entity.key", "cache-type");

        // Interaction units
        InteractionUnit<StereoTypes> root = new Builder()
                .start(new Container(namespace, "securityDomains", "Security Domains", Choice, EditorPanel))
                    .mappedBy(securityDomainsCollection)

                    // The front "page"
                    .start(new Container(namespace, "availableDomains", "Available Domains", Concurrency))
                        .start(new Container(namespace, "tools", "Tools", Toolstrip))
                            .mappedBy(singleSecurityDomain)
                            .add(new Trigger(
                                    QName.valueOf(namespace + ":add"),
                                    QName.valueOf("org.jboss.as:resource-operation#add"),
                                    "Add"))
                                .mappedBy(securityDomainsCollection)
                            .add(new Trigger(
                                    QName.valueOf(namespace + ":remove"),
                                    QName.valueOf("org.jboss.as:resource-operation#remove"),
                                    "Remove"))
                        .end()

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

                        .start(new Container(namespace, "details", "Details", Choice))
                            .mappedBy(singleSecurityDomain)
                            .add(new Container(namespace, "details#attributes", "Attributes", Form))
                                .mappedBy(attributesMapping)
                        .end()
                    .end()

                    // The actual pages

                    .start(new Container(namespace, "domainConfiguration", "Domain Configuration", Concurrency))

                        .add(new Select(namespace, "domainSelection", "Select Domain", PullDown))
                            .mappedBy(tableMapping)

                        .start(new Container(namespace, "securityModules", "Security Modules", Choice, Pages))

                            // Authentication
                           .start(new Container(namespace + ".authentication", "authentication", "Authentication"))
                                .start(new Container(namespace + ".authentication", "tools", "Tools", Toolstrip))
                                    .add(new Trigger(
                                            QName.valueOf(namespace + ".authentication:add"),
                                            QName.valueOf("org.jboss.as:resource-operation#add"),
                                            "Add"))
                                    .add(new Trigger(
                                            QName.valueOf(namespace + ".authentication:remove"),
                                            QName.valueOf("org.jboss.as:resource-operation#remove"),
                                            "Remove"))
                                .end()
                                .add(new Select(namespace + ".authentication", "loginModules", "Login Modules"))
                                    .mappedBy(new DMRMapping()
                                            .setAddress("/{selected.profile}/subsystem=security/security-domain={selected.entity}/authentication=classic/login-module=*")
                                            .addAttributes("code", "flag"))

                                .start(new Container(namespace + ".authentication", "details", "Details", Choice))
                                    .add(new Container(namespace + ".authentication", "details#basicAttributers", "Attributes", Form))
                                       .mappedBy(new DMRMapping()
                                        .setAddress("/{selected.profile}/subsystem=security/security-domain={selected.entity}/authentication=classic/login-module={selected.entity}")
                                        .addAttributes("code", "flag", "module"))

                                    .add(new Select(namespace + ".authentication", "moduleOptions", "Module Options"))
                                .end()
                            .end()

                            // Authorization
                            .start(new Container(namespace + ".authorization", "authorization", "Authorization"))

                                .start(new Container<StereoTypes>(namespace + ".authorization", "tools", "Tools", Toolstrip))
                                    .add(new Trigger(
                                            QName.valueOf(namespace + ".authorization:add"),
                                            QName.valueOf("org.jboss.as:resource-operation#add"),
                                            "Add"))
                                    .add(new Trigger(
                                            QName.valueOf(namespace + ".authorization:remove"),
                                            QName.valueOf("org.jboss.as:resource-operation#remove"),
                                            "Remove"))
                                .end()
                                .add(new Select(namespace + ".authorization", "policies", "Policies"))
                                    .mappedBy(new DMRMapping()
                                            .setAddress("/{selected.profile}/subsystem=security/security-domain={selected.entity}/authorization=classic/policy-module=*")
                                            .addAttributes("code", "flag"))

                                .start(new Container(namespace + ".authorization", "details", "Details", Choice))

                                    .add(new Container(namespace + ".authorization", "details#basicAttributers", "Attributes", Form))
                                        .mappedBy(new DMRMapping()
                                                .setAddress("/{selected.profile}/subsystem=security/security-domain={selected.entity}/authorization=classic/policy-module={selected.entity}")
                                                .addAttributes("code", "flag", "module"))
                                    .add(new Select(namespace + ".authorization", "moduleOptions", "Module Options"))
                                .end()
                            .end()
View Full Code Here

Examples of org.jboss.mbui.model.mapping.as7.DMRMapping

    @Before
    public void setUp() throws Exception
    {
        cut = new Builder();
        iuFixture = new TestableInteractionUnit(NAMESPACE, "test", "Test");
        mappingFixture = new DMRMapping();
    }
View Full Code Here

Examples of org.jboss.mbui.model.mapping.as7.DMRMapping

    public void findMapping()
    {
        Container basicAttributes = new Container(NAMESPACE, "basicAttributes", "Basic Attributes");
        InteractionUnit root = new Builder()
                .start(new Container(NAMESPACE, "root", "Root", OrderIndependance))
                    .mappedBy(new DMRMapping().setAddress("root"))
                    .add(new Select(NAMESPACE, "table", "Table"))
                    .start(new Container(NAMESPACE, "forms", "Forms", Choice))
                        .add(basicAttributes)
                        .mappedBy(new DMRMapping().setAddress("basicAttributes"))
                        .add(new Container(NAMESPACE, "extendedAttributes", "Basic Attributes"))
                    .end()
                .end().build();

        // TODO: find resource mapping type & namespace is what we actual needs I think.
        DMRMapping mapping = (DMRMapping) basicAttributes.findMapping(DMR, new Predicate<DMRMapping>() {
            @Override
            public boolean appliesTo(DMRMapping candidate) {
                return true; // candidate.getNamespace().equals(NAMESPACE);
            }
        });
        assertNotNull(mapping);
        assertEquals("basicAttributes", mapping.getAddress());

        mapping = (DMRMapping) basicAttributes.findMapping(DMR, new Predicate<DMRMapping>()
        {
            @Override
            public boolean appliesTo(final DMRMapping candidate)
            {
                return "root".equals(candidate.getAddress());
            }
        });
        assertNotNull(mapping);
        assertEquals("root", mapping.getAddress());
    }
View Full Code Here

Examples of org.jboss.mbui.model.mapping.as7.DMRMapping

    }

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

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

    }
View Full Code Here

Examples of org.jboss.mbui.model.mapping.as7.DMRMapping

        operationName = getId().getSuffix();

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

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


        // TODO: Refactor init procedure into default precondition ...
        // it appears in several procedures
View Full Code Here

Examples of org.jboss.mbui.model.mapping.as7.DMRMapping

    }

    @Test
    public void addMapping()
    {
        DMRMapping mapping = new DMRMapping().setAddress("/foo=bar");
        cut.addMapping(mapping);
        assertEquals(1, cut.getMappings().size());
        assertEquals(mapping, cut.getMappings().iterator().next());
    }
View Full Code Here

Examples of org.jboss.mbui.model.mapping.as7.DMRMapping

    DMRMapping cut;

    @Before
    public void setUp()
    {
        cut = new DMRMapping();
    }
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.