Package org.drools.ide.common.client.factconstraints.helper

Examples of org.drools.ide.common.client.factconstraints.helper.ConstraintsContainer


        if ( !AssetFormats.WORKING_SET.equals( asset.getMetaData().getFormat() ) ) {
            throw new IllegalArgumentException( "asset must a be a workingset not a: " + asset.getMetaData().getFormat() );
        }
        workingSet = asset;
        WorkingSetConfigData wsData = (WorkingSetConfigData) workingSet.getContent();
        cc = new ConstraintsContainer( wsData.constraints );
        cfc = new CustomFormsContainer( wsData.customForms );
        refreshWidgets();
        setWidth( "100%" );

    }
View Full Code Here


        if ( !AssetFormats.WORKING_SET.equals( asset.getFormat() ) ) {
            throw new IllegalArgumentException( "asset must a be a workingset not a: " + asset.getFormat() );
        }
        workingSet = asset;
        WorkingSetConfigData wsData = (WorkingSetConfigData) workingSet.getContent();
        cc = new ConstraintsContainer( wsData.constraints );
        cfc = new CustomFormsContainer( wsData.customForms );
        refreshWidgets();
        setWidth( "100%" );

    }
View Full Code Here

        if ( !AssetFormats.WORKING_SET.equals( asset.getFormat() ) ) {
            throw new IllegalArgumentException( "asset must a be a workingset not a: " + asset.getFormat() );
        }
        workingSet = asset;
        WorkingSetConfigData wsData = (WorkingSetConfigData) workingSet.getContent();
        cc = new ConstraintsContainer( wsData.constraints );
        cfc = new CustomFormsContainer( wsData.customForms );
        refreshWidgets();
        setWidth( "100%" );

    }
View Full Code Here

        ConstraintConfiguration conf = new SimpleConstraintConfigurationImpl();
        conf.setFactType("Person");
        conf.setFieldName("age");
       
        list.add(conf);
        ConstraintsContainer cc = new ConstraintsContainer(list);
        assertTrue(cc.hasConstraints("Person"));
        assertFalse(cc.hasConstraints("Person3"));

        assertEquals(1, cc.getConstraints("Person").size());

        conf = new SimpleConstraintConfigurationImpl();
        conf.setFactType("Person");
        conf.setFieldName("name");
       
        cc.addConstraint(conf);
        assertEquals(2, cc.getConstraints("Person").size());
        assertEquals(1, cc.getConstraints("Person", "age").size());
        assertSame(conf, cc.getConstraints("Person", "name").get(0));
        assertEquals(0, cc.getConstraints("Person", "toothCount").size());
       
        conf = new SimpleConstraintConfigurationImpl();
        conf.setFactType("Pet");
        conf.setFieldName("name");

        cc.addConstraint(conf);
       
        assertEquals(1, cc.getConstraints("Pet").size());
       
        assertEquals(1, cc.getConstraints("Pet", "name").size());
    }
View Full Code Here

        if ( !AssetFormats.WORKING_SET.equals( asset.metaData.format ) ) {
            throw new IllegalArgumentException( "asset must a be a workingset not a: " + asset.metaData.format );
        }
        workingSet = asset;
        WorkingSetConfigData wsData = (WorkingSetConfigData) workingSet.content;
        cc = new ConstraintsContainer( wsData.constraints );
        cfc = new CustomFormsContainer( wsData.customForms );
        refreshWidgets();
        setWidth( "100%" );

    }
View Full Code Here

TOP

Related Classes of org.drools.ide.common.client.factconstraints.helper.ConstraintsContainer

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.