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

Examples of org.drools.ide.common.client.modeldriven.dt.ActionSetFieldCol


  public void testRHS() {
    GuidedDTDRLPersistence p = new GuidedDTDRLPersistence();
    String[] row = new String[] {"1", "desc", "a", "a condition", "actionsetfield1", "actionsetfield2", "retract", "actioninsertfact1", "actioninsertfact2"};

    List<ActionCol> cols = new ArrayList<ActionCol>();
    ActionSetFieldCol asf1 = new ActionSetFieldCol();
    asf1.boundName = "a";
    asf1.factField = "field1";

    asf1.type = SuggestionCompletionEngine.TYPE_STRING;
    cols.add(asf1);

    ActionSetFieldCol asf2 = new ActionSetFieldCol();
    asf2.boundName = "a";
    asf2.factField = "field2";
    asf2.update = true;
    asf2.type = SuggestionCompletionEngine.TYPE_NUMERIC;
    cols.add(asf2);
View Full Code Here


    ConditionCol c = new ConditionCol();
    c.boundName = "x";
    c.factType = "Context";
    c.constraintValueType = ISingleFieldConstraint.TYPE_LITERAL;
    dt.conditionCols.add(c);
    ActionSetFieldCol asf = new ActionSetFieldCol();
    asf.boundName = "x";
    asf.factField = "age";
    asf.type = "String";

    dt.actionCols.add(asf);
View Full Code Here

    ConditionCol c = new ConditionCol();
    c.boundName = "x";
    c.factType = "Context";
    c.constraintValueType = ISingleFieldConstraint.TYPE_LITERAL;
    dt.conditionCols.add(c);
    ActionSetFieldCol asf = new ActionSetFieldCol();
    asf.boundName = "x";
    asf.factField = "age";
    asf.type = "String";
    asf.update = true;
View Full Code Here

  public void testRoundTrip() {

    GuidedDecisionTable dt = new GuidedDecisionTable();

    dt.actionCols.add(new ActionInsertFactCol());
    ActionSetFieldCol set = new ActionSetFieldCol();
    set.factField = "foo";
    dt.actionCols.add(set);

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

    assertEquals(1, dt_.attributeCols.size());
    assertEquals(2, dt_.actionCols.size());
    assertEquals(1, dt_.conditionCols.size());

    assertTrue(dt_.actionCols.get(1) instanceof ActionSetFieldCol );
    ActionSetFieldCol asf = (ActionSetFieldCol) dt_.actionCols.get(1);
    assertEquals("foo", asf.factField);
    assertEquals(false, asf.update);
  }
View Full Code Here

        c2.factField = "nothing";
        c2.constraintValueType = ISingleFieldConstraint.TYPE_LITERAL;
        dt.conditionCols.add(c2);


        ActionSetFieldCol asf = new ActionSetFieldCol();
        asf.boundName = "c1";
        asf.factField = "name";
        dt.actionCols.add(asf);

        ActionInsertFactCol ins = new ActionInsertFactCol();
        ins.boundName = "x";
        ins.factField = "rating";
        ins.factType = "Person";
        dt.actionCols.add(ins);

        ActionInsertFactCol ins_ = new ActionInsertFactCol();
        ins_.boundName = "x";
        ins_.factField = "rating";
        ins_.factType = "Person";
        ins_.valueList = "one,two,three";
        dt.actionCols.add(ins_);

        ActionSetFieldCol asf_ = new ActionSetFieldCol();
        asf_.boundName = "c1";
        asf_.factField = "goo";
        dt.actionCols.add(asf_);

        ActionSetFieldCol asf__ = new ActionSetFieldCol();
        asf__.boundName = "c1";
        asf__.factField = "goo";
        asf__.valueList = "one,two,three";
        dt.actionCols.add(asf__);
View Full Code Here

        c2.factType = "Driver";
        c2.factField = "age";
        c2.constraintValueType = ISingleFieldConstraint.TYPE_LITERAL;
        dt.conditionCols.add(c2);

        ActionSetFieldCol a = new ActionSetFieldCol();
        a.boundName = "c1";
        a.factField = "name";
        dt.actionCols.add(a);

        ActionSetFieldCol a2 = new ActionSetFieldCol();
        a2.boundName = "c1";
        a2.factField = "age";
        dt.actionCols.add(a2);

        ActionInsertFactCol ins = new ActionInsertFactCol();
View Full Code Here

        return new ImageButton( images.edit(),
                                constants.EditThisActionColumnConfiguration(),
                                new ClickHandler() {
                                    public void onClick(ClickEvent w) {
                                        if ( c instanceof ActionSetFieldCol ) {
                                            final ActionSetFieldCol asf = (ActionSetFieldCol) c;
                                            ActionSetColumn ed = new ActionSetColumn( getSCE(),
                                                                                      dtable,
                                                                                      new ColumnCentricCommand() {
                                                                                          public void execute(DTColumnConfig column) {
                                                                                              dtable.updateColumn( asf,
View Full Code Here

                                                                         true );
                        ins.show();
                    }

                    private void showSet() {
                        final ActionSetFieldCol afc = new ActionSetFieldCol();
                        ActionSetColumn set = new ActionSetColumn( getSCE(),
                                                                   dtable,
                                                                   new ColumnCentricCommand() {
                                                                       public void execute(DTColumnConfig column) {
                                                                           newActionAdded( (ActionCol) column );
View Full Code Here

        c2.setFactType( "Driver" );
        c2.setFactField( "nothing" );
        c2.setConstraintValueType( BaseSingleFieldConstraint.TYPE_LITERAL );
        dt.getConditionCols().add( c2 );

        ActionSetFieldCol asf = new ActionSetFieldCol();
        asf.setBoundName( "c1" );
        asf.setFactField( "name" );
        dt.getActionCols().add( asf );

        ActionInsertFactCol ins = new ActionInsertFactCol();
        ins.setBoundName( "x" );
        ins.setFactField( "rating" );
        ins.setFactType( "Person" );
        dt.getActionCols().add( ins );

        ActionInsertFactCol ins_ = new ActionInsertFactCol();
        ins_.setBoundName( "x" );
        ins_.setFactField( "rating" );
        ins_.setFactType( "Person" );
        ins_.setValueList( "one,two,three" );
        dt.getActionCols().add( ins_ );

        ActionSetFieldCol asf_ = new ActionSetFieldCol();
        asf_.setBoundName( "c1" );
        asf_.setFactField( "goo" );
        dt.getActionCols().add( asf_ );

        ActionSetFieldCol asf__ = new ActionSetFieldCol();
        asf__.setBoundName( "c1" );
        asf__.setFactField( "goo" );
        asf__.setValueList( "one,two,three" );
        dt.getActionCols().add( asf__ );

        SuggestionCompletionEngine sce = new SuggestionCompletionEngine();
        sce.putDataEnumList( "Driver.name",
                             new String[]{"bob", "michael"} );
View Full Code Here

TOP

Related Classes of org.drools.ide.common.client.modeldriven.dt.ActionSetFieldCol

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.