Package org.drools.workbench.models.testscenarios.shared

Examples of org.drools.workbench.models.testscenarios.shared.FieldData


                        getClassLoader(),
                        new FactData(
                                "Cheese",
                                "x",
                                Arrays.<Field>asList(
                                        new FieldData(
                                                "type",
                                                null ),
                                        new FieldData(
                                                "price",
                                                "42" ) ),
                                false ) ) );

        factPopulator.populate();
View Full Code Here


                        getClassLoader(),
                        new FactData(
                                "Cheese",
                                "c1",
                                Arrays.<Field>asList(
                                        new FieldData(
                                                "type",
                                                "cheddar" ),
                                        new FieldData(
                                                "usedBy",
                                                "10-Jul-2008" ) ),
                                false ) ) );
        factPopulator.add(
                new NewFactPopulator(
                        populatedData,
                        getTypeResolver(),
                        getClassLoader(),
                        new FactData(
                                "OuterFact",
                                "p1",
                                Arrays.<Field>asList(
                                        new FieldData(
                                                "name",
                                                "mic" ),
                                        new FieldData(
                                                "innerFact",
                                                "=c1" ) ),
                                false ) ) );

        factPopulator.populate();
View Full Code Here

                        getClassLoader(),
                        new FactData(
                                "SqlDateWrapper",
                                "c1",
                                Arrays.<Field>asList(
                                        new FieldData(
                                                "sqlDate",
                                                "10-Jul-2008" ) ),
                                false ) ) );

        factPopulator.populate();
View Full Code Here

                        getTypeResolver(),
                        getClassLoader(),
                        new FactData( "Cheese",
                                      "c1",
                                      Arrays.<Field>asList(
                                              new FieldData(
                                                      "type",
                                                      "cheddar" ),
                                              new FieldData(
                                                      "price",
                                                      "42" ) ),
                                      false ) ) );
        factPopulator.add(
                new NewFactPopulator(
                        populatedData,
                        getTypeResolver(),
                        getClassLoader(),
                        new FactData(
                                "Cheese",
                                "c2",
                                Arrays.<Field>asList(
                                        new FieldData(
                                                "type",
                                                "= c1.type" ) ),
                                false ) ) );

        factPopulator.populate();
View Full Code Here

                        getClassLoader(),
                        new FactData(
                                "Cheese",
                                "x",
                                Arrays.<Field>asList(
                                        new FieldData(
                                                "type",
                                                "" ),
                                        new FieldData(
                                                "price",
                                                "42" ) ),
                                false ) ) );

        factPopulator.populate();
View Full Code Here

        TypeResolver typeResolver = getTypeResolver();

        FactData fd1 = new FactData( "Cheese",
                                     "f1",
                                     Arrays.<Field>asList(
                                             new FieldData( "type",
                                                            "" ),
                                             new FieldData( "price",
                                                            "42" ) ),
                                     false );

        factPopulator.add( new NewFactPopulator( populatedData, typeResolver, getClassLoader(), fd1 ) );

        FactData fd2 = new FactData( "Cheese",
                                     "f2",
                                     Arrays.<Field>asList(
                                             new FieldData( "type",
                                                            "" ),
                                             new FieldData( "price",
                                                            "43" ) ),
                                     false );
        factPopulator.add( new NewFactPopulator( populatedData, typeResolver, getClassLoader(), fd2 ) );

        FactData fd3 = new FactData( "Cheese",
                                     "f3",
                                     Arrays.<Field>asList(
                                             new FieldData( "type",
                                                            "" ),
                                             new FieldData( "price",
                                                            "45" ) ),
                                     false );

        factPopulator.add( new NewFactPopulator( populatedData, typeResolver, getClassLoader(), fd3 ) );

        FieldData field = new FieldData();
        field.setName( "cheeses" );
        field.setNature( FieldData.TYPE_COLLECTION );
        field.setValue( "=[f1,f2,f3]" );
        List<Field> lstField = new ArrayList<Field>();
        lstField.add( field );
        FactData lst = new FactData( "Cheesery",
                                     "listChesse",
                                     lstField,
View Full Code Here

        List<Field> fieldData = new ArrayList<Field>();
        CollectionFieldData collectionFieldData = new CollectionFieldData();
        collectionFieldData.setName( "cheeses" );
        fieldData.add( collectionFieldData );
        collectionFieldData.getCollectionFieldList().add( new FieldData( "cheeses", "=cheese1" ) );
        collectionFieldData.getCollectionFieldList().add( new FieldData( "cheeses", "=cheese2" ) );

        FactData cheeseryFactData = new FactData(
                "Cheesery",
                "cheesery",
                fieldData,
View Full Code Here

        List<Field> fieldData = new ArrayList<Field>();
        CollectionFieldData collectionFieldData = new CollectionFieldData();
        collectionFieldData.setName( "list" );
        fieldData.add( collectionFieldData );
        collectionFieldData.getCollectionFieldList().add( new FieldData( "list", "=1+3" ) );

        FactData wrapperFactData = new FactData(
                "MyCollectionWrapper",
                "wrapper",
                fieldData,
View Full Code Here

        parent.renderEditor();
    }

    @UiHandler("newItemBelow")
    public void newItemBelow( final ClickEvent event ) {
        FieldData newFieldData = new FieldData();
        newFieldData.setName( parentField.getName() );
        parentField.getCollectionFieldList().add( index + 1,
                                                  newFieldData );
        parent.renderEditor();
    }
View Full Code Here

    }

    @UiHandler("suffleDown")
    public void suffleDown( final ClickEvent event ) {
        if ( index < parentField.getCollectionFieldList().size() - 1 ) {
            FieldData onMyLine = parentField.getCollectionFieldList().get( index );
            FieldData onDown = parentField.getCollectionFieldList().get( index + 1 );
            parentField.getCollectionFieldList().set( index + 1,
                                                      onMyLine );
            parentField.getCollectionFieldList().set( index,
                                                      onDown );
            parent.renderEditor();
View Full Code Here

TOP

Related Classes of org.drools.workbench.models.testscenarios.shared.FieldData

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.