Package org.kie.builder

Examples of org.kie.builder.KieModule


    public Results verfyKieModule(GAV gav) {
        throw new UnsupportedOperationException( "org.kie.builder.impl.KieRepositoryImpl.verfyKieModule -> TODO" );
    }

    public KieModule getKieModule(GAV gav) {
        KieModule kieModule = kieModules.get( gav );
        if ( kieModule == null ) {
            log.debug( "KieModule Lookup. GAV {} was not in cache, checking classpath",
                       gav.toExternalForm() );
            kieModule = checkClasspathForKieModule(gav);
        }
View Full Code Here


    }


    public KieModule addKieModule(Resource resource, Resource... dependencies) {
        log.info( "Adding KieModule from resource :" + resource  );
        KieModule kModule = getKieModule( resource );
       
        if ( dependencies != null && dependencies.length > 0 ) {
            Map<GAV, InternalKieModule> list = new HashMap<GAV, InternalKieModule>();
            for ( Resource depRes : dependencies ) {
                InternalKieModule depKModule = ( InternalKieModule ) getKieModule( depRes );
View Full Code Here

                urlPath = urlPath  + "META-INF/kproject.xml";
               
            } else {
                urlPath = "jar:"+ urlPath  + "!/" + KieModuleModelImpl.KMODULE_JAR_PATH;             
            }
            KieModule kModule = ClasspathKieProject.fetchKModule( new URL( urlPath )  );
            log.debug( "fetched KieModule from resource :" + resource  );
            return kModule;
        } catch ( Exception e ) {
            throw new RuntimeException("Unable to fetch module from resource :" + res, e);
        }         
View Full Code Here

   
    public void go(PrintStream out) {
        KieServices ks = KieServices.Factory.get();         
        KieRepository kr = ks.getRepository();
       
        KieModule kModule = kr.addKieModule( ks.getResources().newFileSystemResource( getFile("named-kiesession") ) );
               
        KieContainer kContainer = ks.newKieContainer( kModule.getReleaseId() );
       
        KieSession kSession = kContainer.newKieSession( "ksession1" );
        kSession.setGlobal( "out", out );
       
        Object msg1 = createMessage( kContainer,"Dave", "Hello, HAL. Do you read me, HAL?" );       
View Full Code Here

    }

    public KieModule getKieModule(ReleaseId releaseId) {
        VersionRange versionRange = new VersionRange(releaseId.getVersion());

        KieModule kieModule = kieModuleRepo.load(releaseId, versionRange);
        if ( kieModule == null ) {
            log.debug( "KieModule Lookup. ReleaseId {} was not in cache, checking classpath",
                       releaseId.toExternalForm() );
            kieModule = checkClasspathForKieModule(releaseId);
        }
View Full Code Here

    }


    public KieModule addKieModule(Resource resource, Resource... dependencies) {
        log.info( "Adding KieModule from resource :" + resource  );
        KieModule kModule = getKieModule( resource );
       
        if ( dependencies != null && dependencies.length > 0 ) {
            for ( Resource depRes : dependencies ) {
                InternalKieModule depKModule = ( InternalKieModule ) getKieModule( depRes );
                ((InternalKieModule)kModule).addDependency(depKModule);
View Full Code Here

                urlPath = urlPath  + KieModuleModelImpl.KMODULE_JAR_PATH;
               
            } else {
                urlPath = "jar:"+ urlPath  + "!/" + KieModuleModelImpl.KMODULE_JAR_PATH;             
            }
            KieModule kModule = ClasspathKieProject.fetchKModule( new URL( urlPath )  );
            log.debug( "fetched KieModule from resource :" + resource  );
            return kModule;
        } catch ( Exception e ) {
            throw new RuntimeException("Unable to fetch module from resource :" + res, e);
        }         
View Full Code Here

        KieRepository kr = ks.getRepository();
       
        Resource ex1Res = ks.getResources().newFileSystemResource( getFile("named-kiesession") ) ;
        Resource ex2Res = ks.getResources().newFileSystemResource( getFile("kiebase-inclusion") ) ;
       
        KieModule kModule = kr.addKieModule(ex1Res,  ex2Res);
        KieContainer kContainer = ks.newKieContainer( kModule.getReleaseId() );

        KieSession kSession = kContainer.newKieSession( "ksession2" );
        kSession.setGlobal( "out", out );
       
        Object msg1 = createMessage(kContainer, "Dave", "Hello, HAL. Do you read me, HAL?");       
View Full Code Here

    }

    public KieModule getKieModule(ReleaseId releaseId, byte[] pomXml) {
        VersionRange versionRange = new VersionRange(releaseId.getVersion());

        KieModule kieModule = kieModuleRepo.load(releaseId, versionRange);
        if ( kieModule == null ) {
            log.debug( "KieModule Lookup. ReleaseId {} was not in cache, checking classpath",
                    releaseId.toExternalForm() );
            kieModule = checkClasspathForKieModule(releaseId);
        }
View Full Code Here

    }


    public KieModule addKieModule(Resource resource, Resource... dependencies) {
        log.info( "Adding KieModule from resource :" + resource  );
        KieModule kModule = getKieModule( resource );
       
        if ( dependencies != null && dependencies.length > 0 ) {
            for ( Resource depRes : dependencies ) {
                InternalKieModule depKModule = ( InternalKieModule ) getKieModule( depRes );
                ((InternalKieModule)kModule).addDependency(depKModule);
View Full Code Here

TOP

Related Classes of org.kie.builder.KieModule

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.