target
stringlengths
20
113k
src_fm
stringlengths
11
86.3k
src_fm_fc
stringlengths
21
86.4k
src_fm_fc_co
stringlengths
30
86.4k
src_fm_fc_ms
stringlengths
42
86.8k
src_fm_fc_ms_ff
stringlengths
43
86.8k
@Test public void readSingleTest() { assertThat(editor.getHistory()).isEmpty(); PomPlaceHolder placeholder = editor.readSingle(Paths.get(tmpRoot.toAbsolutePath() + "/dummy/pom.xml")); SoftAssertions.assertSoftly(softly -> { softly.assertThat(placeholder.isValid()).isTrue(); softly.assertThat(placeholder.getVersion()).isEqualTo("1.0.0.Final"); softly.assertThat(placeholder.getPackaging()).isEqualTo(("kjar")); softly.assertThat(placeholder.getGroupID()).isEqualTo("org.kie"); softly.assertThat(placeholder.getArtifactID()).isEqualTo("kie-maven-plugin-test-kjar-2"); }); }
public PomPlaceHolder readSingle(Path pom) { PomPlaceHolder holder = new PomPlaceHolder(); try { Model model = reader.read(new ByteArrayInputStream(Files.readAllBytes(pom))); holder = new PomPlaceHolder(pom.toAbsolutePath().toString(), model.getArtifactId(), model.getGroupId(), model.getVersion(), model.getPackaging()); } catch (Exception e) { logger.error(e.getMessage()); } return holder; }
DefaultPomEditor implements PomEditor { public PomPlaceHolder readSingle(Path pom) { PomPlaceHolder holder = new PomPlaceHolder(); try { Model model = reader.read(new ByteArrayInputStream(Files.readAllBytes(pom))); holder = new PomPlaceHolder(pom.toAbsolutePath().toString(), model.getArtifactId(), model.getGroupId(), model.getVersion(), model.getPackaging()); } catch (Exception e) { logger.error(e.getMessage()); } return holder; } }
DefaultPomEditor implements PomEditor { public PomPlaceHolder readSingle(Path pom) { PomPlaceHolder holder = new PomPlaceHolder(); try { Model model = reader.read(new ByteArrayInputStream(Files.readAllBytes(pom))); holder = new PomPlaceHolder(pom.toAbsolutePath().toString(), model.getArtifactId(), model.getGroupId(), model.getVersion(), model.getPackaging()); } catch (Exception e) { logger.error(e.getMessage()); } return holder; } DefaultPomEditor(Set<PomPlaceHolder> history, ConfigurationProvider config); }
DefaultPomEditor implements PomEditor { public PomPlaceHolder readSingle(Path pom) { PomPlaceHolder holder = new PomPlaceHolder(); try { Model model = reader.read(new ByteArrayInputStream(Files.readAllBytes(pom))); holder = new PomPlaceHolder(pom.toAbsolutePath().toString(), model.getArtifactId(), model.getGroupId(), model.getVersion(), model.getPackaging()); } catch (Exception e) { logger.error(e.getMessage()); } return holder; } DefaultPomEditor(Set<PomPlaceHolder> history, ConfigurationProvider config); Set<PomPlaceHolder> getHistory(); @Override Boolean cleanHistory(); PomPlaceHolder readSingle(Path pom); boolean write(Path pom, CompilationRequest request); }
DefaultPomEditor implements PomEditor { public PomPlaceHolder readSingle(Path pom) { PomPlaceHolder holder = new PomPlaceHolder(); try { Model model = reader.read(new ByteArrayInputStream(Files.readAllBytes(pom))); holder = new PomPlaceHolder(pom.toAbsolutePath().toString(), model.getArtifactId(), model.getGroupId(), model.getVersion(), model.getPackaging()); } catch (Exception e) { logger.error(e.getMessage()); } return holder; } DefaultPomEditor(Set<PomPlaceHolder> history, ConfigurationProvider config); Set<PomPlaceHolder> getHistory(); @Override Boolean cleanHistory(); PomPlaceHolder readSingle(Path pom); boolean write(Path pom, CompilationRequest request); final String POM; final String TRUE; final String POM_NAME; final String KJAR_EXT; }
@Test public void writeTest() { assertThat(editor.getHistory()).isEmpty(); CompilationRequest req = new DefaultCompilationRequest(mavenRepoPath, info, new String[]{MavenCLIArgs.COMPILE, MavenCLIArgs.ALTERNATE_USER_SETTINGS + alternateSettingsAbsPath}, Boolean.FALSE); assertThat(editor.write(Paths.get(tmpRoot.toAbsolutePath() + "/dummy/pom.xml"), req)).isTrue(); }
public boolean write(Path pom, CompilationRequest request) { try { Model model = reader.read(new ByteArrayInputStream(Files.readAllBytes(pom))); if (model == null) { logger.error("Model null from pom file:", pom.toString()); return false; } PomPlaceHolder pomPH = new PomPlaceHolder(pom.toAbsolutePath().toString(), model.getArtifactId(), model.getGroupId(), model.getVersion(), model.getPackaging(), Files.readAllBytes(pom)); if (!history.contains(pomPH)) { PluginPresents plugs = updatePom(model); request.getInfo().lateAdditionKiePluginPresent(plugs.isKiePluginPresent()); if (!request.skipProjectDependenciesCreationList()) { String args[] = addCreateClasspathMavenArgs(request.getKieCliRequest().getArgs(), request); request.getKieCliRequest().setArgs(args); } if (plugs.pomOverwriteRequired()) { ByteArrayOutputStream baos = new ByteArrayOutputStream(); writer.write(baos, model); if (logger.isDebugEnabled()) { logger.debug("Pom changed:{}", new String(baos.toByteArray(), StandardCharsets.UTF_8)); } Path pomParent = Paths.get(URI.create( new StringBuffer(). append(FILE_URI). append(pom.getParent().toAbsolutePath().toString()). append("/"). append(POM_NAME).toString())); Files.delete(pomParent); Files.write(pomParent, baos.toByteArray(), StandardOpenOption.CREATE_NEW); } history.add(pomPH); } return true; } catch (Exception e) { logger.error(e.getMessage()); return false; } }
DefaultPomEditor implements PomEditor { public boolean write(Path pom, CompilationRequest request) { try { Model model = reader.read(new ByteArrayInputStream(Files.readAllBytes(pom))); if (model == null) { logger.error("Model null from pom file:", pom.toString()); return false; } PomPlaceHolder pomPH = new PomPlaceHolder(pom.toAbsolutePath().toString(), model.getArtifactId(), model.getGroupId(), model.getVersion(), model.getPackaging(), Files.readAllBytes(pom)); if (!history.contains(pomPH)) { PluginPresents plugs = updatePom(model); request.getInfo().lateAdditionKiePluginPresent(plugs.isKiePluginPresent()); if (!request.skipProjectDependenciesCreationList()) { String args[] = addCreateClasspathMavenArgs(request.getKieCliRequest().getArgs(), request); request.getKieCliRequest().setArgs(args); } if (plugs.pomOverwriteRequired()) { ByteArrayOutputStream baos = new ByteArrayOutputStream(); writer.write(baos, model); if (logger.isDebugEnabled()) { logger.debug("Pom changed:{}", new String(baos.toByteArray(), StandardCharsets.UTF_8)); } Path pomParent = Paths.get(URI.create( new StringBuffer(). append(FILE_URI). append(pom.getParent().toAbsolutePath().toString()). append("/"). append(POM_NAME).toString())); Files.delete(pomParent); Files.write(pomParent, baos.toByteArray(), StandardOpenOption.CREATE_NEW); } history.add(pomPH); } return true; } catch (Exception e) { logger.error(e.getMessage()); return false; } } }
DefaultPomEditor implements PomEditor { public boolean write(Path pom, CompilationRequest request) { try { Model model = reader.read(new ByteArrayInputStream(Files.readAllBytes(pom))); if (model == null) { logger.error("Model null from pom file:", pom.toString()); return false; } PomPlaceHolder pomPH = new PomPlaceHolder(pom.toAbsolutePath().toString(), model.getArtifactId(), model.getGroupId(), model.getVersion(), model.getPackaging(), Files.readAllBytes(pom)); if (!history.contains(pomPH)) { PluginPresents plugs = updatePom(model); request.getInfo().lateAdditionKiePluginPresent(plugs.isKiePluginPresent()); if (!request.skipProjectDependenciesCreationList()) { String args[] = addCreateClasspathMavenArgs(request.getKieCliRequest().getArgs(), request); request.getKieCliRequest().setArgs(args); } if (plugs.pomOverwriteRequired()) { ByteArrayOutputStream baos = new ByteArrayOutputStream(); writer.write(baos, model); if (logger.isDebugEnabled()) { logger.debug("Pom changed:{}", new String(baos.toByteArray(), StandardCharsets.UTF_8)); } Path pomParent = Paths.get(URI.create( new StringBuffer(). append(FILE_URI). append(pom.getParent().toAbsolutePath().toString()). append("/"). append(POM_NAME).toString())); Files.delete(pomParent); Files.write(pomParent, baos.toByteArray(), StandardOpenOption.CREATE_NEW); } history.add(pomPH); } return true; } catch (Exception e) { logger.error(e.getMessage()); return false; } } DefaultPomEditor(Set<PomPlaceHolder> history, ConfigurationProvider config); }
DefaultPomEditor implements PomEditor { public boolean write(Path pom, CompilationRequest request) { try { Model model = reader.read(new ByteArrayInputStream(Files.readAllBytes(pom))); if (model == null) { logger.error("Model null from pom file:", pom.toString()); return false; } PomPlaceHolder pomPH = new PomPlaceHolder(pom.toAbsolutePath().toString(), model.getArtifactId(), model.getGroupId(), model.getVersion(), model.getPackaging(), Files.readAllBytes(pom)); if (!history.contains(pomPH)) { PluginPresents plugs = updatePom(model); request.getInfo().lateAdditionKiePluginPresent(plugs.isKiePluginPresent()); if (!request.skipProjectDependenciesCreationList()) { String args[] = addCreateClasspathMavenArgs(request.getKieCliRequest().getArgs(), request); request.getKieCliRequest().setArgs(args); } if (plugs.pomOverwriteRequired()) { ByteArrayOutputStream baos = new ByteArrayOutputStream(); writer.write(baos, model); if (logger.isDebugEnabled()) { logger.debug("Pom changed:{}", new String(baos.toByteArray(), StandardCharsets.UTF_8)); } Path pomParent = Paths.get(URI.create( new StringBuffer(). append(FILE_URI). append(pom.getParent().toAbsolutePath().toString()). append("/"). append(POM_NAME).toString())); Files.delete(pomParent); Files.write(pomParent, baos.toByteArray(), StandardOpenOption.CREATE_NEW); } history.add(pomPH); } return true; } catch (Exception e) { logger.error(e.getMessage()); return false; } } DefaultPomEditor(Set<PomPlaceHolder> history, ConfigurationProvider config); Set<PomPlaceHolder> getHistory(); @Override Boolean cleanHistory(); PomPlaceHolder readSingle(Path pom); boolean write(Path pom, CompilationRequest request); }
DefaultPomEditor implements PomEditor { public boolean write(Path pom, CompilationRequest request) { try { Model model = reader.read(new ByteArrayInputStream(Files.readAllBytes(pom))); if (model == null) { logger.error("Model null from pom file:", pom.toString()); return false; } PomPlaceHolder pomPH = new PomPlaceHolder(pom.toAbsolutePath().toString(), model.getArtifactId(), model.getGroupId(), model.getVersion(), model.getPackaging(), Files.readAllBytes(pom)); if (!history.contains(pomPH)) { PluginPresents plugs = updatePom(model); request.getInfo().lateAdditionKiePluginPresent(plugs.isKiePluginPresent()); if (!request.skipProjectDependenciesCreationList()) { String args[] = addCreateClasspathMavenArgs(request.getKieCliRequest().getArgs(), request); request.getKieCliRequest().setArgs(args); } if (plugs.pomOverwriteRequired()) { ByteArrayOutputStream baos = new ByteArrayOutputStream(); writer.write(baos, model); if (logger.isDebugEnabled()) { logger.debug("Pom changed:{}", new String(baos.toByteArray(), StandardCharsets.UTF_8)); } Path pomParent = Paths.get(URI.create( new StringBuffer(). append(FILE_URI). append(pom.getParent().toAbsolutePath().toString()). append("/"). append(POM_NAME).toString())); Files.delete(pomParent); Files.write(pomParent, baos.toByteArray(), StandardOpenOption.CREATE_NEW); } history.add(pomPH); } return true; } catch (Exception e) { logger.error(e.getMessage()); return false; } } DefaultPomEditor(Set<PomPlaceHolder> history, ConfigurationProvider config); Set<PomPlaceHolder> getHistory(); @Override Boolean cleanHistory(); PomPlaceHolder readSingle(Path pom); boolean write(Path pom, CompilationRequest request); final String POM; final String TRUE; final String POM_NAME; final String KJAR_EXT; }
@Test public void cleanHistoryTest() { assertThat(editor.getHistory()).isEmpty(); CompilationRequest req = new DefaultCompilationRequest(mavenRepoPath, info, new String[]{MavenCLIArgs.COMPILE, MavenCLIArgs.ALTERNATE_USER_SETTINGS + alternateSettingsAbsPath}, Boolean.FALSE); editor.write(Paths.get(tmpRoot.toAbsolutePath() + "/dummy/pom.xml"), req); assertThat(editor.getHistory()).isNotEmpty(); editor.cleanHistory(); assertThat(editor.getHistory()).isEmpty(); }
@Override public Boolean cleanHistory() { history.clear(); return Boolean.TRUE; }
DefaultPomEditor implements PomEditor { @Override public Boolean cleanHistory() { history.clear(); return Boolean.TRUE; } }
DefaultPomEditor implements PomEditor { @Override public Boolean cleanHistory() { history.clear(); return Boolean.TRUE; } DefaultPomEditor(Set<PomPlaceHolder> history, ConfigurationProvider config); }
DefaultPomEditor implements PomEditor { @Override public Boolean cleanHistory() { history.clear(); return Boolean.TRUE; } DefaultPomEditor(Set<PomPlaceHolder> history, ConfigurationProvider config); Set<PomPlaceHolder> getHistory(); @Override Boolean cleanHistory(); PomPlaceHolder readSingle(Path pom); boolean write(Path pom, CompilationRequest request); }
DefaultPomEditor implements PomEditor { @Override public Boolean cleanHistory() { history.clear(); return Boolean.TRUE; } DefaultPomEditor(Set<PomPlaceHolder> history, ConfigurationProvider config); Set<PomPlaceHolder> getHistory(); @Override Boolean cleanHistory(); PomPlaceHolder readSingle(Path pom); boolean write(Path pom, CompilationRequest request); final String POM; final String TRUE; final String POM_NAME; final String KJAR_EXT; }
@Test public void postTest() { try { fileSystemTestingUtils.setup(); ioService = fileSystemTestingUtils.getIoService(); final String repoName = "myrepo"; final JGitFileSystem fs = (JGitFileSystem) ioService.newFileSystem(URI.create("git: new HashMap<String, Object>() {{ put("init", Boolean.TRUE); put("internal", Boolean.TRUE); }}); ioService.startBatch(fs); String pom = "target/test-classes/kjar-2-single-resources/pom.xml"; if (!runIntoMavenCLI) { pom = "kie-wb-common-services/kie-wb-common-compiler/kie-wb-common-compiler-distribution/target/test-classes/kjar-2-single-resources/pom.xml"; } ioService.write(fs.getPath("/kjar-2-single-resources/pom.xml"), new String(java.nio.file.Files.readAllBytes(new File(pom).toPath()))); String personDotJava = "target/test-classes/kjar-2-single-resources/src/main/java/org/kie/maven/plugin/test/Person.java"; if (!runIntoMavenCLI) { personDotJava = "kie-wb-common-services/kie-wb-common-compiler/kie-wb-common-compiler-distribution/target/test-classes/kjar-2-single-resources/src/main/java/org/kie/maven/plugin/test/Person.java"; } ioService.write(fs.getPath("/kjar-2-single-resources/src/main/java/org/kie/maven/plugin/test/Person.java"), new String(java.nio.file.Files.readAllBytes(new File(personDotJava).toPath()))); String simpleRulesDotDRL = "target/test-classes/kjar-2-single-resources/src/main/resources/AllResourcesTypes/simple-rules.drl"; if (!runIntoMavenCLI) { simpleRulesDotDRL = "kie-wb-common-services/kie-wb-common-compiler/kie-wb-common-compiler-distribution/target/test-classes/kjar-2-single-resources/src/main/resources/AllResourceTypes/simple-rules.drl"; } ioService.write(fs.getPath("/kjar-2-single-resources/src/main/resources/AllResourcesTypes/simple-rules.drl"), new String(java.nio.file.Files.readAllBytes(new File(simpleRulesDotDRL).toPath()))); String kmodule = "target/test-classes/kjar-2-single-resources/src/main/resources/META-INF/kmodule.xml"; if (!runIntoMavenCLI) { kmodule = "kie-wb-common-services/kie-wb-common-compiler/kie-wb-common-compiler-distribution/target/test-classes/kjar-2-single-resources/src/main/resources/META-INF/kmodule.xml"; } ioService.write(fs.getPath("/kjar-2-single-resources/src/main/resources/META-INF/kmodule.xml"), new String(java.nio.file.Files.readAllBytes(new File(kmodule).toPath()))); ioService.endBatch(); Path tmpRootCloned = Files.createTempDirectory("cloned"); Path tmpCloned = Files.createDirectories(Paths.get(tmpRootCloned.toString(), "dummy")); final File gitClonedFolder = new File(tmpCloned.toFile(), ".clone.git"); final Git cloned = Git.cloneRepository().setURI(fs.getGit().getRepository().getDirectory().toURI().toString()).setBare(false).setDirectory(gitClonedFolder).call(); assertThat(cloned).isNotNull(); mavenRepoPath = Paths.get(System.getProperty("user.home"), ".m2", "repository"); tmpRoot = Paths.get(gitClonedFolder + "/dummy/"); Client client = ClientBuilder.newClient(); WebTarget target = client.target(deploymentUrl.toString() + "rest/maven/"); MultivaluedMap headersMap = new MultivaluedHashMap(); headersMap.add("project", tmpRoot.toAbsolutePath().toString() + "/dummy"); headersMap.add("mavenrepo", mavenRepoPath.toAbsolutePath().toString()); headersMap.add("settings_xml", mavenSettingsPath); Future<Response> responseFuture = target.request().headers(headersMap).async().post(Entity.entity(String.class, MediaType.TEXT_PLAIN)); Response response = responseFuture.get(); assertThat(response.getStatusInfo().getStatusCode()).isEqualTo(200); InputStream is = response.readEntity(InputStream.class); byte[] serializedCompilationResponse = IOUtils.toByteArray(is); HttpCompilationResponse res = RestUtils.readDefaultCompilationResponseFromBytes(serializedCompilationResponse); assertThat(res).isNotNull(); assertThat(res.getDependencies()).hasSize(4); assertThat(res.getTargetContent()).hasSize(3); tearDown(); } catch (Exception e) { logger.error(e.getMessage()); } finally { fileSystemTestingUtils.cleanup(); } }
public CompletableFuture<KieCompilationResponse> call(String projectPath, String mavenRepoPath, String settingsXmlPath, String url) { final CompletableFuture<KieCompilationResponse> cfInternal = new CompletableFuture<>(); Future<?> future = ClientBuilder.newBuilder().build() .target(url) .request().header("project", projectPath).header("mavenrepo", mavenRepoPath).header("settings_xml",settingsXmlPath) .accept(MediaType.APPLICATION_OCTET_STREAM) .async() .post(null, new InvocationCallback<KieCompilationResponse>() { @Override public void completed(final KieCompilationResponse result) { cfInternal.complete(result); } @Override public void failed(final Throwable throwable) { cfInternal.completeExceptionally(throwable); } }); return cfInternal.whenComplete((result, exception) -> { if (CancellationException.class.isInstance(exception)) { future.cancel(true); } }); }
MavenRestClient { public CompletableFuture<KieCompilationResponse> call(String projectPath, String mavenRepoPath, String settingsXmlPath, String url) { final CompletableFuture<KieCompilationResponse> cfInternal = new CompletableFuture<>(); Future<?> future = ClientBuilder.newBuilder().build() .target(url) .request().header("project", projectPath).header("mavenrepo", mavenRepoPath).header("settings_xml",settingsXmlPath) .accept(MediaType.APPLICATION_OCTET_STREAM) .async() .post(null, new InvocationCallback<KieCompilationResponse>() { @Override public void completed(final KieCompilationResponse result) { cfInternal.complete(result); } @Override public void failed(final Throwable throwable) { cfInternal.completeExceptionally(throwable); } }); return cfInternal.whenComplete((result, exception) -> { if (CancellationException.class.isInstance(exception)) { future.cancel(true); } }); } }
MavenRestClient { public CompletableFuture<KieCompilationResponse> call(String projectPath, String mavenRepoPath, String settingsXmlPath, String url) { final CompletableFuture<KieCompilationResponse> cfInternal = new CompletableFuture<>(); Future<?> future = ClientBuilder.newBuilder().build() .target(url) .request().header("project", projectPath).header("mavenrepo", mavenRepoPath).header("settings_xml",settingsXmlPath) .accept(MediaType.APPLICATION_OCTET_STREAM) .async() .post(null, new InvocationCallback<KieCompilationResponse>() { @Override public void completed(final KieCompilationResponse result) { cfInternal.complete(result); } @Override public void failed(final Throwable throwable) { cfInternal.completeExceptionally(throwable); } }); return cfInternal.whenComplete((result, exception) -> { if (CancellationException.class.isInstance(exception)) { future.cancel(true); } }); } }
MavenRestClient { public CompletableFuture<KieCompilationResponse> call(String projectPath, String mavenRepoPath, String settingsXmlPath, String url) { final CompletableFuture<KieCompilationResponse> cfInternal = new CompletableFuture<>(); Future<?> future = ClientBuilder.newBuilder().build() .target(url) .request().header("project", projectPath).header("mavenrepo", mavenRepoPath).header("settings_xml",settingsXmlPath) .accept(MediaType.APPLICATION_OCTET_STREAM) .async() .post(null, new InvocationCallback<KieCompilationResponse>() { @Override public void completed(final KieCompilationResponse result) { cfInternal.complete(result); } @Override public void failed(final Throwable throwable) { cfInternal.completeExceptionally(throwable); } }); return cfInternal.whenComplete((result, exception) -> { if (CancellationException.class.isInstance(exception)) { future.cancel(true); } }); } CompletableFuture<KieCompilationResponse> call(String projectPath, String mavenRepoPath, String settingsXmlPath, String url); }
MavenRestClient { public CompletableFuture<KieCompilationResponse> call(String projectPath, String mavenRepoPath, String settingsXmlPath, String url) { final CompletableFuture<KieCompilationResponse> cfInternal = new CompletableFuture<>(); Future<?> future = ClientBuilder.newBuilder().build() .target(url) .request().header("project", projectPath).header("mavenrepo", mavenRepoPath).header("settings_xml",settingsXmlPath) .accept(MediaType.APPLICATION_OCTET_STREAM) .async() .post(null, new InvocationCallback<KieCompilationResponse>() { @Override public void completed(final KieCompilationResponse result) { cfInternal.complete(result); } @Override public void failed(final Throwable throwable) { cfInternal.completeExceptionally(throwable); } }); return cfInternal.whenComplete((result, exception) -> { if (CancellationException.class.isInstance(exception)) { future.cancel(true); } }); } CompletableFuture<KieCompilationResponse> call(String projectPath, String mavenRepoPath, String settingsXmlPath, String url); }
@Test public void get() { try { fileSystemTestingUtils.setup(); ioService = fileSystemTestingUtils.getIoService(); final String repoName = "myrepo"; final JGitFileSystem fs = (JGitFileSystem) ioService.newFileSystem(URI.create("git: new HashMap<String, Object>() {{ put("init", Boolean.TRUE); put("internal", Boolean.TRUE); }}); ioService.startBatch(fs); String pom = "target/test-classes/kjar-2-single-resources/pom.xml"; if (!runIntoMavenCLI) { pom = "kie-wb-common-services/kie-wb-common-compiler/kie-wb-common-compiler-distribution/target/test-classes/kjar-2-single-resources/pom.xml"; } ioService.write(fs.getPath("/kjar-2-single-resources/pom.xml"), new String(java.nio.file.Files.readAllBytes(new File(pom).toPath()))); String personDotJava = "target/test-classes/kjar-2-single-resources/src/main/java/org/kie/maven/plugin/test/Person.java"; if (!runIntoMavenCLI) { personDotJava = "kie-wb-common-services/kie-wb-common-compiler/kie-wb-common-compiler-distribution/target/test-classes/kjar-2-single-resources/src/main/java/org/kie/maven/plugin/test/Person.java"; } ioService.write(fs.getPath("/kjar-2-single-resources/src/main/java/org/kie/maven/plugin/test/Person.java"), new String(java.nio.file.Files.readAllBytes(new File(personDotJava).toPath()))); String simpleRulesDotDRL = "target/test-classes/kjar-2-single-resources/src/main/resources/AllResourcesTypes/simple-rules.drl"; if (!runIntoMavenCLI) { simpleRulesDotDRL = "kie-wb-common-services/kie-wb-common-compiler/kie-wb-common-compiler-distribution/target/test-classes/kjar-2-single-resources/src/main/resources/AllResourceTypes/simple-rules.drl"; } ioService.write(fs.getPath("/kjar-2-single-resources/src/main/resources/AllResourcesTypes/simple-rules.drl"), new String(java.nio.file.Files.readAllBytes(new File(simpleRulesDotDRL).toPath()))); String kmodule = "target/test-classes/kjar-2-single-resources/src/main/resources/META-INF/kmodule.xml"; if (!runIntoMavenCLI) { kmodule = "kie-wb-common-services/kie-wb-common-compiler/kie-wb-common-compiler-distribution/target/test-classes/kjar-2-single-resources/src/main/resources/META-INF/kmodule.xml"; } ioService.write(fs.getPath("/kjar-2-single-resources/src/main/resources/META-INF/kmodule.xml"), new String(java.nio.file.Files.readAllBytes(new File(kmodule).toPath()))); ioService.endBatch(); java.nio.file.Path tmpRootCloned = java.nio.file.Files.createTempDirectory("cloned"); java.nio.file.Path tmpCloned = java.nio.file.Files.createDirectories(java.nio.file.Paths.get(tmpRootCloned.toString(), "dummy")); final File gitClonedFolder = new File(tmpCloned.toFile(), ".clone.git"); final Git cloned = Git.cloneRepository().setURI(fs.getGit().getRepository().getDirectory().toURI().toString()).setBare(false).setDirectory(gitClonedFolder).call(); assertThat(cloned).isNotNull(); mavenRepoPath = java.nio.file.Paths.get(System.getProperty("user.home"), ".m2", "repository"); tmpRoot = java.nio.file.Paths.get(gitClonedFolder + "/dummy/"); Dispatcher dispatcher = MockDispatcherFactory.createDispatcher(); POJOResourceFactory noDefaults = new POJOResourceFactory(MavenRestHandler.class); dispatcher.getRegistry().addResourceFactory(noDefaults); MockHttpRequest request = MockHttpRequest.get("build/maven/"); MockHttpResponse response = new MockHttpResponse(); dispatcher.invoke(request, response); assertThat(response.getStatus()).isEqualTo(200); assertThat(response.getContentAsString()).isEqualTo("Apache Maven"); tearDown(); } catch (Exception e) { logger.error(e.getMessage()); } finally { fileSystemTestingUtils.cleanup(); } }
@GET @Produces("text/plain") public String get() { return maven; }
MavenRestHandler extends Application { @GET @Produces("text/plain") public String get() { return maven; } }
MavenRestHandler extends Application { @GET @Produces("text/plain") public String get() { return maven; } MavenRestHandler(); }
MavenRestHandler extends Application { @GET @Produces("text/plain") public String get() { return maven; } MavenRestHandler(); @GET @Produces("text/plain") String get(); @POST @Produces(MediaType.APPLICATION_OCTET_STREAM) void postAsync(@Suspended AsyncResponse ar, @HeaderParam("project") String projectRepo, @HeaderParam("mavenrepo") String mavenRepoPath, @HeaderParam("settings_xml") String settingsXmlPath); }
MavenRestHandler extends Application { @GET @Produces("text/plain") public String get() { return maven; } MavenRestHandler(); @GET @Produces("text/plain") String get(); @POST @Produces(MediaType.APPLICATION_OCTET_STREAM) void postAsync(@Suspended AsyncResponse ar, @HeaderParam("project") String projectRepo, @HeaderParam("mavenrepo") String mavenRepoPath, @HeaderParam("settings_xml") String settingsXmlPath); }
@Test public void post() { try { fileSystemTestingUtils.setup(); ioService = fileSystemTestingUtils.getIoService(); final String repoName = "myrepo"; final JGitFileSystem fs = (JGitFileSystem) ioService.newFileSystem(URI.create("git: new HashMap<String, Object>() {{ put("init", Boolean.TRUE); put("internal", Boolean.TRUE); }}); ioService.startBatch(fs); String pom = "target/test-classes/kjar-2-single-resources/pom.xml"; if (!runIntoMavenCLI) { pom = "kie-wb-common-services/kie-wb-common-compiler/kie-wb-common-compiler-distribution/target/test-classes/kjar-2-single-resources/pom.xml"; } ioService.write(fs.getPath("/kjar-2-single-resources/pom.xml"), new String(java.nio.file.Files.readAllBytes(new File(pom).toPath()))); String personDotJava = "target/test-classes/kjar-2-single-resources/src/main/java/org/kie/maven/plugin/test/Person.java"; if (!runIntoMavenCLI) { personDotJava = "kie-wb-common-services/kie-wb-common-compiler/kie-wb-common-compiler-distribution/target/test-classes/kjar-2-single-resources/src/main/java/org/kie/maven/plugin/test/Person.java"; } ioService.write(fs.getPath("/kjar-2-single-resources/src/main/java/org/kie/maven/plugin/test/Person.java"), new String(java.nio.file.Files.readAllBytes(new File(personDotJava).toPath()))); String simpleRulesDotDRL = "target/test-classes/kjar-2-single-resources/src/main/resources/AllResourcesTypes/simple-rules.drl"; if (!runIntoMavenCLI) { simpleRulesDotDRL = "kie-wb-common-services/kie-wb-common-compiler/kie-wb-common-compiler-distribution/target/test-classes/kjar-2-single-resources/src/main/resources/AllResourceTypes/simple-rules.drl"; } ioService.write(fs.getPath("/kjar-2-single-resources/src/main/resources/AllResourcesTypes/simple-rules.drl"), new String(java.nio.file.Files.readAllBytes(new File(simpleRulesDotDRL).toPath()))); String kmodule = "target/test-classes/kjar-2-single-resources/src/main/resources/META-INF/kmodule.xml"; if (!runIntoMavenCLI) { kmodule = "kie-wb-common-services/kie-wb-common-compiler/kie-wb-common-compiler-distribution/target/test-classes/kjar-2-single-resources/src/main/resources/META-INF/kmodule.xml"; } ioService.write(fs.getPath("/kjar-2-single-resources/src/main/resources/META-INF/kmodule.xml"), new String(java.nio.file.Files.readAllBytes(new File(kmodule).toPath()))); ioService.endBatch(); java.nio.file.Path tmpRootCloned = java.nio.file.Files.createTempDirectory("cloned"); java.nio.file.Path tmpCloned = java.nio.file.Files.createDirectories(java.nio.file.Paths.get(tmpRootCloned.toString(), "dummy")); final File gitClonedFolder = new File(tmpCloned.toFile(), ".clone.git"); final Git cloned = Git.cloneRepository().setURI(fs.getGit().getRepository().getDirectory().toURI().toString()).setBare(false).setDirectory(gitClonedFolder).call(); assertThat(cloned).isNotNull(); mavenRepoPath = java.nio.file.Paths.get(System.getProperty("user.home"), ".m2", "repository"); tmpRoot = java.nio.file.Paths.get(gitClonedFolder + "/dummy/"); Dispatcher dispatcher = new AsynchronousDispatcher(new ResteasyProviderFactory()); ResteasyProviderFactory.setInstance(dispatcher.getProviderFactory()); RegisterBuiltin.register(dispatcher.getProviderFactory()); POJOResourceFactory noDefaults = new POJOResourceFactory(MavenRestHandler.class); dispatcher.getRegistry().addResourceFactory(noDefaults); MockHttpRequest request = MockHttpRequest.create("POST", "build/maven/"); request.header("project", tmpRoot.toAbsolutePath().toString() + "/dummy").header("mavenrepo", mavenRepoPath.toAbsolutePath().toString()); MockHttpResponse response = new MockHttpResponse(); SynchronousExecutionContext synchronousExecutionContext = new SynchronousExecutionContext((SynchronousDispatcher) dispatcher, request, response); request.setAsynchronousContext(synchronousExecutionContext); dispatcher.invoke(request, response); assertThat(response.getStatus()).isEqualTo(200); byte[] serializedCompilationResponse = response.getOutput(); HttpCompilationResponse res = RestUtils.readDefaultCompilationResponseFromBytes(serializedCompilationResponse); assertThat(res).isNotNull(); assertThat(res.getDependencies()).hasSize(4); assertThat(res.getTargetContent()).hasSize(3); tearDown(); } catch (Exception e) { logger.error(e.getMessage()); } finally { fileSystemTestingUtils.cleanup(); } }
@GET @Produces("text/plain") public String get() { return maven; }
MavenRestHandler extends Application { @GET @Produces("text/plain") public String get() { return maven; } }
MavenRestHandler extends Application { @GET @Produces("text/plain") public String get() { return maven; } MavenRestHandler(); }
MavenRestHandler extends Application { @GET @Produces("text/plain") public String get() { return maven; } MavenRestHandler(); @GET @Produces("text/plain") String get(); @POST @Produces(MediaType.APPLICATION_OCTET_STREAM) void postAsync(@Suspended AsyncResponse ar, @HeaderParam("project") String projectRepo, @HeaderParam("mavenrepo") String mavenRepoPath, @HeaderParam("settings_xml") String settingsXmlPath); }
MavenRestHandler extends Application { @GET @Produces("text/plain") public String get() { return maven; } MavenRestHandler(); @GET @Produces("text/plain") String get(); @POST @Produces(MediaType.APPLICATION_OCTET_STREAM) void postAsync(@Suspended AsyncResponse ar, @HeaderParam("project") String projectRepo, @HeaderParam("mavenrepo") String mavenRepoPath, @HeaderParam("settings_xml") String settingsXmlPath); }
@Test public void buildNonExistentProject() throws Exception { AFCompilerService service = new DefaultKieCompilerService(); CompletableFuture<KieCompilationResponse> futureRes = service.build(tmpRoot, mavenRepoPath, TestUtilMaven.getSettingsFile()); KieCompilationResponse res = futureRes.get(); assertThat(res.isSuccessful()).isFalse(); }
@Override public CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML) { return localExecutor.build(projectPath, mavenRepoPath, settingXML); }
DefaultKieCompilerService implements AFCompilerService { @Override public CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML) { return localExecutor.build(projectPath, mavenRepoPath, settingXML); } }
DefaultKieCompilerService implements AFCompilerService { @Override public CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML) { return localExecutor.build(projectPath, mavenRepoPath, settingXML); } DefaultKieCompilerService(); }
DefaultKieCompilerService implements AFCompilerService { @Override public CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML) { return localExecutor.build(projectPath, mavenRepoPath, settingXML); } DefaultKieCompilerService(); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML, Map<Path, InputStream> override); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(Path projectPath, String mavenRepoPath, String[] args); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(Path projectPath, String mavenRepoPath, String[] args, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> build(String projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> build(String projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(String projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(String projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(String projectPath, String mavenRepoPath, String settingXML, String[] args); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(String projectPath, String mavenRepoPath, String[] args, Boolean skipPrjDependenciesCreationList); }
DefaultKieCompilerService implements AFCompilerService { @Override public CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML) { return localExecutor.build(projectPath, mavenRepoPath, settingXML); } DefaultKieCompilerService(); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML, Map<Path, InputStream> override); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(Path projectPath, String mavenRepoPath, String[] args); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(Path projectPath, String mavenRepoPath, String[] args, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> build(String projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> build(String projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(String projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(String projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(String projectPath, String mavenRepoPath, String settingXML, String[] args); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(String projectPath, String mavenRepoPath, String[] args, Boolean skipPrjDependenciesCreationList); }
@Test public void testGetExistingNode() { final JSITDecision nodeDRGElement = makeDecision("id1"); final JSITDecision definitionsDRGElement1 = makeDecision("id1"); final JSITDecision definitionsDRGElement2 = makeDecision("id2"); final JSITDecision definitionsDRGElement3 = makeDecision("id3"); final DMNMarshaller dmnMarshaller = new DMNMarshaller(); final JSITDefinitions definitions = spy(new JSITDefinitions()); final List<JSITDRGElement> definitionsDRGElements = new ArrayList<>(asList(definitionsDRGElement1, definitionsDRGElement2, definitionsDRGElement3)); doReturn(definitionsDRGElements).when(definitions).getDrgElement(); final Optional<JSITDRGElement> existingNode = dmnMarshaller.getExistingNode(definitions, nodeDRGElement); assertTrue(existingNode.isPresent()); assertEquals(definitionsDRGElement1, existingNode.get()); }
Optional<JSITDRGElement> getExistingNode(final JSITDefinitions definitions, final JSITDRGElement node) { final JSITDRGElement[] existingDRGElement = new JSITDRGElement[1]; forEach(definitions.getDrgElement(), drgElement -> { if (Objects.equals(drgElement.getId(), node.getId())) { existingDRGElement[0] = drgElement; } }); final JSITDRGElement value = Js.uncheckedCast(existingDRGElement[0]); return Optional.ofNullable(value); }
DMNMarshaller { Optional<JSITDRGElement> getExistingNode(final JSITDefinitions definitions, final JSITDRGElement node) { final JSITDRGElement[] existingDRGElement = new JSITDRGElement[1]; forEach(definitions.getDrgElement(), drgElement -> { if (Objects.equals(drgElement.getId(), node.getId())) { existingDRGElement[0] = drgElement; } }); final JSITDRGElement value = Js.uncheckedCast(existingDRGElement[0]); return Optional.ofNullable(value); } }
DMNMarshaller { Optional<JSITDRGElement> getExistingNode(final JSITDefinitions definitions, final JSITDRGElement node) { final JSITDRGElement[] existingDRGElement = new JSITDRGElement[1]; forEach(definitions.getDrgElement(), drgElement -> { if (Objects.equals(drgElement.getId(), node.getId())) { existingDRGElement[0] = drgElement; } }); final JSITDRGElement value = Js.uncheckedCast(existingDRGElement[0]); return Optional.ofNullable(value); } protected DMNMarshaller(); @Inject DMNMarshaller(final FactoryManager factoryManager); }
DMNMarshaller { Optional<JSITDRGElement> getExistingNode(final JSITDefinitions definitions, final JSITDRGElement node) { final JSITDRGElement[] existingDRGElement = new JSITDRGElement[1]; forEach(definitions.getDrgElement(), drgElement -> { if (Objects.equals(drgElement.getId(), node.getId())) { existingDRGElement[0] = drgElement; } }); final JSITDRGElement value = Js.uncheckedCast(existingDRGElement[0]); return Optional.ofNullable(value); } protected DMNMarshaller(); @Inject DMNMarshaller(final FactoryManager factoryManager); @PostConstruct void init(); JSITDefinitions marshall(); List<Node> getNodeStream(final Diagram diagram); @SuppressWarnings("unchecked") JSITDRGElement stunnerToDMN(final Node<?, ?> node, final Consumer<JSITComponentWidths> componentWidthsConsumer); }
DMNMarshaller { Optional<JSITDRGElement> getExistingNode(final JSITDefinitions definitions, final JSITDRGElement node) { final JSITDRGElement[] existingDRGElement = new JSITDRGElement[1]; forEach(definitions.getDrgElement(), drgElement -> { if (Objects.equals(drgElement.getId(), node.getId())) { existingDRGElement[0] = drgElement; } }); final JSITDRGElement value = Js.uncheckedCast(existingDRGElement[0]); return Optional.ofNullable(value); } protected DMNMarshaller(); @Inject DMNMarshaller(final FactoryManager factoryManager); @PostConstruct void init(); JSITDefinitions marshall(); List<Node> getNodeStream(final Diagram diagram); @SuppressWarnings("unchecked") JSITDRGElement stunnerToDMN(final Node<?, ?> node, final Consumer<JSITComponentWidths> componentWidthsConsumer); static final String PREFIX; }
@Test public void buildAndSkipDepsNonExistentProject() throws Exception { AFCompilerService service = new DefaultKieCompilerService(); CompletableFuture<KieCompilationResponse> futureRes = service.build(tmpRoot, mavenRepoPath, TestUtilMaven.getSettingsFile(), Boolean.FALSE); KieCompilationResponse res = futureRes.get(); assertThat(res.isSuccessful()).isFalse(); assertThat(res.getDependencies()).isEmpty(); }
@Override public CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML) { return localExecutor.build(projectPath, mavenRepoPath, settingXML); }
DefaultKieCompilerService implements AFCompilerService { @Override public CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML) { return localExecutor.build(projectPath, mavenRepoPath, settingXML); } }
DefaultKieCompilerService implements AFCompilerService { @Override public CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML) { return localExecutor.build(projectPath, mavenRepoPath, settingXML); } DefaultKieCompilerService(); }
DefaultKieCompilerService implements AFCompilerService { @Override public CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML) { return localExecutor.build(projectPath, mavenRepoPath, settingXML); } DefaultKieCompilerService(); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML, Map<Path, InputStream> override); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(Path projectPath, String mavenRepoPath, String[] args); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(Path projectPath, String mavenRepoPath, String[] args, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> build(String projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> build(String projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(String projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(String projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(String projectPath, String mavenRepoPath, String settingXML, String[] args); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(String projectPath, String mavenRepoPath, String[] args, Boolean skipPrjDependenciesCreationList); }
DefaultKieCompilerService implements AFCompilerService { @Override public CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML) { return localExecutor.build(projectPath, mavenRepoPath, settingXML); } DefaultKieCompilerService(); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML, Map<Path, InputStream> override); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(Path projectPath, String mavenRepoPath, String[] args); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(Path projectPath, String mavenRepoPath, String[] args, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> build(String projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> build(String projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(String projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(String projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(String projectPath, String mavenRepoPath, String settingXML, String[] args); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(String projectPath, String mavenRepoPath, String[] args, Boolean skipPrjDependenciesCreationList); }
@Test public void buildAndInstallNonExistentProject() throws Exception { AFCompilerService service = new DefaultKieCompilerService(); CompletableFuture<KieCompilationResponse> futureRes = service.buildAndInstall(tmpRoot, mavenRepoPath,TestUtilMaven.getSettingsFile()); KieCompilationResponse res = futureRes.get(); assertThat(res.isSuccessful()).isFalse(); }
@Override public CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath, String mavenRepoPath, String settingXML) { return localExecutor.buildAndInstall(projectPath, mavenRepoPath, settingXML); }
DefaultKieCompilerService implements AFCompilerService { @Override public CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath, String mavenRepoPath, String settingXML) { return localExecutor.buildAndInstall(projectPath, mavenRepoPath, settingXML); } }
DefaultKieCompilerService implements AFCompilerService { @Override public CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath, String mavenRepoPath, String settingXML) { return localExecutor.buildAndInstall(projectPath, mavenRepoPath, settingXML); } DefaultKieCompilerService(); }
DefaultKieCompilerService implements AFCompilerService { @Override public CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath, String mavenRepoPath, String settingXML) { return localExecutor.buildAndInstall(projectPath, mavenRepoPath, settingXML); } DefaultKieCompilerService(); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML, Map<Path, InputStream> override); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(Path projectPath, String mavenRepoPath, String[] args); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(Path projectPath, String mavenRepoPath, String[] args, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> build(String projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> build(String projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(String projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(String projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(String projectPath, String mavenRepoPath, String settingXML, String[] args); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(String projectPath, String mavenRepoPath, String[] args, Boolean skipPrjDependenciesCreationList); }
DefaultKieCompilerService implements AFCompilerService { @Override public CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath, String mavenRepoPath, String settingXML) { return localExecutor.buildAndInstall(projectPath, mavenRepoPath, settingXML); } DefaultKieCompilerService(); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML, Map<Path, InputStream> override); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(Path projectPath, String mavenRepoPath, String[] args); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(Path projectPath, String mavenRepoPath, String[] args, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> build(String projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> build(String projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(String projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(String projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(String projectPath, String mavenRepoPath, String settingXML, String[] args); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(String projectPath, String mavenRepoPath, String[] args, Boolean skipPrjDependenciesCreationList); }
@Test public void buildAndInstallSkipDepsNonExistentProject() throws Exception { AFCompilerService service = new DefaultKieCompilerService(); CompletableFuture<KieCompilationResponse> futureRes = service.buildAndInstall(tmpRoot, mavenRepoPath, TestUtilMaven.getSettingsFile(), Boolean.FALSE); KieCompilationResponse res = futureRes.get(); assertThat(res.isSuccessful()).isFalse(); assertThat(res.getDependencies()).isEmpty(); }
@Override public CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath, String mavenRepoPath, String settingXML) { return localExecutor.buildAndInstall(projectPath, mavenRepoPath, settingXML); }
DefaultKieCompilerService implements AFCompilerService { @Override public CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath, String mavenRepoPath, String settingXML) { return localExecutor.buildAndInstall(projectPath, mavenRepoPath, settingXML); } }
DefaultKieCompilerService implements AFCompilerService { @Override public CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath, String mavenRepoPath, String settingXML) { return localExecutor.buildAndInstall(projectPath, mavenRepoPath, settingXML); } DefaultKieCompilerService(); }
DefaultKieCompilerService implements AFCompilerService { @Override public CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath, String mavenRepoPath, String settingXML) { return localExecutor.buildAndInstall(projectPath, mavenRepoPath, settingXML); } DefaultKieCompilerService(); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML, Map<Path, InputStream> override); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(Path projectPath, String mavenRepoPath, String[] args); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(Path projectPath, String mavenRepoPath, String[] args, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> build(String projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> build(String projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(String projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(String projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(String projectPath, String mavenRepoPath, String settingXML, String[] args); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(String projectPath, String mavenRepoPath, String[] args, Boolean skipPrjDependenciesCreationList); }
DefaultKieCompilerService implements AFCompilerService { @Override public CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath, String mavenRepoPath, String settingXML) { return localExecutor.buildAndInstall(projectPath, mavenRepoPath, settingXML); } DefaultKieCompilerService(); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML, Map<Path, InputStream> override); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(Path projectPath, String mavenRepoPath, String[] args); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(Path projectPath, String mavenRepoPath, String[] args, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> build(String projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> build(String projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(String projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(String projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(String projectPath, String mavenRepoPath, String settingXML, String[] args); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(String projectPath, String mavenRepoPath, String[] args, Boolean skipPrjDependenciesCreationList); }
@Test public void buildExistentProject() throws Exception { AFCompilerService service = new DefaultKieCompilerService(); CompletableFuture<KieCompilationResponse> futureRes = service.build(Paths.get(tmpRoot.toAbsolutePath() + "/dummy"), mavenRepoPath, TestUtilMaven.getSettingsFile()); KieCompilationResponse res = futureRes.get(); assertThat(res.isSuccessful()).isTrue(); }
@Override public CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML) { return localExecutor.build(projectPath, mavenRepoPath, settingXML); }
DefaultKieCompilerService implements AFCompilerService { @Override public CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML) { return localExecutor.build(projectPath, mavenRepoPath, settingXML); } }
DefaultKieCompilerService implements AFCompilerService { @Override public CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML) { return localExecutor.build(projectPath, mavenRepoPath, settingXML); } DefaultKieCompilerService(); }
DefaultKieCompilerService implements AFCompilerService { @Override public CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML) { return localExecutor.build(projectPath, mavenRepoPath, settingXML); } DefaultKieCompilerService(); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML, Map<Path, InputStream> override); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(Path projectPath, String mavenRepoPath, String[] args); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(Path projectPath, String mavenRepoPath, String[] args, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> build(String projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> build(String projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(String projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(String projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(String projectPath, String mavenRepoPath, String settingXML, String[] args); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(String projectPath, String mavenRepoPath, String[] args, Boolean skipPrjDependenciesCreationList); }
DefaultKieCompilerService implements AFCompilerService { @Override public CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML) { return localExecutor.build(projectPath, mavenRepoPath, settingXML); } DefaultKieCompilerService(); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML, Map<Path, InputStream> override); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(Path projectPath, String mavenRepoPath, String[] args); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(Path projectPath, String mavenRepoPath, String[] args, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> build(String projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> build(String projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(String projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(String projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(String projectPath, String mavenRepoPath, String settingXML, String[] args); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(String projectPath, String mavenRepoPath, String[] args, Boolean skipPrjDependenciesCreationList); }
@Test public void buildAndInstallExistentProject() throws Exception { AFCompilerService service = new DefaultKieCompilerService(); CompletableFuture<KieCompilationResponse> futureRes = service.buildAndInstall(Paths.get(tmpRoot.toAbsolutePath() + "/dummy"), mavenRepoPath, TestUtilMaven.getSettingsFile()); KieCompilationResponse res = futureRes.get(); assertThat(res.isSuccessful()).isTrue(); assertThat(res.getDependencies()).isNotEmpty(); assertThat(res.getDependencies().size()).isGreaterThan(0); }
@Override public CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath, String mavenRepoPath, String settingXML) { return localExecutor.buildAndInstall(projectPath, mavenRepoPath, settingXML); }
DefaultKieCompilerService implements AFCompilerService { @Override public CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath, String mavenRepoPath, String settingXML) { return localExecutor.buildAndInstall(projectPath, mavenRepoPath, settingXML); } }
DefaultKieCompilerService implements AFCompilerService { @Override public CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath, String mavenRepoPath, String settingXML) { return localExecutor.buildAndInstall(projectPath, mavenRepoPath, settingXML); } DefaultKieCompilerService(); }
DefaultKieCompilerService implements AFCompilerService { @Override public CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath, String mavenRepoPath, String settingXML) { return localExecutor.buildAndInstall(projectPath, mavenRepoPath, settingXML); } DefaultKieCompilerService(); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML, Map<Path, InputStream> override); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(Path projectPath, String mavenRepoPath, String[] args); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(Path projectPath, String mavenRepoPath, String[] args, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> build(String projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> build(String projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(String projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(String projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(String projectPath, String mavenRepoPath, String settingXML, String[] args); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(String projectPath, String mavenRepoPath, String[] args, Boolean skipPrjDependenciesCreationList); }
DefaultKieCompilerService implements AFCompilerService { @Override public CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath, String mavenRepoPath, String settingXML) { return localExecutor.buildAndInstall(projectPath, mavenRepoPath, settingXML); } DefaultKieCompilerService(); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML, Map<Path, InputStream> override); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(Path projectPath, String mavenRepoPath, String[] args); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(Path projectPath, String mavenRepoPath, String[] args, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> build(String projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> build(String projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(String projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(String projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(String projectPath, String mavenRepoPath, String settingXML, String[] args); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(String projectPath, String mavenRepoPath, String[] args, Boolean skipPrjDependenciesCreationList); }
@Test public void buildAndInstallSkipDepsExistentProject() throws Exception { AFCompilerService service = new DefaultKieCompilerService(); CompletableFuture<KieCompilationResponse> futureRes = service.buildAndInstall(Paths.get(tmpRoot.toAbsolutePath() + "/dummy"), mavenRepoPath, TestUtilMaven.getSettingsFile(), Boolean.TRUE); KieCompilationResponse res = futureRes.get(); assertThat(res.isSuccessful()).isTrue(); assertThat(res.getDependencies()).isEmpty(); }
@Override public CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath, String mavenRepoPath, String settingXML) { return localExecutor.buildAndInstall(projectPath, mavenRepoPath, settingXML); }
DefaultKieCompilerService implements AFCompilerService { @Override public CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath, String mavenRepoPath, String settingXML) { return localExecutor.buildAndInstall(projectPath, mavenRepoPath, settingXML); } }
DefaultKieCompilerService implements AFCompilerService { @Override public CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath, String mavenRepoPath, String settingXML) { return localExecutor.buildAndInstall(projectPath, mavenRepoPath, settingXML); } DefaultKieCompilerService(); }
DefaultKieCompilerService implements AFCompilerService { @Override public CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath, String mavenRepoPath, String settingXML) { return localExecutor.buildAndInstall(projectPath, mavenRepoPath, settingXML); } DefaultKieCompilerService(); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML, Map<Path, InputStream> override); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(Path projectPath, String mavenRepoPath, String[] args); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(Path projectPath, String mavenRepoPath, String[] args, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> build(String projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> build(String projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(String projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(String projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(String projectPath, String mavenRepoPath, String settingXML, String[] args); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(String projectPath, String mavenRepoPath, String[] args, Boolean skipPrjDependenciesCreationList); }
DefaultKieCompilerService implements AFCompilerService { @Override public CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath, String mavenRepoPath, String settingXML) { return localExecutor.buildAndInstall(projectPath, mavenRepoPath, settingXML); } DefaultKieCompilerService(); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML, Map<Path, InputStream> override); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(Path projectPath, String mavenRepoPath, String[] args); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(Path projectPath, String mavenRepoPath, String[] args, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> build(String projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> build(String projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(String projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(String projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(String projectPath, String mavenRepoPath, String settingXML, String[] args); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(String projectPath, String mavenRepoPath, String[] args, Boolean skipPrjDependenciesCreationList); }
@Test public void buildSpecializedNonExistentProject() throws Exception { AFCompilerService service = new DefaultKieCompilerService(); CompletableFuture<KieCompilationResponse> futureRes = service.buildSpecialized(tmpRoot, mavenRepoPath, new String[]{MavenCLIArgs.ALTERNATE_USER_SETTINGS + TestUtilMaven.getSettingsFile(), MavenCLIArgs.COMPILE}); KieCompilationResponse res = futureRes.get(); assertThat(res.isSuccessful()).isFalse(); }
@Override public CompletableFuture<KieCompilationResponse> buildSpecialized(Path projectPath, String mavenRepoPath, String[] args) { return localExecutor.buildSpecialized(projectPath, mavenRepoPath, args); }
DefaultKieCompilerService implements AFCompilerService { @Override public CompletableFuture<KieCompilationResponse> buildSpecialized(Path projectPath, String mavenRepoPath, String[] args) { return localExecutor.buildSpecialized(projectPath, mavenRepoPath, args); } }
DefaultKieCompilerService implements AFCompilerService { @Override public CompletableFuture<KieCompilationResponse> buildSpecialized(Path projectPath, String mavenRepoPath, String[] args) { return localExecutor.buildSpecialized(projectPath, mavenRepoPath, args); } DefaultKieCompilerService(); }
DefaultKieCompilerService implements AFCompilerService { @Override public CompletableFuture<KieCompilationResponse> buildSpecialized(Path projectPath, String mavenRepoPath, String[] args) { return localExecutor.buildSpecialized(projectPath, mavenRepoPath, args); } DefaultKieCompilerService(); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML, Map<Path, InputStream> override); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(Path projectPath, String mavenRepoPath, String[] args); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(Path projectPath, String mavenRepoPath, String[] args, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> build(String projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> build(String projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(String projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(String projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(String projectPath, String mavenRepoPath, String settingXML, String[] args); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(String projectPath, String mavenRepoPath, String[] args, Boolean skipPrjDependenciesCreationList); }
DefaultKieCompilerService implements AFCompilerService { @Override public CompletableFuture<KieCompilationResponse> buildSpecialized(Path projectPath, String mavenRepoPath, String[] args) { return localExecutor.buildSpecialized(projectPath, mavenRepoPath, args); } DefaultKieCompilerService(); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML, Map<Path, InputStream> override); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(Path projectPath, String mavenRepoPath, String[] args); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(Path projectPath, String mavenRepoPath, String[] args, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> build(String projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> build(String projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(String projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(String projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(String projectPath, String mavenRepoPath, String settingXML, String[] args); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(String projectPath, String mavenRepoPath, String[] args, Boolean skipPrjDependenciesCreationList); }
@Test public void buildSpecializedSkipDepsExistentProject() throws Exception { AFCompilerService service = new DefaultKieCompilerService(); CompletableFuture<KieCompilationResponse> futureRes = service.buildSpecialized(Paths.get(tmpRoot.toAbsolutePath() + "/dummy"), mavenRepoPath, new String[]{ MavenCLIArgs.ALTERNATE_USER_SETTINGS + TestUtilMaven.getSettingsFile(), MavenCLIArgs.COMPILE}, Boolean.TRUE); KieCompilationResponse res = futureRes.get(); assertThat(res.isSuccessful()).isTrue(); }
@Override public CompletableFuture<KieCompilationResponse> buildSpecialized(Path projectPath, String mavenRepoPath, String[] args) { return localExecutor.buildSpecialized(projectPath, mavenRepoPath, args); }
DefaultKieCompilerService implements AFCompilerService { @Override public CompletableFuture<KieCompilationResponse> buildSpecialized(Path projectPath, String mavenRepoPath, String[] args) { return localExecutor.buildSpecialized(projectPath, mavenRepoPath, args); } }
DefaultKieCompilerService implements AFCompilerService { @Override public CompletableFuture<KieCompilationResponse> buildSpecialized(Path projectPath, String mavenRepoPath, String[] args) { return localExecutor.buildSpecialized(projectPath, mavenRepoPath, args); } DefaultKieCompilerService(); }
DefaultKieCompilerService implements AFCompilerService { @Override public CompletableFuture<KieCompilationResponse> buildSpecialized(Path projectPath, String mavenRepoPath, String[] args) { return localExecutor.buildSpecialized(projectPath, mavenRepoPath, args); } DefaultKieCompilerService(); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML, Map<Path, InputStream> override); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(Path projectPath, String mavenRepoPath, String[] args); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(Path projectPath, String mavenRepoPath, String[] args, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> build(String projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> build(String projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(String projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(String projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(String projectPath, String mavenRepoPath, String settingXML, String[] args); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(String projectPath, String mavenRepoPath, String[] args, Boolean skipPrjDependenciesCreationList); }
DefaultKieCompilerService implements AFCompilerService { @Override public CompletableFuture<KieCompilationResponse> buildSpecialized(Path projectPath, String mavenRepoPath, String[] args) { return localExecutor.buildSpecialized(projectPath, mavenRepoPath, args); } DefaultKieCompilerService(); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML, Map<Path, InputStream> override); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(Path projectPath, String mavenRepoPath, String[] args); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(Path projectPath, String mavenRepoPath, String[] args, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> build(String projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> build(String projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(String projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(String projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(String projectPath, String mavenRepoPath, String settingXML, String[] args); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(String projectPath, String mavenRepoPath, String[] args, Boolean skipPrjDependenciesCreationList); }
@Test public void buildSpecializedSkipDepsNonExistentProject() throws Exception { AFCompilerService service = new DefaultKieCompilerService(); CompletableFuture<KieCompilationResponse> futureRes = service.buildSpecialized(tmpRoot, mavenRepoPath, new String[]{ MavenCLIArgs.ALTERNATE_USER_SETTINGS + TestUtilMaven.getSettingsFile(), MavenCLIArgs.COMPILE}, Boolean.TRUE); KieCompilationResponse res = futureRes.get(); assertThat(res.isSuccessful()).isFalse(); }
@Override public CompletableFuture<KieCompilationResponse> buildSpecialized(Path projectPath, String mavenRepoPath, String[] args) { return localExecutor.buildSpecialized(projectPath, mavenRepoPath, args); }
DefaultKieCompilerService implements AFCompilerService { @Override public CompletableFuture<KieCompilationResponse> buildSpecialized(Path projectPath, String mavenRepoPath, String[] args) { return localExecutor.buildSpecialized(projectPath, mavenRepoPath, args); } }
DefaultKieCompilerService implements AFCompilerService { @Override public CompletableFuture<KieCompilationResponse> buildSpecialized(Path projectPath, String mavenRepoPath, String[] args) { return localExecutor.buildSpecialized(projectPath, mavenRepoPath, args); } DefaultKieCompilerService(); }
DefaultKieCompilerService implements AFCompilerService { @Override public CompletableFuture<KieCompilationResponse> buildSpecialized(Path projectPath, String mavenRepoPath, String[] args) { return localExecutor.buildSpecialized(projectPath, mavenRepoPath, args); } DefaultKieCompilerService(); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML, Map<Path, InputStream> override); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(Path projectPath, String mavenRepoPath, String[] args); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(Path projectPath, String mavenRepoPath, String[] args, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> build(String projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> build(String projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(String projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(String projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(String projectPath, String mavenRepoPath, String settingXML, String[] args); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(String projectPath, String mavenRepoPath, String[] args, Boolean skipPrjDependenciesCreationList); }
DefaultKieCompilerService implements AFCompilerService { @Override public CompletableFuture<KieCompilationResponse> buildSpecialized(Path projectPath, String mavenRepoPath, String[] args) { return localExecutor.buildSpecialized(projectPath, mavenRepoPath, args); } DefaultKieCompilerService(); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML, Map<Path, InputStream> override); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(Path projectPath, String mavenRepoPath, String[] args); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(Path projectPath, String mavenRepoPath, String[] args, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> build(String projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> build(String projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(String projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(String projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(String projectPath, String mavenRepoPath, String settingXML, String[] args); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(String projectPath, String mavenRepoPath, String[] args, Boolean skipPrjDependenciesCreationList); }
@Test public void buildWithOverrideNonExistentProject() throws Exception { AFCompilerService service = new DefaultKieCompilerService(); Map<Path, InputStream> override = new HashMap<>(); org.uberfire.java.nio.file.Path path = org.uberfire.java.nio.file.Paths.get(tmpRoot + "/dummy/src/main/java/dummy/DummyOverride.java"); InputStream input = new FileInputStream(new File("target/test-classes/dummy_override/src/main/java/dummy/DummyOverride.java")); override.put(path, input); CompletableFuture<KieCompilationResponse> futureRes = service.build(tmpRoot, mavenRepoPath, TestUtilMaven.getSettingsFile(), override); KieCompilationResponse res = futureRes.get(); assertThat(res.isSuccessful()).isFalse(); }
@Override public CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML) { return localExecutor.build(projectPath, mavenRepoPath, settingXML); }
DefaultKieCompilerService implements AFCompilerService { @Override public CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML) { return localExecutor.build(projectPath, mavenRepoPath, settingXML); } }
DefaultKieCompilerService implements AFCompilerService { @Override public CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML) { return localExecutor.build(projectPath, mavenRepoPath, settingXML); } DefaultKieCompilerService(); }
DefaultKieCompilerService implements AFCompilerService { @Override public CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML) { return localExecutor.build(projectPath, mavenRepoPath, settingXML); } DefaultKieCompilerService(); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML, Map<Path, InputStream> override); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(Path projectPath, String mavenRepoPath, String[] args); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(Path projectPath, String mavenRepoPath, String[] args, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> build(String projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> build(String projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(String projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(String projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(String projectPath, String mavenRepoPath, String settingXML, String[] args); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(String projectPath, String mavenRepoPath, String[] args, Boolean skipPrjDependenciesCreationList); }
DefaultKieCompilerService implements AFCompilerService { @Override public CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML) { return localExecutor.build(projectPath, mavenRepoPath, settingXML); } DefaultKieCompilerService(); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML, Map<Path, InputStream> override); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(Path projectPath, String mavenRepoPath, String[] args); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(Path projectPath, String mavenRepoPath, String[] args, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> build(String projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> build(String projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(String projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(String projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(String projectPath, String mavenRepoPath, String settingXML, String[] args); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(String projectPath, String mavenRepoPath, String[] args, Boolean skipPrjDependenciesCreationList); }
@Test public void testWithIncludedModelsWhenNodeParentIsDefinitions() { final DMNMarshaller dmnMarshaller = spy(new DMNMarshaller()); final Node node = mock(Node.class); final Definition nodeDefinition = mock(Definition.class); final DRGElement drgElement = mock(DRGElement.class); final Definitions definitionsStunnerPojo = mock(Definitions.class); final Import import1 = mock(Import.class); final Import import2 = mock(Import.class); final List<Import> diagramImports = new ArrayList<>(asList(import1, import2)); final Definitions nodeDiagramDefinitions = mock(Definitions.class); final List<Import> nodeDiagramImports = new ArrayList<>(); when(node.getContent()).thenReturn(nodeDefinition); when(nodeDefinition.getDefinition()).thenReturn(drgElement); when(definitionsStunnerPojo.getImport()).thenReturn(diagramImports); when(drgElement.getParent()).thenReturn(nodeDiagramDefinitions); when(nodeDiagramDefinitions.getImport()).thenReturn(nodeDiagramImports); dmnMarshaller.withIncludedModels(node, definitionsStunnerPojo); assertEquals(2, nodeDiagramImports.size()); assertTrue(nodeDiagramImports.contains(import1)); assertTrue(nodeDiagramImports.contains(import2)); }
Node<?, ?> withIncludedModels(final Node<?, ?> node, final Definitions definitionsStunnerPojo) { final Object elementDefinition = getElementDefinition(node); final List<Import> diagramImports = definitionsStunnerPojo.getImport(); if (!(elementDefinition instanceof DRGElement) || diagramImports.isEmpty()) { return node; } final DRGElement drgElement = (DRGElement) elementDefinition; final Optional<Definitions> nodeDefinitions = getDefinitions(drgElement); if (!nodeDefinitions.isPresent()) { return node; } final List<Import> nodeImports = nodeDefinitions.get().getImport(); updateNodeImports(diagramImports, nodeImports); return node; }
DMNMarshaller { Node<?, ?> withIncludedModels(final Node<?, ?> node, final Definitions definitionsStunnerPojo) { final Object elementDefinition = getElementDefinition(node); final List<Import> diagramImports = definitionsStunnerPojo.getImport(); if (!(elementDefinition instanceof DRGElement) || diagramImports.isEmpty()) { return node; } final DRGElement drgElement = (DRGElement) elementDefinition; final Optional<Definitions> nodeDefinitions = getDefinitions(drgElement); if (!nodeDefinitions.isPresent()) { return node; } final List<Import> nodeImports = nodeDefinitions.get().getImport(); updateNodeImports(diagramImports, nodeImports); return node; } }
DMNMarshaller { Node<?, ?> withIncludedModels(final Node<?, ?> node, final Definitions definitionsStunnerPojo) { final Object elementDefinition = getElementDefinition(node); final List<Import> diagramImports = definitionsStunnerPojo.getImport(); if (!(elementDefinition instanceof DRGElement) || diagramImports.isEmpty()) { return node; } final DRGElement drgElement = (DRGElement) elementDefinition; final Optional<Definitions> nodeDefinitions = getDefinitions(drgElement); if (!nodeDefinitions.isPresent()) { return node; } final List<Import> nodeImports = nodeDefinitions.get().getImport(); updateNodeImports(diagramImports, nodeImports); return node; } protected DMNMarshaller(); @Inject DMNMarshaller(final FactoryManager factoryManager); }
DMNMarshaller { Node<?, ?> withIncludedModels(final Node<?, ?> node, final Definitions definitionsStunnerPojo) { final Object elementDefinition = getElementDefinition(node); final List<Import> diagramImports = definitionsStunnerPojo.getImport(); if (!(elementDefinition instanceof DRGElement) || diagramImports.isEmpty()) { return node; } final DRGElement drgElement = (DRGElement) elementDefinition; final Optional<Definitions> nodeDefinitions = getDefinitions(drgElement); if (!nodeDefinitions.isPresent()) { return node; } final List<Import> nodeImports = nodeDefinitions.get().getImport(); updateNodeImports(diagramImports, nodeImports); return node; } protected DMNMarshaller(); @Inject DMNMarshaller(final FactoryManager factoryManager); @PostConstruct void init(); JSITDefinitions marshall(); List<Node> getNodeStream(final Diagram diagram); @SuppressWarnings("unchecked") JSITDRGElement stunnerToDMN(final Node<?, ?> node, final Consumer<JSITComponentWidths> componentWidthsConsumer); }
DMNMarshaller { Node<?, ?> withIncludedModels(final Node<?, ?> node, final Definitions definitionsStunnerPojo) { final Object elementDefinition = getElementDefinition(node); final List<Import> diagramImports = definitionsStunnerPojo.getImport(); if (!(elementDefinition instanceof DRGElement) || diagramImports.isEmpty()) { return node; } final DRGElement drgElement = (DRGElement) elementDefinition; final Optional<Definitions> nodeDefinitions = getDefinitions(drgElement); if (!nodeDefinitions.isPresent()) { return node; } final List<Import> nodeImports = nodeDefinitions.get().getImport(); updateNodeImports(diagramImports, nodeImports); return node; } protected DMNMarshaller(); @Inject DMNMarshaller(final FactoryManager factoryManager); @PostConstruct void init(); JSITDefinitions marshall(); List<Node> getNodeStream(final Diagram diagram); @SuppressWarnings("unchecked") JSITDRGElement stunnerToDMN(final Node<?, ?> node, final Consumer<JSITComponentWidths> componentWidthsConsumer); static final String PREFIX; }
@Test public void buildWithOverrideExistentProject() throws Exception { AFCompilerService service = new DefaultKieCompilerService(); Map<org.uberfire.java.nio.file.Path, InputStream> override = new HashMap<>(); org.uberfire.java.nio.file.Path path = org.uberfire.java.nio.file.Paths.get(tmpRoot + "/dummy/src/main/java/dummy/DummyOverride.java"); InputStream input = new FileInputStream(new File("target/test-classes/dummy_override/src/main/java/dummy/DummyOverride.java")); override.put(path, input); CompletableFuture<KieCompilationResponse> futureRes = service.build(Paths.get(tmpRoot.toAbsolutePath() + "/dummy"), mavenRepoPath, TestUtilMaven.getSettingsFile(), override); KieCompilationResponse res = futureRes.get(); assertThat(res.isSuccessful()).isTrue(); }
@Override public CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML) { return localExecutor.build(projectPath, mavenRepoPath, settingXML); }
DefaultKieCompilerService implements AFCompilerService { @Override public CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML) { return localExecutor.build(projectPath, mavenRepoPath, settingXML); } }
DefaultKieCompilerService implements AFCompilerService { @Override public CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML) { return localExecutor.build(projectPath, mavenRepoPath, settingXML); } DefaultKieCompilerService(); }
DefaultKieCompilerService implements AFCompilerService { @Override public CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML) { return localExecutor.build(projectPath, mavenRepoPath, settingXML); } DefaultKieCompilerService(); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML, Map<Path, InputStream> override); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(Path projectPath, String mavenRepoPath, String[] args); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(Path projectPath, String mavenRepoPath, String[] args, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> build(String projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> build(String projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(String projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(String projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(String projectPath, String mavenRepoPath, String settingXML, String[] args); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(String projectPath, String mavenRepoPath, String[] args, Boolean skipPrjDependenciesCreationList); }
DefaultKieCompilerService implements AFCompilerService { @Override public CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML) { return localExecutor.build(projectPath, mavenRepoPath, settingXML); } DefaultKieCompilerService(); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML, Map<Path, InputStream> override); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(Path projectPath, String mavenRepoPath, String[] args); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(Path projectPath, String mavenRepoPath, String[] args, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> build(String projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> build(String projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(String projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(String projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(String projectPath, String mavenRepoPath, String settingXML, String[] args); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(String projectPath, String mavenRepoPath, String[] args, Boolean skipPrjDependenciesCreationList); }
@Test public void buildRemoteNonExistentProject() throws Exception { AFCompilerService service = new DefaultKieCompilerService(); CompletableFuture<KieCompilationResponse> futureRes = service.build(tmpRoot.toAbsolutePath().toString(), mavenRepoPath, TestUtilMaven.getSettingsFile()); KieCompilationResponse res = futureRes.get(); assertThat(res.isSuccessful()).isFalse(); }
@Override public CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML) { return localExecutor.build(projectPath, mavenRepoPath, settingXML); }
DefaultKieCompilerService implements AFCompilerService { @Override public CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML) { return localExecutor.build(projectPath, mavenRepoPath, settingXML); } }
DefaultKieCompilerService implements AFCompilerService { @Override public CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML) { return localExecutor.build(projectPath, mavenRepoPath, settingXML); } DefaultKieCompilerService(); }
DefaultKieCompilerService implements AFCompilerService { @Override public CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML) { return localExecutor.build(projectPath, mavenRepoPath, settingXML); } DefaultKieCompilerService(); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML, Map<Path, InputStream> override); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(Path projectPath, String mavenRepoPath, String[] args); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(Path projectPath, String mavenRepoPath, String[] args, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> build(String projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> build(String projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(String projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(String projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(String projectPath, String mavenRepoPath, String settingXML, String[] args); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(String projectPath, String mavenRepoPath, String[] args, Boolean skipPrjDependenciesCreationList); }
DefaultKieCompilerService implements AFCompilerService { @Override public CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML) { return localExecutor.build(projectPath, mavenRepoPath, settingXML); } DefaultKieCompilerService(); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML, Map<Path, InputStream> override); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(Path projectPath, String mavenRepoPath, String[] args); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(Path projectPath, String mavenRepoPath, String[] args, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> build(String projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> build(String projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(String projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(String projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(String projectPath, String mavenRepoPath, String settingXML, String[] args); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(String projectPath, String mavenRepoPath, String[] args, Boolean skipPrjDependenciesCreationList); }
@Test public void buildRemoteAndSkipDepsNonExistentProject() throws Exception { AFCompilerService service = new DefaultKieCompilerService(); CompletableFuture<KieCompilationResponse> futureRes = service.build(tmpRoot.toAbsolutePath().toString(), mavenRepoPath, TestUtilMaven.getSettingsFile(), Boolean.FALSE); KieCompilationResponse res = futureRes.get(); assertThat(res.isSuccessful()).isFalse(); assertThat(res.getDependencies()).isEmpty(); }
@Override public CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML) { return localExecutor.build(projectPath, mavenRepoPath, settingXML); }
DefaultKieCompilerService implements AFCompilerService { @Override public CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML) { return localExecutor.build(projectPath, mavenRepoPath, settingXML); } }
DefaultKieCompilerService implements AFCompilerService { @Override public CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML) { return localExecutor.build(projectPath, mavenRepoPath, settingXML); } DefaultKieCompilerService(); }
DefaultKieCompilerService implements AFCompilerService { @Override public CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML) { return localExecutor.build(projectPath, mavenRepoPath, settingXML); } DefaultKieCompilerService(); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML, Map<Path, InputStream> override); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(Path projectPath, String mavenRepoPath, String[] args); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(Path projectPath, String mavenRepoPath, String[] args, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> build(String projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> build(String projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(String projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(String projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(String projectPath, String mavenRepoPath, String settingXML, String[] args); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(String projectPath, String mavenRepoPath, String[] args, Boolean skipPrjDependenciesCreationList); }
DefaultKieCompilerService implements AFCompilerService { @Override public CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML) { return localExecutor.build(projectPath, mavenRepoPath, settingXML); } DefaultKieCompilerService(); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML, Map<Path, InputStream> override); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(Path projectPath, String mavenRepoPath, String[] args); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(Path projectPath, String mavenRepoPath, String[] args, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> build(String projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> build(String projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(String projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(String projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(String projectPath, String mavenRepoPath, String settingXML, String[] args); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(String projectPath, String mavenRepoPath, String[] args, Boolean skipPrjDependenciesCreationList); }
@Test public void buildRemoteAndInstallNonExistentProject() throws Exception { AFCompilerService service = new DefaultKieCompilerService(); CompletableFuture<KieCompilationResponse> futureRes = service.buildAndInstall(tmpRoot.toAbsolutePath().toString(), mavenRepoPath, TestUtilMaven.getSettingsFile()); KieCompilationResponse res = futureRes.get(); assertThat(res.isSuccessful()).isFalse(); }
@Override public CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath, String mavenRepoPath, String settingXML) { return localExecutor.buildAndInstall(projectPath, mavenRepoPath, settingXML); }
DefaultKieCompilerService implements AFCompilerService { @Override public CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath, String mavenRepoPath, String settingXML) { return localExecutor.buildAndInstall(projectPath, mavenRepoPath, settingXML); } }
DefaultKieCompilerService implements AFCompilerService { @Override public CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath, String mavenRepoPath, String settingXML) { return localExecutor.buildAndInstall(projectPath, mavenRepoPath, settingXML); } DefaultKieCompilerService(); }
DefaultKieCompilerService implements AFCompilerService { @Override public CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath, String mavenRepoPath, String settingXML) { return localExecutor.buildAndInstall(projectPath, mavenRepoPath, settingXML); } DefaultKieCompilerService(); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML, Map<Path, InputStream> override); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(Path projectPath, String mavenRepoPath, String[] args); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(Path projectPath, String mavenRepoPath, String[] args, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> build(String projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> build(String projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(String projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(String projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(String projectPath, String mavenRepoPath, String settingXML, String[] args); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(String projectPath, String mavenRepoPath, String[] args, Boolean skipPrjDependenciesCreationList); }
DefaultKieCompilerService implements AFCompilerService { @Override public CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath, String mavenRepoPath, String settingXML) { return localExecutor.buildAndInstall(projectPath, mavenRepoPath, settingXML); } DefaultKieCompilerService(); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML, Map<Path, InputStream> override); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(Path projectPath, String mavenRepoPath, String[] args); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(Path projectPath, String mavenRepoPath, String[] args, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> build(String projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> build(String projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(String projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(String projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(String projectPath, String mavenRepoPath, String settingXML, String[] args); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(String projectPath, String mavenRepoPath, String[] args, Boolean skipPrjDependenciesCreationList); }
@Test public void buildRemoteAndInstallSkipDepsNonExistentProject() throws Exception { AFCompilerService service = new DefaultKieCompilerService(); CompletableFuture<KieCompilationResponse> futureRes = service.buildAndInstall(tmpRoot.toAbsolutePath().toString(), mavenRepoPath, TestUtilMaven.getSettingsFile(), Boolean.FALSE); KieCompilationResponse res = futureRes.get(); assertThat(res.isSuccessful()).isFalse(); assertThat(res.getDependencies()).isEmpty(); }
@Override public CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath, String mavenRepoPath, String settingXML) { return localExecutor.buildAndInstall(projectPath, mavenRepoPath, settingXML); }
DefaultKieCompilerService implements AFCompilerService { @Override public CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath, String mavenRepoPath, String settingXML) { return localExecutor.buildAndInstall(projectPath, mavenRepoPath, settingXML); } }
DefaultKieCompilerService implements AFCompilerService { @Override public CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath, String mavenRepoPath, String settingXML) { return localExecutor.buildAndInstall(projectPath, mavenRepoPath, settingXML); } DefaultKieCompilerService(); }
DefaultKieCompilerService implements AFCompilerService { @Override public CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath, String mavenRepoPath, String settingXML) { return localExecutor.buildAndInstall(projectPath, mavenRepoPath, settingXML); } DefaultKieCompilerService(); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML, Map<Path, InputStream> override); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(Path projectPath, String mavenRepoPath, String[] args); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(Path projectPath, String mavenRepoPath, String[] args, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> build(String projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> build(String projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(String projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(String projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(String projectPath, String mavenRepoPath, String settingXML, String[] args); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(String projectPath, String mavenRepoPath, String[] args, Boolean skipPrjDependenciesCreationList); }
DefaultKieCompilerService implements AFCompilerService { @Override public CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath, String mavenRepoPath, String settingXML) { return localExecutor.buildAndInstall(projectPath, mavenRepoPath, settingXML); } DefaultKieCompilerService(); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML, Map<Path, InputStream> override); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(Path projectPath, String mavenRepoPath, String[] args); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(Path projectPath, String mavenRepoPath, String[] args, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> build(String projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> build(String projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(String projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(String projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(String projectPath, String mavenRepoPath, String settingXML, String[] args); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(String projectPath, String mavenRepoPath, String[] args, Boolean skipPrjDependenciesCreationList); }
@Test public void buildRemoteExistentProject() throws Exception { AFCompilerService service = new DefaultKieCompilerService(); CompletableFuture<KieCompilationResponse> futureRes = service.build(Paths.get(tmpRoot.toAbsolutePath() + "/dummy").toAbsolutePath().toString(), mavenRepoPath, TestUtilMaven.getSettingsFile()); KieCompilationResponse res = futureRes.get(); assertThat(res.isSuccessful()).isTrue(); }
@Override public CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML) { return localExecutor.build(projectPath, mavenRepoPath, settingXML); }
DefaultKieCompilerService implements AFCompilerService { @Override public CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML) { return localExecutor.build(projectPath, mavenRepoPath, settingXML); } }
DefaultKieCompilerService implements AFCompilerService { @Override public CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML) { return localExecutor.build(projectPath, mavenRepoPath, settingXML); } DefaultKieCompilerService(); }
DefaultKieCompilerService implements AFCompilerService { @Override public CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML) { return localExecutor.build(projectPath, mavenRepoPath, settingXML); } DefaultKieCompilerService(); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML, Map<Path, InputStream> override); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(Path projectPath, String mavenRepoPath, String[] args); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(Path projectPath, String mavenRepoPath, String[] args, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> build(String projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> build(String projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(String projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(String projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(String projectPath, String mavenRepoPath, String settingXML, String[] args); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(String projectPath, String mavenRepoPath, String[] args, Boolean skipPrjDependenciesCreationList); }
DefaultKieCompilerService implements AFCompilerService { @Override public CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML) { return localExecutor.build(projectPath, mavenRepoPath, settingXML); } DefaultKieCompilerService(); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML, Map<Path, InputStream> override); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(Path projectPath, String mavenRepoPath, String[] args); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(Path projectPath, String mavenRepoPath, String[] args, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> build(String projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> build(String projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(String projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(String projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(String projectPath, String mavenRepoPath, String settingXML, String[] args); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(String projectPath, String mavenRepoPath, String[] args, Boolean skipPrjDependenciesCreationList); }
@Test public void buildRemoteAndInstallExistentProject() throws Exception { AFCompilerService service = new DefaultKieCompilerService(); CompletableFuture<KieCompilationResponse> futureRes = service.buildAndInstall(Paths.get(tmpRoot.toAbsolutePath() + "/dummy").toAbsolutePath().toString(), mavenRepoPath, TestUtilMaven.getSettingsFile()); KieCompilationResponse res = futureRes.get(); assertThat(res.isSuccessful()).isTrue(); assertThat(res.getDependencies()).isNotEmpty(); assertThat(res.getDependencies().size()).isGreaterThan(0); }
@Override public CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath, String mavenRepoPath, String settingXML) { return localExecutor.buildAndInstall(projectPath, mavenRepoPath, settingXML); }
DefaultKieCompilerService implements AFCompilerService { @Override public CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath, String mavenRepoPath, String settingXML) { return localExecutor.buildAndInstall(projectPath, mavenRepoPath, settingXML); } }
DefaultKieCompilerService implements AFCompilerService { @Override public CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath, String mavenRepoPath, String settingXML) { return localExecutor.buildAndInstall(projectPath, mavenRepoPath, settingXML); } DefaultKieCompilerService(); }
DefaultKieCompilerService implements AFCompilerService { @Override public CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath, String mavenRepoPath, String settingXML) { return localExecutor.buildAndInstall(projectPath, mavenRepoPath, settingXML); } DefaultKieCompilerService(); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML, Map<Path, InputStream> override); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(Path projectPath, String mavenRepoPath, String[] args); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(Path projectPath, String mavenRepoPath, String[] args, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> build(String projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> build(String projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(String projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(String projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(String projectPath, String mavenRepoPath, String settingXML, String[] args); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(String projectPath, String mavenRepoPath, String[] args, Boolean skipPrjDependenciesCreationList); }
DefaultKieCompilerService implements AFCompilerService { @Override public CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath, String mavenRepoPath, String settingXML) { return localExecutor.buildAndInstall(projectPath, mavenRepoPath, settingXML); } DefaultKieCompilerService(); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML, Map<Path, InputStream> override); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(Path projectPath, String mavenRepoPath, String[] args); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(Path projectPath, String mavenRepoPath, String[] args, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> build(String projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> build(String projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(String projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(String projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(String projectPath, String mavenRepoPath, String settingXML, String[] args); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(String projectPath, String mavenRepoPath, String[] args, Boolean skipPrjDependenciesCreationList); }
@Test public void buildRemoteAndInstallSkipDepsExistentProject() throws Exception { AFCompilerService service = new DefaultKieCompilerService(); CompletableFuture<KieCompilationResponse> futureRes = service.buildAndInstall(Paths.get(tmpRoot.toAbsolutePath() + "/dummy").toAbsolutePath().toString(), mavenRepoPath, TestUtilMaven.getSettingsFile(), Boolean.TRUE); KieCompilationResponse res = futureRes.get(); assertThat(res.isSuccessful()).isTrue(); assertThat(res.getDependencies()).isEmpty(); }
@Override public CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath, String mavenRepoPath, String settingXML) { return localExecutor.buildAndInstall(projectPath, mavenRepoPath, settingXML); }
DefaultKieCompilerService implements AFCompilerService { @Override public CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath, String mavenRepoPath, String settingXML) { return localExecutor.buildAndInstall(projectPath, mavenRepoPath, settingXML); } }
DefaultKieCompilerService implements AFCompilerService { @Override public CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath, String mavenRepoPath, String settingXML) { return localExecutor.buildAndInstall(projectPath, mavenRepoPath, settingXML); } DefaultKieCompilerService(); }
DefaultKieCompilerService implements AFCompilerService { @Override public CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath, String mavenRepoPath, String settingXML) { return localExecutor.buildAndInstall(projectPath, mavenRepoPath, settingXML); } DefaultKieCompilerService(); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML, Map<Path, InputStream> override); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(Path projectPath, String mavenRepoPath, String[] args); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(Path projectPath, String mavenRepoPath, String[] args, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> build(String projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> build(String projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(String projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(String projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(String projectPath, String mavenRepoPath, String settingXML, String[] args); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(String projectPath, String mavenRepoPath, String[] args, Boolean skipPrjDependenciesCreationList); }
DefaultKieCompilerService implements AFCompilerService { @Override public CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath, String mavenRepoPath, String settingXML) { return localExecutor.buildAndInstall(projectPath, mavenRepoPath, settingXML); } DefaultKieCompilerService(); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML, Map<Path, InputStream> override); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(Path projectPath, String mavenRepoPath, String[] args); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(Path projectPath, String mavenRepoPath, String[] args, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> build(String projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> build(String projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(String projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(String projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(String projectPath, String mavenRepoPath, String settingXML, String[] args); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(String projectPath, String mavenRepoPath, String[] args, Boolean skipPrjDependenciesCreationList); }
@Test public void buildRemoteSpecializedNonExistentProject() throws Exception { AFCompilerService service = new DefaultKieCompilerService(); CompletableFuture<KieCompilationResponse> futureRes = service.buildSpecialized(Paths.get(tmpRoot.toAbsolutePath().toString()), mavenRepoPath, new String[]{MavenCLIArgs.ALTERNATE_USER_SETTINGS + TestUtilMaven.getSettingsFile(), MavenCLIArgs.COMPILE}); KieCompilationResponse res = futureRes.get(); assertThat(res.isSuccessful()).isFalse(); }
@Override public CompletableFuture<KieCompilationResponse> buildSpecialized(Path projectPath, String mavenRepoPath, String[] args) { return localExecutor.buildSpecialized(projectPath, mavenRepoPath, args); }
DefaultKieCompilerService implements AFCompilerService { @Override public CompletableFuture<KieCompilationResponse> buildSpecialized(Path projectPath, String mavenRepoPath, String[] args) { return localExecutor.buildSpecialized(projectPath, mavenRepoPath, args); } }
DefaultKieCompilerService implements AFCompilerService { @Override public CompletableFuture<KieCompilationResponse> buildSpecialized(Path projectPath, String mavenRepoPath, String[] args) { return localExecutor.buildSpecialized(projectPath, mavenRepoPath, args); } DefaultKieCompilerService(); }
DefaultKieCompilerService implements AFCompilerService { @Override public CompletableFuture<KieCompilationResponse> buildSpecialized(Path projectPath, String mavenRepoPath, String[] args) { return localExecutor.buildSpecialized(projectPath, mavenRepoPath, args); } DefaultKieCompilerService(); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML, Map<Path, InputStream> override); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(Path projectPath, String mavenRepoPath, String[] args); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(Path projectPath, String mavenRepoPath, String[] args, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> build(String projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> build(String projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(String projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(String projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(String projectPath, String mavenRepoPath, String settingXML, String[] args); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(String projectPath, String mavenRepoPath, String[] args, Boolean skipPrjDependenciesCreationList); }
DefaultKieCompilerService implements AFCompilerService { @Override public CompletableFuture<KieCompilationResponse> buildSpecialized(Path projectPath, String mavenRepoPath, String[] args) { return localExecutor.buildSpecialized(projectPath, mavenRepoPath, args); } DefaultKieCompilerService(); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML, Map<Path, InputStream> override); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(Path projectPath, String mavenRepoPath, String[] args); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(Path projectPath, String mavenRepoPath, String[] args, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> build(String projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> build(String projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(String projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(String projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(String projectPath, String mavenRepoPath, String settingXML, String[] args); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(String projectPath, String mavenRepoPath, String[] args, Boolean skipPrjDependenciesCreationList); }
@Test public void buildRemoteSpecializedSkipDepsExistentProject() throws Exception { AFCompilerService service = new DefaultKieCompilerService(); CompletableFuture<KieCompilationResponse> futureRes = service.buildSpecialized(Paths.get(tmpRoot.toAbsolutePath() + "/dummy").toAbsolutePath().toString(), mavenRepoPath, new String[]{MavenCLIArgs.ALTERNATE_USER_SETTINGS + TestUtilMaven.getSettingsFile(), MavenCLIArgs.COMPILE}, Boolean.TRUE); KieCompilationResponse res = futureRes.get(); assertThat(res.isSuccessful()).isTrue(); }
@Override public CompletableFuture<KieCompilationResponse> buildSpecialized(Path projectPath, String mavenRepoPath, String[] args) { return localExecutor.buildSpecialized(projectPath, mavenRepoPath, args); }
DefaultKieCompilerService implements AFCompilerService { @Override public CompletableFuture<KieCompilationResponse> buildSpecialized(Path projectPath, String mavenRepoPath, String[] args) { return localExecutor.buildSpecialized(projectPath, mavenRepoPath, args); } }
DefaultKieCompilerService implements AFCompilerService { @Override public CompletableFuture<KieCompilationResponse> buildSpecialized(Path projectPath, String mavenRepoPath, String[] args) { return localExecutor.buildSpecialized(projectPath, mavenRepoPath, args); } DefaultKieCompilerService(); }
DefaultKieCompilerService implements AFCompilerService { @Override public CompletableFuture<KieCompilationResponse> buildSpecialized(Path projectPath, String mavenRepoPath, String[] args) { return localExecutor.buildSpecialized(projectPath, mavenRepoPath, args); } DefaultKieCompilerService(); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML, Map<Path, InputStream> override); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(Path projectPath, String mavenRepoPath, String[] args); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(Path projectPath, String mavenRepoPath, String[] args, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> build(String projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> build(String projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(String projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(String projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(String projectPath, String mavenRepoPath, String settingXML, String[] args); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(String projectPath, String mavenRepoPath, String[] args, Boolean skipPrjDependenciesCreationList); }
DefaultKieCompilerService implements AFCompilerService { @Override public CompletableFuture<KieCompilationResponse> buildSpecialized(Path projectPath, String mavenRepoPath, String[] args) { return localExecutor.buildSpecialized(projectPath, mavenRepoPath, args); } DefaultKieCompilerService(); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML, Map<Path, InputStream> override); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(Path projectPath, String mavenRepoPath, String[] args); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(Path projectPath, String mavenRepoPath, String[] args, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> build(String projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> build(String projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(String projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(String projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(String projectPath, String mavenRepoPath, String settingXML, String[] args); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(String projectPath, String mavenRepoPath, String[] args, Boolean skipPrjDependenciesCreationList); }
@Test public void testNewShape() { assertThat(shapeFactory.newShape(instance, shapeDef)).isInstanceOf(DMNDecisionServiceSVGMutableShapeImpl.class); }
@Override public DMNDecisionServiceSVGMutableShapeImpl newShape(final DecisionService instance, final DMNDecisionServiceSVGShapeDef shapeDef) { final SVGShapeView view = shapeDef.newViewInstance(dmnViewFactory, instance); return new DMNDecisionServiceSVGMutableShapeImpl(shapeDef, (SVGShapeViewImpl) view); }
DMNDecisionServiceShapeFactory implements ShapeDefFactory<DecisionService, DMNDecisionServiceSVGShapeDef, DMNDecisionServiceSVGMutableShapeImpl> { @Override public DMNDecisionServiceSVGMutableShapeImpl newShape(final DecisionService instance, final DMNDecisionServiceSVGShapeDef shapeDef) { final SVGShapeView view = shapeDef.newViewInstance(dmnViewFactory, instance); return new DMNDecisionServiceSVGMutableShapeImpl(shapeDef, (SVGShapeViewImpl) view); } }
DMNDecisionServiceShapeFactory implements ShapeDefFactory<DecisionService, DMNDecisionServiceSVGShapeDef, DMNDecisionServiceSVGMutableShapeImpl> { @Override public DMNDecisionServiceSVGMutableShapeImpl newShape(final DecisionService instance, final DMNDecisionServiceSVGShapeDef shapeDef) { final SVGShapeView view = shapeDef.newViewInstance(dmnViewFactory, instance); return new DMNDecisionServiceSVGMutableShapeImpl(shapeDef, (SVGShapeViewImpl) view); } protected DMNDecisionServiceShapeFactory(); @Inject DMNDecisionServiceShapeFactory(final DMNDecisionServiceSVGViewFactory dmnViewFactory); }
DMNDecisionServiceShapeFactory implements ShapeDefFactory<DecisionService, DMNDecisionServiceSVGShapeDef, DMNDecisionServiceSVGMutableShapeImpl> { @Override public DMNDecisionServiceSVGMutableShapeImpl newShape(final DecisionService instance, final DMNDecisionServiceSVGShapeDef shapeDef) { final SVGShapeView view = shapeDef.newViewInstance(dmnViewFactory, instance); return new DMNDecisionServiceSVGMutableShapeImpl(shapeDef, (SVGShapeViewImpl) view); } protected DMNDecisionServiceShapeFactory(); @Inject DMNDecisionServiceShapeFactory(final DMNDecisionServiceSVGViewFactory dmnViewFactory); @Override DMNDecisionServiceSVGMutableShapeImpl newShape(final DecisionService instance, final DMNDecisionServiceSVGShapeDef shapeDef); }
DMNDecisionServiceShapeFactory implements ShapeDefFactory<DecisionService, DMNDecisionServiceSVGShapeDef, DMNDecisionServiceSVGMutableShapeImpl> { @Override public DMNDecisionServiceSVGMutableShapeImpl newShape(final DecisionService instance, final DMNDecisionServiceSVGShapeDef shapeDef) { final SVGShapeView view = shapeDef.newViewInstance(dmnViewFactory, instance); return new DMNDecisionServiceSVGMutableShapeImpl(shapeDef, (SVGShapeViewImpl) view); } protected DMNDecisionServiceShapeFactory(); @Inject DMNDecisionServiceShapeFactory(final DMNDecisionServiceSVGViewFactory dmnViewFactory); @Override DMNDecisionServiceSVGMutableShapeImpl newShape(final DecisionService instance, final DMNDecisionServiceSVGShapeDef shapeDef); }
@Test public void buildRemoteSpecializedSkipDepsNonExistentProject() throws Exception { AFCompilerService service = new DefaultKieCompilerService(); CompletableFuture<KieCompilationResponse> futureRes = service.buildSpecialized(tmpRoot.toAbsolutePath().toString(), mavenRepoPath, new String[]{MavenCLIArgs.ALTERNATE_USER_SETTINGS + TestUtilMaven.getSettingsFile(), MavenCLIArgs.COMPILE}, Boolean.TRUE); KieCompilationResponse res = futureRes.get(); assertThat(res.isSuccessful()).isFalse(); }
@Override public CompletableFuture<KieCompilationResponse> buildSpecialized(Path projectPath, String mavenRepoPath, String[] args) { return localExecutor.buildSpecialized(projectPath, mavenRepoPath, args); }
DefaultKieCompilerService implements AFCompilerService { @Override public CompletableFuture<KieCompilationResponse> buildSpecialized(Path projectPath, String mavenRepoPath, String[] args) { return localExecutor.buildSpecialized(projectPath, mavenRepoPath, args); } }
DefaultKieCompilerService implements AFCompilerService { @Override public CompletableFuture<KieCompilationResponse> buildSpecialized(Path projectPath, String mavenRepoPath, String[] args) { return localExecutor.buildSpecialized(projectPath, mavenRepoPath, args); } DefaultKieCompilerService(); }
DefaultKieCompilerService implements AFCompilerService { @Override public CompletableFuture<KieCompilationResponse> buildSpecialized(Path projectPath, String mavenRepoPath, String[] args) { return localExecutor.buildSpecialized(projectPath, mavenRepoPath, args); } DefaultKieCompilerService(); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML, Map<Path, InputStream> override); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(Path projectPath, String mavenRepoPath, String[] args); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(Path projectPath, String mavenRepoPath, String[] args, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> build(String projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> build(String projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(String projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(String projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(String projectPath, String mavenRepoPath, String settingXML, String[] args); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(String projectPath, String mavenRepoPath, String[] args, Boolean skipPrjDependenciesCreationList); }
DefaultKieCompilerService implements AFCompilerService { @Override public CompletableFuture<KieCompilationResponse> buildSpecialized(Path projectPath, String mavenRepoPath, String[] args) { return localExecutor.buildSpecialized(projectPath, mavenRepoPath, args); } DefaultKieCompilerService(); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML, Map<Path, InputStream> override); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(Path projectPath, String mavenRepoPath, String[] args); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(Path projectPath, String mavenRepoPath, String[] args, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> build(String projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> build(String projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(String projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(String projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(String projectPath, String mavenRepoPath, String settingXML, String[] args); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(String projectPath, String mavenRepoPath, String[] args, Boolean skipPrjDependenciesCreationList); }
@Test public void buildNonExistentProject() throws Exception{ DefaultLocalExecutor executor = new DefaultLocalExecutor(executorService); CompletableFuture<KieCompilationResponse> futureRes = executor.build(tmpRoot, mavenRepoPath, TestUtilMaven.getSettingsFile()); KieCompilationResponse res = futureRes.get(); assertThat(res.isSuccessful()).isFalse(); }
@Override public CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML) { return internalBuild(projectPath, mavenRepoPath, settingXML, Boolean.FALSE, MavenCLIArgs.COMPILE); }
DefaultLocalExecutor implements CompilerExecutor { @Override public CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML) { return internalBuild(projectPath, mavenRepoPath, settingXML, Boolean.FALSE, MavenCLIArgs.COMPILE); } }
DefaultLocalExecutor implements CompilerExecutor { @Override public CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML) { return internalBuild(projectPath, mavenRepoPath, settingXML, Boolean.FALSE, MavenCLIArgs.COMPILE); } DefaultLocalExecutor(ExecutorService executorService); }
DefaultLocalExecutor implements CompilerExecutor { @Override public CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML) { return internalBuild(projectPath, mavenRepoPath, settingXML, Boolean.FALSE, MavenCLIArgs.COMPILE); } DefaultLocalExecutor(ExecutorService executorService); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML, Map<Path, InputStream> override); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(Path projectPath, String mavenRepoPath, String[] args); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(Path projectPath, String mavenRepoPath, String[] args, Boolean skipPrjDependenciesCreationList); }
DefaultLocalExecutor implements CompilerExecutor { @Override public CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML) { return internalBuild(projectPath, mavenRepoPath, settingXML, Boolean.FALSE, MavenCLIArgs.COMPILE); } DefaultLocalExecutor(ExecutorService executorService); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML, Map<Path, InputStream> override); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(Path projectPath, String mavenRepoPath, String[] args); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(Path projectPath, String mavenRepoPath, String[] args, Boolean skipPrjDependenciesCreationList); }
@Test public void buildAndSkipDepsNonExistentProject() throws Exception{ DefaultLocalExecutor executor = new DefaultLocalExecutor(executorService); CompletableFuture<KieCompilationResponse> futureRes = executor.build(tmpRoot, mavenRepoPath, TestUtilMaven.getSettingsFile(), Boolean.FALSE); KieCompilationResponse res = futureRes.get(); assertThat(res.isSuccessful()).isFalse(); assertThat(res.getDependencies()).isEmpty(); }
@Override public CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML) { return internalBuild(projectPath, mavenRepoPath, settingXML, Boolean.FALSE, MavenCLIArgs.COMPILE); }
DefaultLocalExecutor implements CompilerExecutor { @Override public CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML) { return internalBuild(projectPath, mavenRepoPath, settingXML, Boolean.FALSE, MavenCLIArgs.COMPILE); } }
DefaultLocalExecutor implements CompilerExecutor { @Override public CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML) { return internalBuild(projectPath, mavenRepoPath, settingXML, Boolean.FALSE, MavenCLIArgs.COMPILE); } DefaultLocalExecutor(ExecutorService executorService); }
DefaultLocalExecutor implements CompilerExecutor { @Override public CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML) { return internalBuild(projectPath, mavenRepoPath, settingXML, Boolean.FALSE, MavenCLIArgs.COMPILE); } DefaultLocalExecutor(ExecutorService executorService); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML, Map<Path, InputStream> override); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(Path projectPath, String mavenRepoPath, String[] args); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(Path projectPath, String mavenRepoPath, String[] args, Boolean skipPrjDependenciesCreationList); }
DefaultLocalExecutor implements CompilerExecutor { @Override public CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML) { return internalBuild(projectPath, mavenRepoPath, settingXML, Boolean.FALSE, MavenCLIArgs.COMPILE); } DefaultLocalExecutor(ExecutorService executorService); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML, Map<Path, InputStream> override); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(Path projectPath, String mavenRepoPath, String[] args); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(Path projectPath, String mavenRepoPath, String[] args, Boolean skipPrjDependenciesCreationList); }
@Test public void buildAndInstallNonExistentProject() throws Exception{ DefaultLocalExecutor executor = new DefaultLocalExecutor(executorService); CompletableFuture<KieCompilationResponse> futureRes = executor.buildAndInstall(tmpRoot, mavenRepoPath, TestUtilMaven.getSettingsFile()); KieCompilationResponse res = futureRes.get(); assertThat(res.isSuccessful()).isFalse(); }
@Override public CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath, String mavenRepoPath, String settingXML) { return internalBuild(projectPath, mavenRepoPath, settingXML, Boolean.FALSE, MavenCLIArgs.INSTALL); }
DefaultLocalExecutor implements CompilerExecutor { @Override public CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath, String mavenRepoPath, String settingXML) { return internalBuild(projectPath, mavenRepoPath, settingXML, Boolean.FALSE, MavenCLIArgs.INSTALL); } }
DefaultLocalExecutor implements CompilerExecutor { @Override public CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath, String mavenRepoPath, String settingXML) { return internalBuild(projectPath, mavenRepoPath, settingXML, Boolean.FALSE, MavenCLIArgs.INSTALL); } DefaultLocalExecutor(ExecutorService executorService); }
DefaultLocalExecutor implements CompilerExecutor { @Override public CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath, String mavenRepoPath, String settingXML) { return internalBuild(projectPath, mavenRepoPath, settingXML, Boolean.FALSE, MavenCLIArgs.INSTALL); } DefaultLocalExecutor(ExecutorService executorService); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML, Map<Path, InputStream> override); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(Path projectPath, String mavenRepoPath, String[] args); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(Path projectPath, String mavenRepoPath, String[] args, Boolean skipPrjDependenciesCreationList); }
DefaultLocalExecutor implements CompilerExecutor { @Override public CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath, String mavenRepoPath, String settingXML) { return internalBuild(projectPath, mavenRepoPath, settingXML, Boolean.FALSE, MavenCLIArgs.INSTALL); } DefaultLocalExecutor(ExecutorService executorService); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML, Map<Path, InputStream> override); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(Path projectPath, String mavenRepoPath, String[] args); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(Path projectPath, String mavenRepoPath, String[] args, Boolean skipPrjDependenciesCreationList); }
@Test public void buildAndInstallSkipDepsNonExistentProject() throws Exception{ DefaultLocalExecutor executor = new DefaultLocalExecutor(executorService); CompletableFuture<KieCompilationResponse> futureRes = executor.buildAndInstall(tmpRoot, mavenRepoPath, TestUtilMaven.getSettingsFile(), Boolean.FALSE); KieCompilationResponse res = futureRes.get(); assertThat(res.isSuccessful()).isFalse(); assertThat(res.getDependencies()).isEmpty(); }
@Override public CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath, String mavenRepoPath, String settingXML) { return internalBuild(projectPath, mavenRepoPath, settingXML, Boolean.FALSE, MavenCLIArgs.INSTALL); }
DefaultLocalExecutor implements CompilerExecutor { @Override public CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath, String mavenRepoPath, String settingXML) { return internalBuild(projectPath, mavenRepoPath, settingXML, Boolean.FALSE, MavenCLIArgs.INSTALL); } }
DefaultLocalExecutor implements CompilerExecutor { @Override public CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath, String mavenRepoPath, String settingXML) { return internalBuild(projectPath, mavenRepoPath, settingXML, Boolean.FALSE, MavenCLIArgs.INSTALL); } DefaultLocalExecutor(ExecutorService executorService); }
DefaultLocalExecutor implements CompilerExecutor { @Override public CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath, String mavenRepoPath, String settingXML) { return internalBuild(projectPath, mavenRepoPath, settingXML, Boolean.FALSE, MavenCLIArgs.INSTALL); } DefaultLocalExecutor(ExecutorService executorService); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML, Map<Path, InputStream> override); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(Path projectPath, String mavenRepoPath, String[] args); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(Path projectPath, String mavenRepoPath, String[] args, Boolean skipPrjDependenciesCreationList); }
DefaultLocalExecutor implements CompilerExecutor { @Override public CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath, String mavenRepoPath, String settingXML) { return internalBuild(projectPath, mavenRepoPath, settingXML, Boolean.FALSE, MavenCLIArgs.INSTALL); } DefaultLocalExecutor(ExecutorService executorService); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML, Map<Path, InputStream> override); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(Path projectPath, String mavenRepoPath, String[] args); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(Path projectPath, String mavenRepoPath, String[] args, Boolean skipPrjDependenciesCreationList); }
@Test public void buildExistentProject() throws Exception{ DefaultLocalExecutor executor = new DefaultLocalExecutor(executorService); CompletableFuture<KieCompilationResponse> futureRes = executor.build(Paths.get(tmpRoot.toAbsolutePath()+"/dummy"), mavenRepoPath, TestUtilMaven.getSettingsFile()); KieCompilationResponse res = futureRes.get(); assertThat(res.isSuccessful()).isTrue(); }
@Override public CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML) { return internalBuild(projectPath, mavenRepoPath, settingXML, Boolean.FALSE, MavenCLIArgs.COMPILE); }
DefaultLocalExecutor implements CompilerExecutor { @Override public CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML) { return internalBuild(projectPath, mavenRepoPath, settingXML, Boolean.FALSE, MavenCLIArgs.COMPILE); } }
DefaultLocalExecutor implements CompilerExecutor { @Override public CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML) { return internalBuild(projectPath, mavenRepoPath, settingXML, Boolean.FALSE, MavenCLIArgs.COMPILE); } DefaultLocalExecutor(ExecutorService executorService); }
DefaultLocalExecutor implements CompilerExecutor { @Override public CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML) { return internalBuild(projectPath, mavenRepoPath, settingXML, Boolean.FALSE, MavenCLIArgs.COMPILE); } DefaultLocalExecutor(ExecutorService executorService); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML, Map<Path, InputStream> override); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(Path projectPath, String mavenRepoPath, String[] args); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(Path projectPath, String mavenRepoPath, String[] args, Boolean skipPrjDependenciesCreationList); }
DefaultLocalExecutor implements CompilerExecutor { @Override public CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML) { return internalBuild(projectPath, mavenRepoPath, settingXML, Boolean.FALSE, MavenCLIArgs.COMPILE); } DefaultLocalExecutor(ExecutorService executorService); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML, Map<Path, InputStream> override); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(Path projectPath, String mavenRepoPath, String[] args); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(Path projectPath, String mavenRepoPath, String[] args, Boolean skipPrjDependenciesCreationList); }
@Test public void buildAndInstallExistentProject() throws Exception{ DefaultLocalExecutor executor = new DefaultLocalExecutor(executorService); CompletableFuture<KieCompilationResponse> futureRes = executor.buildAndInstall(Paths.get(tmpRoot.toAbsolutePath()+"/dummy"), mavenRepoPath, TestUtilMaven.getSettingsFile()); KieCompilationResponse res = futureRes.get(); assertThat(res.isSuccessful()).isTrue(); assertThat(res.getDependencies()).isNotEmpty(); assertThat(res.getDependencies().size()).isGreaterThan(0); }
@Override public CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath, String mavenRepoPath, String settingXML) { return internalBuild(projectPath, mavenRepoPath, settingXML, Boolean.FALSE, MavenCLIArgs.INSTALL); }
DefaultLocalExecutor implements CompilerExecutor { @Override public CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath, String mavenRepoPath, String settingXML) { return internalBuild(projectPath, mavenRepoPath, settingXML, Boolean.FALSE, MavenCLIArgs.INSTALL); } }
DefaultLocalExecutor implements CompilerExecutor { @Override public CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath, String mavenRepoPath, String settingXML) { return internalBuild(projectPath, mavenRepoPath, settingXML, Boolean.FALSE, MavenCLIArgs.INSTALL); } DefaultLocalExecutor(ExecutorService executorService); }
DefaultLocalExecutor implements CompilerExecutor { @Override public CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath, String mavenRepoPath, String settingXML) { return internalBuild(projectPath, mavenRepoPath, settingXML, Boolean.FALSE, MavenCLIArgs.INSTALL); } DefaultLocalExecutor(ExecutorService executorService); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML, Map<Path, InputStream> override); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(Path projectPath, String mavenRepoPath, String[] args); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(Path projectPath, String mavenRepoPath, String[] args, Boolean skipPrjDependenciesCreationList); }
DefaultLocalExecutor implements CompilerExecutor { @Override public CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath, String mavenRepoPath, String settingXML) { return internalBuild(projectPath, mavenRepoPath, settingXML, Boolean.FALSE, MavenCLIArgs.INSTALL); } DefaultLocalExecutor(ExecutorService executorService); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML, Map<Path, InputStream> override); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(Path projectPath, String mavenRepoPath, String[] args); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(Path projectPath, String mavenRepoPath, String[] args, Boolean skipPrjDependenciesCreationList); }
@Test public void buildAndInstallSkipDepsExistentProject() throws Exception{ DefaultLocalExecutor executor = new DefaultLocalExecutor(executorService); CompletableFuture<KieCompilationResponse> futureRes = executor.buildAndInstall(Paths.get(tmpRoot.toAbsolutePath()+"/dummy"), mavenRepoPath, TestUtilMaven.getSettingsFile(), Boolean.TRUE); KieCompilationResponse res = futureRes.get(); assertThat(res.isSuccessful()).isTrue(); assertThat(res.getDependencies()).isEmpty(); }
@Override public CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath, String mavenRepoPath, String settingXML) { return internalBuild(projectPath, mavenRepoPath, settingXML, Boolean.FALSE, MavenCLIArgs.INSTALL); }
DefaultLocalExecutor implements CompilerExecutor { @Override public CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath, String mavenRepoPath, String settingXML) { return internalBuild(projectPath, mavenRepoPath, settingXML, Boolean.FALSE, MavenCLIArgs.INSTALL); } }
DefaultLocalExecutor implements CompilerExecutor { @Override public CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath, String mavenRepoPath, String settingXML) { return internalBuild(projectPath, mavenRepoPath, settingXML, Boolean.FALSE, MavenCLIArgs.INSTALL); } DefaultLocalExecutor(ExecutorService executorService); }
DefaultLocalExecutor implements CompilerExecutor { @Override public CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath, String mavenRepoPath, String settingXML) { return internalBuild(projectPath, mavenRepoPath, settingXML, Boolean.FALSE, MavenCLIArgs.INSTALL); } DefaultLocalExecutor(ExecutorService executorService); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML, Map<Path, InputStream> override); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(Path projectPath, String mavenRepoPath, String[] args); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(Path projectPath, String mavenRepoPath, String[] args, Boolean skipPrjDependenciesCreationList); }
DefaultLocalExecutor implements CompilerExecutor { @Override public CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath, String mavenRepoPath, String settingXML) { return internalBuild(projectPath, mavenRepoPath, settingXML, Boolean.FALSE, MavenCLIArgs.INSTALL); } DefaultLocalExecutor(ExecutorService executorService); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML, Map<Path, InputStream> override); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(Path projectPath, String mavenRepoPath, String[] args); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(Path projectPath, String mavenRepoPath, String[] args, Boolean skipPrjDependenciesCreationList); }
@Test public void buildSpecializedNonExistentProject() throws Exception{ DefaultLocalExecutor executor = new DefaultLocalExecutor(executorService); CompletableFuture<KieCompilationResponse> futureRes = executor.buildSpecialized(tmpRoot, mavenRepoPath, new String[]{MavenCLIArgs.ALTERNATE_USER_SETTINGS+ TestUtilMaven.getSettingsFile(), MavenCLIArgs.COMPILE}); KieCompilationResponse res = futureRes.get(); assertThat(res.isSuccessful()).isFalse(); }
@Override public CompletableFuture<KieCompilationResponse> buildSpecialized(Path projectPath, String mavenRepoPath, String[] args) { return internalBuild(projectPath, mavenRepoPath, Boolean.FALSE, args); }
DefaultLocalExecutor implements CompilerExecutor { @Override public CompletableFuture<KieCompilationResponse> buildSpecialized(Path projectPath, String mavenRepoPath, String[] args) { return internalBuild(projectPath, mavenRepoPath, Boolean.FALSE, args); } }
DefaultLocalExecutor implements CompilerExecutor { @Override public CompletableFuture<KieCompilationResponse> buildSpecialized(Path projectPath, String mavenRepoPath, String[] args) { return internalBuild(projectPath, mavenRepoPath, Boolean.FALSE, args); } DefaultLocalExecutor(ExecutorService executorService); }
DefaultLocalExecutor implements CompilerExecutor { @Override public CompletableFuture<KieCompilationResponse> buildSpecialized(Path projectPath, String mavenRepoPath, String[] args) { return internalBuild(projectPath, mavenRepoPath, Boolean.FALSE, args); } DefaultLocalExecutor(ExecutorService executorService); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML, Map<Path, InputStream> override); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(Path projectPath, String mavenRepoPath, String[] args); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(Path projectPath, String mavenRepoPath, String[] args, Boolean skipPrjDependenciesCreationList); }
DefaultLocalExecutor implements CompilerExecutor { @Override public CompletableFuture<KieCompilationResponse> buildSpecialized(Path projectPath, String mavenRepoPath, String[] args) { return internalBuild(projectPath, mavenRepoPath, Boolean.FALSE, args); } DefaultLocalExecutor(ExecutorService executorService); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML, Map<Path, InputStream> override); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(Path projectPath, String mavenRepoPath, String[] args); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(Path projectPath, String mavenRepoPath, String[] args, Boolean skipPrjDependenciesCreationList); }
@Test public void buildSpecializedSkipDepsExistentProject() throws Exception{ DefaultLocalExecutor executor = new DefaultLocalExecutor(executorService); CompletableFuture<KieCompilationResponse> futureRes = executor.buildSpecialized(Paths.get(tmpRoot.toAbsolutePath()+"/dummy"), mavenRepoPath, new String[]{MavenCLIArgs.ALTERNATE_USER_SETTINGS+ TestUtilMaven.getSettingsFile(), MavenCLIArgs.COMPILE}, Boolean.TRUE); KieCompilationResponse res = futureRes.get(); assertThat(res.isSuccessful()).isTrue(); }
@Override public CompletableFuture<KieCompilationResponse> buildSpecialized(Path projectPath, String mavenRepoPath, String[] args) { return internalBuild(projectPath, mavenRepoPath, Boolean.FALSE, args); }
DefaultLocalExecutor implements CompilerExecutor { @Override public CompletableFuture<KieCompilationResponse> buildSpecialized(Path projectPath, String mavenRepoPath, String[] args) { return internalBuild(projectPath, mavenRepoPath, Boolean.FALSE, args); } }
DefaultLocalExecutor implements CompilerExecutor { @Override public CompletableFuture<KieCompilationResponse> buildSpecialized(Path projectPath, String mavenRepoPath, String[] args) { return internalBuild(projectPath, mavenRepoPath, Boolean.FALSE, args); } DefaultLocalExecutor(ExecutorService executorService); }
DefaultLocalExecutor implements CompilerExecutor { @Override public CompletableFuture<KieCompilationResponse> buildSpecialized(Path projectPath, String mavenRepoPath, String[] args) { return internalBuild(projectPath, mavenRepoPath, Boolean.FALSE, args); } DefaultLocalExecutor(ExecutorService executorService); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML, Map<Path, InputStream> override); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(Path projectPath, String mavenRepoPath, String[] args); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(Path projectPath, String mavenRepoPath, String[] args, Boolean skipPrjDependenciesCreationList); }
DefaultLocalExecutor implements CompilerExecutor { @Override public CompletableFuture<KieCompilationResponse> buildSpecialized(Path projectPath, String mavenRepoPath, String[] args) { return internalBuild(projectPath, mavenRepoPath, Boolean.FALSE, args); } DefaultLocalExecutor(ExecutorService executorService); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML, Map<Path, InputStream> override); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(Path projectPath, String mavenRepoPath, String[] args); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(Path projectPath, String mavenRepoPath, String[] args, Boolean skipPrjDependenciesCreationList); }
@Test @SuppressWarnings("unchecked") public void testInit() { factory.init(); verify(delegateShapeFactory).delegate(eq(DMNDiagram.class), any(DMNSVGShapeDefImpl.class), shapeDefFactoryCaptor.capture()); assertEquals(svgShapeFactory, shapeDefFactoryCaptor.getValue().get()); verify(delegateShapeFactory).delegate(eq(InputData.class), any(DMNSVGShapeDefImpl.class), shapeDefFactoryCaptor.capture()); assertEquals(svgShapeFactory, shapeDefFactoryCaptor.getValue().get()); verify(delegateShapeFactory).delegate(eq(KnowledgeSource.class), any(DMNSVGShapeDefImpl.class), shapeDefFactoryCaptor.capture()); assertEquals(svgShapeFactory, shapeDefFactoryCaptor.getValue().get()); verify(delegateShapeFactory).delegate(eq(BusinessKnowledgeModel.class), any(DMNSVGShapeDefImpl.class), shapeDefFactoryCaptor.capture()); assertEquals(svgShapeFactory, shapeDefFactoryCaptor.getValue().get()); verify(delegateShapeFactory).delegate(eq(Decision.class), any(DMNSVGShapeDefImpl.class), shapeDefFactoryCaptor.capture()); assertEquals(svgShapeFactory, shapeDefFactoryCaptor.getValue().get()); verify(delegateShapeFactory).delegate(eq(TextAnnotation.class), any(DMNSVGShapeDefImpl.class), shapeDefFactoryCaptor.capture()); assertEquals(svgShapeFactory, shapeDefFactoryCaptor.getValue().get()); verify(delegateShapeFactory).delegate(eq(Association.class), any(DMNConnectorShapeDefImpl.class), shapeDefFactoryCaptor.capture()); assertEquals(dmnConnectorShapeFactory, shapeDefFactoryCaptor.getValue().get()); verify(delegateShapeFactory).delegate(eq(AuthorityRequirement.class), any(DMNConnectorShapeDefImpl.class), shapeDefFactoryCaptor.capture()); assertEquals(dmnConnectorShapeFactory, shapeDefFactoryCaptor.getValue().get()); verify(delegateShapeFactory).delegate(eq(InformationRequirement.class), any(DMNConnectorShapeDefImpl.class), shapeDefFactoryCaptor.capture()); assertEquals(dmnConnectorShapeFactory, shapeDefFactoryCaptor.getValue().get()); verify(delegateShapeFactory).delegate(eq(KnowledgeRequirement.class), any(DMNConnectorShapeDefImpl.class), shapeDefFactoryCaptor.capture()); assertEquals(dmnConnectorShapeFactory, shapeDefFactoryCaptor.getValue().get()); verify(delegateShapeFactory).delegate(eq(DecisionService.class), any(DMNSVGShapeDefImpl.class), shapeDefFactoryCaptor.capture()); assertEquals(dmnDecisionServiceShapeFactory, shapeDefFactoryCaptor.getValue().get()); }
@PostConstruct public void init() { delegateShapeFactory .delegate(DMNDiagram.class, new DMNSVGShapeDefImpl(), () -> svgShapeFactory) .delegate(InputData.class, new DMNSVGShapeDefImpl(), () -> svgShapeFactory) .delegate(KnowledgeSource.class, new DMNSVGShapeDefImpl(), () -> svgShapeFactory) .delegate(BusinessKnowledgeModel.class, new DMNSVGShapeDefImpl(), () -> svgShapeFactory) .delegate(Decision.class, new DMNSVGShapeDefImpl(), () -> svgShapeFactory) .delegate(TextAnnotation.class, new DMNSVGShapeDefImpl(), () -> svgShapeFactory) .delegate(Association.class, new DMNConnectorShapeDefImpl(), () -> dmnConnectorShapeFactory) .delegate(AuthorityRequirement.class, new DMNConnectorShapeDefImpl(), () -> dmnConnectorShapeFactory) .delegate(InformationRequirement.class, new DMNConnectorShapeDefImpl(), () -> dmnConnectorShapeFactory) .delegate(KnowledgeRequirement.class, new DMNConnectorShapeDefImpl(), () -> dmnConnectorShapeFactory) .delegate(DecisionService.class, new DMNDecisionServiceSVGShapeDefImpl(), () -> dmnDecisionServiceShapeFactory); }
DMNShapeFactory implements ShapeFactory<DMNDefinition, Shape> { @PostConstruct public void init() { delegateShapeFactory .delegate(DMNDiagram.class, new DMNSVGShapeDefImpl(), () -> svgShapeFactory) .delegate(InputData.class, new DMNSVGShapeDefImpl(), () -> svgShapeFactory) .delegate(KnowledgeSource.class, new DMNSVGShapeDefImpl(), () -> svgShapeFactory) .delegate(BusinessKnowledgeModel.class, new DMNSVGShapeDefImpl(), () -> svgShapeFactory) .delegate(Decision.class, new DMNSVGShapeDefImpl(), () -> svgShapeFactory) .delegate(TextAnnotation.class, new DMNSVGShapeDefImpl(), () -> svgShapeFactory) .delegate(Association.class, new DMNConnectorShapeDefImpl(), () -> dmnConnectorShapeFactory) .delegate(AuthorityRequirement.class, new DMNConnectorShapeDefImpl(), () -> dmnConnectorShapeFactory) .delegate(InformationRequirement.class, new DMNConnectorShapeDefImpl(), () -> dmnConnectorShapeFactory) .delegate(KnowledgeRequirement.class, new DMNConnectorShapeDefImpl(), () -> dmnConnectorShapeFactory) .delegate(DecisionService.class, new DMNDecisionServiceSVGShapeDefImpl(), () -> dmnDecisionServiceShapeFactory); } }
DMNShapeFactory implements ShapeFactory<DMNDefinition, Shape> { @PostConstruct public void init() { delegateShapeFactory .delegate(DMNDiagram.class, new DMNSVGShapeDefImpl(), () -> svgShapeFactory) .delegate(InputData.class, new DMNSVGShapeDefImpl(), () -> svgShapeFactory) .delegate(KnowledgeSource.class, new DMNSVGShapeDefImpl(), () -> svgShapeFactory) .delegate(BusinessKnowledgeModel.class, new DMNSVGShapeDefImpl(), () -> svgShapeFactory) .delegate(Decision.class, new DMNSVGShapeDefImpl(), () -> svgShapeFactory) .delegate(TextAnnotation.class, new DMNSVGShapeDefImpl(), () -> svgShapeFactory) .delegate(Association.class, new DMNConnectorShapeDefImpl(), () -> dmnConnectorShapeFactory) .delegate(AuthorityRequirement.class, new DMNConnectorShapeDefImpl(), () -> dmnConnectorShapeFactory) .delegate(InformationRequirement.class, new DMNConnectorShapeDefImpl(), () -> dmnConnectorShapeFactory) .delegate(KnowledgeRequirement.class, new DMNConnectorShapeDefImpl(), () -> dmnConnectorShapeFactory) .delegate(DecisionService.class, new DMNDecisionServiceSVGShapeDefImpl(), () -> dmnDecisionServiceShapeFactory); } @Inject DMNShapeFactory(final SVGShapeFactory svgShapeFactory, final DMNConnectorShapeFactory dmnConnectorShapeFactory, final DMNDecisionServiceShapeFactory dmnDecisionServiceShapeFactory, final DelegateShapeFactory<DMNDefinition, Shape> delegateShapeFactory); }
DMNShapeFactory implements ShapeFactory<DMNDefinition, Shape> { @PostConstruct public void init() { delegateShapeFactory .delegate(DMNDiagram.class, new DMNSVGShapeDefImpl(), () -> svgShapeFactory) .delegate(InputData.class, new DMNSVGShapeDefImpl(), () -> svgShapeFactory) .delegate(KnowledgeSource.class, new DMNSVGShapeDefImpl(), () -> svgShapeFactory) .delegate(BusinessKnowledgeModel.class, new DMNSVGShapeDefImpl(), () -> svgShapeFactory) .delegate(Decision.class, new DMNSVGShapeDefImpl(), () -> svgShapeFactory) .delegate(TextAnnotation.class, new DMNSVGShapeDefImpl(), () -> svgShapeFactory) .delegate(Association.class, new DMNConnectorShapeDefImpl(), () -> dmnConnectorShapeFactory) .delegate(AuthorityRequirement.class, new DMNConnectorShapeDefImpl(), () -> dmnConnectorShapeFactory) .delegate(InformationRequirement.class, new DMNConnectorShapeDefImpl(), () -> dmnConnectorShapeFactory) .delegate(KnowledgeRequirement.class, new DMNConnectorShapeDefImpl(), () -> dmnConnectorShapeFactory) .delegate(DecisionService.class, new DMNDecisionServiceSVGShapeDefImpl(), () -> dmnDecisionServiceShapeFactory); } @Inject DMNShapeFactory(final SVGShapeFactory svgShapeFactory, final DMNConnectorShapeFactory dmnConnectorShapeFactory, final DMNDecisionServiceShapeFactory dmnDecisionServiceShapeFactory, final DelegateShapeFactory<DMNDefinition, Shape> delegateShapeFactory); @PostConstruct void init(); @Override Shape newShape(final DMNDefinition definition); @Override Glyph getGlyph(final String definitionId); @Override Glyph getGlyph(final String definitionId, final Class<? extends GlyphConsumer> consumer); }
DMNShapeFactory implements ShapeFactory<DMNDefinition, Shape> { @PostConstruct public void init() { delegateShapeFactory .delegate(DMNDiagram.class, new DMNSVGShapeDefImpl(), () -> svgShapeFactory) .delegate(InputData.class, new DMNSVGShapeDefImpl(), () -> svgShapeFactory) .delegate(KnowledgeSource.class, new DMNSVGShapeDefImpl(), () -> svgShapeFactory) .delegate(BusinessKnowledgeModel.class, new DMNSVGShapeDefImpl(), () -> svgShapeFactory) .delegate(Decision.class, new DMNSVGShapeDefImpl(), () -> svgShapeFactory) .delegate(TextAnnotation.class, new DMNSVGShapeDefImpl(), () -> svgShapeFactory) .delegate(Association.class, new DMNConnectorShapeDefImpl(), () -> dmnConnectorShapeFactory) .delegate(AuthorityRequirement.class, new DMNConnectorShapeDefImpl(), () -> dmnConnectorShapeFactory) .delegate(InformationRequirement.class, new DMNConnectorShapeDefImpl(), () -> dmnConnectorShapeFactory) .delegate(KnowledgeRequirement.class, new DMNConnectorShapeDefImpl(), () -> dmnConnectorShapeFactory) .delegate(DecisionService.class, new DMNDecisionServiceSVGShapeDefImpl(), () -> dmnDecisionServiceShapeFactory); } @Inject DMNShapeFactory(final SVGShapeFactory svgShapeFactory, final DMNConnectorShapeFactory dmnConnectorShapeFactory, final DMNDecisionServiceShapeFactory dmnDecisionServiceShapeFactory, final DelegateShapeFactory<DMNDefinition, Shape> delegateShapeFactory); @PostConstruct void init(); @Override Shape newShape(final DMNDefinition definition); @Override Glyph getGlyph(final String definitionId); @Override Glyph getGlyph(final String definitionId, final Class<? extends GlyphConsumer> consumer); }
@Test public void buildSpecializedSkipDepsNonExistentProject() throws Exception{ DefaultLocalExecutor executor = new DefaultLocalExecutor(executorService); CompletableFuture<KieCompilationResponse> futureRes = executor.buildSpecialized(tmpRoot, mavenRepoPath, new String[]{MavenCLIArgs.ALTERNATE_USER_SETTINGS+ TestUtilMaven.getSettingsFile(), MavenCLIArgs.COMPILE}, Boolean.TRUE); KieCompilationResponse res = futureRes.get(); assertThat(res.isSuccessful()).isFalse(); }
@Override public CompletableFuture<KieCompilationResponse> buildSpecialized(Path projectPath, String mavenRepoPath, String[] args) { return internalBuild(projectPath, mavenRepoPath, Boolean.FALSE, args); }
DefaultLocalExecutor implements CompilerExecutor { @Override public CompletableFuture<KieCompilationResponse> buildSpecialized(Path projectPath, String mavenRepoPath, String[] args) { return internalBuild(projectPath, mavenRepoPath, Boolean.FALSE, args); } }
DefaultLocalExecutor implements CompilerExecutor { @Override public CompletableFuture<KieCompilationResponse> buildSpecialized(Path projectPath, String mavenRepoPath, String[] args) { return internalBuild(projectPath, mavenRepoPath, Boolean.FALSE, args); } DefaultLocalExecutor(ExecutorService executorService); }
DefaultLocalExecutor implements CompilerExecutor { @Override public CompletableFuture<KieCompilationResponse> buildSpecialized(Path projectPath, String mavenRepoPath, String[] args) { return internalBuild(projectPath, mavenRepoPath, Boolean.FALSE, args); } DefaultLocalExecutor(ExecutorService executorService); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML, Map<Path, InputStream> override); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(Path projectPath, String mavenRepoPath, String[] args); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(Path projectPath, String mavenRepoPath, String[] args, Boolean skipPrjDependenciesCreationList); }
DefaultLocalExecutor implements CompilerExecutor { @Override public CompletableFuture<KieCompilationResponse> buildSpecialized(Path projectPath, String mavenRepoPath, String[] args) { return internalBuild(projectPath, mavenRepoPath, Boolean.FALSE, args); } DefaultLocalExecutor(ExecutorService executorService); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML, Map<Path, InputStream> override); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(Path projectPath, String mavenRepoPath, String[] args); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(Path projectPath, String mavenRepoPath, String[] args, Boolean skipPrjDependenciesCreationList); }
@Test public void buildWithOverrideNonExistentProject() throws Exception{ Map<org.uberfire.java.nio.file.Path, InputStream> override = new HashMap<>(); org.uberfire.java.nio.file.Path path = org.uberfire.java.nio.file.Paths.get(tmpRoot+ "/dummy/src/main/java/dummy/DummyOverride.java"); InputStream input = new FileInputStream(new File("target/test-classes/dummy_override/src/main/java/dummy/DummyOverride.java")); override.put(path, input); DefaultLocalExecutor executor = new DefaultLocalExecutor(executorService); CompletableFuture<KieCompilationResponse> futureRes = executor.build(tmpRoot, mavenRepoPath, TestUtilMaven.getSettingsFile(), override); KieCompilationResponse res = futureRes.get(); assertThat(res.isSuccessful()).isFalse(); }
@Override public CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML) { return internalBuild(projectPath, mavenRepoPath, settingXML, Boolean.FALSE, MavenCLIArgs.COMPILE); }
DefaultLocalExecutor implements CompilerExecutor { @Override public CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML) { return internalBuild(projectPath, mavenRepoPath, settingXML, Boolean.FALSE, MavenCLIArgs.COMPILE); } }
DefaultLocalExecutor implements CompilerExecutor { @Override public CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML) { return internalBuild(projectPath, mavenRepoPath, settingXML, Boolean.FALSE, MavenCLIArgs.COMPILE); } DefaultLocalExecutor(ExecutorService executorService); }
DefaultLocalExecutor implements CompilerExecutor { @Override public CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML) { return internalBuild(projectPath, mavenRepoPath, settingXML, Boolean.FALSE, MavenCLIArgs.COMPILE); } DefaultLocalExecutor(ExecutorService executorService); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML, Map<Path, InputStream> override); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(Path projectPath, String mavenRepoPath, String[] args); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(Path projectPath, String mavenRepoPath, String[] args, Boolean skipPrjDependenciesCreationList); }
DefaultLocalExecutor implements CompilerExecutor { @Override public CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML) { return internalBuild(projectPath, mavenRepoPath, settingXML, Boolean.FALSE, MavenCLIArgs.COMPILE); } DefaultLocalExecutor(ExecutorService executorService); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML, Map<Path, InputStream> override); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(Path projectPath, String mavenRepoPath, String[] args); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(Path projectPath, String mavenRepoPath, String[] args, Boolean skipPrjDependenciesCreationList); }
@Test public void buildWithOverrideExistentProject() throws Exception{ Map<org.uberfire.java.nio.file.Path, InputStream> override = new HashMap<>(); org.uberfire.java.nio.file.Path path = org.uberfire.java.nio.file.Paths.get(tmpRoot+ "/dummy/src/main/java/dummy/DummyOverride.java"); InputStream input = new FileInputStream(new File("target/test-classes/dummy_override/src/main/java/dummy/DummyOverride.java")); override.put(path, input); DefaultLocalExecutor executor = new DefaultLocalExecutor(executorService); CompletableFuture<KieCompilationResponse> futureRes = executor.build(Paths.get(tmpRoot.toAbsolutePath()+"/dummy"), mavenRepoPath, TestUtilMaven.getSettingsFile(), override); KieCompilationResponse res = futureRes.get(); assertThat(res.isSuccessful()).isTrue(); }
@Override public CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML) { return internalBuild(projectPath, mavenRepoPath, settingXML, Boolean.FALSE, MavenCLIArgs.COMPILE); }
DefaultLocalExecutor implements CompilerExecutor { @Override public CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML) { return internalBuild(projectPath, mavenRepoPath, settingXML, Boolean.FALSE, MavenCLIArgs.COMPILE); } }
DefaultLocalExecutor implements CompilerExecutor { @Override public CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML) { return internalBuild(projectPath, mavenRepoPath, settingXML, Boolean.FALSE, MavenCLIArgs.COMPILE); } DefaultLocalExecutor(ExecutorService executorService); }
DefaultLocalExecutor implements CompilerExecutor { @Override public CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML) { return internalBuild(projectPath, mavenRepoPath, settingXML, Boolean.FALSE, MavenCLIArgs.COMPILE); } DefaultLocalExecutor(ExecutorService executorService); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML, Map<Path, InputStream> override); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(Path projectPath, String mavenRepoPath, String[] args); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(Path projectPath, String mavenRepoPath, String[] args, Boolean skipPrjDependenciesCreationList); }
DefaultLocalExecutor implements CompilerExecutor { @Override public CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML) { return internalBuild(projectPath, mavenRepoPath, settingXML, Boolean.FALSE, MavenCLIArgs.COMPILE); } DefaultLocalExecutor(ExecutorService executorService); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML, Map<Path, InputStream> override); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath, String mavenRepoPath, String settingXML); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath, String mavenRepoPath, String settingXML, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(Path projectPath, String mavenRepoPath, String[] args); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(Path projectPath, String mavenRepoPath, String[] args, Boolean skipPrjDependenciesCreationList); }
@Test public void buildNonExistentProject() throws Exception{ DefaultRemoteExecutor executor = new DefaultRemoteExecutor(executorService); CompletableFuture<KieCompilationResponse> futureRes = executor.build(tmpRoot.toAbsolutePath().toString(), mavenRepoPath, TestUtilMaven.getSettingsFile()); KieCompilationResponse res = futureRes.get(); assertThat(res.isSuccessful()).isFalse(); }
@Override public CompletableFuture<KieCompilationResponse> build(String projectPath, String mavenRepoPath, String settingsXmlPath) { return internalBuild(projectPath, mavenRepoPath, settingsXmlPath, Boolean.FALSE, MavenCLIArgs.COMPILE); }
DefaultRemoteExecutor implements RemoteExecutor { @Override public CompletableFuture<KieCompilationResponse> build(String projectPath, String mavenRepoPath, String settingsXmlPath) { return internalBuild(projectPath, mavenRepoPath, settingsXmlPath, Boolean.FALSE, MavenCLIArgs.COMPILE); } }
DefaultRemoteExecutor implements RemoteExecutor { @Override public CompletableFuture<KieCompilationResponse> build(String projectPath, String mavenRepoPath, String settingsXmlPath) { return internalBuild(projectPath, mavenRepoPath, settingsXmlPath, Boolean.FALSE, MavenCLIArgs.COMPILE); } DefaultRemoteExecutor(ExecutorService executorService); }
DefaultRemoteExecutor implements RemoteExecutor { @Override public CompletableFuture<KieCompilationResponse> build(String projectPath, String mavenRepoPath, String settingsXmlPath) { return internalBuild(projectPath, mavenRepoPath, settingsXmlPath, Boolean.FALSE, MavenCLIArgs.COMPILE); } DefaultRemoteExecutor(ExecutorService executorService); @Override CompletableFuture<KieCompilationResponse> build(String projectPath, String mavenRepoPath, String settingsXmlPath); @Override CompletableFuture<KieCompilationResponse> build(String projectPath, String mavenRepoPath, String settingsXmlPath, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(String projectPath, String mavenRepoPath, String settingsXmlPath); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(String projectPath, String mavenRepoPath, String settingsXmlPath, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(String projectPath, String mavenRepoPath, String[] args); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(String projectPath, String mavenRepoPath, String[] args, Boolean skipPrjDependenciesCreationList); }
DefaultRemoteExecutor implements RemoteExecutor { @Override public CompletableFuture<KieCompilationResponse> build(String projectPath, String mavenRepoPath, String settingsXmlPath) { return internalBuild(projectPath, mavenRepoPath, settingsXmlPath, Boolean.FALSE, MavenCLIArgs.COMPILE); } DefaultRemoteExecutor(ExecutorService executorService); @Override CompletableFuture<KieCompilationResponse> build(String projectPath, String mavenRepoPath, String settingsXmlPath); @Override CompletableFuture<KieCompilationResponse> build(String projectPath, String mavenRepoPath, String settingsXmlPath, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(String projectPath, String mavenRepoPath, String settingsXmlPath); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(String projectPath, String mavenRepoPath, String settingsXmlPath, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(String projectPath, String mavenRepoPath, String[] args); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(String projectPath, String mavenRepoPath, String[] args, Boolean skipPrjDependenciesCreationList); }
@Test public void buildAndSkipDepsNonExistentProject() throws Exception{ DefaultRemoteExecutor executor = new DefaultRemoteExecutor(executorService); CompletableFuture<KieCompilationResponse> futureRes = executor.build(tmpRoot.toAbsolutePath().toString(), mavenRepoPath, TestUtilMaven.getSettingsFile(), Boolean.FALSE); KieCompilationResponse res = futureRes.get(); assertThat(res.isSuccessful()).isFalse(); assertThat(res.getDependencies()).isEmpty(); }
@Override public CompletableFuture<KieCompilationResponse> build(String projectPath, String mavenRepoPath, String settingsXmlPath) { return internalBuild(projectPath, mavenRepoPath, settingsXmlPath, Boolean.FALSE, MavenCLIArgs.COMPILE); }
DefaultRemoteExecutor implements RemoteExecutor { @Override public CompletableFuture<KieCompilationResponse> build(String projectPath, String mavenRepoPath, String settingsXmlPath) { return internalBuild(projectPath, mavenRepoPath, settingsXmlPath, Boolean.FALSE, MavenCLIArgs.COMPILE); } }
DefaultRemoteExecutor implements RemoteExecutor { @Override public CompletableFuture<KieCompilationResponse> build(String projectPath, String mavenRepoPath, String settingsXmlPath) { return internalBuild(projectPath, mavenRepoPath, settingsXmlPath, Boolean.FALSE, MavenCLIArgs.COMPILE); } DefaultRemoteExecutor(ExecutorService executorService); }
DefaultRemoteExecutor implements RemoteExecutor { @Override public CompletableFuture<KieCompilationResponse> build(String projectPath, String mavenRepoPath, String settingsXmlPath) { return internalBuild(projectPath, mavenRepoPath, settingsXmlPath, Boolean.FALSE, MavenCLIArgs.COMPILE); } DefaultRemoteExecutor(ExecutorService executorService); @Override CompletableFuture<KieCompilationResponse> build(String projectPath, String mavenRepoPath, String settingsXmlPath); @Override CompletableFuture<KieCompilationResponse> build(String projectPath, String mavenRepoPath, String settingsXmlPath, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(String projectPath, String mavenRepoPath, String settingsXmlPath); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(String projectPath, String mavenRepoPath, String settingsXmlPath, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(String projectPath, String mavenRepoPath, String[] args); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(String projectPath, String mavenRepoPath, String[] args, Boolean skipPrjDependenciesCreationList); }
DefaultRemoteExecutor implements RemoteExecutor { @Override public CompletableFuture<KieCompilationResponse> build(String projectPath, String mavenRepoPath, String settingsXmlPath) { return internalBuild(projectPath, mavenRepoPath, settingsXmlPath, Boolean.FALSE, MavenCLIArgs.COMPILE); } DefaultRemoteExecutor(ExecutorService executorService); @Override CompletableFuture<KieCompilationResponse> build(String projectPath, String mavenRepoPath, String settingsXmlPath); @Override CompletableFuture<KieCompilationResponse> build(String projectPath, String mavenRepoPath, String settingsXmlPath, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(String projectPath, String mavenRepoPath, String settingsXmlPath); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(String projectPath, String mavenRepoPath, String settingsXmlPath, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(String projectPath, String mavenRepoPath, String[] args); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(String projectPath, String mavenRepoPath, String[] args, Boolean skipPrjDependenciesCreationList); }
@Test public void buildAndInstallNonExistentProject() throws Exception{ DefaultRemoteExecutor executor = new DefaultRemoteExecutor(executorService); CompletableFuture<KieCompilationResponse> futureRes = executor.buildAndInstall(tmpRoot.toAbsolutePath().toString(), mavenRepoPath, TestUtilMaven.getSettingsFile()); KieCompilationResponse res = futureRes.get(); assertThat(res.isSuccessful()).isFalse(); }
@Override public CompletableFuture<KieCompilationResponse> buildAndInstall(String projectPath, String mavenRepoPath, String settingsXmlPath) { return internalBuild(projectPath, mavenRepoPath, settingsXmlPath, Boolean.FALSE, MavenCLIArgs.INSTALL); }
DefaultRemoteExecutor implements RemoteExecutor { @Override public CompletableFuture<KieCompilationResponse> buildAndInstall(String projectPath, String mavenRepoPath, String settingsXmlPath) { return internalBuild(projectPath, mavenRepoPath, settingsXmlPath, Boolean.FALSE, MavenCLIArgs.INSTALL); } }
DefaultRemoteExecutor implements RemoteExecutor { @Override public CompletableFuture<KieCompilationResponse> buildAndInstall(String projectPath, String mavenRepoPath, String settingsXmlPath) { return internalBuild(projectPath, mavenRepoPath, settingsXmlPath, Boolean.FALSE, MavenCLIArgs.INSTALL); } DefaultRemoteExecutor(ExecutorService executorService); }
DefaultRemoteExecutor implements RemoteExecutor { @Override public CompletableFuture<KieCompilationResponse> buildAndInstall(String projectPath, String mavenRepoPath, String settingsXmlPath) { return internalBuild(projectPath, mavenRepoPath, settingsXmlPath, Boolean.FALSE, MavenCLIArgs.INSTALL); } DefaultRemoteExecutor(ExecutorService executorService); @Override CompletableFuture<KieCompilationResponse> build(String projectPath, String mavenRepoPath, String settingsXmlPath); @Override CompletableFuture<KieCompilationResponse> build(String projectPath, String mavenRepoPath, String settingsXmlPath, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(String projectPath, String mavenRepoPath, String settingsXmlPath); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(String projectPath, String mavenRepoPath, String settingsXmlPath, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(String projectPath, String mavenRepoPath, String[] args); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(String projectPath, String mavenRepoPath, String[] args, Boolean skipPrjDependenciesCreationList); }
DefaultRemoteExecutor implements RemoteExecutor { @Override public CompletableFuture<KieCompilationResponse> buildAndInstall(String projectPath, String mavenRepoPath, String settingsXmlPath) { return internalBuild(projectPath, mavenRepoPath, settingsXmlPath, Boolean.FALSE, MavenCLIArgs.INSTALL); } DefaultRemoteExecutor(ExecutorService executorService); @Override CompletableFuture<KieCompilationResponse> build(String projectPath, String mavenRepoPath, String settingsXmlPath); @Override CompletableFuture<KieCompilationResponse> build(String projectPath, String mavenRepoPath, String settingsXmlPath, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(String projectPath, String mavenRepoPath, String settingsXmlPath); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(String projectPath, String mavenRepoPath, String settingsXmlPath, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(String projectPath, String mavenRepoPath, String[] args); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(String projectPath, String mavenRepoPath, String[] args, Boolean skipPrjDependenciesCreationList); }
@Test public void buildAndInstallSkipDepsNonExistentProject() throws Exception{ DefaultRemoteExecutor executor = new DefaultRemoteExecutor(executorService); CompletableFuture<KieCompilationResponse> futureRes = executor.buildAndInstall(tmpRoot.toAbsolutePath().toString(), mavenRepoPath, TestUtilMaven.getSettingsFile(), Boolean.FALSE); KieCompilationResponse res = futureRes.get(); assertThat(res.isSuccessful()).isFalse(); assertThat(res.getDependencies()).isEmpty(); }
@Override public CompletableFuture<KieCompilationResponse> buildAndInstall(String projectPath, String mavenRepoPath, String settingsXmlPath) { return internalBuild(projectPath, mavenRepoPath, settingsXmlPath, Boolean.FALSE, MavenCLIArgs.INSTALL); }
DefaultRemoteExecutor implements RemoteExecutor { @Override public CompletableFuture<KieCompilationResponse> buildAndInstall(String projectPath, String mavenRepoPath, String settingsXmlPath) { return internalBuild(projectPath, mavenRepoPath, settingsXmlPath, Boolean.FALSE, MavenCLIArgs.INSTALL); } }
DefaultRemoteExecutor implements RemoteExecutor { @Override public CompletableFuture<KieCompilationResponse> buildAndInstall(String projectPath, String mavenRepoPath, String settingsXmlPath) { return internalBuild(projectPath, mavenRepoPath, settingsXmlPath, Boolean.FALSE, MavenCLIArgs.INSTALL); } DefaultRemoteExecutor(ExecutorService executorService); }
DefaultRemoteExecutor implements RemoteExecutor { @Override public CompletableFuture<KieCompilationResponse> buildAndInstall(String projectPath, String mavenRepoPath, String settingsXmlPath) { return internalBuild(projectPath, mavenRepoPath, settingsXmlPath, Boolean.FALSE, MavenCLIArgs.INSTALL); } DefaultRemoteExecutor(ExecutorService executorService); @Override CompletableFuture<KieCompilationResponse> build(String projectPath, String mavenRepoPath, String settingsXmlPath); @Override CompletableFuture<KieCompilationResponse> build(String projectPath, String mavenRepoPath, String settingsXmlPath, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(String projectPath, String mavenRepoPath, String settingsXmlPath); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(String projectPath, String mavenRepoPath, String settingsXmlPath, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(String projectPath, String mavenRepoPath, String[] args); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(String projectPath, String mavenRepoPath, String[] args, Boolean skipPrjDependenciesCreationList); }
DefaultRemoteExecutor implements RemoteExecutor { @Override public CompletableFuture<KieCompilationResponse> buildAndInstall(String projectPath, String mavenRepoPath, String settingsXmlPath) { return internalBuild(projectPath, mavenRepoPath, settingsXmlPath, Boolean.FALSE, MavenCLIArgs.INSTALL); } DefaultRemoteExecutor(ExecutorService executorService); @Override CompletableFuture<KieCompilationResponse> build(String projectPath, String mavenRepoPath, String settingsXmlPath); @Override CompletableFuture<KieCompilationResponse> build(String projectPath, String mavenRepoPath, String settingsXmlPath, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(String projectPath, String mavenRepoPath, String settingsXmlPath); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(String projectPath, String mavenRepoPath, String settingsXmlPath, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(String projectPath, String mavenRepoPath, String[] args); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(String projectPath, String mavenRepoPath, String[] args, Boolean skipPrjDependenciesCreationList); }
@Test public void buildExistentProject() throws Exception{ DefaultRemoteExecutor executor = new DefaultRemoteExecutor(executorService); CompletableFuture<KieCompilationResponse> futureRes = executor.build(Paths.get(tmpRoot.toAbsolutePath()+"/dummy").toAbsolutePath().toString(), mavenRepoPath, TestUtilMaven.getSettingsFile()); KieCompilationResponse res = futureRes.get(); assertThat(res.isSuccessful()).isTrue(); }
@Override public CompletableFuture<KieCompilationResponse> build(String projectPath, String mavenRepoPath, String settingsXmlPath) { return internalBuild(projectPath, mavenRepoPath, settingsXmlPath, Boolean.FALSE, MavenCLIArgs.COMPILE); }
DefaultRemoteExecutor implements RemoteExecutor { @Override public CompletableFuture<KieCompilationResponse> build(String projectPath, String mavenRepoPath, String settingsXmlPath) { return internalBuild(projectPath, mavenRepoPath, settingsXmlPath, Boolean.FALSE, MavenCLIArgs.COMPILE); } }
DefaultRemoteExecutor implements RemoteExecutor { @Override public CompletableFuture<KieCompilationResponse> build(String projectPath, String mavenRepoPath, String settingsXmlPath) { return internalBuild(projectPath, mavenRepoPath, settingsXmlPath, Boolean.FALSE, MavenCLIArgs.COMPILE); } DefaultRemoteExecutor(ExecutorService executorService); }
DefaultRemoteExecutor implements RemoteExecutor { @Override public CompletableFuture<KieCompilationResponse> build(String projectPath, String mavenRepoPath, String settingsXmlPath) { return internalBuild(projectPath, mavenRepoPath, settingsXmlPath, Boolean.FALSE, MavenCLIArgs.COMPILE); } DefaultRemoteExecutor(ExecutorService executorService); @Override CompletableFuture<KieCompilationResponse> build(String projectPath, String mavenRepoPath, String settingsXmlPath); @Override CompletableFuture<KieCompilationResponse> build(String projectPath, String mavenRepoPath, String settingsXmlPath, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(String projectPath, String mavenRepoPath, String settingsXmlPath); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(String projectPath, String mavenRepoPath, String settingsXmlPath, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(String projectPath, String mavenRepoPath, String[] args); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(String projectPath, String mavenRepoPath, String[] args, Boolean skipPrjDependenciesCreationList); }
DefaultRemoteExecutor implements RemoteExecutor { @Override public CompletableFuture<KieCompilationResponse> build(String projectPath, String mavenRepoPath, String settingsXmlPath) { return internalBuild(projectPath, mavenRepoPath, settingsXmlPath, Boolean.FALSE, MavenCLIArgs.COMPILE); } DefaultRemoteExecutor(ExecutorService executorService); @Override CompletableFuture<KieCompilationResponse> build(String projectPath, String mavenRepoPath, String settingsXmlPath); @Override CompletableFuture<KieCompilationResponse> build(String projectPath, String mavenRepoPath, String settingsXmlPath, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(String projectPath, String mavenRepoPath, String settingsXmlPath); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(String projectPath, String mavenRepoPath, String settingsXmlPath, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(String projectPath, String mavenRepoPath, String[] args); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(String projectPath, String mavenRepoPath, String[] args, Boolean skipPrjDependenciesCreationList); }
@Test public void buildAndInstallExistentProject() throws Exception{ DefaultRemoteExecutor executor = new DefaultRemoteExecutor(executorService); CompletableFuture<KieCompilationResponse> futureRes = executor.buildAndInstall(Paths.get(tmpRoot.toAbsolutePath()+"/dummy").toAbsolutePath().toString(), mavenRepoPath, TestUtilMaven.getSettingsFile()); KieCompilationResponse res = futureRes.get(); assertThat(res.isSuccessful()).isTrue(); assertThat(res.getDependencies()).isNotEmpty(); assertThat(res.getDependencies().size()).isGreaterThan(0); }
@Override public CompletableFuture<KieCompilationResponse> buildAndInstall(String projectPath, String mavenRepoPath, String settingsXmlPath) { return internalBuild(projectPath, mavenRepoPath, settingsXmlPath, Boolean.FALSE, MavenCLIArgs.INSTALL); }
DefaultRemoteExecutor implements RemoteExecutor { @Override public CompletableFuture<KieCompilationResponse> buildAndInstall(String projectPath, String mavenRepoPath, String settingsXmlPath) { return internalBuild(projectPath, mavenRepoPath, settingsXmlPath, Boolean.FALSE, MavenCLIArgs.INSTALL); } }
DefaultRemoteExecutor implements RemoteExecutor { @Override public CompletableFuture<KieCompilationResponse> buildAndInstall(String projectPath, String mavenRepoPath, String settingsXmlPath) { return internalBuild(projectPath, mavenRepoPath, settingsXmlPath, Boolean.FALSE, MavenCLIArgs.INSTALL); } DefaultRemoteExecutor(ExecutorService executorService); }
DefaultRemoteExecutor implements RemoteExecutor { @Override public CompletableFuture<KieCompilationResponse> buildAndInstall(String projectPath, String mavenRepoPath, String settingsXmlPath) { return internalBuild(projectPath, mavenRepoPath, settingsXmlPath, Boolean.FALSE, MavenCLIArgs.INSTALL); } DefaultRemoteExecutor(ExecutorService executorService); @Override CompletableFuture<KieCompilationResponse> build(String projectPath, String mavenRepoPath, String settingsXmlPath); @Override CompletableFuture<KieCompilationResponse> build(String projectPath, String mavenRepoPath, String settingsXmlPath, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(String projectPath, String mavenRepoPath, String settingsXmlPath); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(String projectPath, String mavenRepoPath, String settingsXmlPath, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(String projectPath, String mavenRepoPath, String[] args); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(String projectPath, String mavenRepoPath, String[] args, Boolean skipPrjDependenciesCreationList); }
DefaultRemoteExecutor implements RemoteExecutor { @Override public CompletableFuture<KieCompilationResponse> buildAndInstall(String projectPath, String mavenRepoPath, String settingsXmlPath) { return internalBuild(projectPath, mavenRepoPath, settingsXmlPath, Boolean.FALSE, MavenCLIArgs.INSTALL); } DefaultRemoteExecutor(ExecutorService executorService); @Override CompletableFuture<KieCompilationResponse> build(String projectPath, String mavenRepoPath, String settingsXmlPath); @Override CompletableFuture<KieCompilationResponse> build(String projectPath, String mavenRepoPath, String settingsXmlPath, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(String projectPath, String mavenRepoPath, String settingsXmlPath); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(String projectPath, String mavenRepoPath, String settingsXmlPath, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(String projectPath, String mavenRepoPath, String[] args); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(String projectPath, String mavenRepoPath, String[] args, Boolean skipPrjDependenciesCreationList); }
@Test public void buildAndInstallSkipDepsExistentProject() throws Exception{ DefaultRemoteExecutor executor = new DefaultRemoteExecutor(executorService); CompletableFuture<KieCompilationResponse> futureRes = executor.buildAndInstall(Paths.get(tmpRoot.toAbsolutePath()+"/dummy").toAbsolutePath().toString(), mavenRepoPath, TestUtilMaven.getSettingsFile(), Boolean.TRUE); KieCompilationResponse res = futureRes.get(); assertThat(res.isSuccessful()).isTrue(); assertThat(res.getDependencies()).isEmpty(); }
@Override public CompletableFuture<KieCompilationResponse> buildAndInstall(String projectPath, String mavenRepoPath, String settingsXmlPath) { return internalBuild(projectPath, mavenRepoPath, settingsXmlPath, Boolean.FALSE, MavenCLIArgs.INSTALL); }
DefaultRemoteExecutor implements RemoteExecutor { @Override public CompletableFuture<KieCompilationResponse> buildAndInstall(String projectPath, String mavenRepoPath, String settingsXmlPath) { return internalBuild(projectPath, mavenRepoPath, settingsXmlPath, Boolean.FALSE, MavenCLIArgs.INSTALL); } }
DefaultRemoteExecutor implements RemoteExecutor { @Override public CompletableFuture<KieCompilationResponse> buildAndInstall(String projectPath, String mavenRepoPath, String settingsXmlPath) { return internalBuild(projectPath, mavenRepoPath, settingsXmlPath, Boolean.FALSE, MavenCLIArgs.INSTALL); } DefaultRemoteExecutor(ExecutorService executorService); }
DefaultRemoteExecutor implements RemoteExecutor { @Override public CompletableFuture<KieCompilationResponse> buildAndInstall(String projectPath, String mavenRepoPath, String settingsXmlPath) { return internalBuild(projectPath, mavenRepoPath, settingsXmlPath, Boolean.FALSE, MavenCLIArgs.INSTALL); } DefaultRemoteExecutor(ExecutorService executorService); @Override CompletableFuture<KieCompilationResponse> build(String projectPath, String mavenRepoPath, String settingsXmlPath); @Override CompletableFuture<KieCompilationResponse> build(String projectPath, String mavenRepoPath, String settingsXmlPath, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(String projectPath, String mavenRepoPath, String settingsXmlPath); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(String projectPath, String mavenRepoPath, String settingsXmlPath, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(String projectPath, String mavenRepoPath, String[] args); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(String projectPath, String mavenRepoPath, String[] args, Boolean skipPrjDependenciesCreationList); }
DefaultRemoteExecutor implements RemoteExecutor { @Override public CompletableFuture<KieCompilationResponse> buildAndInstall(String projectPath, String mavenRepoPath, String settingsXmlPath) { return internalBuild(projectPath, mavenRepoPath, settingsXmlPath, Boolean.FALSE, MavenCLIArgs.INSTALL); } DefaultRemoteExecutor(ExecutorService executorService); @Override CompletableFuture<KieCompilationResponse> build(String projectPath, String mavenRepoPath, String settingsXmlPath); @Override CompletableFuture<KieCompilationResponse> build(String projectPath, String mavenRepoPath, String settingsXmlPath, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(String projectPath, String mavenRepoPath, String settingsXmlPath); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(String projectPath, String mavenRepoPath, String settingsXmlPath, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(String projectPath, String mavenRepoPath, String[] args); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(String projectPath, String mavenRepoPath, String[] args, Boolean skipPrjDependenciesCreationList); }
@Test public void testNewShape() { factory.newShape(definition); verify(delegateShapeFactory).newShape(definition); }
@Override public Shape newShape(final DMNDefinition definition) { return delegateShapeFactory.newShape(definition); }
DMNShapeFactory implements ShapeFactory<DMNDefinition, Shape> { @Override public Shape newShape(final DMNDefinition definition) { return delegateShapeFactory.newShape(definition); } }
DMNShapeFactory implements ShapeFactory<DMNDefinition, Shape> { @Override public Shape newShape(final DMNDefinition definition) { return delegateShapeFactory.newShape(definition); } @Inject DMNShapeFactory(final SVGShapeFactory svgShapeFactory, final DMNConnectorShapeFactory dmnConnectorShapeFactory, final DMNDecisionServiceShapeFactory dmnDecisionServiceShapeFactory, final DelegateShapeFactory<DMNDefinition, Shape> delegateShapeFactory); }
DMNShapeFactory implements ShapeFactory<DMNDefinition, Shape> { @Override public Shape newShape(final DMNDefinition definition) { return delegateShapeFactory.newShape(definition); } @Inject DMNShapeFactory(final SVGShapeFactory svgShapeFactory, final DMNConnectorShapeFactory dmnConnectorShapeFactory, final DMNDecisionServiceShapeFactory dmnDecisionServiceShapeFactory, final DelegateShapeFactory<DMNDefinition, Shape> delegateShapeFactory); @PostConstruct void init(); @Override Shape newShape(final DMNDefinition definition); @Override Glyph getGlyph(final String definitionId); @Override Glyph getGlyph(final String definitionId, final Class<? extends GlyphConsumer> consumer); }
DMNShapeFactory implements ShapeFactory<DMNDefinition, Shape> { @Override public Shape newShape(final DMNDefinition definition) { return delegateShapeFactory.newShape(definition); } @Inject DMNShapeFactory(final SVGShapeFactory svgShapeFactory, final DMNConnectorShapeFactory dmnConnectorShapeFactory, final DMNDecisionServiceShapeFactory dmnDecisionServiceShapeFactory, final DelegateShapeFactory<DMNDefinition, Shape> delegateShapeFactory); @PostConstruct void init(); @Override Shape newShape(final DMNDefinition definition); @Override Glyph getGlyph(final String definitionId); @Override Glyph getGlyph(final String definitionId, final Class<? extends GlyphConsumer> consumer); }
@Test public void buildSpecializedNonExistentProject() throws Exception{ DefaultRemoteExecutor executor = new DefaultRemoteExecutor(executorService); CompletableFuture<KieCompilationResponse> futureRes = executor.buildSpecialized(tmpRoot.toAbsolutePath().toString(), mavenRepoPath, new String[]{MavenCLIArgs.ALTERNATE_USER_SETTINGS + TestUtilMaven.getSettingsFile(), MavenCLIArgs.COMPILE}); KieCompilationResponse res = futureRes.get(); assertThat(res.isSuccessful()).isFalse(); }
@Override public CompletableFuture<KieCompilationResponse> buildSpecialized(String projectPath, String mavenRepoPath, String[] args) { return internalBuild(projectPath, mavenRepoPath, Boolean.FALSE, args); }
DefaultRemoteExecutor implements RemoteExecutor { @Override public CompletableFuture<KieCompilationResponse> buildSpecialized(String projectPath, String mavenRepoPath, String[] args) { return internalBuild(projectPath, mavenRepoPath, Boolean.FALSE, args); } }
DefaultRemoteExecutor implements RemoteExecutor { @Override public CompletableFuture<KieCompilationResponse> buildSpecialized(String projectPath, String mavenRepoPath, String[] args) { return internalBuild(projectPath, mavenRepoPath, Boolean.FALSE, args); } DefaultRemoteExecutor(ExecutorService executorService); }
DefaultRemoteExecutor implements RemoteExecutor { @Override public CompletableFuture<KieCompilationResponse> buildSpecialized(String projectPath, String mavenRepoPath, String[] args) { return internalBuild(projectPath, mavenRepoPath, Boolean.FALSE, args); } DefaultRemoteExecutor(ExecutorService executorService); @Override CompletableFuture<KieCompilationResponse> build(String projectPath, String mavenRepoPath, String settingsXmlPath); @Override CompletableFuture<KieCompilationResponse> build(String projectPath, String mavenRepoPath, String settingsXmlPath, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(String projectPath, String mavenRepoPath, String settingsXmlPath); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(String projectPath, String mavenRepoPath, String settingsXmlPath, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(String projectPath, String mavenRepoPath, String[] args); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(String projectPath, String mavenRepoPath, String[] args, Boolean skipPrjDependenciesCreationList); }
DefaultRemoteExecutor implements RemoteExecutor { @Override public CompletableFuture<KieCompilationResponse> buildSpecialized(String projectPath, String mavenRepoPath, String[] args) { return internalBuild(projectPath, mavenRepoPath, Boolean.FALSE, args); } DefaultRemoteExecutor(ExecutorService executorService); @Override CompletableFuture<KieCompilationResponse> build(String projectPath, String mavenRepoPath, String settingsXmlPath); @Override CompletableFuture<KieCompilationResponse> build(String projectPath, String mavenRepoPath, String settingsXmlPath, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(String projectPath, String mavenRepoPath, String settingsXmlPath); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(String projectPath, String mavenRepoPath, String settingsXmlPath, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(String projectPath, String mavenRepoPath, String[] args); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(String projectPath, String mavenRepoPath, String[] args, Boolean skipPrjDependenciesCreationList); }
@Test public void buildSpecializedSkipDepsExistentProject() throws Exception{ DefaultRemoteExecutor executor = new DefaultRemoteExecutor(executorService); CompletableFuture<KieCompilationResponse> futureRes = executor.buildSpecialized(Paths.get(tmpRoot.toAbsolutePath()+"/dummy").toAbsolutePath().toString(), mavenRepoPath, new String[]{MavenCLIArgs.ALTERNATE_USER_SETTINGS + TestUtilMaven.getSettingsFile(), MavenCLIArgs.COMPILE}, Boolean.TRUE); KieCompilationResponse res = futureRes.get(); assertThat(res.isSuccessful()).isTrue(); }
@Override public CompletableFuture<KieCompilationResponse> buildSpecialized(String projectPath, String mavenRepoPath, String[] args) { return internalBuild(projectPath, mavenRepoPath, Boolean.FALSE, args); }
DefaultRemoteExecutor implements RemoteExecutor { @Override public CompletableFuture<KieCompilationResponse> buildSpecialized(String projectPath, String mavenRepoPath, String[] args) { return internalBuild(projectPath, mavenRepoPath, Boolean.FALSE, args); } }
DefaultRemoteExecutor implements RemoteExecutor { @Override public CompletableFuture<KieCompilationResponse> buildSpecialized(String projectPath, String mavenRepoPath, String[] args) { return internalBuild(projectPath, mavenRepoPath, Boolean.FALSE, args); } DefaultRemoteExecutor(ExecutorService executorService); }
DefaultRemoteExecutor implements RemoteExecutor { @Override public CompletableFuture<KieCompilationResponse> buildSpecialized(String projectPath, String mavenRepoPath, String[] args) { return internalBuild(projectPath, mavenRepoPath, Boolean.FALSE, args); } DefaultRemoteExecutor(ExecutorService executorService); @Override CompletableFuture<KieCompilationResponse> build(String projectPath, String mavenRepoPath, String settingsXmlPath); @Override CompletableFuture<KieCompilationResponse> build(String projectPath, String mavenRepoPath, String settingsXmlPath, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(String projectPath, String mavenRepoPath, String settingsXmlPath); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(String projectPath, String mavenRepoPath, String settingsXmlPath, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(String projectPath, String mavenRepoPath, String[] args); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(String projectPath, String mavenRepoPath, String[] args, Boolean skipPrjDependenciesCreationList); }
DefaultRemoteExecutor implements RemoteExecutor { @Override public CompletableFuture<KieCompilationResponse> buildSpecialized(String projectPath, String mavenRepoPath, String[] args) { return internalBuild(projectPath, mavenRepoPath, Boolean.FALSE, args); } DefaultRemoteExecutor(ExecutorService executorService); @Override CompletableFuture<KieCompilationResponse> build(String projectPath, String mavenRepoPath, String settingsXmlPath); @Override CompletableFuture<KieCompilationResponse> build(String projectPath, String mavenRepoPath, String settingsXmlPath, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(String projectPath, String mavenRepoPath, String settingsXmlPath); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(String projectPath, String mavenRepoPath, String settingsXmlPath, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(String projectPath, String mavenRepoPath, String[] args); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(String projectPath, String mavenRepoPath, String[] args, Boolean skipPrjDependenciesCreationList); }
@Test public void buildSpecializedSkipDepsNonExistentProject() throws Exception{ DefaultRemoteExecutor executor = new DefaultRemoteExecutor(executorService); CompletableFuture<KieCompilationResponse> futureRes = executor.buildSpecialized(tmpRoot.toAbsolutePath().toString(), mavenRepoPath, new String[]{MavenCLIArgs.ALTERNATE_USER_SETTINGS + TestUtilMaven.getSettingsFile(), MavenCLIArgs.COMPILE}, Boolean.TRUE); KieCompilationResponse res = futureRes.get(); assertThat(res.isSuccessful()).isFalse(); }
@Override public CompletableFuture<KieCompilationResponse> buildSpecialized(String projectPath, String mavenRepoPath, String[] args) { return internalBuild(projectPath, mavenRepoPath, Boolean.FALSE, args); }
DefaultRemoteExecutor implements RemoteExecutor { @Override public CompletableFuture<KieCompilationResponse> buildSpecialized(String projectPath, String mavenRepoPath, String[] args) { return internalBuild(projectPath, mavenRepoPath, Boolean.FALSE, args); } }
DefaultRemoteExecutor implements RemoteExecutor { @Override public CompletableFuture<KieCompilationResponse> buildSpecialized(String projectPath, String mavenRepoPath, String[] args) { return internalBuild(projectPath, mavenRepoPath, Boolean.FALSE, args); } DefaultRemoteExecutor(ExecutorService executorService); }
DefaultRemoteExecutor implements RemoteExecutor { @Override public CompletableFuture<KieCompilationResponse> buildSpecialized(String projectPath, String mavenRepoPath, String[] args) { return internalBuild(projectPath, mavenRepoPath, Boolean.FALSE, args); } DefaultRemoteExecutor(ExecutorService executorService); @Override CompletableFuture<KieCompilationResponse> build(String projectPath, String mavenRepoPath, String settingsXmlPath); @Override CompletableFuture<KieCompilationResponse> build(String projectPath, String mavenRepoPath, String settingsXmlPath, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(String projectPath, String mavenRepoPath, String settingsXmlPath); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(String projectPath, String mavenRepoPath, String settingsXmlPath, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(String projectPath, String mavenRepoPath, String[] args); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(String projectPath, String mavenRepoPath, String[] args, Boolean skipPrjDependenciesCreationList); }
DefaultRemoteExecutor implements RemoteExecutor { @Override public CompletableFuture<KieCompilationResponse> buildSpecialized(String projectPath, String mavenRepoPath, String[] args) { return internalBuild(projectPath, mavenRepoPath, Boolean.FALSE, args); } DefaultRemoteExecutor(ExecutorService executorService); @Override CompletableFuture<KieCompilationResponse> build(String projectPath, String mavenRepoPath, String settingsXmlPath); @Override CompletableFuture<KieCompilationResponse> build(String projectPath, String mavenRepoPath, String settingsXmlPath, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(String projectPath, String mavenRepoPath, String settingsXmlPath); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(String projectPath, String mavenRepoPath, String settingsXmlPath, Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(String projectPath, String mavenRepoPath, String[] args); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(String projectPath, String mavenRepoPath, String[] args, Boolean skipPrjDependenciesCreationList); }
@Test public void noWebWorkerProviders() throws Exception { final Instance verifierWebWorkerProviders = mock(Instance.class); doReturn(new ArrayList<>().iterator()).when(verifierWebWorkerProviders).iterator(); assertFalse(new VerifierWebWorkerRegistry(verifierWebWorkerProviders).get("something").isPresent()); }
public Optional<VerifierWebWorkerProvider> get(final String id) { if (map.containsKey(id)) { return Optional.of(map.get(id)); } else { return Optional.empty(); } }
VerifierWebWorkerRegistry { public Optional<VerifierWebWorkerProvider> get(final String id) { if (map.containsKey(id)) { return Optional.of(map.get(id)); } else { return Optional.empty(); } } }
VerifierWebWorkerRegistry { public Optional<VerifierWebWorkerProvider> get(final String id) { if (map.containsKey(id)) { return Optional.of(map.get(id)); } else { return Optional.empty(); } } VerifierWebWorkerRegistry(); @Inject VerifierWebWorkerRegistry(@Any final Instance<VerifierWebWorkerProvider> verifierWebWorkerProviders); }
VerifierWebWorkerRegistry { public Optional<VerifierWebWorkerProvider> get(final String id) { if (map.containsKey(id)) { return Optional.of(map.get(id)); } else { return Optional.empty(); } } VerifierWebWorkerRegistry(); @Inject VerifierWebWorkerRegistry(@Any final Instance<VerifierWebWorkerProvider> verifierWebWorkerProviders); Optional<VerifierWebWorkerProvider> get(final String id); }
VerifierWebWorkerRegistry { public Optional<VerifierWebWorkerProvider> get(final String id) { if (map.containsKey(id)) { return Optional.of(map.get(id)); } else { return Optional.empty(); } } VerifierWebWorkerRegistry(); @Inject VerifierWebWorkerRegistry(@Any final Instance<VerifierWebWorkerProvider> verifierWebWorkerProviders); Optional<VerifierWebWorkerProvider> get(final String id); }
@Test public void wrongId() throws Exception { final Instance verifierWebWorkerProviders = mock(Instance.class); final ArrayList<Object> webWorkerProviders = new ArrayList<>(); webWorkerProviders.add(getWebWorkerProvider("somethingElse")); doReturn(webWorkerProviders.iterator()).when(verifierWebWorkerProviders).iterator(); assertFalse(new VerifierWebWorkerRegistry(verifierWebWorkerProviders).get("something").isPresent()); }
public Optional<VerifierWebWorkerProvider> get(final String id) { if (map.containsKey(id)) { return Optional.of(map.get(id)); } else { return Optional.empty(); } }
VerifierWebWorkerRegistry { public Optional<VerifierWebWorkerProvider> get(final String id) { if (map.containsKey(id)) { return Optional.of(map.get(id)); } else { return Optional.empty(); } } }
VerifierWebWorkerRegistry { public Optional<VerifierWebWorkerProvider> get(final String id) { if (map.containsKey(id)) { return Optional.of(map.get(id)); } else { return Optional.empty(); } } VerifierWebWorkerRegistry(); @Inject VerifierWebWorkerRegistry(@Any final Instance<VerifierWebWorkerProvider> verifierWebWorkerProviders); }
VerifierWebWorkerRegistry { public Optional<VerifierWebWorkerProvider> get(final String id) { if (map.containsKey(id)) { return Optional.of(map.get(id)); } else { return Optional.empty(); } } VerifierWebWorkerRegistry(); @Inject VerifierWebWorkerRegistry(@Any final Instance<VerifierWebWorkerProvider> verifierWebWorkerProviders); Optional<VerifierWebWorkerProvider> get(final String id); }
VerifierWebWorkerRegistry { public Optional<VerifierWebWorkerProvider> get(final String id) { if (map.containsKey(id)) { return Optional.of(map.get(id)); } else { return Optional.empty(); } } VerifierWebWorkerRegistry(); @Inject VerifierWebWorkerRegistry(@Any final Instance<VerifierWebWorkerProvider> verifierWebWorkerProviders); Optional<VerifierWebWorkerProvider> get(final String id); }
@Test public void correctId() throws Exception { final Instance verifierWebWorkerProviders = mock(Instance.class); final ArrayList<Object> webWorkerProviders = new ArrayList<>(); webWorkerProviders.add(getWebWorkerProvider("something")); doReturn(webWorkerProviders.iterator()).when(verifierWebWorkerProviders).iterator(); assertTrue(new VerifierWebWorkerRegistry(verifierWebWorkerProviders).get("something").isPresent()); }
public Optional<VerifierWebWorkerProvider> get(final String id) { if (map.containsKey(id)) { return Optional.of(map.get(id)); } else { return Optional.empty(); } }
VerifierWebWorkerRegistry { public Optional<VerifierWebWorkerProvider> get(final String id) { if (map.containsKey(id)) { return Optional.of(map.get(id)); } else { return Optional.empty(); } } }
VerifierWebWorkerRegistry { public Optional<VerifierWebWorkerProvider> get(final String id) { if (map.containsKey(id)) { return Optional.of(map.get(id)); } else { return Optional.empty(); } } VerifierWebWorkerRegistry(); @Inject VerifierWebWorkerRegistry(@Any final Instance<VerifierWebWorkerProvider> verifierWebWorkerProviders); }
VerifierWebWorkerRegistry { public Optional<VerifierWebWorkerProvider> get(final String id) { if (map.containsKey(id)) { return Optional.of(map.get(id)); } else { return Optional.empty(); } } VerifierWebWorkerRegistry(); @Inject VerifierWebWorkerRegistry(@Any final Instance<VerifierWebWorkerProvider> verifierWebWorkerProviders); Optional<VerifierWebWorkerProvider> get(final String id); }
VerifierWebWorkerRegistry { public Optional<VerifierWebWorkerProvider> get(final String id) { if (map.containsKey(id)) { return Optional.of(map.get(id)); } else { return Optional.empty(); } } VerifierWebWorkerRegistry(); @Inject VerifierWebWorkerRegistry(@Any final Instance<VerifierWebWorkerProvider> verifierWebWorkerProviders); Optional<VerifierWebWorkerProvider> get(final String id); }
@Test public void testShow() throws Exception { Issue issue = new Issue(Severity.WARNING, CheckType.REDUNDANT_ROWS, new HashSet<>(Arrays.asList(1, 2, 3)) ); screen.show(issue); verify(view).setIssueTitle("RedundantRows"); ArgumentCaptor<SafeHtml> safeHtmlArgumentCaptor = ArgumentCaptor.forClass(SafeHtml.class); verify(view).setExplanation(safeHtmlArgumentCaptor.capture()); assertEquals("<p>MissingRangeP1(1)</p>", safeHtmlArgumentCaptor.getValue() .asString()); verify(view).setLines("1, 2, 3"); }
public void show(final Issue issue) { final String title = ExplanationProvider.toTitle(issue); view.setIssueTitle(title); view.setExplanation(ExplanationProvider.toHTML(issue)); view.setLines(makeRowNumbers(issue)); }
IssuePresenter implements IsWidget { public void show(final Issue issue) { final String title = ExplanationProvider.toTitle(issue); view.setIssueTitle(title); view.setExplanation(ExplanationProvider.toHTML(issue)); view.setLines(makeRowNumbers(issue)); } }
IssuePresenter implements IsWidget { public void show(final Issue issue) { final String title = ExplanationProvider.toTitle(issue); view.setIssueTitle(title); view.setExplanation(ExplanationProvider.toHTML(issue)); view.setLines(makeRowNumbers(issue)); } @Inject IssuePresenter(final IssuePresenterView view); }
IssuePresenter implements IsWidget { public void show(final Issue issue) { final String title = ExplanationProvider.toTitle(issue); view.setIssueTitle(title); view.setExplanation(ExplanationProvider.toHTML(issue)); view.setLines(makeRowNumbers(issue)); } @Inject IssuePresenter(final IssuePresenterView view); @Override Widget asWidget(); void show(final Issue issue); void clear(); }
IssuePresenter implements IsWidget { public void show(final Issue issue) { final String title = ExplanationProvider.toTitle(issue); view.setIssueTitle(title); view.setExplanation(ExplanationProvider.toHTML(issue)); view.setLines(makeRowNumbers(issue)); } @Inject IssuePresenter(final IssuePresenterView view); @Override Widget asWidget(); void show(final Issue issue); void clear(); }
@Test public void testIllegalVerifierState() { final Issue issue = new IllegalVerifierStateIssue(); screen.show(issue); verify(view).setIssueTitle("VerifierFailedTitle"); ArgumentCaptor<SafeHtml> safeHtmlArgumentCaptor = ArgumentCaptor.forClass(SafeHtml.class); verify(view).setExplanation(safeHtmlArgumentCaptor.capture()); assertEquals("<p>VerifierFailed</p>", safeHtmlArgumentCaptor.getValue().asString()); verify(view).setLines(""); }
public void show(final Issue issue) { final String title = ExplanationProvider.toTitle(issue); view.setIssueTitle(title); view.setExplanation(ExplanationProvider.toHTML(issue)); view.setLines(makeRowNumbers(issue)); }
IssuePresenter implements IsWidget { public void show(final Issue issue) { final String title = ExplanationProvider.toTitle(issue); view.setIssueTitle(title); view.setExplanation(ExplanationProvider.toHTML(issue)); view.setLines(makeRowNumbers(issue)); } }
IssuePresenter implements IsWidget { public void show(final Issue issue) { final String title = ExplanationProvider.toTitle(issue); view.setIssueTitle(title); view.setExplanation(ExplanationProvider.toHTML(issue)); view.setLines(makeRowNumbers(issue)); } @Inject IssuePresenter(final IssuePresenterView view); }
IssuePresenter implements IsWidget { public void show(final Issue issue) { final String title = ExplanationProvider.toTitle(issue); view.setIssueTitle(title); view.setExplanation(ExplanationProvider.toHTML(issue)); view.setLines(makeRowNumbers(issue)); } @Inject IssuePresenter(final IssuePresenterView view); @Override Widget asWidget(); void show(final Issue issue); void clear(); }
IssuePresenter implements IsWidget { public void show(final Issue issue) { final String title = ExplanationProvider.toTitle(issue); view.setIssueTitle(title); view.setExplanation(ExplanationProvider.toHTML(issue)); view.setLines(makeRowNumbers(issue)); } @Inject IssuePresenter(final IssuePresenterView view); @Override Widget asWidget(); void show(final Issue issue); void clear(); }
@Test public void testShowEmptyIssue() throws Exception { screen.show(Issue.EMPTY); verify(view).setIssueTitle("---"); ArgumentCaptor<SafeHtml> safeHtmlArgumentCaptor = ArgumentCaptor.forClass(SafeHtml.class); verify(view).setExplanation(safeHtmlArgumentCaptor.capture()); assertEquals("---", safeHtmlArgumentCaptor.getValue() .asString()); verify(view).setLines(""); }
public void show(final Issue issue) { final String title = ExplanationProvider.toTitle(issue); view.setIssueTitle(title); view.setExplanation(ExplanationProvider.toHTML(issue)); view.setLines(makeRowNumbers(issue)); }
IssuePresenter implements IsWidget { public void show(final Issue issue) { final String title = ExplanationProvider.toTitle(issue); view.setIssueTitle(title); view.setExplanation(ExplanationProvider.toHTML(issue)); view.setLines(makeRowNumbers(issue)); } }
IssuePresenter implements IsWidget { public void show(final Issue issue) { final String title = ExplanationProvider.toTitle(issue); view.setIssueTitle(title); view.setExplanation(ExplanationProvider.toHTML(issue)); view.setLines(makeRowNumbers(issue)); } @Inject IssuePresenter(final IssuePresenterView view); }
IssuePresenter implements IsWidget { public void show(final Issue issue) { final String title = ExplanationProvider.toTitle(issue); view.setIssueTitle(title); view.setExplanation(ExplanationProvider.toHTML(issue)); view.setLines(makeRowNumbers(issue)); } @Inject IssuePresenter(final IssuePresenterView view); @Override Widget asWidget(); void show(final Issue issue); void clear(); }
IssuePresenter implements IsWidget { public void show(final Issue issue) { final String title = ExplanationProvider.toTitle(issue); view.setIssueTitle(title); view.setExplanation(ExplanationProvider.toHTML(issue)); view.setLines(makeRowNumbers(issue)); } @Inject IssuePresenter(final IssuePresenterView view); @Override Widget asWidget(); void show(final Issue issue); void clear(); }
@Test public void testClear() throws Exception { screen.clear(); verify(view).setIssueTitle(""); ArgumentCaptor<SafeHtml> safeHtmlArgumentCaptor = ArgumentCaptor.forClass(SafeHtml.class); verify(view).setExplanation(safeHtmlArgumentCaptor.capture()); assertEquals("", safeHtmlArgumentCaptor.getValue() .asString()); verify(view).hideLines(); verify(view).setLines(""); }
public void clear() { view.setIssueTitle(""); view.setExplanation(new SafeHtml() { @Override public String asString() { return ""; } }); view.setLines(""); view.hideLines(); }
IssuePresenter implements IsWidget { public void clear() { view.setIssueTitle(""); view.setExplanation(new SafeHtml() { @Override public String asString() { return ""; } }); view.setLines(""); view.hideLines(); } }
IssuePresenter implements IsWidget { public void clear() { view.setIssueTitle(""); view.setExplanation(new SafeHtml() { @Override public String asString() { return ""; } }); view.setLines(""); view.hideLines(); } @Inject IssuePresenter(final IssuePresenterView view); }
IssuePresenter implements IsWidget { public void clear() { view.setIssueTitle(""); view.setExplanation(new SafeHtml() { @Override public String asString() { return ""; } }); view.setLines(""); view.hideLines(); } @Inject IssuePresenter(final IssuePresenterView view); @Override Widget asWidget(); void show(final Issue issue); void clear(); }
IssuePresenter implements IsWidget { public void clear() { view.setIssueTitle(""); view.setExplanation(new SafeHtml() { @Override public String asString() { return ""; } }); view.setLines(""); view.hideLines(); } @Inject IssuePresenter(final IssuePresenterView view); @Override Widget asWidget(); void show(final Issue issue); void clear(); }
@Test public void testGetGlyph() { factory.getGlyph(DEFINITION_ID); verify(delegateShapeFactory).getGlyph(DEFINITION_ID); }
@Override public Glyph getGlyph(final String definitionId) { return delegateShapeFactory.getGlyph(definitionId); }
DMNShapeFactory implements ShapeFactory<DMNDefinition, Shape> { @Override public Glyph getGlyph(final String definitionId) { return delegateShapeFactory.getGlyph(definitionId); } }
DMNShapeFactory implements ShapeFactory<DMNDefinition, Shape> { @Override public Glyph getGlyph(final String definitionId) { return delegateShapeFactory.getGlyph(definitionId); } @Inject DMNShapeFactory(final SVGShapeFactory svgShapeFactory, final DMNConnectorShapeFactory dmnConnectorShapeFactory, final DMNDecisionServiceShapeFactory dmnDecisionServiceShapeFactory, final DelegateShapeFactory<DMNDefinition, Shape> delegateShapeFactory); }
DMNShapeFactory implements ShapeFactory<DMNDefinition, Shape> { @Override public Glyph getGlyph(final String definitionId) { return delegateShapeFactory.getGlyph(definitionId); } @Inject DMNShapeFactory(final SVGShapeFactory svgShapeFactory, final DMNConnectorShapeFactory dmnConnectorShapeFactory, final DMNDecisionServiceShapeFactory dmnDecisionServiceShapeFactory, final DelegateShapeFactory<DMNDefinition, Shape> delegateShapeFactory); @PostConstruct void init(); @Override Shape newShape(final DMNDefinition definition); @Override Glyph getGlyph(final String definitionId); @Override Glyph getGlyph(final String definitionId, final Class<? extends GlyphConsumer> consumer); }
DMNShapeFactory implements ShapeFactory<DMNDefinition, Shape> { @Override public Glyph getGlyph(final String definitionId) { return delegateShapeFactory.getGlyph(definitionId); } @Inject DMNShapeFactory(final SVGShapeFactory svgShapeFactory, final DMNConnectorShapeFactory dmnConnectorShapeFactory, final DMNDecisionServiceShapeFactory dmnDecisionServiceShapeFactory, final DelegateShapeFactory<DMNDefinition, Shape> delegateShapeFactory); @PostConstruct void init(); @Override Shape newShape(final DMNDefinition definition); @Override Glyph getGlyph(final String definitionId); @Override Glyph getGlyph(final String definitionId, final Class<? extends GlyphConsumer> consumer); }
@Test public void testLoadDataObjects_UnknownCustomProperty() { final Maps.Builder<String, ModelField[]> modelFieldsBuilder = new Maps.Builder<>(); modelFieldsBuilder.put(CFamily.class.getName(), new ModelField[]{ newModelField(DataType.TYPE_THIS, CFamily.class.getName(), CFamily.class.getSimpleName()), newModelField("mother", APerson.class.getName(), APerson.class.getSimpleName()) }); final Map<String, ModelField[]> modelFields = modelFieldsBuilder.build(); dataModelOracle.addModuleModelFields(modelFields); final List<DataObject> dataObjects = service.loadDataObjects(workspaceProject); assertThat(dataObjects).isNotEmpty(); assertThat(dataObjects).hasSize(1); assertThat(dataObjects.get(0).getClassType()).isEqualTo(CFamily.class.getName()); assertThat(dataObjects.get(0).getProperties()).hasSize(1); assertThat(dataObjects.get(0).getProperties().get(0).getProperty()).isEqualTo("mother"); assertThat(dataObjects.get(0).getProperties().get(0).getType()).isEqualTo(BuiltInType.ANY.getName()); }
@Override public List<DataObject> loadDataObjects(final WorkspaceProject workspaceProject) { final KieModule module = moduleService.resolveModule(workspaceProject.getRootPath()); final ClassLoader classLoader = moduleClassLoaderHelper.getModuleClassLoader(module); final ModuleDataModelOracle dmo = dataModelService.getModuleDataModel(workspaceProject.getRootPath()); final String[] types = DataModelOracleUtilities.getFactTypes(dmo); final Map<String, ModelField[]> typesModelFields = dmo.getModuleModelFields(); final Map<String, String> parametersType = dmo.getModuleFieldParametersType(); final List<DataObject> dataObjects = Arrays.stream(types).map(DataObject::new).collect(Collectors.toList()); dataObjects.forEach(dataObject -> convertProperties(dataObject, dataObjects, typesModelFields, classLoader, parametersType)); return dataObjects; }
DataObjectsServiceImpl implements DataObjectsService { @Override public List<DataObject> loadDataObjects(final WorkspaceProject workspaceProject) { final KieModule module = moduleService.resolveModule(workspaceProject.getRootPath()); final ClassLoader classLoader = moduleClassLoaderHelper.getModuleClassLoader(module); final ModuleDataModelOracle dmo = dataModelService.getModuleDataModel(workspaceProject.getRootPath()); final String[] types = DataModelOracleUtilities.getFactTypes(dmo); final Map<String, ModelField[]> typesModelFields = dmo.getModuleModelFields(); final Map<String, String> parametersType = dmo.getModuleFieldParametersType(); final List<DataObject> dataObjects = Arrays.stream(types).map(DataObject::new).collect(Collectors.toList()); dataObjects.forEach(dataObject -> convertProperties(dataObject, dataObjects, typesModelFields, classLoader, parametersType)); return dataObjects; } }
DataObjectsServiceImpl implements DataObjectsService { @Override public List<DataObject> loadDataObjects(final WorkspaceProject workspaceProject) { final KieModule module = moduleService.resolveModule(workspaceProject.getRootPath()); final ClassLoader classLoader = moduleClassLoaderHelper.getModuleClassLoader(module); final ModuleDataModelOracle dmo = dataModelService.getModuleDataModel(workspaceProject.getRootPath()); final String[] types = DataModelOracleUtilities.getFactTypes(dmo); final Map<String, ModelField[]> typesModelFields = dmo.getModuleModelFields(); final Map<String, String> parametersType = dmo.getModuleFieldParametersType(); final List<DataObject> dataObjects = Arrays.stream(types).map(DataObject::new).collect(Collectors.toList()); dataObjects.forEach(dataObject -> convertProperties(dataObject, dataObjects, typesModelFields, classLoader, parametersType)); return dataObjects; } protected DataObjectsServiceImpl(); @Inject DataObjectsServiceImpl(final DataModelService dataModelService, final ModuleClassLoaderHelper moduleClassLoaderHelper, final KieModuleService moduleService); }
DataObjectsServiceImpl implements DataObjectsService { @Override public List<DataObject> loadDataObjects(final WorkspaceProject workspaceProject) { final KieModule module = moduleService.resolveModule(workspaceProject.getRootPath()); final ClassLoader classLoader = moduleClassLoaderHelper.getModuleClassLoader(module); final ModuleDataModelOracle dmo = dataModelService.getModuleDataModel(workspaceProject.getRootPath()); final String[] types = DataModelOracleUtilities.getFactTypes(dmo); final Map<String, ModelField[]> typesModelFields = dmo.getModuleModelFields(); final Map<String, String> parametersType = dmo.getModuleFieldParametersType(); final List<DataObject> dataObjects = Arrays.stream(types).map(DataObject::new).collect(Collectors.toList()); dataObjects.forEach(dataObject -> convertProperties(dataObject, dataObjects, typesModelFields, classLoader, parametersType)); return dataObjects; } protected DataObjectsServiceImpl(); @Inject DataObjectsServiceImpl(final DataModelService dataModelService, final ModuleClassLoaderHelper moduleClassLoaderHelper, final KieModuleService moduleService); @Override List<DataObject> loadDataObjects(final WorkspaceProject workspaceProject); }
DataObjectsServiceImpl implements DataObjectsService { @Override public List<DataObject> loadDataObjects(final WorkspaceProject workspaceProject) { final KieModule module = moduleService.resolveModule(workspaceProject.getRootPath()); final ClassLoader classLoader = moduleClassLoaderHelper.getModuleClassLoader(module); final ModuleDataModelOracle dmo = dataModelService.getModuleDataModel(workspaceProject.getRootPath()); final String[] types = DataModelOracleUtilities.getFactTypes(dmo); final Map<String, ModelField[]> typesModelFields = dmo.getModuleModelFields(); final Map<String, String> parametersType = dmo.getModuleFieldParametersType(); final List<DataObject> dataObjects = Arrays.stream(types).map(DataObject::new).collect(Collectors.toList()); dataObjects.forEach(dataObject -> convertProperties(dataObject, dataObjects, typesModelFields, classLoader, parametersType)); return dataObjects; } protected DataObjectsServiceImpl(); @Inject DataObjectsServiceImpl(final DataModelService dataModelService, final ModuleClassLoaderHelper moduleClassLoaderHelper, final KieModuleService moduleService); @Override List<DataObject> loadDataObjects(final WorkspaceProject workspaceProject); }
@Test public void testShowReport() throws Exception { Issue issue1 = new Issue(Severity.WARNING, CheckType.DEFICIENT_ROW, Collections.emptySet()); screen.showReport(getAnalysis(issue1)); assertEquals(1, dataProvider.getList() .size()); assertTrue(dataProvider.getList() .contains(issue1)); Issue issue2 = new Issue(Severity.ERROR, CheckType.CONFLICTING_ROWS, Collections.emptySet()); Issue issue3 = new Issue(Severity.WARNING, CheckType.SINGLE_HIT_LOST, Collections.emptySet()); screen.showReport(getAnalysis(issue2, issue3)); verify(view).showIssue(issue1); assertEquals(2, dataProvider.getList() .size()); assertFalse(dataProvider.getList() .contains(issue1)); assertTrue(dataProvider.getList() .contains(issue2)); assertTrue(dataProvider.getList() .contains(issue3)); }
public void showReport(final AnalysisReport report) { LOGGER.finest("Received report for: " + report.getPlace().getPath()); if (!report.getPlace().equals(currentPlace)) { return; } view.showStatusComplete(); final List<Issue> issues = getIssues(report); final boolean isIllegalState = issues.stream() .filter(issue -> Objects.equals(issue.getCheckType(), CheckType.ILLEGAL_VERIFIER_STATE)) .count() > 0; if (isIllegalState) { view.hideProgressStatus(); } dataProvider.setList(issues); if (dataProvider.getList().isEmpty()) { fireIssueSelectedEvent(Issue.EMPTY); view.clearIssue(); } else { final Issue issue = dataProvider.getList().get(0); onSelect(issue); } }
AnalysisReportScreen implements IsWidget { public void showReport(final AnalysisReport report) { LOGGER.finest("Received report for: " + report.getPlace().getPath()); if (!report.getPlace().equals(currentPlace)) { return; } view.showStatusComplete(); final List<Issue> issues = getIssues(report); final boolean isIllegalState = issues.stream() .filter(issue -> Objects.equals(issue.getCheckType(), CheckType.ILLEGAL_VERIFIER_STATE)) .count() > 0; if (isIllegalState) { view.hideProgressStatus(); } dataProvider.setList(issues); if (dataProvider.getList().isEmpty()) { fireIssueSelectedEvent(Issue.EMPTY); view.clearIssue(); } else { final Issue issue = dataProvider.getList().get(0); onSelect(issue); } } }
AnalysisReportScreen implements IsWidget { public void showReport(final AnalysisReport report) { LOGGER.finest("Received report for: " + report.getPlace().getPath()); if (!report.getPlace().equals(currentPlace)) { return; } view.showStatusComplete(); final List<Issue> issues = getIssues(report); final boolean isIllegalState = issues.stream() .filter(issue -> Objects.equals(issue.getCheckType(), CheckType.ILLEGAL_VERIFIER_STATE)) .count() > 0; if (isIllegalState) { view.hideProgressStatus(); } dataProvider.setList(issues); if (dataProvider.getList().isEmpty()) { fireIssueSelectedEvent(Issue.EMPTY); view.clearIssue(); } else { final Issue issue = dataProvider.getList().get(0); onSelect(issue); } } AnalysisReportScreen(); @Inject AnalysisReportScreen(final AnalysisReportScreenView view, final Event<IssueSelectedEvent> issueSelectedEvent); }
AnalysisReportScreen implements IsWidget { public void showReport(final AnalysisReport report) { LOGGER.finest("Received report for: " + report.getPlace().getPath()); if (!report.getPlace().equals(currentPlace)) { return; } view.showStatusComplete(); final List<Issue> issues = getIssues(report); final boolean isIllegalState = issues.stream() .filter(issue -> Objects.equals(issue.getCheckType(), CheckType.ILLEGAL_VERIFIER_STATE)) .count() > 0; if (isIllegalState) { view.hideProgressStatus(); } dataProvider.setList(issues); if (dataProvider.getList().isEmpty()) { fireIssueSelectedEvent(Issue.EMPTY); view.clearIssue(); } else { final Issue issue = dataProvider.getList().get(0); onSelect(issue); } } AnalysisReportScreen(); @Inject AnalysisReportScreen(final AnalysisReportScreenView view, final Event<IssueSelectedEvent> issueSelectedEvent); void showReport(final AnalysisReport report); void setCurrentPlace(final PlaceRequest place); @Override Widget asWidget(); void onSelect(final Issue issue); void showStatus(final Status status); }
AnalysisReportScreen implements IsWidget { public void showReport(final AnalysisReport report) { LOGGER.finest("Received report for: " + report.getPlace().getPath()); if (!report.getPlace().equals(currentPlace)) { return; } view.showStatusComplete(); final List<Issue> issues = getIssues(report); final boolean isIllegalState = issues.stream() .filter(issue -> Objects.equals(issue.getCheckType(), CheckType.ILLEGAL_VERIFIER_STATE)) .count() > 0; if (isIllegalState) { view.hideProgressStatus(); } dataProvider.setList(issues); if (dataProvider.getList().isEmpty()) { fireIssueSelectedEvent(Issue.EMPTY); view.clearIssue(); } else { final Issue issue = dataProvider.getList().get(0); onSelect(issue); } } AnalysisReportScreen(); @Inject AnalysisReportScreen(final AnalysisReportScreenView view, final Event<IssueSelectedEvent> issueSelectedEvent); void showReport(final AnalysisReport report); void setCurrentPlace(final PlaceRequest place); @Override Widget asWidget(); void onSelect(final Issue issue); void showStatus(final Status status); }
@Test public void testShowReportIllegalState() { final Issue illegalStateIssue = new Issue(Severity.ERROR, CheckType.ILLEGAL_VERIFIER_STATE, Collections.emptySet()); screen.showReport(getAnalysis(illegalStateIssue)); assertEquals(1, dataProvider.getList().size()); assertTrue(dataProvider.getList().contains(illegalStateIssue)); verify(view).hideProgressStatus(); }
public void showReport(final AnalysisReport report) { LOGGER.finest("Received report for: " + report.getPlace().getPath()); if (!report.getPlace().equals(currentPlace)) { return; } view.showStatusComplete(); final List<Issue> issues = getIssues(report); final boolean isIllegalState = issues.stream() .filter(issue -> Objects.equals(issue.getCheckType(), CheckType.ILLEGAL_VERIFIER_STATE)) .count() > 0; if (isIllegalState) { view.hideProgressStatus(); } dataProvider.setList(issues); if (dataProvider.getList().isEmpty()) { fireIssueSelectedEvent(Issue.EMPTY); view.clearIssue(); } else { final Issue issue = dataProvider.getList().get(0); onSelect(issue); } }
AnalysisReportScreen implements IsWidget { public void showReport(final AnalysisReport report) { LOGGER.finest("Received report for: " + report.getPlace().getPath()); if (!report.getPlace().equals(currentPlace)) { return; } view.showStatusComplete(); final List<Issue> issues = getIssues(report); final boolean isIllegalState = issues.stream() .filter(issue -> Objects.equals(issue.getCheckType(), CheckType.ILLEGAL_VERIFIER_STATE)) .count() > 0; if (isIllegalState) { view.hideProgressStatus(); } dataProvider.setList(issues); if (dataProvider.getList().isEmpty()) { fireIssueSelectedEvent(Issue.EMPTY); view.clearIssue(); } else { final Issue issue = dataProvider.getList().get(0); onSelect(issue); } } }
AnalysisReportScreen implements IsWidget { public void showReport(final AnalysisReport report) { LOGGER.finest("Received report for: " + report.getPlace().getPath()); if (!report.getPlace().equals(currentPlace)) { return; } view.showStatusComplete(); final List<Issue> issues = getIssues(report); final boolean isIllegalState = issues.stream() .filter(issue -> Objects.equals(issue.getCheckType(), CheckType.ILLEGAL_VERIFIER_STATE)) .count() > 0; if (isIllegalState) { view.hideProgressStatus(); } dataProvider.setList(issues); if (dataProvider.getList().isEmpty()) { fireIssueSelectedEvent(Issue.EMPTY); view.clearIssue(); } else { final Issue issue = dataProvider.getList().get(0); onSelect(issue); } } AnalysisReportScreen(); @Inject AnalysisReportScreen(final AnalysisReportScreenView view, final Event<IssueSelectedEvent> issueSelectedEvent); }
AnalysisReportScreen implements IsWidget { public void showReport(final AnalysisReport report) { LOGGER.finest("Received report for: " + report.getPlace().getPath()); if (!report.getPlace().equals(currentPlace)) { return; } view.showStatusComplete(); final List<Issue> issues = getIssues(report); final boolean isIllegalState = issues.stream() .filter(issue -> Objects.equals(issue.getCheckType(), CheckType.ILLEGAL_VERIFIER_STATE)) .count() > 0; if (isIllegalState) { view.hideProgressStatus(); } dataProvider.setList(issues); if (dataProvider.getList().isEmpty()) { fireIssueSelectedEvent(Issue.EMPTY); view.clearIssue(); } else { final Issue issue = dataProvider.getList().get(0); onSelect(issue); } } AnalysisReportScreen(); @Inject AnalysisReportScreen(final AnalysisReportScreenView view, final Event<IssueSelectedEvent> issueSelectedEvent); void showReport(final AnalysisReport report); void setCurrentPlace(final PlaceRequest place); @Override Widget asWidget(); void onSelect(final Issue issue); void showStatus(final Status status); }
AnalysisReportScreen implements IsWidget { public void showReport(final AnalysisReport report) { LOGGER.finest("Received report for: " + report.getPlace().getPath()); if (!report.getPlace().equals(currentPlace)) { return; } view.showStatusComplete(); final List<Issue> issues = getIssues(report); final boolean isIllegalState = issues.stream() .filter(issue -> Objects.equals(issue.getCheckType(), CheckType.ILLEGAL_VERIFIER_STATE)) .count() > 0; if (isIllegalState) { view.hideProgressStatus(); } dataProvider.setList(issues); if (dataProvider.getList().isEmpty()) { fireIssueSelectedEvent(Issue.EMPTY); view.clearIssue(); } else { final Issue issue = dataProvider.getList().get(0); onSelect(issue); } } AnalysisReportScreen(); @Inject AnalysisReportScreen(final AnalysisReportScreenView view, final Event<IssueSelectedEvent> issueSelectedEvent); void showReport(final AnalysisReport report); void setCurrentPlace(final PlaceRequest place); @Override Widget asWidget(); void onSelect(final Issue issue); void showStatus(final Status status); }
@Test public void testDoNotShowIfThereAreNoIssues() throws Exception { screen.showReport(getAnalysis()); assertEquals(0, dataProvider.getList() .size()); verify(view, never()).showIssue(any(Issue.class)); }
public void showReport(final AnalysisReport report) { LOGGER.finest("Received report for: " + report.getPlace().getPath()); if (!report.getPlace().equals(currentPlace)) { return; } view.showStatusComplete(); final List<Issue> issues = getIssues(report); final boolean isIllegalState = issues.stream() .filter(issue -> Objects.equals(issue.getCheckType(), CheckType.ILLEGAL_VERIFIER_STATE)) .count() > 0; if (isIllegalState) { view.hideProgressStatus(); } dataProvider.setList(issues); if (dataProvider.getList().isEmpty()) { fireIssueSelectedEvent(Issue.EMPTY); view.clearIssue(); } else { final Issue issue = dataProvider.getList().get(0); onSelect(issue); } }
AnalysisReportScreen implements IsWidget { public void showReport(final AnalysisReport report) { LOGGER.finest("Received report for: " + report.getPlace().getPath()); if (!report.getPlace().equals(currentPlace)) { return; } view.showStatusComplete(); final List<Issue> issues = getIssues(report); final boolean isIllegalState = issues.stream() .filter(issue -> Objects.equals(issue.getCheckType(), CheckType.ILLEGAL_VERIFIER_STATE)) .count() > 0; if (isIllegalState) { view.hideProgressStatus(); } dataProvider.setList(issues); if (dataProvider.getList().isEmpty()) { fireIssueSelectedEvent(Issue.EMPTY); view.clearIssue(); } else { final Issue issue = dataProvider.getList().get(0); onSelect(issue); } } }
AnalysisReportScreen implements IsWidget { public void showReport(final AnalysisReport report) { LOGGER.finest("Received report for: " + report.getPlace().getPath()); if (!report.getPlace().equals(currentPlace)) { return; } view.showStatusComplete(); final List<Issue> issues = getIssues(report); final boolean isIllegalState = issues.stream() .filter(issue -> Objects.equals(issue.getCheckType(), CheckType.ILLEGAL_VERIFIER_STATE)) .count() > 0; if (isIllegalState) { view.hideProgressStatus(); } dataProvider.setList(issues); if (dataProvider.getList().isEmpty()) { fireIssueSelectedEvent(Issue.EMPTY); view.clearIssue(); } else { final Issue issue = dataProvider.getList().get(0); onSelect(issue); } } AnalysisReportScreen(); @Inject AnalysisReportScreen(final AnalysisReportScreenView view, final Event<IssueSelectedEvent> issueSelectedEvent); }
AnalysisReportScreen implements IsWidget { public void showReport(final AnalysisReport report) { LOGGER.finest("Received report for: " + report.getPlace().getPath()); if (!report.getPlace().equals(currentPlace)) { return; } view.showStatusComplete(); final List<Issue> issues = getIssues(report); final boolean isIllegalState = issues.stream() .filter(issue -> Objects.equals(issue.getCheckType(), CheckType.ILLEGAL_VERIFIER_STATE)) .count() > 0; if (isIllegalState) { view.hideProgressStatus(); } dataProvider.setList(issues); if (dataProvider.getList().isEmpty()) { fireIssueSelectedEvent(Issue.EMPTY); view.clearIssue(); } else { final Issue issue = dataProvider.getList().get(0); onSelect(issue); } } AnalysisReportScreen(); @Inject AnalysisReportScreen(final AnalysisReportScreenView view, final Event<IssueSelectedEvent> issueSelectedEvent); void showReport(final AnalysisReport report); void setCurrentPlace(final PlaceRequest place); @Override Widget asWidget(); void onSelect(final Issue issue); void showStatus(final Status status); }
AnalysisReportScreen implements IsWidget { public void showReport(final AnalysisReport report) { LOGGER.finest("Received report for: " + report.getPlace().getPath()); if (!report.getPlace().equals(currentPlace)) { return; } view.showStatusComplete(); final List<Issue> issues = getIssues(report); final boolean isIllegalState = issues.stream() .filter(issue -> Objects.equals(issue.getCheckType(), CheckType.ILLEGAL_VERIFIER_STATE)) .count() > 0; if (isIllegalState) { view.hideProgressStatus(); } dataProvider.setList(issues); if (dataProvider.getList().isEmpty()) { fireIssueSelectedEvent(Issue.EMPTY); view.clearIssue(); } else { final Issue issue = dataProvider.getList().get(0); onSelect(issue); } } AnalysisReportScreen(); @Inject AnalysisReportScreen(final AnalysisReportScreenView view, final Event<IssueSelectedEvent> issueSelectedEvent); void showReport(final AnalysisReport report); void setCurrentPlace(final PlaceRequest place); @Override Widget asWidget(); void onSelect(final Issue issue); void showStatus(final Status status); }
@Test public void testShowEverythingOnce() throws Exception { Issue issue2 = new Issue(Severity.WARNING, CheckType.REDUNDANT_ROWS, Collections.emptySet()); Issue issue3 = new Issue(Severity.WARNING, CheckType.REDUNDANT_ROWS, Collections.emptySet()); Issue issue4 = new Issue(Severity.WARNING, CheckType.REDUNDANT_ROWS, new HashSet<>(Arrays.asList(1, 2, 3))); Issue issue5 = new Issue(Severity.WARNING, CheckType.REDUNDANT_ROWS, new HashSet<>(Arrays.asList(1, 2, 3))); screen.showReport(getAnalysis(issue2, issue3, issue4, issue5)); assertEquals(2, dataProvider.getList() .size()); }
public void showReport(final AnalysisReport report) { LOGGER.finest("Received report for: " + report.getPlace().getPath()); if (!report.getPlace().equals(currentPlace)) { return; } view.showStatusComplete(); final List<Issue> issues = getIssues(report); final boolean isIllegalState = issues.stream() .filter(issue -> Objects.equals(issue.getCheckType(), CheckType.ILLEGAL_VERIFIER_STATE)) .count() > 0; if (isIllegalState) { view.hideProgressStatus(); } dataProvider.setList(issues); if (dataProvider.getList().isEmpty()) { fireIssueSelectedEvent(Issue.EMPTY); view.clearIssue(); } else { final Issue issue = dataProvider.getList().get(0); onSelect(issue); } }
AnalysisReportScreen implements IsWidget { public void showReport(final AnalysisReport report) { LOGGER.finest("Received report for: " + report.getPlace().getPath()); if (!report.getPlace().equals(currentPlace)) { return; } view.showStatusComplete(); final List<Issue> issues = getIssues(report); final boolean isIllegalState = issues.stream() .filter(issue -> Objects.equals(issue.getCheckType(), CheckType.ILLEGAL_VERIFIER_STATE)) .count() > 0; if (isIllegalState) { view.hideProgressStatus(); } dataProvider.setList(issues); if (dataProvider.getList().isEmpty()) { fireIssueSelectedEvent(Issue.EMPTY); view.clearIssue(); } else { final Issue issue = dataProvider.getList().get(0); onSelect(issue); } } }
AnalysisReportScreen implements IsWidget { public void showReport(final AnalysisReport report) { LOGGER.finest("Received report for: " + report.getPlace().getPath()); if (!report.getPlace().equals(currentPlace)) { return; } view.showStatusComplete(); final List<Issue> issues = getIssues(report); final boolean isIllegalState = issues.stream() .filter(issue -> Objects.equals(issue.getCheckType(), CheckType.ILLEGAL_VERIFIER_STATE)) .count() > 0; if (isIllegalState) { view.hideProgressStatus(); } dataProvider.setList(issues); if (dataProvider.getList().isEmpty()) { fireIssueSelectedEvent(Issue.EMPTY); view.clearIssue(); } else { final Issue issue = dataProvider.getList().get(0); onSelect(issue); } } AnalysisReportScreen(); @Inject AnalysisReportScreen(final AnalysisReportScreenView view, final Event<IssueSelectedEvent> issueSelectedEvent); }
AnalysisReportScreen implements IsWidget { public void showReport(final AnalysisReport report) { LOGGER.finest("Received report for: " + report.getPlace().getPath()); if (!report.getPlace().equals(currentPlace)) { return; } view.showStatusComplete(); final List<Issue> issues = getIssues(report); final boolean isIllegalState = issues.stream() .filter(issue -> Objects.equals(issue.getCheckType(), CheckType.ILLEGAL_VERIFIER_STATE)) .count() > 0; if (isIllegalState) { view.hideProgressStatus(); } dataProvider.setList(issues); if (dataProvider.getList().isEmpty()) { fireIssueSelectedEvent(Issue.EMPTY); view.clearIssue(); } else { final Issue issue = dataProvider.getList().get(0); onSelect(issue); } } AnalysisReportScreen(); @Inject AnalysisReportScreen(final AnalysisReportScreenView view, final Event<IssueSelectedEvent> issueSelectedEvent); void showReport(final AnalysisReport report); void setCurrentPlace(final PlaceRequest place); @Override Widget asWidget(); void onSelect(final Issue issue); void showStatus(final Status status); }
AnalysisReportScreen implements IsWidget { public void showReport(final AnalysisReport report) { LOGGER.finest("Received report for: " + report.getPlace().getPath()); if (!report.getPlace().equals(currentPlace)) { return; } view.showStatusComplete(); final List<Issue> issues = getIssues(report); final boolean isIllegalState = issues.stream() .filter(issue -> Objects.equals(issue.getCheckType(), CheckType.ILLEGAL_VERIFIER_STATE)) .count() > 0; if (isIllegalState) { view.hideProgressStatus(); } dataProvider.setList(issues); if (dataProvider.getList().isEmpty()) { fireIssueSelectedEvent(Issue.EMPTY); view.clearIssue(); } else { final Issue issue = dataProvider.getList().get(0); onSelect(issue); } } AnalysisReportScreen(); @Inject AnalysisReportScreen(final AnalysisReportScreenView view, final Event<IssueSelectedEvent> issueSelectedEvent); void showReport(final AnalysisReport report); void setCurrentPlace(final PlaceRequest place); @Override Widget asWidget(); void onSelect(final Issue issue); void showStatus(final Status status); }
@Test public void testOnSelect() throws Exception { Issue issue1 = new Issue(Severity.WARNING, CheckType.REDUNDANT_ROWS, Collections.emptySet()); Issue issue2 = new Issue(Severity.WARNING, CheckType.SINGLE_HIT_LOST, Collections.emptySet()); screen.showReport(getAnalysis(issue1, issue2)); verify(issueSelectedEvent, times(1)).fire(issueSelectedEventCaptor.capture()); assertEquals(issue1, issueSelectedEventCaptor.getValue().getIssue()); screen.onSelect(issue2); verify(view).showIssue(issue2); verify(issueSelectedEvent, times(2)).fire(issueSelectedEventCaptor.capture()); assertEquals(issue2, issueSelectedEventCaptor.getValue().getIssue()); }
public void onSelect(final Issue issue) { view.showIssue(issue); fireIssueSelectedEvent(issue); }
AnalysisReportScreen implements IsWidget { public void onSelect(final Issue issue) { view.showIssue(issue); fireIssueSelectedEvent(issue); } }
AnalysisReportScreen implements IsWidget { public void onSelect(final Issue issue) { view.showIssue(issue); fireIssueSelectedEvent(issue); } AnalysisReportScreen(); @Inject AnalysisReportScreen(final AnalysisReportScreenView view, final Event<IssueSelectedEvent> issueSelectedEvent); }
AnalysisReportScreen implements IsWidget { public void onSelect(final Issue issue) { view.showIssue(issue); fireIssueSelectedEvent(issue); } AnalysisReportScreen(); @Inject AnalysisReportScreen(final AnalysisReportScreenView view, final Event<IssueSelectedEvent> issueSelectedEvent); void showReport(final AnalysisReport report); void setCurrentPlace(final PlaceRequest place); @Override Widget asWidget(); void onSelect(final Issue issue); void showStatus(final Status status); }
AnalysisReportScreen implements IsWidget { public void onSelect(final Issue issue) { view.showIssue(issue); fireIssueSelectedEvent(issue); } AnalysisReportScreen(); @Inject AnalysisReportScreen(final AnalysisReportScreenView view, final Event<IssueSelectedEvent> issueSelectedEvent); void showReport(final AnalysisReport report); void setCurrentPlace(final PlaceRequest place); @Override Widget asWidget(); void onSelect(final Issue issue); void showStatus(final Status status); }
@Test public void testShowStatus() throws Exception { screen.showStatus(new Status("UUID", 1, 2, 3)); verify(view).showStatusTitle(1, 2, 3); }
public void showStatus(final Status status) { view.showStatusTitle(status.getStart(), status.getEnd(), status.getTotalCheckCount()); }
AnalysisReportScreen implements IsWidget { public void showStatus(final Status status) { view.showStatusTitle(status.getStart(), status.getEnd(), status.getTotalCheckCount()); } }
AnalysisReportScreen implements IsWidget { public void showStatus(final Status status) { view.showStatusTitle(status.getStart(), status.getEnd(), status.getTotalCheckCount()); } AnalysisReportScreen(); @Inject AnalysisReportScreen(final AnalysisReportScreenView view, final Event<IssueSelectedEvent> issueSelectedEvent); }
AnalysisReportScreen implements IsWidget { public void showStatus(final Status status) { view.showStatusTitle(status.getStart(), status.getEnd(), status.getTotalCheckCount()); } AnalysisReportScreen(); @Inject AnalysisReportScreen(final AnalysisReportScreenView view, final Event<IssueSelectedEvent> issueSelectedEvent); void showReport(final AnalysisReport report); void setCurrentPlace(final PlaceRequest place); @Override Widget asWidget(); void onSelect(final Issue issue); void showStatus(final Status status); }
AnalysisReportScreen implements IsWidget { public void showStatus(final Status status) { view.showStatusTitle(status.getStart(), status.getEnd(), status.getTotalCheckCount()); } AnalysisReportScreen(); @Inject AnalysisReportScreen(final AnalysisReportScreenView view, final Event<IssueSelectedEvent> issueSelectedEvent); void showReport(final AnalysisReport report); void setCurrentPlace(final PlaceRequest place); @Override Widget asWidget(); void onSelect(final Issue issue); void showStatus(final Status status); }
@Test public void testThePlaceInReportIsNotActive() throws Exception { screen.showReport(getAnalysis(PlaceRequest.NOWHERE)); verify(view, never()).showStatusComplete(); }
public void showReport(final AnalysisReport report) { LOGGER.finest("Received report for: " + report.getPlace().getPath()); if (!report.getPlace().equals(currentPlace)) { return; } view.showStatusComplete(); final List<Issue> issues = getIssues(report); final boolean isIllegalState = issues.stream() .filter(issue -> Objects.equals(issue.getCheckType(), CheckType.ILLEGAL_VERIFIER_STATE)) .count() > 0; if (isIllegalState) { view.hideProgressStatus(); } dataProvider.setList(issues); if (dataProvider.getList().isEmpty()) { fireIssueSelectedEvent(Issue.EMPTY); view.clearIssue(); } else { final Issue issue = dataProvider.getList().get(0); onSelect(issue); } }
AnalysisReportScreen implements IsWidget { public void showReport(final AnalysisReport report) { LOGGER.finest("Received report for: " + report.getPlace().getPath()); if (!report.getPlace().equals(currentPlace)) { return; } view.showStatusComplete(); final List<Issue> issues = getIssues(report); final boolean isIllegalState = issues.stream() .filter(issue -> Objects.equals(issue.getCheckType(), CheckType.ILLEGAL_VERIFIER_STATE)) .count() > 0; if (isIllegalState) { view.hideProgressStatus(); } dataProvider.setList(issues); if (dataProvider.getList().isEmpty()) { fireIssueSelectedEvent(Issue.EMPTY); view.clearIssue(); } else { final Issue issue = dataProvider.getList().get(0); onSelect(issue); } } }
AnalysisReportScreen implements IsWidget { public void showReport(final AnalysisReport report) { LOGGER.finest("Received report for: " + report.getPlace().getPath()); if (!report.getPlace().equals(currentPlace)) { return; } view.showStatusComplete(); final List<Issue> issues = getIssues(report); final boolean isIllegalState = issues.stream() .filter(issue -> Objects.equals(issue.getCheckType(), CheckType.ILLEGAL_VERIFIER_STATE)) .count() > 0; if (isIllegalState) { view.hideProgressStatus(); } dataProvider.setList(issues); if (dataProvider.getList().isEmpty()) { fireIssueSelectedEvent(Issue.EMPTY); view.clearIssue(); } else { final Issue issue = dataProvider.getList().get(0); onSelect(issue); } } AnalysisReportScreen(); @Inject AnalysisReportScreen(final AnalysisReportScreenView view, final Event<IssueSelectedEvent> issueSelectedEvent); }
AnalysisReportScreen implements IsWidget { public void showReport(final AnalysisReport report) { LOGGER.finest("Received report for: " + report.getPlace().getPath()); if (!report.getPlace().equals(currentPlace)) { return; } view.showStatusComplete(); final List<Issue> issues = getIssues(report); final boolean isIllegalState = issues.stream() .filter(issue -> Objects.equals(issue.getCheckType(), CheckType.ILLEGAL_VERIFIER_STATE)) .count() > 0; if (isIllegalState) { view.hideProgressStatus(); } dataProvider.setList(issues); if (dataProvider.getList().isEmpty()) { fireIssueSelectedEvent(Issue.EMPTY); view.clearIssue(); } else { final Issue issue = dataProvider.getList().get(0); onSelect(issue); } } AnalysisReportScreen(); @Inject AnalysisReportScreen(final AnalysisReportScreenView view, final Event<IssueSelectedEvent> issueSelectedEvent); void showReport(final AnalysisReport report); void setCurrentPlace(final PlaceRequest place); @Override Widget asWidget(); void onSelect(final Issue issue); void showStatus(final Status status); }
AnalysisReportScreen implements IsWidget { public void showReport(final AnalysisReport report) { LOGGER.finest("Received report for: " + report.getPlace().getPath()); if (!report.getPlace().equals(currentPlace)) { return; } view.showStatusComplete(); final List<Issue> issues = getIssues(report); final boolean isIllegalState = issues.stream() .filter(issue -> Objects.equals(issue.getCheckType(), CheckType.ILLEGAL_VERIFIER_STATE)) .count() > 0; if (isIllegalState) { view.hideProgressStatus(); } dataProvider.setList(issues); if (dataProvider.getList().isEmpty()) { fireIssueSelectedEvent(Issue.EMPTY); view.clearIssue(); } else { final Issue issue = dataProvider.getList().get(0); onSelect(issue); } } AnalysisReportScreen(); @Inject AnalysisReportScreen(final AnalysisReportScreenView view, final Event<IssueSelectedEvent> issueSelectedEvent); void showReport(final AnalysisReport report); void setCurrentPlace(final PlaceRequest place); @Override Widget asWidget(); void onSelect(final Issue issue); void showStatus(final Status status); }
@Test public void testNoIssuesShowNothing() throws Exception { screen.showReport(getAnalysis()); verify(view, never()).showIssue(any(Issue.class)); verify(view).clearIssue(); verify(issueSelectedEvent, times(1)).fire(issueSelectedEventCaptor.capture()); assertEquals(Issue.EMPTY, issueSelectedEventCaptor.getValue().getIssue()); }
public void showReport(final AnalysisReport report) { LOGGER.finest("Received report for: " + report.getPlace().getPath()); if (!report.getPlace().equals(currentPlace)) { return; } view.showStatusComplete(); final List<Issue> issues = getIssues(report); final boolean isIllegalState = issues.stream() .filter(issue -> Objects.equals(issue.getCheckType(), CheckType.ILLEGAL_VERIFIER_STATE)) .count() > 0; if (isIllegalState) { view.hideProgressStatus(); } dataProvider.setList(issues); if (dataProvider.getList().isEmpty()) { fireIssueSelectedEvent(Issue.EMPTY); view.clearIssue(); } else { final Issue issue = dataProvider.getList().get(0); onSelect(issue); } }
AnalysisReportScreen implements IsWidget { public void showReport(final AnalysisReport report) { LOGGER.finest("Received report for: " + report.getPlace().getPath()); if (!report.getPlace().equals(currentPlace)) { return; } view.showStatusComplete(); final List<Issue> issues = getIssues(report); final boolean isIllegalState = issues.stream() .filter(issue -> Objects.equals(issue.getCheckType(), CheckType.ILLEGAL_VERIFIER_STATE)) .count() > 0; if (isIllegalState) { view.hideProgressStatus(); } dataProvider.setList(issues); if (dataProvider.getList().isEmpty()) { fireIssueSelectedEvent(Issue.EMPTY); view.clearIssue(); } else { final Issue issue = dataProvider.getList().get(0); onSelect(issue); } } }
AnalysisReportScreen implements IsWidget { public void showReport(final AnalysisReport report) { LOGGER.finest("Received report for: " + report.getPlace().getPath()); if (!report.getPlace().equals(currentPlace)) { return; } view.showStatusComplete(); final List<Issue> issues = getIssues(report); final boolean isIllegalState = issues.stream() .filter(issue -> Objects.equals(issue.getCheckType(), CheckType.ILLEGAL_VERIFIER_STATE)) .count() > 0; if (isIllegalState) { view.hideProgressStatus(); } dataProvider.setList(issues); if (dataProvider.getList().isEmpty()) { fireIssueSelectedEvent(Issue.EMPTY); view.clearIssue(); } else { final Issue issue = dataProvider.getList().get(0); onSelect(issue); } } AnalysisReportScreen(); @Inject AnalysisReportScreen(final AnalysisReportScreenView view, final Event<IssueSelectedEvent> issueSelectedEvent); }
AnalysisReportScreen implements IsWidget { public void showReport(final AnalysisReport report) { LOGGER.finest("Received report for: " + report.getPlace().getPath()); if (!report.getPlace().equals(currentPlace)) { return; } view.showStatusComplete(); final List<Issue> issues = getIssues(report); final boolean isIllegalState = issues.stream() .filter(issue -> Objects.equals(issue.getCheckType(), CheckType.ILLEGAL_VERIFIER_STATE)) .count() > 0; if (isIllegalState) { view.hideProgressStatus(); } dataProvider.setList(issues); if (dataProvider.getList().isEmpty()) { fireIssueSelectedEvent(Issue.EMPTY); view.clearIssue(); } else { final Issue issue = dataProvider.getList().get(0); onSelect(issue); } } AnalysisReportScreen(); @Inject AnalysisReportScreen(final AnalysisReportScreenView view, final Event<IssueSelectedEvent> issueSelectedEvent); void showReport(final AnalysisReport report); void setCurrentPlace(final PlaceRequest place); @Override Widget asWidget(); void onSelect(final Issue issue); void showStatus(final Status status); }
AnalysisReportScreen implements IsWidget { public void showReport(final AnalysisReport report) { LOGGER.finest("Received report for: " + report.getPlace().getPath()); if (!report.getPlace().equals(currentPlace)) { return; } view.showStatusComplete(); final List<Issue> issues = getIssues(report); final boolean isIllegalState = issues.stream() .filter(issue -> Objects.equals(issue.getCheckType(), CheckType.ILLEGAL_VERIFIER_STATE)) .count() > 0; if (isIllegalState) { view.hideProgressStatus(); } dataProvider.setList(issues); if (dataProvider.getList().isEmpty()) { fireIssueSelectedEvent(Issue.EMPTY); view.clearIssue(); } else { final Issue issue = dataProvider.getList().get(0); onSelect(issue); } } AnalysisReportScreen(); @Inject AnalysisReportScreen(final AnalysisReportScreenView view, final Event<IssueSelectedEvent> issueSelectedEvent); void showReport(final AnalysisReport report); void setCurrentPlace(final PlaceRequest place); @Override Widget asWidget(); void onSelect(final Issue issue); void showStatus(final Status status); }
@Test public void testHideProgressStatus() { view.hideProgressStatus(); verify(style).setVisibility(Style.Visibility.HIDDEN); }
@Override public void hideProgressStatus() { progressTooltip.getStyle().setVisibility(Style.Visibility.HIDDEN); }
AnalysisReportScreenViewImpl extends Composite implements AnalysisReportScreenView, RequiresResize { @Override public void hideProgressStatus() { progressTooltip.getStyle().setVisibility(Style.Visibility.HIDDEN); } }
AnalysisReportScreenViewImpl extends Composite implements AnalysisReportScreenView, RequiresResize { @Override public void hideProgressStatus() { progressTooltip.getStyle().setVisibility(Style.Visibility.HIDDEN); } AnalysisReportScreenViewImpl(); @Inject AnalysisReportScreenViewImpl(final IssuePresenter issuePresenter); }
AnalysisReportScreenViewImpl extends Composite implements AnalysisReportScreenView, RequiresResize { @Override public void hideProgressStatus() { progressTooltip.getStyle().setVisibility(Style.Visibility.HIDDEN); } AnalysisReportScreenViewImpl(); @Inject AnalysisReportScreenViewImpl(final IssuePresenter issuePresenter); @Override void setUpDataProvider(ListDataProvider<Issue> dataProvider); @Override void setPresenter(final AnalysisReportScreen presenter); @Override void showIssue(Issue issue); @Override void clearIssue(); @Override void showStatusComplete(); @Override void showStatusTitle(final int start, final int end, final int totalCheckCount); @Override void hideProgressStatus(); @Override void onResize(); }
AnalysisReportScreenViewImpl extends Composite implements AnalysisReportScreenView, RequiresResize { @Override public void hideProgressStatus() { progressTooltip.getStyle().setVisibility(Style.Visibility.HIDDEN); } AnalysisReportScreenViewImpl(); @Inject AnalysisReportScreenViewImpl(final IssuePresenter issuePresenter); @Override void setUpDataProvider(ListDataProvider<Issue> dataProvider); @Override void setPresenter(final AnalysisReportScreen presenter); @Override void showIssue(Issue issue); @Override void clearIssue(); @Override void showStatusComplete(); @Override void showStatusTitle(final int start, final int end, final int totalCheckCount); @Override void hideProgressStatus(); @Override void onResize(); }
@Test public void testStatusComplete() { view.showStatusComplete(); verify(style).setVisibility(Style.Visibility.VISIBLE); }
@Override public void showStatusComplete() { progressTooltip.getStyle().setVisibility(Style.Visibility.VISIBLE); progressPanel.getStyle().setColor("WHITE"); progressPanel.getStyle().setBackgroundColor("GREEN"); progressPanel.setInnerHTML(AnalysisConstants.INSTANCE.AnalysisComplete()); }
AnalysisReportScreenViewImpl extends Composite implements AnalysisReportScreenView, RequiresResize { @Override public void showStatusComplete() { progressTooltip.getStyle().setVisibility(Style.Visibility.VISIBLE); progressPanel.getStyle().setColor("WHITE"); progressPanel.getStyle().setBackgroundColor("GREEN"); progressPanel.setInnerHTML(AnalysisConstants.INSTANCE.AnalysisComplete()); } }
AnalysisReportScreenViewImpl extends Composite implements AnalysisReportScreenView, RequiresResize { @Override public void showStatusComplete() { progressTooltip.getStyle().setVisibility(Style.Visibility.VISIBLE); progressPanel.getStyle().setColor("WHITE"); progressPanel.getStyle().setBackgroundColor("GREEN"); progressPanel.setInnerHTML(AnalysisConstants.INSTANCE.AnalysisComplete()); } AnalysisReportScreenViewImpl(); @Inject AnalysisReportScreenViewImpl(final IssuePresenter issuePresenter); }
AnalysisReportScreenViewImpl extends Composite implements AnalysisReportScreenView, RequiresResize { @Override public void showStatusComplete() { progressTooltip.getStyle().setVisibility(Style.Visibility.VISIBLE); progressPanel.getStyle().setColor("WHITE"); progressPanel.getStyle().setBackgroundColor("GREEN"); progressPanel.setInnerHTML(AnalysisConstants.INSTANCE.AnalysisComplete()); } AnalysisReportScreenViewImpl(); @Inject AnalysisReportScreenViewImpl(final IssuePresenter issuePresenter); @Override void setUpDataProvider(ListDataProvider<Issue> dataProvider); @Override void setPresenter(final AnalysisReportScreen presenter); @Override void showIssue(Issue issue); @Override void clearIssue(); @Override void showStatusComplete(); @Override void showStatusTitle(final int start, final int end, final int totalCheckCount); @Override void hideProgressStatus(); @Override void onResize(); }
AnalysisReportScreenViewImpl extends Composite implements AnalysisReportScreenView, RequiresResize { @Override public void showStatusComplete() { progressTooltip.getStyle().setVisibility(Style.Visibility.VISIBLE); progressPanel.getStyle().setColor("WHITE"); progressPanel.getStyle().setBackgroundColor("GREEN"); progressPanel.setInnerHTML(AnalysisConstants.INSTANCE.AnalysisComplete()); } AnalysisReportScreenViewImpl(); @Inject AnalysisReportScreenViewImpl(final IssuePresenter issuePresenter); @Override void setUpDataProvider(ListDataProvider<Issue> dataProvider); @Override void setPresenter(final AnalysisReportScreen presenter); @Override void showIssue(Issue issue); @Override void clearIssue(); @Override void showStatusComplete(); @Override void showStatusTitle(final int start, final int end, final int totalCheckCount); @Override void hideProgressStatus(); @Override void onResize(); }
@Test public void testGetGlyphWithConsumer() { factory.getGlyph(DEFINITION_ID, ShapeFactory.GlyphConsumer.class); verify(delegateShapeFactory).getGlyph(DEFINITION_ID, ShapeFactory.GlyphConsumer.class); }
@Override public Glyph getGlyph(final String definitionId) { return delegateShapeFactory.getGlyph(definitionId); }
DMNShapeFactory implements ShapeFactory<DMNDefinition, Shape> { @Override public Glyph getGlyph(final String definitionId) { return delegateShapeFactory.getGlyph(definitionId); } }
DMNShapeFactory implements ShapeFactory<DMNDefinition, Shape> { @Override public Glyph getGlyph(final String definitionId) { return delegateShapeFactory.getGlyph(definitionId); } @Inject DMNShapeFactory(final SVGShapeFactory svgShapeFactory, final DMNConnectorShapeFactory dmnConnectorShapeFactory, final DMNDecisionServiceShapeFactory dmnDecisionServiceShapeFactory, final DelegateShapeFactory<DMNDefinition, Shape> delegateShapeFactory); }
DMNShapeFactory implements ShapeFactory<DMNDefinition, Shape> { @Override public Glyph getGlyph(final String definitionId) { return delegateShapeFactory.getGlyph(definitionId); } @Inject DMNShapeFactory(final SVGShapeFactory svgShapeFactory, final DMNConnectorShapeFactory dmnConnectorShapeFactory, final DMNDecisionServiceShapeFactory dmnDecisionServiceShapeFactory, final DelegateShapeFactory<DMNDefinition, Shape> delegateShapeFactory); @PostConstruct void init(); @Override Shape newShape(final DMNDefinition definition); @Override Glyph getGlyph(final String definitionId); @Override Glyph getGlyph(final String definitionId, final Class<? extends GlyphConsumer> consumer); }
DMNShapeFactory implements ShapeFactory<DMNDefinition, Shape> { @Override public Glyph getGlyph(final String definitionId) { return delegateShapeFactory.getGlyph(definitionId); } @Inject DMNShapeFactory(final SVGShapeFactory svgShapeFactory, final DMNConnectorShapeFactory dmnConnectorShapeFactory, final DMNDecisionServiceShapeFactory dmnDecisionServiceShapeFactory, final DelegateShapeFactory<DMNDefinition, Shape> delegateShapeFactory); @PostConstruct void init(); @Override Shape newShape(final DMNDefinition definition); @Override Glyph getGlyph(final String definitionId); @Override Glyph getGlyph(final String definitionId, final Class<? extends GlyphConsumer> consumer); }
@Test public void testStatusTitle() { view.showStatusTitle(0, 1, 1); verify(style).setVisibility(Style.Visibility.VISIBLE); }
@Override public void showStatusTitle(final int start, final int end, final int totalCheckCount) { progressTooltip.getStyle().setVisibility(Style.Visibility.VISIBLE); progressPanel.getStyle().setColor("BLACK"); progressPanel.getStyle().setBackgroundColor("#ffc"); progressPanel.setInnerHTML(AnalysisConstants.INSTANCE.AnalysingChecks0To1Of2(start, end, totalCheckCount)); }
AnalysisReportScreenViewImpl extends Composite implements AnalysisReportScreenView, RequiresResize { @Override public void showStatusTitle(final int start, final int end, final int totalCheckCount) { progressTooltip.getStyle().setVisibility(Style.Visibility.VISIBLE); progressPanel.getStyle().setColor("BLACK"); progressPanel.getStyle().setBackgroundColor("#ffc"); progressPanel.setInnerHTML(AnalysisConstants.INSTANCE.AnalysingChecks0To1Of2(start, end, totalCheckCount)); } }
AnalysisReportScreenViewImpl extends Composite implements AnalysisReportScreenView, RequiresResize { @Override public void showStatusTitle(final int start, final int end, final int totalCheckCount) { progressTooltip.getStyle().setVisibility(Style.Visibility.VISIBLE); progressPanel.getStyle().setColor("BLACK"); progressPanel.getStyle().setBackgroundColor("#ffc"); progressPanel.setInnerHTML(AnalysisConstants.INSTANCE.AnalysingChecks0To1Of2(start, end, totalCheckCount)); } AnalysisReportScreenViewImpl(); @Inject AnalysisReportScreenViewImpl(final IssuePresenter issuePresenter); }
AnalysisReportScreenViewImpl extends Composite implements AnalysisReportScreenView, RequiresResize { @Override public void showStatusTitle(final int start, final int end, final int totalCheckCount) { progressTooltip.getStyle().setVisibility(Style.Visibility.VISIBLE); progressPanel.getStyle().setColor("BLACK"); progressPanel.getStyle().setBackgroundColor("#ffc"); progressPanel.setInnerHTML(AnalysisConstants.INSTANCE.AnalysingChecks0To1Of2(start, end, totalCheckCount)); } AnalysisReportScreenViewImpl(); @Inject AnalysisReportScreenViewImpl(final IssuePresenter issuePresenter); @Override void setUpDataProvider(ListDataProvider<Issue> dataProvider); @Override void setPresenter(final AnalysisReportScreen presenter); @Override void showIssue(Issue issue); @Override void clearIssue(); @Override void showStatusComplete(); @Override void showStatusTitle(final int start, final int end, final int totalCheckCount); @Override void hideProgressStatus(); @Override void onResize(); }
AnalysisReportScreenViewImpl extends Composite implements AnalysisReportScreenView, RequiresResize { @Override public void showStatusTitle(final int start, final int end, final int totalCheckCount) { progressTooltip.getStyle().setVisibility(Style.Visibility.VISIBLE); progressPanel.getStyle().setColor("BLACK"); progressPanel.getStyle().setBackgroundColor("#ffc"); progressPanel.setInnerHTML(AnalysisConstants.INSTANCE.AnalysingChecks0To1Of2(start, end, totalCheckCount)); } AnalysisReportScreenViewImpl(); @Inject AnalysisReportScreenViewImpl(final IssuePresenter issuePresenter); @Override void setUpDataProvider(ListDataProvider<Issue> dataProvider); @Override void setPresenter(final AnalysisReportScreen presenter); @Override void showIssue(Issue issue); @Override void clearIssue(); @Override void showStatusComplete(); @Override void showStatusTitle(final int start, final int end, final int totalCheckCount); @Override void hideProgressStatus(); @Override void onResize(); }
@Test public void areHandlersAreSetUpOnInit() throws Exception { controller.initialiseAnalysis(); verify(eventBus).addHandler(ValidateEvent.TYPE, controller); verify(eventBus).addHandler(DeleteRowEvent.TYPE, controller); verify(eventBus).addHandler(AfterColumnDeleted.TYPE, controller); verify(eventBus).addHandler(UpdateColumnDataEvent.TYPE, controller); verify(eventBus).addHandler(AppendRowEvent.TYPE, controller); verify(eventBus).addHandler(InsertRowEvent.TYPE, controller); verify(eventBus).addHandler(AfterColumnInserted.TYPE, controller); }
@Override public void initialiseAnalysis() { LOGGER.info("Initializing analysis."); events.setup(); decisionTableAnalyzer.activate(); }
AnalyzerControllerImpl implements AnalyzerController, ValidateEvent.Handler, DeleteRowEvent.Handler, AfterColumnDeleted.Handler, UpdateColumnDataEvent.Handler, AppendRowEvent.Handler, InsertRowEvent.Handler, AfterColumnInserted.Handler { @Override public void initialiseAnalysis() { LOGGER.info("Initializing analysis."); events.setup(); decisionTableAnalyzer.activate(); } }
AnalyzerControllerImpl implements AnalyzerController, ValidateEvent.Handler, DeleteRowEvent.Handler, AfterColumnDeleted.Handler, UpdateColumnDataEvent.Handler, AppendRowEvent.Handler, InsertRowEvent.Handler, AfterColumnInserted.Handler { @Override public void initialiseAnalysis() { LOGGER.info("Initializing analysis."); events.setup(); decisionTableAnalyzer.activate(); } AnalyzerControllerImpl(final DecisionTableAnalyzer decisionTableAnalyzer, final EventBus eventBus); }
AnalyzerControllerImpl implements AnalyzerController, ValidateEvent.Handler, DeleteRowEvent.Handler, AfterColumnDeleted.Handler, UpdateColumnDataEvent.Handler, AppendRowEvent.Handler, InsertRowEvent.Handler, AfterColumnInserted.Handler { @Override public void initialiseAnalysis() { LOGGER.info("Initializing analysis."); events.setup(); decisionTableAnalyzer.activate(); } AnalyzerControllerImpl(final DecisionTableAnalyzer decisionTableAnalyzer, final EventBus eventBus); @Override void initialiseAnalysis(); @Override void terminateAnalysis(); @Override void onValidate(final ValidateEvent event); @Override void onAfterDeletedColumn(final AfterColumnDeleted event); @Override void onAfterColumnInserted(final AfterColumnInserted event); @Override void onAppendRow(final AppendRowEvent event); @Override void onDeleteRow(final DeleteRowEvent event); @Override void onInsertRow(final InsertRowEvent event); @Override void onUpdateColumnData(final UpdateColumnDataEvent event); }
AnalyzerControllerImpl implements AnalyzerController, ValidateEvent.Handler, DeleteRowEvent.Handler, AfterColumnDeleted.Handler, UpdateColumnDataEvent.Handler, AppendRowEvent.Handler, InsertRowEvent.Handler, AfterColumnInserted.Handler { @Override public void initialiseAnalysis() { LOGGER.info("Initializing analysis."); events.setup(); decisionTableAnalyzer.activate(); } AnalyzerControllerImpl(final DecisionTableAnalyzer decisionTableAnalyzer, final EventBus eventBus); @Override void initialiseAnalysis(); @Override void terminateAnalysis(); @Override void onValidate(final ValidateEvent event); @Override void onAfterDeletedColumn(final AfterColumnDeleted event); @Override void onAfterColumnInserted(final AfterColumnInserted event); @Override void onAppendRow(final AppendRowEvent event); @Override void onDeleteRow(final DeleteRowEvent event); @Override void onInsertRow(final InsertRowEvent event); @Override void onUpdateColumnData(final UpdateColumnDataEvent event); }
@Test public void start() throws Exception { controller.initialiseAnalysis(); verify(analyzer).activate(); }
@Override public void initialiseAnalysis() { LOGGER.info("Initializing analysis."); events.setup(); decisionTableAnalyzer.activate(); }
AnalyzerControllerImpl implements AnalyzerController, ValidateEvent.Handler, DeleteRowEvent.Handler, AfterColumnDeleted.Handler, UpdateColumnDataEvent.Handler, AppendRowEvent.Handler, InsertRowEvent.Handler, AfterColumnInserted.Handler { @Override public void initialiseAnalysis() { LOGGER.info("Initializing analysis."); events.setup(); decisionTableAnalyzer.activate(); } }
AnalyzerControllerImpl implements AnalyzerController, ValidateEvent.Handler, DeleteRowEvent.Handler, AfterColumnDeleted.Handler, UpdateColumnDataEvent.Handler, AppendRowEvent.Handler, InsertRowEvent.Handler, AfterColumnInserted.Handler { @Override public void initialiseAnalysis() { LOGGER.info("Initializing analysis."); events.setup(); decisionTableAnalyzer.activate(); } AnalyzerControllerImpl(final DecisionTableAnalyzer decisionTableAnalyzer, final EventBus eventBus); }
AnalyzerControllerImpl implements AnalyzerController, ValidateEvent.Handler, DeleteRowEvent.Handler, AfterColumnDeleted.Handler, UpdateColumnDataEvent.Handler, AppendRowEvent.Handler, InsertRowEvent.Handler, AfterColumnInserted.Handler { @Override public void initialiseAnalysis() { LOGGER.info("Initializing analysis."); events.setup(); decisionTableAnalyzer.activate(); } AnalyzerControllerImpl(final DecisionTableAnalyzer decisionTableAnalyzer, final EventBus eventBus); @Override void initialiseAnalysis(); @Override void terminateAnalysis(); @Override void onValidate(final ValidateEvent event); @Override void onAfterDeletedColumn(final AfterColumnDeleted event); @Override void onAfterColumnInserted(final AfterColumnInserted event); @Override void onAppendRow(final AppendRowEvent event); @Override void onDeleteRow(final DeleteRowEvent event); @Override void onInsertRow(final InsertRowEvent event); @Override void onUpdateColumnData(final UpdateColumnDataEvent event); }
AnalyzerControllerImpl implements AnalyzerController, ValidateEvent.Handler, DeleteRowEvent.Handler, AfterColumnDeleted.Handler, UpdateColumnDataEvent.Handler, AppendRowEvent.Handler, InsertRowEvent.Handler, AfterColumnInserted.Handler { @Override public void initialiseAnalysis() { LOGGER.info("Initializing analysis."); events.setup(); decisionTableAnalyzer.activate(); } AnalyzerControllerImpl(final DecisionTableAnalyzer decisionTableAnalyzer, final EventBus eventBus); @Override void initialiseAnalysis(); @Override void terminateAnalysis(); @Override void onValidate(final ValidateEvent event); @Override void onAfterDeletedColumn(final AfterColumnDeleted event); @Override void onAfterColumnInserted(final AfterColumnInserted event); @Override void onAppendRow(final AppendRowEvent event); @Override void onDeleteRow(final DeleteRowEvent event); @Override void onInsertRow(final InsertRowEvent event); @Override void onUpdateColumnData(final UpdateColumnDataEvent event); }
@Test public void terminate() throws Exception { controller.terminateAnalysis(); verify(analyzer).terminate(); }
@Override public void terminateAnalysis() { LOGGER.info("Terminating analysis."); events.teardown(); decisionTableAnalyzer.terminate(); }
AnalyzerControllerImpl implements AnalyzerController, ValidateEvent.Handler, DeleteRowEvent.Handler, AfterColumnDeleted.Handler, UpdateColumnDataEvent.Handler, AppendRowEvent.Handler, InsertRowEvent.Handler, AfterColumnInserted.Handler { @Override public void terminateAnalysis() { LOGGER.info("Terminating analysis."); events.teardown(); decisionTableAnalyzer.terminate(); } }
AnalyzerControllerImpl implements AnalyzerController, ValidateEvent.Handler, DeleteRowEvent.Handler, AfterColumnDeleted.Handler, UpdateColumnDataEvent.Handler, AppendRowEvent.Handler, InsertRowEvent.Handler, AfterColumnInserted.Handler { @Override public void terminateAnalysis() { LOGGER.info("Terminating analysis."); events.teardown(); decisionTableAnalyzer.terminate(); } AnalyzerControllerImpl(final DecisionTableAnalyzer decisionTableAnalyzer, final EventBus eventBus); }
AnalyzerControllerImpl implements AnalyzerController, ValidateEvent.Handler, DeleteRowEvent.Handler, AfterColumnDeleted.Handler, UpdateColumnDataEvent.Handler, AppendRowEvent.Handler, InsertRowEvent.Handler, AfterColumnInserted.Handler { @Override public void terminateAnalysis() { LOGGER.info("Terminating analysis."); events.teardown(); decisionTableAnalyzer.terminate(); } AnalyzerControllerImpl(final DecisionTableAnalyzer decisionTableAnalyzer, final EventBus eventBus); @Override void initialiseAnalysis(); @Override void terminateAnalysis(); @Override void onValidate(final ValidateEvent event); @Override void onAfterDeletedColumn(final AfterColumnDeleted event); @Override void onAfterColumnInserted(final AfterColumnInserted event); @Override void onAppendRow(final AppendRowEvent event); @Override void onDeleteRow(final DeleteRowEvent event); @Override void onInsertRow(final InsertRowEvent event); @Override void onUpdateColumnData(final UpdateColumnDataEvent event); }
AnalyzerControllerImpl implements AnalyzerController, ValidateEvent.Handler, DeleteRowEvent.Handler, AfterColumnDeleted.Handler, UpdateColumnDataEvent.Handler, AppendRowEvent.Handler, InsertRowEvent.Handler, AfterColumnInserted.Handler { @Override public void terminateAnalysis() { LOGGER.info("Terminating analysis."); events.teardown(); decisionTableAnalyzer.terminate(); } AnalyzerControllerImpl(final DecisionTableAnalyzer decisionTableAnalyzer, final EventBus eventBus); @Override void initialiseAnalysis(); @Override void terminateAnalysis(); @Override void onValidate(final ValidateEvent event); @Override void onAfterDeletedColumn(final AfterColumnDeleted event); @Override void onAfterColumnInserted(final AfterColumnInserted event); @Override void onAppendRow(final AppendRowEvent event); @Override void onDeleteRow(final DeleteRowEvent event); @Override void onInsertRow(final InsertRowEvent event); @Override void onUpdateColumnData(final UpdateColumnDataEvent event); }
@Test public void analyze() throws Exception { final ArrayList<Coordinate> updates = new ArrayList<>(); controller.onValidate(new ValidateEvent(updates)); verify(analyzer).analyze(updates); }
@Override public void onValidate(final ValidateEvent event) { decisionTableAnalyzer.analyze(event.getUpdates()); }
AnalyzerControllerImpl implements AnalyzerController, ValidateEvent.Handler, DeleteRowEvent.Handler, AfterColumnDeleted.Handler, UpdateColumnDataEvent.Handler, AppendRowEvent.Handler, InsertRowEvent.Handler, AfterColumnInserted.Handler { @Override public void onValidate(final ValidateEvent event) { decisionTableAnalyzer.analyze(event.getUpdates()); } }
AnalyzerControllerImpl implements AnalyzerController, ValidateEvent.Handler, DeleteRowEvent.Handler, AfterColumnDeleted.Handler, UpdateColumnDataEvent.Handler, AppendRowEvent.Handler, InsertRowEvent.Handler, AfterColumnInserted.Handler { @Override public void onValidate(final ValidateEvent event) { decisionTableAnalyzer.analyze(event.getUpdates()); } AnalyzerControllerImpl(final DecisionTableAnalyzer decisionTableAnalyzer, final EventBus eventBus); }
AnalyzerControllerImpl implements AnalyzerController, ValidateEvent.Handler, DeleteRowEvent.Handler, AfterColumnDeleted.Handler, UpdateColumnDataEvent.Handler, AppendRowEvent.Handler, InsertRowEvent.Handler, AfterColumnInserted.Handler { @Override public void onValidate(final ValidateEvent event) { decisionTableAnalyzer.analyze(event.getUpdates()); } AnalyzerControllerImpl(final DecisionTableAnalyzer decisionTableAnalyzer, final EventBus eventBus); @Override void initialiseAnalysis(); @Override void terminateAnalysis(); @Override void onValidate(final ValidateEvent event); @Override void onAfterDeletedColumn(final AfterColumnDeleted event); @Override void onAfterColumnInserted(final AfterColumnInserted event); @Override void onAppendRow(final AppendRowEvent event); @Override void onDeleteRow(final DeleteRowEvent event); @Override void onInsertRow(final InsertRowEvent event); @Override void onUpdateColumnData(final UpdateColumnDataEvent event); }
AnalyzerControllerImpl implements AnalyzerController, ValidateEvent.Handler, DeleteRowEvent.Handler, AfterColumnDeleted.Handler, UpdateColumnDataEvent.Handler, AppendRowEvent.Handler, InsertRowEvent.Handler, AfterColumnInserted.Handler { @Override public void onValidate(final ValidateEvent event) { decisionTableAnalyzer.analyze(event.getUpdates()); } AnalyzerControllerImpl(final DecisionTableAnalyzer decisionTableAnalyzer, final EventBus eventBus); @Override void initialiseAnalysis(); @Override void terminateAnalysis(); @Override void onValidate(final ValidateEvent event); @Override void onAfterDeletedColumn(final AfterColumnDeleted event); @Override void onAfterColumnInserted(final AfterColumnInserted event); @Override void onAppendRow(final AppendRowEvent event); @Override void onDeleteRow(final DeleteRowEvent event); @Override void onInsertRow(final InsertRowEvent event); @Override void onUpdateColumnData(final UpdateColumnDataEvent event); }
@Test public void deleteColumns() throws Exception { controller.onAfterDeletedColumn(new AfterColumnDeleted(1, 2)); verify(analyzer).deleteColumns(1, 2); }
@Override public void onAfterDeletedColumn(final AfterColumnDeleted event) { decisionTableAnalyzer.deleteColumns(event.getFirstColumnIndex(), event.getNumberOfColumns()); }
AnalyzerControllerImpl implements AnalyzerController, ValidateEvent.Handler, DeleteRowEvent.Handler, AfterColumnDeleted.Handler, UpdateColumnDataEvent.Handler, AppendRowEvent.Handler, InsertRowEvent.Handler, AfterColumnInserted.Handler { @Override public void onAfterDeletedColumn(final AfterColumnDeleted event) { decisionTableAnalyzer.deleteColumns(event.getFirstColumnIndex(), event.getNumberOfColumns()); } }
AnalyzerControllerImpl implements AnalyzerController, ValidateEvent.Handler, DeleteRowEvent.Handler, AfterColumnDeleted.Handler, UpdateColumnDataEvent.Handler, AppendRowEvent.Handler, InsertRowEvent.Handler, AfterColumnInserted.Handler { @Override public void onAfterDeletedColumn(final AfterColumnDeleted event) { decisionTableAnalyzer.deleteColumns(event.getFirstColumnIndex(), event.getNumberOfColumns()); } AnalyzerControllerImpl(final DecisionTableAnalyzer decisionTableAnalyzer, final EventBus eventBus); }
AnalyzerControllerImpl implements AnalyzerController, ValidateEvent.Handler, DeleteRowEvent.Handler, AfterColumnDeleted.Handler, UpdateColumnDataEvent.Handler, AppendRowEvent.Handler, InsertRowEvent.Handler, AfterColumnInserted.Handler { @Override public void onAfterDeletedColumn(final AfterColumnDeleted event) { decisionTableAnalyzer.deleteColumns(event.getFirstColumnIndex(), event.getNumberOfColumns()); } AnalyzerControllerImpl(final DecisionTableAnalyzer decisionTableAnalyzer, final EventBus eventBus); @Override void initialiseAnalysis(); @Override void terminateAnalysis(); @Override void onValidate(final ValidateEvent event); @Override void onAfterDeletedColumn(final AfterColumnDeleted event); @Override void onAfterColumnInserted(final AfterColumnInserted event); @Override void onAppendRow(final AppendRowEvent event); @Override void onDeleteRow(final DeleteRowEvent event); @Override void onInsertRow(final InsertRowEvent event); @Override void onUpdateColumnData(final UpdateColumnDataEvent event); }
AnalyzerControllerImpl implements AnalyzerController, ValidateEvent.Handler, DeleteRowEvent.Handler, AfterColumnDeleted.Handler, UpdateColumnDataEvent.Handler, AppendRowEvent.Handler, InsertRowEvent.Handler, AfterColumnInserted.Handler { @Override public void onAfterDeletedColumn(final AfterColumnDeleted event) { decisionTableAnalyzer.deleteColumns(event.getFirstColumnIndex(), event.getNumberOfColumns()); } AnalyzerControllerImpl(final DecisionTableAnalyzer decisionTableAnalyzer, final EventBus eventBus); @Override void initialiseAnalysis(); @Override void terminateAnalysis(); @Override void onValidate(final ValidateEvent event); @Override void onAfterDeletedColumn(final AfterColumnDeleted event); @Override void onAfterColumnInserted(final AfterColumnInserted event); @Override void onAppendRow(final AppendRowEvent event); @Override void onDeleteRow(final DeleteRowEvent event); @Override void onInsertRow(final InsertRowEvent event); @Override void onUpdateColumnData(final UpdateColumnDataEvent event); }
@Test public void appendRow() throws Exception { controller.onAppendRow(new AppendRowEvent()); verify(analyzer).appendRow(); }
@Override public void onAppendRow(final AppendRowEvent event) { decisionTableAnalyzer.appendRow(); }
AnalyzerControllerImpl implements AnalyzerController, ValidateEvent.Handler, DeleteRowEvent.Handler, AfterColumnDeleted.Handler, UpdateColumnDataEvent.Handler, AppendRowEvent.Handler, InsertRowEvent.Handler, AfterColumnInserted.Handler { @Override public void onAppendRow(final AppendRowEvent event) { decisionTableAnalyzer.appendRow(); } }
AnalyzerControllerImpl implements AnalyzerController, ValidateEvent.Handler, DeleteRowEvent.Handler, AfterColumnDeleted.Handler, UpdateColumnDataEvent.Handler, AppendRowEvent.Handler, InsertRowEvent.Handler, AfterColumnInserted.Handler { @Override public void onAppendRow(final AppendRowEvent event) { decisionTableAnalyzer.appendRow(); } AnalyzerControllerImpl(final DecisionTableAnalyzer decisionTableAnalyzer, final EventBus eventBus); }
AnalyzerControllerImpl implements AnalyzerController, ValidateEvent.Handler, DeleteRowEvent.Handler, AfterColumnDeleted.Handler, UpdateColumnDataEvent.Handler, AppendRowEvent.Handler, InsertRowEvent.Handler, AfterColumnInserted.Handler { @Override public void onAppendRow(final AppendRowEvent event) { decisionTableAnalyzer.appendRow(); } AnalyzerControllerImpl(final DecisionTableAnalyzer decisionTableAnalyzer, final EventBus eventBus); @Override void initialiseAnalysis(); @Override void terminateAnalysis(); @Override void onValidate(final ValidateEvent event); @Override void onAfterDeletedColumn(final AfterColumnDeleted event); @Override void onAfterColumnInserted(final AfterColumnInserted event); @Override void onAppendRow(final AppendRowEvent event); @Override void onDeleteRow(final DeleteRowEvent event); @Override void onInsertRow(final InsertRowEvent event); @Override void onUpdateColumnData(final UpdateColumnDataEvent event); }
AnalyzerControllerImpl implements AnalyzerController, ValidateEvent.Handler, DeleteRowEvent.Handler, AfterColumnDeleted.Handler, UpdateColumnDataEvent.Handler, AppendRowEvent.Handler, InsertRowEvent.Handler, AfterColumnInserted.Handler { @Override public void onAppendRow(final AppendRowEvent event) { decisionTableAnalyzer.appendRow(); } AnalyzerControllerImpl(final DecisionTableAnalyzer decisionTableAnalyzer, final EventBus eventBus); @Override void initialiseAnalysis(); @Override void terminateAnalysis(); @Override void onValidate(final ValidateEvent event); @Override void onAfterDeletedColumn(final AfterColumnDeleted event); @Override void onAfterColumnInserted(final AfterColumnInserted event); @Override void onAppendRow(final AppendRowEvent event); @Override void onDeleteRow(final DeleteRowEvent event); @Override void onInsertRow(final InsertRowEvent event); @Override void onUpdateColumnData(final UpdateColumnDataEvent event); }
@Test public void deleteRow() throws Exception { controller.onDeleteRow(new DeleteRowEvent(10)); verify(analyzer).deleteRow(10); }
@Override public void onDeleteRow(final DeleteRowEvent event) { decisionTableAnalyzer.deleteRow(event.getIndex()); }
AnalyzerControllerImpl implements AnalyzerController, ValidateEvent.Handler, DeleteRowEvent.Handler, AfterColumnDeleted.Handler, UpdateColumnDataEvent.Handler, AppendRowEvent.Handler, InsertRowEvent.Handler, AfterColumnInserted.Handler { @Override public void onDeleteRow(final DeleteRowEvent event) { decisionTableAnalyzer.deleteRow(event.getIndex()); } }
AnalyzerControllerImpl implements AnalyzerController, ValidateEvent.Handler, DeleteRowEvent.Handler, AfterColumnDeleted.Handler, UpdateColumnDataEvent.Handler, AppendRowEvent.Handler, InsertRowEvent.Handler, AfterColumnInserted.Handler { @Override public void onDeleteRow(final DeleteRowEvent event) { decisionTableAnalyzer.deleteRow(event.getIndex()); } AnalyzerControllerImpl(final DecisionTableAnalyzer decisionTableAnalyzer, final EventBus eventBus); }
AnalyzerControllerImpl implements AnalyzerController, ValidateEvent.Handler, DeleteRowEvent.Handler, AfterColumnDeleted.Handler, UpdateColumnDataEvent.Handler, AppendRowEvent.Handler, InsertRowEvent.Handler, AfterColumnInserted.Handler { @Override public void onDeleteRow(final DeleteRowEvent event) { decisionTableAnalyzer.deleteRow(event.getIndex()); } AnalyzerControllerImpl(final DecisionTableAnalyzer decisionTableAnalyzer, final EventBus eventBus); @Override void initialiseAnalysis(); @Override void terminateAnalysis(); @Override void onValidate(final ValidateEvent event); @Override void onAfterDeletedColumn(final AfterColumnDeleted event); @Override void onAfterColumnInserted(final AfterColumnInserted event); @Override void onAppendRow(final AppendRowEvent event); @Override void onDeleteRow(final DeleteRowEvent event); @Override void onInsertRow(final InsertRowEvent event); @Override void onUpdateColumnData(final UpdateColumnDataEvent event); }
AnalyzerControllerImpl implements AnalyzerController, ValidateEvent.Handler, DeleteRowEvent.Handler, AfterColumnDeleted.Handler, UpdateColumnDataEvent.Handler, AppendRowEvent.Handler, InsertRowEvent.Handler, AfterColumnInserted.Handler { @Override public void onDeleteRow(final DeleteRowEvent event) { decisionTableAnalyzer.deleteRow(event.getIndex()); } AnalyzerControllerImpl(final DecisionTableAnalyzer decisionTableAnalyzer, final EventBus eventBus); @Override void initialiseAnalysis(); @Override void terminateAnalysis(); @Override void onValidate(final ValidateEvent event); @Override void onAfterDeletedColumn(final AfterColumnDeleted event); @Override void onAfterColumnInserted(final AfterColumnInserted event); @Override void onAppendRow(final AppendRowEvent event); @Override void onDeleteRow(final DeleteRowEvent event); @Override void onInsertRow(final InsertRowEvent event); @Override void onUpdateColumnData(final UpdateColumnDataEvent event); }
@Test public void insertRow() throws Exception { controller.onInsertRow(new InsertRowEvent(10)); verify(analyzer).insertRow(10); }
@Override public void onInsertRow(final InsertRowEvent event) { decisionTableAnalyzer.insertRow(event.getIndex()); }
AnalyzerControllerImpl implements AnalyzerController, ValidateEvent.Handler, DeleteRowEvent.Handler, AfterColumnDeleted.Handler, UpdateColumnDataEvent.Handler, AppendRowEvent.Handler, InsertRowEvent.Handler, AfterColumnInserted.Handler { @Override public void onInsertRow(final InsertRowEvent event) { decisionTableAnalyzer.insertRow(event.getIndex()); } }
AnalyzerControllerImpl implements AnalyzerController, ValidateEvent.Handler, DeleteRowEvent.Handler, AfterColumnDeleted.Handler, UpdateColumnDataEvent.Handler, AppendRowEvent.Handler, InsertRowEvent.Handler, AfterColumnInserted.Handler { @Override public void onInsertRow(final InsertRowEvent event) { decisionTableAnalyzer.insertRow(event.getIndex()); } AnalyzerControllerImpl(final DecisionTableAnalyzer decisionTableAnalyzer, final EventBus eventBus); }
AnalyzerControllerImpl implements AnalyzerController, ValidateEvent.Handler, DeleteRowEvent.Handler, AfterColumnDeleted.Handler, UpdateColumnDataEvent.Handler, AppendRowEvent.Handler, InsertRowEvent.Handler, AfterColumnInserted.Handler { @Override public void onInsertRow(final InsertRowEvent event) { decisionTableAnalyzer.insertRow(event.getIndex()); } AnalyzerControllerImpl(final DecisionTableAnalyzer decisionTableAnalyzer, final EventBus eventBus); @Override void initialiseAnalysis(); @Override void terminateAnalysis(); @Override void onValidate(final ValidateEvent event); @Override void onAfterDeletedColumn(final AfterColumnDeleted event); @Override void onAfterColumnInserted(final AfterColumnInserted event); @Override void onAppendRow(final AppendRowEvent event); @Override void onDeleteRow(final DeleteRowEvent event); @Override void onInsertRow(final InsertRowEvent event); @Override void onUpdateColumnData(final UpdateColumnDataEvent event); }
AnalyzerControllerImpl implements AnalyzerController, ValidateEvent.Handler, DeleteRowEvent.Handler, AfterColumnDeleted.Handler, UpdateColumnDataEvent.Handler, AppendRowEvent.Handler, InsertRowEvent.Handler, AfterColumnInserted.Handler { @Override public void onInsertRow(final InsertRowEvent event) { decisionTableAnalyzer.insertRow(event.getIndex()); } AnalyzerControllerImpl(final DecisionTableAnalyzer decisionTableAnalyzer, final EventBus eventBus); @Override void initialiseAnalysis(); @Override void terminateAnalysis(); @Override void onValidate(final ValidateEvent event); @Override void onAfterDeletedColumn(final AfterColumnDeleted event); @Override void onAfterColumnInserted(final AfterColumnInserted event); @Override void onAppendRow(final AppendRowEvent event); @Override void onDeleteRow(final DeleteRowEvent event); @Override void onInsertRow(final InsertRowEvent event); @Override void onUpdateColumnData(final UpdateColumnDataEvent event); }
@Test public void updateColumns() throws Exception { final ArrayList<CellValue<? extends Comparable<?>>> columnData = new ArrayList<>(); columnData.add(mock(CellValue.class)); controller.onUpdateColumnData(new UpdateColumnDataEvent(10, columnData)); verify(analyzer).updateColumns(1); }
@Override public void onUpdateColumnData(final UpdateColumnDataEvent event) { decisionTableAnalyzer.updateColumns(event.getColumnData().size()); }
AnalyzerControllerImpl implements AnalyzerController, ValidateEvent.Handler, DeleteRowEvent.Handler, AfterColumnDeleted.Handler, UpdateColumnDataEvent.Handler, AppendRowEvent.Handler, InsertRowEvent.Handler, AfterColumnInserted.Handler { @Override public void onUpdateColumnData(final UpdateColumnDataEvent event) { decisionTableAnalyzer.updateColumns(event.getColumnData().size()); } }
AnalyzerControllerImpl implements AnalyzerController, ValidateEvent.Handler, DeleteRowEvent.Handler, AfterColumnDeleted.Handler, UpdateColumnDataEvent.Handler, AppendRowEvent.Handler, InsertRowEvent.Handler, AfterColumnInserted.Handler { @Override public void onUpdateColumnData(final UpdateColumnDataEvent event) { decisionTableAnalyzer.updateColumns(event.getColumnData().size()); } AnalyzerControllerImpl(final DecisionTableAnalyzer decisionTableAnalyzer, final EventBus eventBus); }
AnalyzerControllerImpl implements AnalyzerController, ValidateEvent.Handler, DeleteRowEvent.Handler, AfterColumnDeleted.Handler, UpdateColumnDataEvent.Handler, AppendRowEvent.Handler, InsertRowEvent.Handler, AfterColumnInserted.Handler { @Override public void onUpdateColumnData(final UpdateColumnDataEvent event) { decisionTableAnalyzer.updateColumns(event.getColumnData().size()); } AnalyzerControllerImpl(final DecisionTableAnalyzer decisionTableAnalyzer, final EventBus eventBus); @Override void initialiseAnalysis(); @Override void terminateAnalysis(); @Override void onValidate(final ValidateEvent event); @Override void onAfterDeletedColumn(final AfterColumnDeleted event); @Override void onAfterColumnInserted(final AfterColumnInserted event); @Override void onAppendRow(final AppendRowEvent event); @Override void onDeleteRow(final DeleteRowEvent event); @Override void onInsertRow(final InsertRowEvent event); @Override void onUpdateColumnData(final UpdateColumnDataEvent event); }
AnalyzerControllerImpl implements AnalyzerController, ValidateEvent.Handler, DeleteRowEvent.Handler, AfterColumnDeleted.Handler, UpdateColumnDataEvent.Handler, AppendRowEvent.Handler, InsertRowEvent.Handler, AfterColumnInserted.Handler { @Override public void onUpdateColumnData(final UpdateColumnDataEvent event) { decisionTableAnalyzer.updateColumns(event.getColumnData().size()); } AnalyzerControllerImpl(final DecisionTableAnalyzer decisionTableAnalyzer, final EventBus eventBus); @Override void initialiseAnalysis(); @Override void terminateAnalysis(); @Override void onValidate(final ValidateEvent event); @Override void onAfterDeletedColumn(final AfterColumnDeleted event); @Override void onAfterColumnInserted(final AfterColumnInserted event); @Override void onAppendRow(final AppendRowEvent event); @Override void onDeleteRow(final DeleteRowEvent event); @Override void onInsertRow(final InsertRowEvent event); @Override void onUpdateColumnData(final UpdateColumnDataEvent event); }
@Test public void testApplyCustomProperties() { final DecisionServiceDividerLineY divider = new DecisionServiceDividerLineY(25.0); when(decisionServiceDefinition.getDividerLineY()).thenReturn(divider); svgMutableShape.applyCustomProperties(decisionServiceNode, mutationContext); verify(view).setDividerLineY(eq(25.0)); }
@Override protected void applyCustomProperties(final Node<View<DecisionService>, Edge> element, final MutationContext mutationContext) { final DecisionService instance = getDefinition(element); final DecisionServiceSVGShapeView decisionServiceSVGShapeView = (DecisionServiceSVGShapeView) getShapeView(); decisionServiceSVGShapeView.setDividerLineY(instance.getDividerLineY().getValue()); }
DMNDecisionServiceSVGMutableShapeImpl extends SVGMutableShapeImpl<DecisionService, DMNDecisionServiceSVGShapeDef> { @Override protected void applyCustomProperties(final Node<View<DecisionService>, Edge> element, final MutationContext mutationContext) { final DecisionService instance = getDefinition(element); final DecisionServiceSVGShapeView decisionServiceSVGShapeView = (DecisionServiceSVGShapeView) getShapeView(); decisionServiceSVGShapeView.setDividerLineY(instance.getDividerLineY().getValue()); } }
DMNDecisionServiceSVGMutableShapeImpl extends SVGMutableShapeImpl<DecisionService, DMNDecisionServiceSVGShapeDef> { @Override protected void applyCustomProperties(final Node<View<DecisionService>, Edge> element, final MutationContext mutationContext) { final DecisionService instance = getDefinition(element); final DecisionServiceSVGShapeView decisionServiceSVGShapeView = (DecisionServiceSVGShapeView) getShapeView(); decisionServiceSVGShapeView.setDividerLineY(instance.getDividerLineY().getValue()); } DMNDecisionServiceSVGMutableShapeImpl(final DMNDecisionServiceSVGShapeDef shapeDef, final SVGShapeViewImpl view); }
DMNDecisionServiceSVGMutableShapeImpl extends SVGMutableShapeImpl<DecisionService, DMNDecisionServiceSVGShapeDef> { @Override protected void applyCustomProperties(final Node<View<DecisionService>, Edge> element, final MutationContext mutationContext) { final DecisionService instance = getDefinition(element); final DecisionServiceSVGShapeView decisionServiceSVGShapeView = (DecisionServiceSVGShapeView) getShapeView(); decisionServiceSVGShapeView.setDividerLineY(instance.getDividerLineY().getValue()); } DMNDecisionServiceSVGMutableShapeImpl(final DMNDecisionServiceSVGShapeDef shapeDef, final SVGShapeViewImpl view); }
DMNDecisionServiceSVGMutableShapeImpl extends SVGMutableShapeImpl<DecisionService, DMNDecisionServiceSVGShapeDef> { @Override protected void applyCustomProperties(final Node<View<DecisionService>, Edge> element, final MutationContext mutationContext) { final DecisionService instance = getDefinition(element); final DecisionServiceSVGShapeView decisionServiceSVGShapeView = (DecisionServiceSVGShapeView) getShapeView(); decisionServiceSVGShapeView.setDividerLineY(instance.getDividerLineY().getValue()); } DMNDecisionServiceSVGMutableShapeImpl(final DMNDecisionServiceSVGShapeDef shapeDef, final SVGShapeViewImpl view); }
@Test public void setUpWorksOnlyOnce() throws Exception { events.setup(); verify( eventBus ).addHandler( ValidateEvent.TYPE, analyzerController ); reset( eventBus ); events.setup(); verify( eventBus, never() ).addHandler( ValidateEvent.TYPE, analyzerController ); }
public void setup() { if (eventBusHandlerRegistrations.isEmpty()) { eventBusHandlerRegistrations.add(eventBus.addHandler(ValidateEvent.TYPE, analyzerController)); eventBusHandlerRegistrations.add(eventBus.addHandler(DeleteRowEvent.TYPE, analyzerController)); eventBusHandlerRegistrations.add(eventBus.addHandler(AfterColumnDeleted.TYPE, analyzerController)); eventBusHandlerRegistrations.add(eventBus.addHandler(UpdateColumnDataEvent.TYPE, analyzerController)); eventBusHandlerRegistrations.add(eventBus.addHandler(AppendRowEvent.TYPE, analyzerController)); eventBusHandlerRegistrations.add(eventBus.addHandler(InsertRowEvent.TYPE, analyzerController)); eventBusHandlerRegistrations.add(eventBus.addHandler(AfterColumnInserted.TYPE, analyzerController)); } }
Events { public void setup() { if (eventBusHandlerRegistrations.isEmpty()) { eventBusHandlerRegistrations.add(eventBus.addHandler(ValidateEvent.TYPE, analyzerController)); eventBusHandlerRegistrations.add(eventBus.addHandler(DeleteRowEvent.TYPE, analyzerController)); eventBusHandlerRegistrations.add(eventBus.addHandler(AfterColumnDeleted.TYPE, analyzerController)); eventBusHandlerRegistrations.add(eventBus.addHandler(UpdateColumnDataEvent.TYPE, analyzerController)); eventBusHandlerRegistrations.add(eventBus.addHandler(AppendRowEvent.TYPE, analyzerController)); eventBusHandlerRegistrations.add(eventBus.addHandler(InsertRowEvent.TYPE, analyzerController)); eventBusHandlerRegistrations.add(eventBus.addHandler(AfterColumnInserted.TYPE, analyzerController)); } } }
Events { public void setup() { if (eventBusHandlerRegistrations.isEmpty()) { eventBusHandlerRegistrations.add(eventBus.addHandler(ValidateEvent.TYPE, analyzerController)); eventBusHandlerRegistrations.add(eventBus.addHandler(DeleteRowEvent.TYPE, analyzerController)); eventBusHandlerRegistrations.add(eventBus.addHandler(AfterColumnDeleted.TYPE, analyzerController)); eventBusHandlerRegistrations.add(eventBus.addHandler(UpdateColumnDataEvent.TYPE, analyzerController)); eventBusHandlerRegistrations.add(eventBus.addHandler(AppendRowEvent.TYPE, analyzerController)); eventBusHandlerRegistrations.add(eventBus.addHandler(InsertRowEvent.TYPE, analyzerController)); eventBusHandlerRegistrations.add(eventBus.addHandler(AfterColumnInserted.TYPE, analyzerController)); } } Events(final EventBus eventBus, final AnalyzerControllerImpl analyzerController); }
Events { public void setup() { if (eventBusHandlerRegistrations.isEmpty()) { eventBusHandlerRegistrations.add(eventBus.addHandler(ValidateEvent.TYPE, analyzerController)); eventBusHandlerRegistrations.add(eventBus.addHandler(DeleteRowEvent.TYPE, analyzerController)); eventBusHandlerRegistrations.add(eventBus.addHandler(AfterColumnDeleted.TYPE, analyzerController)); eventBusHandlerRegistrations.add(eventBus.addHandler(UpdateColumnDataEvent.TYPE, analyzerController)); eventBusHandlerRegistrations.add(eventBus.addHandler(AppendRowEvent.TYPE, analyzerController)); eventBusHandlerRegistrations.add(eventBus.addHandler(InsertRowEvent.TYPE, analyzerController)); eventBusHandlerRegistrations.add(eventBus.addHandler(AfterColumnInserted.TYPE, analyzerController)); } } Events(final EventBus eventBus, final AnalyzerControllerImpl analyzerController); void setup(); void teardown(); }
Events { public void setup() { if (eventBusHandlerRegistrations.isEmpty()) { eventBusHandlerRegistrations.add(eventBus.addHandler(ValidateEvent.TYPE, analyzerController)); eventBusHandlerRegistrations.add(eventBus.addHandler(DeleteRowEvent.TYPE, analyzerController)); eventBusHandlerRegistrations.add(eventBus.addHandler(AfterColumnDeleted.TYPE, analyzerController)); eventBusHandlerRegistrations.add(eventBus.addHandler(UpdateColumnDataEvent.TYPE, analyzerController)); eventBusHandlerRegistrations.add(eventBus.addHandler(AppendRowEvent.TYPE, analyzerController)); eventBusHandlerRegistrations.add(eventBus.addHandler(InsertRowEvent.TYPE, analyzerController)); eventBusHandlerRegistrations.add(eventBus.addHandler(AfterColumnInserted.TYPE, analyzerController)); } } Events(final EventBus eventBus, final AnalyzerControllerImpl analyzerController); void setup(); void teardown(); }
@Test public void firstActivationStartWebWorker() throws Exception { verifierWebWorkerConnection.activate(); verify(receiver).activate(); verify(receiver).setUp(any()); verify(poster).setUp(any()); verify(poster).post(any(Initialize.class)); }
@Override public void activate() { receiver.activate(); if (worker == null) { startWorker(); poster.post(initialize); } else { poster.post(new RequestStatus()); } }
VerifierWebWorkerConnectionImpl implements VerifierWebWorkerConnection { @Override public void activate() { receiver.activate(); if (worker == null) { startWorker(); poster.post(initialize); } else { poster.post(new RequestStatus()); } } }
VerifierWebWorkerConnectionImpl implements VerifierWebWorkerConnection { @Override public void activate() { receiver.activate(); if (worker == null) { startWorker(); poster.post(initialize); } else { poster.post(new RequestStatus()); } } VerifierWebWorkerConnectionImpl(final Initialize initialize, final String pathToVerifier, final Poster poster, final Receiver receiver); }
VerifierWebWorkerConnectionImpl implements VerifierWebWorkerConnection { @Override public void activate() { receiver.activate(); if (worker == null) { startWorker(); poster.post(initialize); } else { poster.post(new RequestStatus()); } } VerifierWebWorkerConnectionImpl(final Initialize initialize, final String pathToVerifier, final Poster poster, final Receiver receiver); @Override void activate(); @Override void terminate(); }
VerifierWebWorkerConnectionImpl implements VerifierWebWorkerConnection { @Override public void activate() { receiver.activate(); if (worker == null) { startWorker(); poster.post(initialize); } else { poster.post(new RequestStatus()); } } VerifierWebWorkerConnectionImpl(final Initialize initialize, final String pathToVerifier, final Poster poster, final Receiver receiver); @Override void activate(); @Override void terminate(); }
@Test public void secondActivationDoesNotStartWebWorker() throws Exception { verifierWebWorkerConnection.activate(); reset(receiver, poster); verifierWebWorkerConnection.activate(); verify(receiver).activate(); verify(receiver, never()).setUp(any()); verify(poster, never()).setUp(any()); verify(poster).post(any(RequestStatus.class)); }
@Override public void activate() { receiver.activate(); if (worker == null) { startWorker(); poster.post(initialize); } else { poster.post(new RequestStatus()); } }
VerifierWebWorkerConnectionImpl implements VerifierWebWorkerConnection { @Override public void activate() { receiver.activate(); if (worker == null) { startWorker(); poster.post(initialize); } else { poster.post(new RequestStatus()); } } }
VerifierWebWorkerConnectionImpl implements VerifierWebWorkerConnection { @Override public void activate() { receiver.activate(); if (worker == null) { startWorker(); poster.post(initialize); } else { poster.post(new RequestStatus()); } } VerifierWebWorkerConnectionImpl(final Initialize initialize, final String pathToVerifier, final Poster poster, final Receiver receiver); }
VerifierWebWorkerConnectionImpl implements VerifierWebWorkerConnection { @Override public void activate() { receiver.activate(); if (worker == null) { startWorker(); poster.post(initialize); } else { poster.post(new RequestStatus()); } } VerifierWebWorkerConnectionImpl(final Initialize initialize, final String pathToVerifier, final Poster poster, final Receiver receiver); @Override void activate(); @Override void terminate(); }
VerifierWebWorkerConnectionImpl implements VerifierWebWorkerConnection { @Override public void activate() { receiver.activate(); if (worker == null) { startWorker(); poster.post(initialize); } else { poster.post(new RequestStatus()); } } VerifierWebWorkerConnectionImpl(final Initialize initialize, final String pathToVerifier, final Poster poster, final Receiver receiver); @Override void activate(); @Override void terminate(); }
@Test public void sendReport() { new AnalysisReporter(place, reportScreen).sendReport(new HashSet<>()); verify(reportScreen).showReport(analysisReportArgumentCaptor.capture()); final AnalysisReport report = analysisReportArgumentCaptor.getValue(); assertTrue(report.getAnalysisData().isEmpty()); assertEquals(place, report.getPlace()); }
public void sendReport(final AnalysisReport report) { reportScreen.showReport(report); }
AnalysisReporter implements Reporter { public void sendReport(final AnalysisReport report) { reportScreen.showReport(report); } }
AnalysisReporter implements Reporter { public void sendReport(final AnalysisReport report) { reportScreen.showReport(report); } AnalysisReporter(final PlaceRequest place, final AnalysisReportScreen reportScreen); }
AnalysisReporter implements Reporter { public void sendReport(final AnalysisReport report) { reportScreen.showReport(report); } AnalysisReporter(final PlaceRequest place, final AnalysisReportScreen reportScreen); void sendReport(final AnalysisReport report); @Override void sendReport(final Set<Issue> issues); @Override void sendStatus(final Status status); @Override void activate(); }
AnalysisReporter implements Reporter { public void sendReport(final AnalysisReport report) { reportScreen.showReport(report); } AnalysisReporter(final PlaceRequest place, final AnalysisReportScreen reportScreen); void sendReport(final AnalysisReport report); @Override void sendReport(final Set<Issue> issues); @Override void sendStatus(final Status status); @Override void activate(); }
@Test public void newConfigGroupWithoutNamespaceTest() { final ConfigGroup configGroup = configurationFactory.newConfigGroup(ConfigType.GLOBAL, "my-config", "my-description"); assertEquals(ConfigType.GLOBAL, configGroup.getType()); assertEquals("my-config", configGroup.getName()); assertEquals("my-description", configGroup.getDescription()); assertTrue(configGroup.isEnabled()); }
@Override public ConfigGroup newConfigGroup(ConfigType type, final String name, final String description) { if (ConfigType.SPACE.equals(type)) { type = ConfigType.ORGANIZATIONAL_UNIT; } final ConfigGroup configGroup = new ConfigGroup(); configGroup.setDescription(description); configGroup.setName(name); configGroup.setType(type); configGroup.setEnabled(true); return configGroup; }
MigrationConfigurationFactoryImpl extends ConfigurationFactoryImpl implements ConfigurationFactory { @Override public ConfigGroup newConfigGroup(ConfigType type, final String name, final String description) { if (ConfigType.SPACE.equals(type)) { type = ConfigType.ORGANIZATIONAL_UNIT; } final ConfigGroup configGroup = new ConfigGroup(); configGroup.setDescription(description); configGroup.setName(name); configGroup.setType(type); configGroup.setEnabled(true); return configGroup; } }
MigrationConfigurationFactoryImpl extends ConfigurationFactoryImpl implements ConfigurationFactory { @Override public ConfigGroup newConfigGroup(ConfigType type, final String name, final String description) { if (ConfigType.SPACE.equals(type)) { type = ConfigType.ORGANIZATIONAL_UNIT; } final ConfigGroup configGroup = new ConfigGroup(); configGroup.setDescription(description); configGroup.setName(name); configGroup.setType(type); configGroup.setEnabled(true); return configGroup; } MigrationConfigurationFactoryImpl(); @Inject MigrationConfigurationFactoryImpl(final PasswordService secureService); }
MigrationConfigurationFactoryImpl extends ConfigurationFactoryImpl implements ConfigurationFactory { @Override public ConfigGroup newConfigGroup(ConfigType type, final String name, final String description) { if (ConfigType.SPACE.equals(type)) { type = ConfigType.ORGANIZATIONAL_UNIT; } final ConfigGroup configGroup = new ConfigGroup(); configGroup.setDescription(description); configGroup.setName(name); configGroup.setType(type); configGroup.setEnabled(true); return configGroup; } MigrationConfigurationFactoryImpl(); @Inject MigrationConfigurationFactoryImpl(final PasswordService secureService); @Override ConfigGroup newConfigGroup(ConfigType type, final String name, final String description); @Override ConfigGroup newConfigGroup(final ConfigType type, final String namespace, final String name, final String description); }
MigrationConfigurationFactoryImpl extends ConfigurationFactoryImpl implements ConfigurationFactory { @Override public ConfigGroup newConfigGroup(ConfigType type, final String name, final String description) { if (ConfigType.SPACE.equals(type)) { type = ConfigType.ORGANIZATIONAL_UNIT; } final ConfigGroup configGroup = new ConfigGroup(); configGroup.setDescription(description); configGroup.setName(name); configGroup.setType(type); configGroup.setEnabled(true); return configGroup; } MigrationConfigurationFactoryImpl(); @Inject MigrationConfigurationFactoryImpl(final PasswordService secureService); @Override ConfigGroup newConfigGroup(ConfigType type, final String name, final String description); @Override ConfigGroup newConfigGroup(final ConfigType type, final String namespace, final String name, final String description); }
@Test public void newConfigGroupWithNamespaceTest() { final ConfigGroup configGroup = configurationFactory.newConfigGroup(ConfigType.REPOSITORY, "my-namespace", "my-config", "my-description"); assertEquals(ConfigType.REPOSITORY, configGroup.getType()); assertEquals("my-config", configGroup.getName()); assertEquals("my-description", configGroup.getDescription()); assertTrue(configGroup.isEnabled()); }
@Override public ConfigGroup newConfigGroup(ConfigType type, final String name, final String description) { if (ConfigType.SPACE.equals(type)) { type = ConfigType.ORGANIZATIONAL_UNIT; } final ConfigGroup configGroup = new ConfigGroup(); configGroup.setDescription(description); configGroup.setName(name); configGroup.setType(type); configGroup.setEnabled(true); return configGroup; }
MigrationConfigurationFactoryImpl extends ConfigurationFactoryImpl implements ConfigurationFactory { @Override public ConfigGroup newConfigGroup(ConfigType type, final String name, final String description) { if (ConfigType.SPACE.equals(type)) { type = ConfigType.ORGANIZATIONAL_UNIT; } final ConfigGroup configGroup = new ConfigGroup(); configGroup.setDescription(description); configGroup.setName(name); configGroup.setType(type); configGroup.setEnabled(true); return configGroup; } }
MigrationConfigurationFactoryImpl extends ConfigurationFactoryImpl implements ConfigurationFactory { @Override public ConfigGroup newConfigGroup(ConfigType type, final String name, final String description) { if (ConfigType.SPACE.equals(type)) { type = ConfigType.ORGANIZATIONAL_UNIT; } final ConfigGroup configGroup = new ConfigGroup(); configGroup.setDescription(description); configGroup.setName(name); configGroup.setType(type); configGroup.setEnabled(true); return configGroup; } MigrationConfigurationFactoryImpl(); @Inject MigrationConfigurationFactoryImpl(final PasswordService secureService); }
MigrationConfigurationFactoryImpl extends ConfigurationFactoryImpl implements ConfigurationFactory { @Override public ConfigGroup newConfigGroup(ConfigType type, final String name, final String description) { if (ConfigType.SPACE.equals(type)) { type = ConfigType.ORGANIZATIONAL_UNIT; } final ConfigGroup configGroup = new ConfigGroup(); configGroup.setDescription(description); configGroup.setName(name); configGroup.setType(type); configGroup.setEnabled(true); return configGroup; } MigrationConfigurationFactoryImpl(); @Inject MigrationConfigurationFactoryImpl(final PasswordService secureService); @Override ConfigGroup newConfigGroup(ConfigType type, final String name, final String description); @Override ConfigGroup newConfigGroup(final ConfigType type, final String namespace, final String name, final String description); }
MigrationConfigurationFactoryImpl extends ConfigurationFactoryImpl implements ConfigurationFactory { @Override public ConfigGroup newConfigGroup(ConfigType type, final String name, final String description) { if (ConfigType.SPACE.equals(type)) { type = ConfigType.ORGANIZATIONAL_UNIT; } final ConfigGroup configGroup = new ConfigGroup(); configGroup.setDescription(description); configGroup.setName(name); configGroup.setType(type); configGroup.setEnabled(true); return configGroup; } MigrationConfigurationFactoryImpl(); @Inject MigrationConfigurationFactoryImpl(final PasswordService secureService); @Override ConfigGroup newConfigGroup(ConfigType type, final String name, final String description); @Override ConfigGroup newConfigGroup(final ConfigType type, final String namespace, final String name, final String description); }
@Test public void testIsBPMNFile() throws Exception { assertTrue(BPMNFormAdapter.isBPMNFile("abc.bpmn")); assertTrue(BPMNFormAdapter.isBPMNFile("abc.bpmn2")); assertTrue(BPMNFormAdapter.isBPMNFile("abc.bpmn-cm")); assertFalse(BPMNFormAdapter.isBPMNFile("abc.bpmn2-cm")); }
static boolean isBPMNFile(final String fileName) { return ResourceType.getResourceType("BPMN2").matchesExtension(fileName); }
BPMNFormAdapter extends AbstractFormAdapter { static boolean isBPMNFile(final String fileName) { return ResourceType.getResourceType("BPMN2").matchesExtension(fileName); } }
BPMNFormAdapter extends AbstractFormAdapter { static boolean isBPMNFile(final String fileName) { return ResourceType.getResourceType("BPMN2").matchesExtension(fileName); } BPMNFormAdapter(MigrationContext migrationContext); }
BPMNFormAdapter extends AbstractFormAdapter { static boolean isBPMNFile(final String fileName) { return ResourceType.getResourceType("BPMN2").matchesExtension(fileName); } BPMNFormAdapter(MigrationContext migrationContext); }
BPMNFormAdapter extends AbstractFormAdapter { static boolean isBPMNFile(final String fileName) { return ResourceType.getResourceType("BPMN2").matchesExtension(fileName); } BPMNFormAdapter(MigrationContext migrationContext); }
@Test(expected = ParseException.class) public void testNoTargetParameter() throws ParseException { final String[] args = {}; defaultFactory.parse(args); }
public static ToolConfig parse(String[] args) throws ParseException { Options opts = OPTIONS; return new ToolConfig(new DefaultParser().parse(opts, args)); }
ToolConfig { public static ToolConfig parse(String[] args) throws ParseException { Options opts = OPTIONS; return new ToolConfig(new DefaultParser().parse(opts, args)); } }
ToolConfig { public static ToolConfig parse(String[] args) throws ParseException { Options opts = OPTIONS; return new ToolConfig(new DefaultParser().parse(opts, args)); } ToolConfig(CommandLine cli); ToolConfig(Path target, boolean batch); }
ToolConfig { public static ToolConfig parse(String[] args) throws ParseException { Options opts = OPTIONS; return new ToolConfig(new DefaultParser().parse(opts, args)); } ToolConfig(CommandLine cli); ToolConfig(Path target, boolean batch); Path getTarget(); boolean isBatch(); static ToolConfig parse(String[] args); static void printHelp(PrintStream stream, String app); }
ToolConfig { public static ToolConfig parse(String[] args) throws ParseException { Options opts = OPTIONS; return new ToolConfig(new DefaultParser().parse(opts, args)); } ToolConfig(CommandLine cli); ToolConfig(Path target, boolean batch); Path getTarget(); boolean isBatch(); static ToolConfig parse(String[] args); static void printHelp(PrintStream stream, String app); }
@Test(expected = MissingArgumentException.class) public void testNoTargetArgument() throws ParseException { final String[] args = {"-t"}; defaultFactory.parse(args); }
public static ToolConfig parse(String[] args) throws ParseException { Options opts = OPTIONS; return new ToolConfig(new DefaultParser().parse(opts, args)); }
ToolConfig { public static ToolConfig parse(String[] args) throws ParseException { Options opts = OPTIONS; return new ToolConfig(new DefaultParser().parse(opts, args)); } }
ToolConfig { public static ToolConfig parse(String[] args) throws ParseException { Options opts = OPTIONS; return new ToolConfig(new DefaultParser().parse(opts, args)); } ToolConfig(CommandLine cli); ToolConfig(Path target, boolean batch); }
ToolConfig { public static ToolConfig parse(String[] args) throws ParseException { Options opts = OPTIONS; return new ToolConfig(new DefaultParser().parse(opts, args)); } ToolConfig(CommandLine cli); ToolConfig(Path target, boolean batch); Path getTarget(); boolean isBatch(); static ToolConfig parse(String[] args); static void printHelp(PrintStream stream, String app); }
ToolConfig { public static ToolConfig parse(String[] args) throws ParseException { Options opts = OPTIONS; return new ToolConfig(new DefaultParser().parse(opts, args)); } ToolConfig(CommandLine cli); ToolConfig(Path target, boolean batch); Path getTarget(); boolean isBatch(); static ToolConfig parse(String[] args); static void printHelp(PrintStream stream, String app); }
@Test public void testPrintHelp() throws IOException { final String APP_NAME = "myAppName"; File tf = File.createTempFile("printTestFile", ".txt"); try (PrintStream ps = new PrintStream(tf); BufferedReader br = new BufferedReader(new FileReader(tf))) { defaultFactory.printHelp(ps, APP_NAME); assertTrue(br.readLine().contains(APP_NAME)); } }
public static void printHelp(PrintStream stream, String app) { HelpFormatter formatter = new HelpFormatter(); formatter.printHelp(new PrintWriter(stream, true), formatter.getWidth(), app, HELP_HEADER, OPTIONS, formatter.getLeftPadding(), formatter.getDescPadding(), HELP_FOOTER, true); }
ToolConfig { public static void printHelp(PrintStream stream, String app) { HelpFormatter formatter = new HelpFormatter(); formatter.printHelp(new PrintWriter(stream, true), formatter.getWidth(), app, HELP_HEADER, OPTIONS, formatter.getLeftPadding(), formatter.getDescPadding(), HELP_FOOTER, true); } }
ToolConfig { public static void printHelp(PrintStream stream, String app) { HelpFormatter formatter = new HelpFormatter(); formatter.printHelp(new PrintWriter(stream, true), formatter.getWidth(), app, HELP_HEADER, OPTIONS, formatter.getLeftPadding(), formatter.getDescPadding(), HELP_FOOTER, true); } ToolConfig(CommandLine cli); ToolConfig(Path target, boolean batch); }
ToolConfig { public static void printHelp(PrintStream stream, String app) { HelpFormatter formatter = new HelpFormatter(); formatter.printHelp(new PrintWriter(stream, true), formatter.getWidth(), app, HELP_HEADER, OPTIONS, formatter.getLeftPadding(), formatter.getDescPadding(), HELP_FOOTER, true); } ToolConfig(CommandLine cli); ToolConfig(Path target, boolean batch); Path getTarget(); boolean isBatch(); static ToolConfig parse(String[] args); static void printHelp(PrintStream stream, String app); }
ToolConfig { public static void printHelp(PrintStream stream, String app) { HelpFormatter formatter = new HelpFormatter(); formatter.printHelp(new PrintWriter(stream, true), formatter.getWidth(), app, HELP_HEADER, OPTIONS, formatter.getLeftPadding(), formatter.getDescPadding(), HELP_FOOTER, true); } ToolConfig(CommandLine cli); ToolConfig(Path target, boolean batch); Path getTarget(); boolean isBatch(); static ToolConfig parse(String[] args); static void printHelp(PrintStream stream, String app); }
@Test public void testAsSVGPrimitiveShape() { final SVGPrimitiveShape primitiveShape = line.asSVGPrimitiveShape(); assertThat(primitiveShape.get().isDraggable()).isTrue(); }
SVGPrimitiveShape asSVGPrimitiveShape() { final SVGPrimitiveShape divider = SVGPrimitiveFactory.newSVGPrimitiveShape(this, false, null); divider.setDragEnabled(true); return divider; }
DecisionServiceDividerLine extends Line { SVGPrimitiveShape asSVGPrimitiveShape() { final SVGPrimitiveShape divider = SVGPrimitiveFactory.newSVGPrimitiveShape(this, false, null); divider.setDragEnabled(true); return divider; } }
DecisionServiceDividerLine extends Line { SVGPrimitiveShape asSVGPrimitiveShape() { final SVGPrimitiveShape divider = SVGPrimitiveFactory.newSVGPrimitiveShape(this, false, null); divider.setDragEnabled(true); return divider; } DecisionServiceDividerLine(final Supplier<Double> dynamicWidthSupplier); }
DecisionServiceDividerLine extends Line { SVGPrimitiveShape asSVGPrimitiveShape() { final SVGPrimitiveShape divider = SVGPrimitiveFactory.newSVGPrimitiveShape(this, false, null); divider.setDragEnabled(true); return divider; } DecisionServiceDividerLine(final Supplier<Double> dynamicWidthSupplier); }
DecisionServiceDividerLine extends Line { SVGPrimitiveShape asSVGPrimitiveShape() { final SVGPrimitiveShape divider = SVGPrimitiveFactory.newSVGPrimitiveShape(this, false, null); divider.setDragEnabled(true); return divider; } DecisionServiceDividerLine(final Supplier<Double> dynamicWidthSupplier); }
@Test public void testGetTarget() throws ParseException { final String[] args = {"-t", "/fake/dir"}; CommandLine cl = new CLIManager().parse(args); Path path = new ToolConfig(cl).getTarget(); assertEquals(2, path.getNameCount()); assertEquals("fake", path.getName(0).toString()); }
public Path getTarget() { return target; }
ToolConfig { public Path getTarget() { return target; } }
ToolConfig { public Path getTarget() { return target; } ToolConfig(CommandLine cli); ToolConfig(Path target, boolean batch); }
ToolConfig { public Path getTarget() { return target; } ToolConfig(CommandLine cli); ToolConfig(Path target, boolean batch); Path getTarget(); boolean isBatch(); static ToolConfig parse(String[] args); static void printHelp(PrintStream stream, String app); }
ToolConfig { public Path getTarget() { return target; } ToolConfig(CommandLine cli); ToolConfig(Path target, boolean batch); Path getTarget(); boolean isBatch(); static ToolConfig parse(String[] args); static void printHelp(PrintStream stream, String app); }
@Test public void removeMigrationRepoAfterMigration() throws Exception { service.importProjects(target); verify(repoService).removeRepository(eq(new Space(OU_NAME)), eq(TMP_REPO_ALIAS)); }
public void importProjects(Path actualTarget) { OrganizationalUnit ou = ouService.createOrganizationalUnit(OU_NAME, "org.migration", Collections.emptyList(), Collections.singletonList(new Contributor(OU_OWNER, ContributorType.OWNER))); String repositoryURL = actualTarget.toUri().toString(); RepositoryEnvironmentConfigurations configurations = new RepositoryEnvironmentConfigurations(); Map<String, Object> configMap = configurations.getConfigurationMap(); configMap.put(EnvironmentParameters.AVOID_INDEX, "true"); configMap.put("origin", repositoryURL); Repository repo = repoService.createRepository(ou, GitRepository.SCHEME.toString(), TMP_REPO_ALIAS, configurations); WorkspaceProject project = projectService.resolveProject(repo); migrationService.migrate(project); repoService.removeRepository(ou.getSpace(), TMP_REPO_ALIAS); }
TemporaryNiogitService { public void importProjects(Path actualTarget) { OrganizationalUnit ou = ouService.createOrganizationalUnit(OU_NAME, "org.migration", Collections.emptyList(), Collections.singletonList(new Contributor(OU_OWNER, ContributorType.OWNER))); String repositoryURL = actualTarget.toUri().toString(); RepositoryEnvironmentConfigurations configurations = new RepositoryEnvironmentConfigurations(); Map<String, Object> configMap = configurations.getConfigurationMap(); configMap.put(EnvironmentParameters.AVOID_INDEX, "true"); configMap.put("origin", repositoryURL); Repository repo = repoService.createRepository(ou, GitRepository.SCHEME.toString(), TMP_REPO_ALIAS, configurations); WorkspaceProject project = projectService.resolveProject(repo); migrationService.migrate(project); repoService.removeRepository(ou.getSpace(), TMP_REPO_ALIAS); } }
TemporaryNiogitService { public void importProjects(Path actualTarget) { OrganizationalUnit ou = ouService.createOrganizationalUnit(OU_NAME, "org.migration", Collections.emptyList(), Collections.singletonList(new Contributor(OU_OWNER, ContributorType.OWNER))); String repositoryURL = actualTarget.toUri().toString(); RepositoryEnvironmentConfigurations configurations = new RepositoryEnvironmentConfigurations(); Map<String, Object> configMap = configurations.getConfigurationMap(); configMap.put(EnvironmentParameters.AVOID_INDEX, "true"); configMap.put("origin", repositoryURL); Repository repo = repoService.createRepository(ou, GitRepository.SCHEME.toString(), TMP_REPO_ALIAS, configurations); WorkspaceProject project = projectService.resolveProject(repo); migrationService.migrate(project); repoService.removeRepository(ou.getSpace(), TMP_REPO_ALIAS); } @Inject TemporaryNiogitService(OrganizationalUnitService ouService, RepositoryService repoService, WorkspaceProjectService projectService, WorkspaceProjectMigrationService migrationService); }
TemporaryNiogitService { public void importProjects(Path actualTarget) { OrganizationalUnit ou = ouService.createOrganizationalUnit(OU_NAME, "org.migration", Collections.emptyList(), Collections.singletonList(new Contributor(OU_OWNER, ContributorType.OWNER))); String repositoryURL = actualTarget.toUri().toString(); RepositoryEnvironmentConfigurations configurations = new RepositoryEnvironmentConfigurations(); Map<String, Object> configMap = configurations.getConfigurationMap(); configMap.put(EnvironmentParameters.AVOID_INDEX, "true"); configMap.put("origin", repositoryURL); Repository repo = repoService.createRepository(ou, GitRepository.SCHEME.toString(), TMP_REPO_ALIAS, configurations); WorkspaceProject project = projectService.resolveProject(repo); migrationService.migrate(project); repoService.removeRepository(ou.getSpace(), TMP_REPO_ALIAS); } @Inject TemporaryNiogitService(OrganizationalUnitService ouService, RepositoryService repoService, WorkspaceProjectService projectService, WorkspaceProjectMigrationService migrationService); void importProjects(Path actualTarget); }
TemporaryNiogitService { public void importProjects(Path actualTarget) { OrganizationalUnit ou = ouService.createOrganizationalUnit(OU_NAME, "org.migration", Collections.emptyList(), Collections.singletonList(new Contributor(OU_OWNER, ContributorType.OWNER))); String repositoryURL = actualTarget.toUri().toString(); RepositoryEnvironmentConfigurations configurations = new RepositoryEnvironmentConfigurations(); Map<String, Object> configMap = configurations.getConfigurationMap(); configMap.put(EnvironmentParameters.AVOID_INDEX, "true"); configMap.put("origin", repositoryURL); Repository repo = repoService.createRepository(ou, GitRepository.SCHEME.toString(), TMP_REPO_ALIAS, configurations); WorkspaceProject project = projectService.resolveProject(repo); migrationService.migrate(project); repoService.removeRepository(ou.getSpace(), TMP_REPO_ALIAS); } @Inject TemporaryNiogitService(OrganizationalUnitService ouService, RepositoryService repoService, WorkspaceProjectService projectService, WorkspaceProjectMigrationService migrationService); void importProjects(Path actualTarget); }
@Test public void migrateCalledOnLegacyProject() throws Exception { service.importProjects(target); verify(migrationService).migrate(projectCaptor.capture()); WorkspaceProject migrated = projectCaptor.getValue(); assertEquals(TMP_REPO_ALIAS, migrated.getRepository().getAlias()); }
public void importProjects(Path actualTarget) { OrganizationalUnit ou = ouService.createOrganizationalUnit(OU_NAME, "org.migration", Collections.emptyList(), Collections.singletonList(new Contributor(OU_OWNER, ContributorType.OWNER))); String repositoryURL = actualTarget.toUri().toString(); RepositoryEnvironmentConfigurations configurations = new RepositoryEnvironmentConfigurations(); Map<String, Object> configMap = configurations.getConfigurationMap(); configMap.put(EnvironmentParameters.AVOID_INDEX, "true"); configMap.put("origin", repositoryURL); Repository repo = repoService.createRepository(ou, GitRepository.SCHEME.toString(), TMP_REPO_ALIAS, configurations); WorkspaceProject project = projectService.resolveProject(repo); migrationService.migrate(project); repoService.removeRepository(ou.getSpace(), TMP_REPO_ALIAS); }
TemporaryNiogitService { public void importProjects(Path actualTarget) { OrganizationalUnit ou = ouService.createOrganizationalUnit(OU_NAME, "org.migration", Collections.emptyList(), Collections.singletonList(new Contributor(OU_OWNER, ContributorType.OWNER))); String repositoryURL = actualTarget.toUri().toString(); RepositoryEnvironmentConfigurations configurations = new RepositoryEnvironmentConfigurations(); Map<String, Object> configMap = configurations.getConfigurationMap(); configMap.put(EnvironmentParameters.AVOID_INDEX, "true"); configMap.put("origin", repositoryURL); Repository repo = repoService.createRepository(ou, GitRepository.SCHEME.toString(), TMP_REPO_ALIAS, configurations); WorkspaceProject project = projectService.resolveProject(repo); migrationService.migrate(project); repoService.removeRepository(ou.getSpace(), TMP_REPO_ALIAS); } }
TemporaryNiogitService { public void importProjects(Path actualTarget) { OrganizationalUnit ou = ouService.createOrganizationalUnit(OU_NAME, "org.migration", Collections.emptyList(), Collections.singletonList(new Contributor(OU_OWNER, ContributorType.OWNER))); String repositoryURL = actualTarget.toUri().toString(); RepositoryEnvironmentConfigurations configurations = new RepositoryEnvironmentConfigurations(); Map<String, Object> configMap = configurations.getConfigurationMap(); configMap.put(EnvironmentParameters.AVOID_INDEX, "true"); configMap.put("origin", repositoryURL); Repository repo = repoService.createRepository(ou, GitRepository.SCHEME.toString(), TMP_REPO_ALIAS, configurations); WorkspaceProject project = projectService.resolveProject(repo); migrationService.migrate(project); repoService.removeRepository(ou.getSpace(), TMP_REPO_ALIAS); } @Inject TemporaryNiogitService(OrganizationalUnitService ouService, RepositoryService repoService, WorkspaceProjectService projectService, WorkspaceProjectMigrationService migrationService); }
TemporaryNiogitService { public void importProjects(Path actualTarget) { OrganizationalUnit ou = ouService.createOrganizationalUnit(OU_NAME, "org.migration", Collections.emptyList(), Collections.singletonList(new Contributor(OU_OWNER, ContributorType.OWNER))); String repositoryURL = actualTarget.toUri().toString(); RepositoryEnvironmentConfigurations configurations = new RepositoryEnvironmentConfigurations(); Map<String, Object> configMap = configurations.getConfigurationMap(); configMap.put(EnvironmentParameters.AVOID_INDEX, "true"); configMap.put("origin", repositoryURL); Repository repo = repoService.createRepository(ou, GitRepository.SCHEME.toString(), TMP_REPO_ALIAS, configurations); WorkspaceProject project = projectService.resolveProject(repo); migrationService.migrate(project); repoService.removeRepository(ou.getSpace(), TMP_REPO_ALIAS); } @Inject TemporaryNiogitService(OrganizationalUnitService ouService, RepositoryService repoService, WorkspaceProjectService projectService, WorkspaceProjectMigrationService migrationService); void importProjects(Path actualTarget); }
TemporaryNiogitService { public void importProjects(Path actualTarget) { OrganizationalUnit ou = ouService.createOrganizationalUnit(OU_NAME, "org.migration", Collections.emptyList(), Collections.singletonList(new Contributor(OU_OWNER, ContributorType.OWNER))); String repositoryURL = actualTarget.toUri().toString(); RepositoryEnvironmentConfigurations configurations = new RepositoryEnvironmentConfigurations(); Map<String, Object> configMap = configurations.getConfigurationMap(); configMap.put(EnvironmentParameters.AVOID_INDEX, "true"); configMap.put("origin", repositoryURL); Repository repo = repoService.createRepository(ou, GitRepository.SCHEME.toString(), TMP_REPO_ALIAS, configurations); WorkspaceProject project = projectService.resolveProject(repo); migrationService.migrate(project); repoService.removeRepository(ou.getSpace(), TMP_REPO_ALIAS); } @Inject TemporaryNiogitService(OrganizationalUnitService ouService, RepositoryService repoService, WorkspaceProjectService projectService, WorkspaceProjectMigrationService migrationService); void importProjects(Path actualTarget); }