@Test public void testBuilderSimpleKModule() throws Exception { LRUPomModelCache pomModelCache = getReference(LRUPomModelCache.class); URL url = this.getClass().getResource("/GuvnorM2RepoDependencyExample1"); SimpleFileSystemProvider p = new SimpleFileSystemProvider(); org.uberfire.java.nio.file.Path path = p.getPath(url.toURI()); final Module module = moduleService.resolveModule(Paths.convert(path)); final Builder builder = new Builder(module, ioService, moduleService, importsService, new ArrayList<>(), dependenciesClassLoaderCache, pomModelCache, getPackageNameWhiteListService(), alwaysTrue); assertNotNull(builder.getKieContainer()); }
public KieContainer getKieContainer() { BuildResults results = null; if (!isBuilt()) { results = build(); } else { results = new BuildResults(); results.addAllBuildMessages(convertMessages(kieBuilder.getResults().getMessages(), handles)); } if (results.getErrorMessages().isEmpty()) { final org.kie.api.builder.KieModule kieModule = kieBuilder.getKieModule(); final ReleaseId releaseId = kieModule.getReleaseId(); final org.drools.compiler.kie.builder.impl.KieProject kieProject = new KieModuleKieProject((InternalKieModule) kieBuilder.getKieModule(), null); final KieContainer kieContainer = new KieContainerImpl(kieProject, KieServices.Factory.get().getRepository(), releaseId); return kieContainer; } else { return null; } }
Builder implements Serializable { public KieContainer getKieContainer() { BuildResults results = null; if (!isBuilt()) { results = build(); } else { results = new BuildResults(); results.addAllBuildMessages(convertMessages(kieBuilder.getResults().getMessages(), handles)); } if (results.getErrorMessages().isEmpty()) { final org.kie.api.builder.KieModule kieModule = kieBuilder.getKieModule(); final ReleaseId releaseId = kieModule.getReleaseId(); final org.drools.compiler.kie.builder.impl.KieProject kieProject = new KieModuleKieProject((InternalKieModule) kieBuilder.getKieModule(), null); final KieContainer kieContainer = new KieContainerImpl(kieProject, KieServices.Factory.get().getRepository(), releaseId); return kieContainer; } else { return null; } } }
Builder implements Serializable { public KieContainer getKieContainer() { BuildResults results = null; if (!isBuilt()) { results = build(); } else { results = new BuildResults(); results.addAllBuildMessages(convertMessages(kieBuilder.getResults().getMessages(), handles)); } if (results.getErrorMessages().isEmpty()) { final org.kie.api.builder.KieModule kieModule = kieBuilder.getKieModule(); final ReleaseId releaseId = kieModule.getReleaseId(); final org.drools.compiler.kie.builder.impl.KieProject kieProject = new KieModuleKieProject((InternalKieModule) kieBuilder.getKieModule(), null); final KieContainer kieContainer = new KieContainerImpl(kieProject, KieServices.Factory.get().getRepository(), releaseId); return kieContainer; } else { return null; } } Builder(final Module project,
                   final IOService ioService,
                   final KieModuleService moduleService,
                   final ProjectImportsService importsService,
                   final List<BuildValidationHelper> buildValidationHelpers,
                   final LRUModuleDependenciesClassLoaderCache dependenciesClassLoaderCache,
                   final LRUPomModelCache pomModelCache,
                   final PackageNameWhiteListService packageNameWhiteListService,
                   final Predicate<String> classFilter,
                   final KieBuilder kieBuilder,
                   final KieFileSystem kieFileSystem);  Builder(final Module project,
                   final IOService ioService,
                   final KieModuleService moduleService,
                   final ProjectImportsService importsService,
                   final List<BuildValidationHelper> buildValidationHelpers,
                   final LRUModuleDependenciesClassLoaderCache dependenciesClassLoaderCache,
                   final LRUPomModelCache pomModelCache,
                   final PackageNameWhiteListService packageNameWhiteListService,
                   final Predicate<String> classFilter); }
