Package org.thechiselgroup.choosel.core.client.visualization.model

Examples of org.thechiselgroup.choosel.core.client.visualization.model.Slot


            Memento child = entry.getValue();

            assert child.getFactoryId() != null : "factory id must not be null ("
                    + child + ")";

            Slot slot = configuration.getSlotById(slotId);
            ManagedVisualItemValueResolver resolver = visualItemResolverFactoryPersistenceManagers
                    .get(child.getFactoryId()).restore(child);

            configuration.setCurrentResolver(slot, resolver);
        }
View Full Code Here


        for (Entry<Slot, VisualItemValueResolver> entry : slotMappingInitializer
                .getResolvers(visualizationModel.getContentResourceSet(),
                        states).entrySet()) {

            Slot slot = entry.getKey();
            VisualItemValueResolver resolver = entry.getValue();

            assert resolver != null;

            // TODO change initializers to return these values
View Full Code Here

    @Before
    public void setUp() {
        MockitoAnnotations.initMocks(this);

        slot = new Slot("1", "Description", DataType.TEXT);

        helper = new DefaultVisualizationModelTestHelper();
        helper.setSlots(slot);
        underTest = helper.createTestVisualizationModel();
        underTest.setResolver(slot, new FixedValueResolver("a", DataType.TEXT));
View Full Code Here

    @Before
    public void setUp() {
        MockitoAnnotations.initMocks(this);

        slots = new Slot[] { new Slot("id-1", "text-slot", DataType.TEXT),
                new Slot("id-2", "number-slot", DataType.NUMBER) };

        resolverProvider = new DefaultVisualItemResolverFactoryProvider();
        slotMappingConfigurationPersistence = new ManagedSlotMappingConfigurationPersistence();

        {
View Full Code Here

    @Before
    public void setUp() {
        MockitoAnnotations.initMocks(this);

        slots = new Slot[] { new Slot(SLOT_ID, "n1", DataType.TEXT) };

        when(persistenceManager.getId()).thenReturn(RESOLVER_ID);

        underTest = new ManagedSlotMappingConfigurationPersistence();
        underTest.registerResolverPersistence(persistenceManager);
View Full Code Here

    @Before
    public void setUp() {
        MockitoAnnotations.initMocks(this);

        slot1 = new Slot("s1", "", DataType.TEXT);
        slot2 = new Slot("s2", "", DataType.TEXT);

        when(visualItem1.getId()).thenReturn("v1");
        when(visualItem2.getId()).thenReturn("v2");

        underTest = new DefaultVisualItemResolutionErrorModel();
View Full Code Here

    @Before
    public void setUp() {
        MockitoAnnotations.initMocks(this);

        numberSlot = new Slot("id-2", "number-slot", DataType.NUMBER);
        resources = new DefaultResourceSet();
        underTest = spy(new DefaultVisualItem(VIEW_ITEM_ID, resources,
                resolverContext, mock(VisualItemInteractionHandler.class)));

        when(resolverContext.getResolver(numberSlot)).thenReturn(resolver);
View Full Code Here

public final class VisualItemValueResolverTestUtils {

    public static Slot[] createSlots(DataType... dataTypes) {
        Slot[] slots = new Slot[dataTypes.length];
        for (int i = 0; i < slots.length; i++) {
            slots[i] = new Slot("slot" + i, "Slot " + i, dataTypes[i]);
        }
        return slots;
    }
View Full Code Here

    @Before
    public void setUp() {
        MockitoAnnotations.initMocks(this);

        fixedSlot = new Slot("s1", "", DataType.NUMBER);
        otherSlot = new Slot("s2", "", DataType.NUMBER);
    }
View Full Code Here

    private PropertyDependantVisualItemValueResolverFactory underTest;

    @Test
    public void cannotCreateResolverForEmptyVisualItemCollection() {
        assertFalse(underTest.canCreateApplicableResolver(new Slot("id",
                "name", DataType.TEXT), LightweightCollections
                .<VisualItem> emptyCollection()));
    }
View Full Code Here

TOP

Related Classes of org.thechiselgroup.choosel.core.client.visualization.model.Slot

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.