Package org.jboss.mbui.model.mapping.as7

Examples of org.jboss.mbui.model.mapping.as7.AddressMapping$Memory


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


    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

    }

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

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

    }
View Full Code Here

        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

    }

    @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

    DMRMapping cut;

    @Before
    public void setUp()
    {
        cut = new DMRMapping();
    }
View Full Code Here

    }

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

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

        // check preconditions of the address token
        final Set<String> requiredStatements = address.getRequiredStatements();

        // any value expression key becomes a precondition matched against the statement context
View Full Code Here

TOP

Related Classes of org.jboss.mbui.model.mapping.as7.AddressMapping$Memory

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.