Builder implements Serializable { public KieContainer getKieContainer() { BuildResults results = null; if (!isBuilt()) { results = build(); } else { results = new BuildResults(); results.addAllBuildMessages(convertMessages(kieBuilder.getResults().getMessages(), handles)); } if (results.getErrorMessages().isEmpty()) { final org.kie.api.builder.KieModule kieModule = kieBuilder.getKieModule(); final ReleaseId releaseId = kieModule.getReleaseId(); final org.drools.compiler.kie.builder.impl.KieProject kieProject = new KieModuleKieProject((InternalKieModule) kieBuilder.getKieModule(), null); final KieContainer kieContainer = new KieContainerImpl(kieProject, KieServices.Factory.get().getRepository(), releaseId); return kieContainer; } else { return null; } } Builder(final Module project,
                   final IOService ioService,
                   final KieModuleService moduleService,
                   final ProjectImportsService importsService,
                   final List<BuildValidationHelper> buildValidationHelpers,
                   final LRUModuleDependenciesClassLoaderCache dependenciesClassLoaderCache,
                   final LRUPomModelCache pomModelCache,
                   final PackageNameWhiteListService packageNameWhiteListService,
                   final Predicate<String> classFilter,
                   final KieBuilder kieBuilder,
                   final KieFileSystem kieFileSystem);  Builder(final Module project,
                   final IOService ioService,
                   final KieModuleService moduleService,
                   final ProjectImportsService importsService,
                   final List<BuildValidationHelper> buildValidationHelpers,
                   final LRUModuleDependenciesClassLoaderCache dependenciesClassLoaderCache,
                   final LRUPomModelCache pomModelCache,
                   final PackageNameWhiteListService packageNameWhiteListService,
                   final Predicate<String> classFilter); Builder clone(); BuildResults build(); BuildResults build(final Path resource,
                              final InputStream inputStream); IncrementalBuildResults addResource(final Path resource); IncrementalBuildResults deleteResource(final Path resource); IncrementalBuildResults updateResource(final Path resource); IncrementalBuildResults updateResource(final Path resource,
                                                  final InputStream inputStream); IncrementalBuildResults applyBatchResourceChanges(final Map<org.uberfire.backend.vfs.Path, Collection<ResourceChange>> changes); org.kie.api.builder.KieModule getKieModule(); org.kie.api.builder.KieModule getKieModuleIgnoringErrors(); KieModuleMetaData getKieModuleMetaDataIgnoringErrors(); TypeSourceResolver getTypeSourceResolver(KieModuleMetaData kieModuleMetaData); KieContainer getKieContainer(); boolean isBuilt(); }
Builder implements Serializable { public KieContainer getKieContainer() { BuildResults results = null; if (!isBuilt()) { results = build(); } else { results = new BuildResults(); results.addAllBuildMessages(convertMessages(kieBuilder.getResults().getMessages(), handles)); } if (results.getErrorMessages().isEmpty()) { final org.kie.api.builder.KieModule kieModule = kieBuilder.getKieModule(); final ReleaseId releaseId = kieModule.getReleaseId(); final org.drools.compiler.kie.builder.impl.KieProject kieProject = new KieModuleKieProject((InternalKieModule) kieBuilder.getKieModule(), null); final KieContainer kieContainer = new KieContainerImpl(kieProject, KieServices.Factory.get().getRepository(), releaseId); return kieContainer; } else { return null; } } Builder(final Module project,
                   final IOService ioService,
                   final KieModuleService moduleService,
                   final ProjectImportsService importsService,
                   final List<BuildValidationHelper> buildValidationHelpers,
                   final LRUModuleDependenciesClassLoaderCache dependenciesClassLoaderCache,
                   final LRUPomModelCache pomModelCache,
                   final PackageNameWhiteListService packageNameWhiteListService,
                   final Predicate<String> classFilter,
                   final KieBuilder kieBuilder,
                   final KieFileSystem kieFileSystem);  Builder(final Module project,
                   final IOService ioService,
                   final KieModuleService moduleService,
                   final ProjectImportsService importsService,
                   final List<BuildValidationHelper> buildValidationHelpers,
                   final LRUModuleDependenciesClassLoaderCache dependenciesClassLoaderCache,
                   final LRUPomModelCache pomModelCache,
                   final PackageNameWhiteListService packageNameWhiteListService,
                   final Predicate<String> classFilter); Builder clone(); BuildResults build(); BuildResults build(final Path resource,
                              final InputStream inputStream); IncrementalBuildResults addResource(final Path resource); IncrementalBuildResults deleteResource(final Path resource); IncrementalBuildResults updateResource(final Path resource); IncrementalBuildResults updateResource(final Path resource,
                                                  final InputStream inputStream); IncrementalBuildResults applyBatchResourceChanges(final Map<org.uberfire.backend.vfs.Path, Collection<ResourceChange>> changes); org.kie.api.builder.KieModule getKieModule(); org.kie.api.builder.KieModule getKieModuleIgnoringErrors(); KieModuleMetaData getKieModuleMetaDataIgnoringErrors(); TypeSourceResolver getTypeSourceResolver(KieModuleMetaData kieModuleMetaData); KieContainer getKieContainer(); boolean isBuilt();  }