Package org.drools.ide.common.client.modeldriven.dt52

Examples of org.drools.ide.common.client.modeldriven.dt52.ActionInsertFactCol52


                              final ActionInsertFactCol52 col,
                              final boolean isNew) {
        this.setModal( false );
        this.model = model;
        this.sce = sce;
        this.editingCol = new ActionInsertFactCol52();
        editingCol.setBoundName( col.getBoundName() );
        editingCol.setType( col.getType() );
        editingCol.setFactField( col.getFactField() );
        editingCol.setFactType( col.getFactType() );
        editingCol.setHeader( col.getHeader() );
View Full Code Here


        ListBox patterns = new ListBox();

        for ( Object o : model.getActionCols() ) {
            ActionCol52 col = (ActionCol52) o;
            if ( col instanceof ActionInsertFactCol52 ) {
                ActionInsertFactCol52 c = (ActionInsertFactCol52) col;
                if ( !vars.contains( c.getBoundName() ) ) {
                    patterns.addItem( c.getFactType()
                                              + " ["
                                              + c.getBoundName()
                                              + "]",
                                      c.getFactType()
                                              + " "
                                              + c.getBoundName() );
                    vars.add( c.getBoundName() );
                }
            }

        }
View Full Code Here

    }

    @UiHandler(value = "btnAdd")
    public void btnAddClick(ClickEvent event) {
        for ( AvailableField f : availableFieldsSelections ) {
            ActionInsertFactCol52 a = new ActionInsertFactCol52();
            a.setBoundName( chosenPatternsSelection.getBoundName() );
            a.setFactField( f.getName() );
            a.setType( f.getType() );
            chosenFields.add( a );
        }
        setChosenFields( chosenFields );
        presenter.stateChanged();
    }
View Full Code Here

        for ( ActionCol52 a : dtable.getActionCols() ) {
            if ( a instanceof ActionSetFieldCol52 ) {
                ActionSetFieldCol52 afc = (ActionSetFieldCol52) a;
                addColumn( afc );
            } else if ( a instanceof ActionInsertFactCol52 ) {
                ActionInsertFactCol52 aif = (ActionInsertFactCol52) a;
                addColumn( aif );
            }
        }
    }
View Full Code Here

        view.setAvailableFactTypes( availableTypes );

        //Existing ActionInsertFactCols (should be empty for a new Decision Table)
        for ( ActionCol52 a : dtable.getActionCols() ) {
            if ( a instanceof ActionInsertFactCol52 ) {
                ActionInsertFactCol52 aif = (ActionInsertFactCol52) a;
                ActionInsertFactFieldsPattern p = lookupExistingInsertFactPattern( aif.getBoundName() );
                List<ActionInsertFactCol52> actions = patternToActionsMap.get( p );
                getValidator().addActionPattern( p );
                actions.add( aif );
            }
        }
View Full Code Here

        con4.setFactField( "(not needed)" );
        p2.getConditions().add( con4 );

        dt.getConditionPatterns().add( p2 );

        ActionInsertFactCol52 ins = new ActionInsertFactCol52();
        ins.setBoundName( "ins" );
        ins.setFactType( "Cheese" );
        ins.setFactField( "price" );
        ins.setType( SuggestionCompletionEngine.TYPE_NUMERIC );
        dt.getActionCols().add( ins );

        ActionRetractFactCol52 ret = new ActionRetractFactCol52();
        ret.setBoundName( "f2" );
        dt.getActionCols().add( ret );
View Full Code Here

        con4.setFactField( "(not needed)" );
        p1.getConditions().add( con4 );

        dt.getConditionPatterns().add( p1 );

        ActionInsertFactCol52 ins = new ActionInsertFactCol52();
        ins.setBoundName( "ins" );
        ins.setFactType( "Cheese" );
        ins.setFactField( "price" );
        ins.setType( SuggestionCompletionEngine.TYPE_NUMERIC );
        dt.getActionCols().add( ins );

        ActionRetractFactCol52 ret = new ActionRetractFactCol52();
        ret.setBoundName( "f2" );
        dt.getActionCols().add( ret );
View Full Code Here

        con4.setFactField( "this.hasSomething($param)" );
        p2.getConditions().add( con4 );

        dt.getConditionPatterns().add( p2 );

        ActionInsertFactCol52 ins = new ActionInsertFactCol52();
        ins.setBoundName( "ins" );
        ins.setFactType( "Cheese" );
        ins.setFactField( "price" );
        ins.setType( SuggestionCompletionEngine.TYPE_NUMERIC );
        dt.getActionCols().add( ins );

        ActionRetractFactCol52 ret = new ActionRetractFactCol52();
        ret.setBoundName( "f2" );
        dt.getActionCols().add( ret );
View Full Code Here

        ActionRetractFactCol52 ret = new ActionRetractFactCol52();
        ret.setBoundName( "ret" );
        cols.add( ret );

        ActionInsertFactCol52 ins1 = new ActionInsertFactCol52();
        ins1.setBoundName( "ins" );
        ins1.setFactType( "Cheese" );
        ins1.setFactField( "price" );
        ins1.setType( SuggestionCompletionEngine.TYPE_NUMERIC );
        cols.add( ins1 );

        ActionInsertFactCol52 ins2 = new ActionInsertFactCol52();
        ins2.setBoundName( "ins" );
        ins2.setFactType( "Cheese" );
        ins2.setFactField( "type" );
        ins2.setType( SuggestionCompletionEngine.TYPE_NUMERIC );
        cols.add( ins2 );

        RuleModel rm = new RuleModel();
        allColumns.addAll( cols );
View Full Code Here

    @Test
    public void testRoundTrip() {

        GuidedDecisionTable52 dt = new GuidedDecisionTable52();

        dt.getActionCols().add( new ActionInsertFactCol52() );
        ActionSetFieldCol52 set = new ActionSetFieldCol52();
        set.setFactField( "foo" );
        dt.getActionCols().add( set );

        dt.getMetadataCols().add( new MetadataCol52() );
View Full Code Here

TOP

Related Classes of org.drools.ide.common.client.modeldriven.dt52.ActionInsertFactCol52

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.