Package org.drools.workbench.models.datamodel.imports

Examples of org.drools.workbench.models.datamodel.imports.Import


    public void testIndexGuidedDecisionTableConditions() throws IOException, InterruptedException {
        //Add test files
        final Path path = basePath.resolve( "dtable1.gdst" );
        final GuidedDecisionTable52 model = GuidedDecisionTableFactory.makeTableWithConditionCol( "org.drools.workbench.screens.guided.dtable.backend.server.indexing",
                                                                                                  new ArrayList<Import>() {{
                                                                                                      add( new Import( "org.drools.workbench.screens.guided.dtable.backend.server.indexing.classes.Applicant" ) );
                                                                                                      add( new Import( "org.drools.workbench.screens.guided.dtable.backend.server.indexing.classes.Mortgage" ) );
                                                                                                  }},
                                                                                                  "dtable1" );
        final String xml = GuidedDTXMLPersistence.getInstance().marshal( model );
        ioService().write( path,
                           xml );
View Full Code Here


    public void testIndexGuidedDecisionTableBRLFragmentConditions() throws IOException, InterruptedException {
        //Add test files
        final Path path = basePath.resolve( "dtable1.gdst" );
        final GuidedDecisionTable52 model = GuidedDecisionTableFactory.makeTableWithBRLFragmentConditionCol( "org.drools.workbench.screens.guided.dtable.backend.server.indexing",
                                                                                                             new ArrayList<Import>() {{
                                                                                                                 add( new Import( "org.drools.workbench.screens.guided.dtable.backend.server.indexing.classes.Applicant" ) );
                                                                                                                 add( new Import( "org.drools.workbench.screens.guided.dtable.backend.server.indexing.classes.Mortgage" ) );
                                                                                                             }},
                                                                                                             "dtable1" );
        final String xml = GuidedDTXMLPersistence.getInstance().marshal( model );
        ioService().write( path,
                           xml );
View Full Code Here

    @Test
    public void testPackageNameAndImports() throws Exception {
        GuidedDecisionTable52 dt = new GuidedDecisionTable52();
        dt.setPackageName( "org.drools.guvnor.models.guided.dtable.backend" );
        dt.getImports().addImport( new Import( "java.lang.String" ) );

        dt.setTableName( "michael" );

        Pattern52 p1 = new Pattern52();
        p1.setBoundName( "f1" );
View Full Code Here

            final Package pkg = projectService.resolvePackage( context );
            final String packageName = ( pkg == null ? null : pkg.getPackageName() );
            model.setPackageName( packageName );

            // Temporal fix for https://bugzilla.redhat.com/show_bug.cgi?id=998922
            model.getImports().addImport( new Import( "java.lang.Number" ) );

            final org.uberfire.java.nio.file.Path nioPath = Paths.convert( context ).resolve( fileName );
            final Path newPath = Paths.convert( nioPath );

            if ( ioService.exists( nioPath ) ) {
View Full Code Here

    }

    @Override
    public void addImport( final String fqcn ) {
        //Filter DMO
        final Import addedImport = new Import( fqcn );
        model.getImports().addImport( addedImport );
        oracle.filter( model.getImports() );

        //Signal change to any other interested consumers (e.g. some editors support rendering of unknown fact-types)
        importAddedEvent.fire( new ImportAddedEvent( oracle,
View Full Code Here

        if ( validator.isTypeUsed( fqcn ) ) {
            return false;
        }

        //Filter DMO
        final Import removedImport = new Import( fqcn );
        model.getImports().removeImport( removedImport );
        oracle.filter( model.getImports() );

        //Signal change to any other interested consumers (e.g. some editors support rendering of unknown fact-types)
        importRemovedEvent.fire( new ImportRemovedEvent( oracle,
View Full Code Here

            final Package pkg = projectService.resolvePackage( context );
            final String packageName = ( pkg == null ? null : pkg.getPackageName() );
            model.setPackageName( packageName );

            // Temporal fix for https://bugzilla.redhat.com/show_bug.cgi?id=998922
            model.getImports().addImport( new Import( "java.lang.Number" ) );

            final org.uberfire.java.nio.file.Path nioPath = Paths.convert( context ).resolve( fileName );
            final Path newPath = Paths.convert( nioPath );

            if ( ioService.exists( nioPath ) ) {
View Full Code Here

    @Test
    public void testPackageNameAndImports() throws Exception {
        GuidedDecisionTable52 dt = new GuidedDecisionTable52();
        dt.setPackageName( "org.drools.guvnor.models.guided.dtable.backend" );
        dt.getImports().addImport( new Import( "java.lang.String" ) );

        dt.setTableName( "michael" );

        Pattern52 p1 = new Pattern52();
        p1.setBoundName( "f1" );
View Full Code Here

    @Test
    public void testModelWithImports() {
        final ScoreCardModel model = new ScoreCardModel();
        model.setName( "test" );
        model.setPackageName( "org.drools.workbench.models.guided.scorecard.backend" );
        model.getImports().addImport( new Import( "org.smurf.Pupa" ) );

        final String drl = GuidedScoreCardDRLPersistence.marshal( model );
        assertNotNull( drl );

        assertTrue( drl.contains( "package org.drools.workbench.models.guided.scorecard.backend" ) );
View Full Code Here

    @Test
    public void testModelWithImportsAndFactName() {
        final ScoreCardModel model = new ScoreCardModel();
        model.setName( "test" );
        model.setPackageName( "org.drools.workbench.models.guided.scorecard.backend" );
        model.getImports().addImport( new Import( "org.smurf.Pupa" ) );
        model.setFactName( "org.drools.MoreCheese" );

        final String drl = GuidedScoreCardDRLPersistence.marshal( model );
        assertNotNull( drl );
View Full Code Here

TOP

Related Classes of org.drools.workbench.models.datamodel.imports.Import

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.