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 testUpdatePackageResource() { prepareIncrementalBuild(path, LocalBuildConfig.BuildType.INCREMENTAL_UPDATE_RESOURCE); IncrementalBuildResults result = buildService.updatePackageResource(path); assertEquals(incrementalBuildResults, result); verifyIncrementalBuild(path, LocalBuildConfig.BuildType.INCREME...
@Override public IncrementalBuildResults updatePackageResource(final Path resource) { return buildIncrementally(resource, LocalBuildConfig.BuildType.INCREMENTAL_UPDATE_RESOURCE); }
BuildServiceImpl implements BuildService { @Override public IncrementalBuildResults updatePackageResource(final Path resource) { return buildIncrementally(resource, LocalBuildConfig.BuildType.INCREMENTAL_UPDATE_RESOURCE); } }
BuildServiceImpl implements BuildService { @Override public IncrementalBuildResults updatePackageResource(final Path resource) { return buildIncrementally(resource, LocalBuildConfig.BuildType.INCREMENTAL_UPDATE_RESOURCE); } BuildServiceImpl(); @Inject BuildServiceImpl(final KieModuleService moduleService, ...
BuildServiceImpl implements BuildService { @Override public IncrementalBuildResults updatePackageResource(final Path resource) { return buildIncrementally(resource, LocalBuildConfig.BuildType.INCREMENTAL_UPDATE_RESOURCE); } BuildServiceImpl(); @Inject BuildServiceImpl(final KieModuleService moduleService, ...
BuildServiceImpl implements BuildService { @Override public IncrementalBuildResults updatePackageResource(final Path resource) { return buildIncrementally(resource, LocalBuildConfig.BuildType.INCREMENTAL_UPDATE_RESOURCE); } BuildServiceImpl(); @Inject BuildServiceImpl(final KieModuleService moduleService, ...
@Test public void testApplyBatchResourceChanges() { when(buildServiceHelper.localBuild(module, resourceChanges)).thenReturn(incrementalBuildResults); IncrementalBuildResults result = buildService.applyBatchResourceChanges(module, resourceChanges); assertEquals(incrementalBuildResults, result); verify(buildServiceHelper...
@Override public IncrementalBuildResults applyBatchResourceChanges(final Module module, final Map<Path, Collection<ResourceChange>> changes) { if (module == null) { return new IncrementalBuildResults(); } return buildServiceHelper.localBuild(module, changes); }
BuildServiceImpl implements BuildService { @Override public IncrementalBuildResults applyBatchResourceChanges(final Module module, final Map<Path, Collection<ResourceChange>> changes) { if (module == null) { return new IncrementalBuildResults(); } return buildServiceHelper.localBuild(module, changes); } }
BuildServiceImpl implements BuildService { @Override public IncrementalBuildResults applyBatchResourceChanges(final Module module, final Map<Path, Collection<ResourceChange>> changes) { if (module == null) { return new IncrementalBuildResults(); } return buildServiceHelper.localBuild(module, changes); } BuildServiceImp...
BuildServiceImpl implements BuildService { @Override public IncrementalBuildResults applyBatchResourceChanges(final Module module, final Map<Path, Collection<ResourceChange>> changes) { if (module == null) { return new IncrementalBuildResults(); } return buildServiceHelper.localBuild(module, changes); } BuildServiceImp...
BuildServiceImpl implements BuildService { @Override public IncrementalBuildResults applyBatchResourceChanges(final Module module, final Map<Path, Collection<ResourceChange>> changes) { if (module == null) { return new IncrementalBuildResults(); } return buildServiceHelper.localBuild(module, changes); } BuildServiceImp...
@Test public void testVerifyClass(){ WhiteList whiteList = new WhiteList(); whiteList.add("org.kie.workbench.common.services.backend.builder"); ClassVerifier classVerifier = new ClassVerifier(kieModuleMetaData, typeSourceResolver); List<BuildMessage> messages = classVerifier.verify(whiteList); assertEquals(messages.siz...
private void verifyClass(final String packageName, final String className) { try { final Class clazz = kieModuleMetaData.getClass(packageName, className); if (clazz != null) { if (TypeSource.JAVA_DEPENDENCY == typeSourceResolver.getTypeSource(clazz)) { verifyExternalClass(clazz); } } else { logger.warn(MessageFormat.fo...
ClassVerifier { private void verifyClass(final String packageName, final String className) { try { final Class clazz = kieModuleMetaData.getClass(packageName, className); if (clazz != null) { if (TypeSource.JAVA_DEPENDENCY == typeSourceResolver.getTypeSource(clazz)) { verifyExternalClass(clazz); } } else { logger.warn(...
ClassVerifier { private void verifyClass(final String packageName, final String className) { try { final Class clazz = kieModuleMetaData.getClass(packageName, className); if (clazz != null) { if (TypeSource.JAVA_DEPENDENCY == typeSourceResolver.getTypeSource(clazz)) { verifyExternalClass(clazz); } } else { logger.warn(...
ClassVerifier { private void verifyClass(final String packageName, final String className) { try { final Class clazz = kieModuleMetaData.getClass(packageName, className); if (clazz != null) { if (TypeSource.JAVA_DEPENDENCY == typeSourceResolver.getTypeSource(clazz)) { verifyExternalClass(clazz); } } else { logger.warn(...
ClassVerifier { private void verifyClass(final String packageName, final String className) { try { final Class clazz = kieModuleMetaData.getClass(packageName, className); if (clazz != null) { if (TypeSource.JAVA_DEPENDENCY == typeSourceResolver.getTypeSource(clazz)) { verifyExternalClass(clazz); } } else { logger.warn(...
@Test public void testAcceptWithoutProjectImportsFile() { doReturn("Cheese.txt").when(path).getFileName(); assertFalse(observer.accept(path)); }
@Override public boolean accept(final Path path) { final String fileName = path.getFileName(); return fileName.equals(FILENAME); }
ObservableProjectImportsFile implements ResourceChangeObservableFile { @Override public boolean accept(final Path path) { final String fileName = path.getFileName(); return fileName.equals(FILENAME); } }
ObservableProjectImportsFile implements ResourceChangeObservableFile { @Override public boolean accept(final Path path) { final String fileName = path.getFileName(); return fileName.equals(FILENAME); } }
ObservableProjectImportsFile implements ResourceChangeObservableFile { @Override public boolean accept(final Path path) { final String fileName = path.getFileName(); return fileName.equals(FILENAME); } @Override boolean accept(final Path path); }
ObservableProjectImportsFile implements ResourceChangeObservableFile { @Override public boolean accept(final Path path) { final String fileName = path.getFileName(); return fileName.equals(FILENAME); } @Override boolean accept(final Path path); }
@Test public void testAcceptWithProjectImportsFile() { doReturn(ObservableProjectImportsFile.FILENAME).when(path).getFileName(); assertTrue(observer.accept(path)); }
@Override public boolean accept(final Path path) { final String fileName = path.getFileName(); return fileName.equals(FILENAME); }
ObservableProjectImportsFile implements ResourceChangeObservableFile { @Override public boolean accept(final Path path) { final String fileName = path.getFileName(); return fileName.equals(FILENAME); } }
ObservableProjectImportsFile implements ResourceChangeObservableFile { @Override public boolean accept(final Path path) { final String fileName = path.getFileName(); return fileName.equals(FILENAME); } }
ObservableProjectImportsFile implements ResourceChangeObservableFile { @Override public boolean accept(final Path path) { final String fileName = path.getFileName(); return fileName.equals(FILENAME); } @Override boolean accept(final Path path); }
ObservableProjectImportsFile implements ResourceChangeObservableFile { @Override public boolean accept(final Path path) { final String fileName = path.getFileName(); return fileName.equals(FILENAME); } @Override boolean accept(final Path path); }
@Test public void testAcceptWithoutKModuleFile() { doReturn("Cheese.txt").when(path).getFileName(); assertFalse(observer.accept(path)); }
@Override public boolean accept(final Path path) { final String fileName = path.getFileName(); return fileName.equals(FILENAME); }
ObservableKModuleFile implements ResourceChangeObservableFile { @Override public boolean accept(final Path path) { final String fileName = path.getFileName(); return fileName.equals(FILENAME); } }
ObservableKModuleFile implements ResourceChangeObservableFile { @Override public boolean accept(final Path path) { final String fileName = path.getFileName(); return fileName.equals(FILENAME); } }
ObservableKModuleFile implements ResourceChangeObservableFile { @Override public boolean accept(final Path path) { final String fileName = path.getFileName(); return fileName.equals(FILENAME); } @Override boolean accept(final Path path); }
ObservableKModuleFile implements ResourceChangeObservableFile { @Override public boolean accept(final Path path) { final String fileName = path.getFileName(); return fileName.equals(FILENAME); } @Override boolean accept(final Path path); }
@Test public void testAcceptWithKModuleFile() { doReturn(ObservableKModuleFile.FILENAME).when(path).getFileName(); assertTrue(observer.accept(path)); }
@Override public boolean accept(final Path path) { final String fileName = path.getFileName(); return fileName.equals(FILENAME); }
ObservableKModuleFile implements ResourceChangeObservableFile { @Override public boolean accept(final Path path) { final String fileName = path.getFileName(); return fileName.equals(FILENAME); } }
ObservableKModuleFile implements ResourceChangeObservableFile { @Override public boolean accept(final Path path) { final String fileName = path.getFileName(); return fileName.equals(FILENAME); } }
ObservableKModuleFile implements ResourceChangeObservableFile { @Override public boolean accept(final Path path) { final String fileName = path.getFileName(); return fileName.equals(FILENAME); } @Override boolean accept(final Path path); }
ObservableKModuleFile implements ResourceChangeObservableFile { @Override public boolean accept(final Path path) { final String fileName = path.getFileName(); return fileName.equals(FILENAME); } @Override boolean accept(final Path path); }
@Test public void getPMMLDocumentsAsyncWhenAnyFileCouldBeRead() { when(dmnImportsContentService.getModelsPMMLFilesURIs()).thenReturn(promises.resolve(new String[0])); final Promise<Map<JSITImport, PMMLDocumentMetadata>> returnPromise = importsHelper.getPMMLDocumentsAsync(metadataMock, singletonList(mock(JSITImport.clas...
public Promise<Map<JSITImport, PMMLDocumentMetadata>> getPMMLDocumentsAsync(final Metadata metadata, final List<JSITImport> imports) { if (!imports.isEmpty()) { return loadPMMLDefinitions().then(otherDefinitions -> { final Map<JSITImport, PMMLDocumentMetadata> importDefinitions = new HashMap<>(); for (final Map.Entry<S...
DMNMarshallerImportsClientHelper implements DMNMarshallerImportsHelper<JSITImport, JSITDefinitions, JSITDRGElement, JSITItemDefinition> { public Promise<Map<JSITImport, PMMLDocumentMetadata>> getPMMLDocumentsAsync(final Metadata metadata, final List<JSITImport> imports) { if (!imports.isEmpty()) { return loadPMMLDefini...
DMNMarshallerImportsClientHelper implements DMNMarshallerImportsHelper<JSITImport, JSITDefinitions, JSITDRGElement, JSITItemDefinition> { public Promise<Map<JSITImport, PMMLDocumentMetadata>> getPMMLDocumentsAsync(final Metadata metadata, final List<JSITImport> imports) { if (!imports.isEmpty()) { return loadPMMLDefini...
DMNMarshallerImportsClientHelper implements DMNMarshallerImportsHelper<JSITImport, JSITDefinitions, JSITDRGElement, JSITItemDefinition> { public Promise<Map<JSITImport, PMMLDocumentMetadata>> getPMMLDocumentsAsync(final Metadata metadata, final List<JSITImport> imports) { if (!imports.isEmpty()) { return loadPMMLDefini...
DMNMarshallerImportsClientHelper implements DMNMarshallerImportsHelper<JSITImport, JSITDefinitions, JSITDRGElement, JSITItemDefinition> { public Promise<Map<JSITImport, PMMLDocumentMetadata>> getPMMLDocumentsAsync(final Metadata metadata, final List<JSITImport> imports) { if (!imports.isEmpty()) { return loadPMMLDefini...
@Test public void testValidateCacheSize() { assertEquals(LRUBuilderCache.validateCacheSize("10"), "10"); assertEquals(LRUBuilderCache.validateCacheSize("-10"), LRUBuilderCache.DEFAULT_BUILDER_CACHE_SIZE); assertEquals(LRUBuilderCache.validateCacheSize(""), LRUBuilderCache.DEFAULT_BUILDER_CACHE_SIZE); assertEquals(LRUBu...
protected static String validateCacheSize(final String value) { if (value == null || value.length() == 0 || !value.matches("^[0-9]*$")) { logger.error("Illeagal Argument : Property {} should be a positive integer", BUILDER_CACHE_SIZE); return DEFAULT_BUILDER_CACHE_SIZE; } return value; }
LRUBuilderCache extends LRUCache<Module, Builder> { protected static String validateCacheSize(final String value) { if (value == null || value.length() == 0 || !value.matches("^[0-9]*$")) { logger.error("Illeagal Argument : Property {} should be a positive integer", BUILDER_CACHE_SIZE); return DEFAULT_BUILDER_CACHE_SIZ...
LRUBuilderCache extends LRUCache<Module, Builder> { protected static String validateCacheSize(final String value) { if (value == null || value.length() == 0 || !value.matches("^[0-9]*$")) { logger.error("Illeagal Argument : Property {} should be a positive integer", BUILDER_CACHE_SIZE); return DEFAULT_BUILDER_CACHE_SIZ...
LRUBuilderCache extends LRUCache<Module, Builder> { protected static String validateCacheSize(final String value) { if (value == null || value.length() == 0 || !value.matches("^[0-9]*$")) { logger.error("Illeagal Argument : Property {} should be a positive integer", BUILDER_CACHE_SIZE); return DEFAULT_BUILDER_CACHE_SIZ...
LRUBuilderCache extends LRUCache<Module, Builder> { protected static String validateCacheSize(final String value) { if (value == null || value.length() == 0 || !value.matches("^[0-9]*$")) { logger.error("Illeagal Argument : Property {} should be a positive integer", BUILDER_CACHE_SIZE); return DEFAULT_BUILDER_CACHE_SIZ...
@Test public void testBuildAndDeployNonSnapshotNotDeployed() { final GAV gav = new GAV(GROUP_ID, ARTIFACT_ID, VERSION); prepareBuildAndDeploy(rootPath, gav, false); buildHelper.buildAndDeploy(module); verify(buildHelper, times(1)).buildAndDeploy(eq(module), eq(DeploymentMode.VALIDATED)); verifyBuildAndDeploy(module, ga...
public BuildResults buildAndDeploy(final Module module) { return buildAndDeploy(module, DeploymentMode.VALIDATED); }
BuildHelper { public BuildResults buildAndDeploy(final Module module) { return buildAndDeploy(module, DeploymentMode.VALIDATED); } }
BuildHelper { public BuildResults buildAndDeploy(final Module module) { return buildAndDeploy(module, DeploymentMode.VALIDATED); } BuildHelper(); @Inject BuildHelper(final POMService pomService, final ExtendedM2RepoService m2RepoService, final KieModuleService moduleServic...
BuildHelper { public BuildResults buildAndDeploy(final Module module) { return buildAndDeploy(module, DeploymentMode.VALIDATED); } BuildHelper(); @Inject BuildHelper(final POMService pomService, final ExtendedM2RepoService m2RepoService, final KieModuleService moduleServic...
BuildHelper { public BuildResults buildAndDeploy(final Module module) { return buildAndDeploy(module, DeploymentMode.VALIDATED); } BuildHelper(); @Inject BuildHelper(final POMService pomService, final ExtendedM2RepoService m2RepoService, final KieModuleService moduleServic...
@Test public void testBuildAndDeployNonSnapshotAlreadyDeployed() { final GAV gav = new GAV(GROUP_ID, ARTIFACT_ID, VERSION); prepareBuildAndDeploy(rootPath, gav, true); Exception exception = null; try { buildHelper.buildAndDeploy(module); } catch (Exception e) { exception = e; } verify(buildHelper, times(1)).buildAndDep...
public BuildResults buildAndDeploy(final Module module) { return buildAndDeploy(module, DeploymentMode.VALIDATED); }
BuildHelper { public BuildResults buildAndDeploy(final Module module) { return buildAndDeploy(module, DeploymentMode.VALIDATED); } }
BuildHelper { public BuildResults buildAndDeploy(final Module module) { return buildAndDeploy(module, DeploymentMode.VALIDATED); } BuildHelper(); @Inject BuildHelper(final POMService pomService, final ExtendedM2RepoService m2RepoService, final KieModuleService moduleServic...
BuildHelper { public BuildResults buildAndDeploy(final Module module) { return buildAndDeploy(module, DeploymentMode.VALIDATED); } BuildHelper(); @Inject BuildHelper(final POMService pomService, final ExtendedM2RepoService m2RepoService, final KieModuleService moduleServic...
BuildHelper { public BuildResults buildAndDeploy(final Module module) { return buildAndDeploy(module, DeploymentMode.VALIDATED); } BuildHelper(); @Inject BuildHelper(final POMService pomService, final ExtendedM2RepoService m2RepoService, final KieModuleService moduleServic...
@Test public void testBuildAndDeploySnapshot() { final GAV gav = new GAV(GROUP_ID, ARTIFACT_ID, SNAPSHOT_VERSION); prepareBuildAndDeploy(snapshotRootPath, gav); buildHelper.buildAndDeploy(module); verify(buildHelper, times(1)).buildAndDeploy(eq(module), eq(DeploymentMode.VALIDATED)); verifyBuildAndDeploySnapshot(module...
public BuildResults buildAndDeploy(final Module module) { return buildAndDeploy(module, DeploymentMode.VALIDATED); }
BuildHelper { public BuildResults buildAndDeploy(final Module module) { return buildAndDeploy(module, DeploymentMode.VALIDATED); } }
BuildHelper { public BuildResults buildAndDeploy(final Module module) { return buildAndDeploy(module, DeploymentMode.VALIDATED); } BuildHelper(); @Inject BuildHelper(final POMService pomService, final ExtendedM2RepoService m2RepoService, final KieModuleService moduleServic...
BuildHelper { public BuildResults buildAndDeploy(final Module module) { return buildAndDeploy(module, DeploymentMode.VALIDATED); } BuildHelper(); @Inject BuildHelper(final POMService pomService, final ExtendedM2RepoService m2RepoService, final KieModuleService moduleServic...
BuildHelper { public BuildResults buildAndDeploy(final Module module) { return buildAndDeploy(module, DeploymentMode.VALIDATED); } BuildHelper(); @Inject BuildHelper(final POMService pomService, final ExtendedM2RepoService m2RepoService, final KieModuleService moduleServic...
@Test public void testBuildAndDeploySuppressHandlersNonSnapshot() { final GAV gav = new GAV(GROUP_ID, ARTIFACT_ID, VERSION); prepareBuildAndDeploy(rootPath, gav); buildHelper.buildAndDeploy(module, true); verify(buildHelper, times(1)).buildAndDeploy(eq(module), eq(true), eq(DeploymentMode.VALIDATED)); verifyBuildAndDep...
public BuildResults buildAndDeploy(final Module module) { return buildAndDeploy(module, DeploymentMode.VALIDATED); }
BuildHelper { public BuildResults buildAndDeploy(final Module module) { return buildAndDeploy(module, DeploymentMode.VALIDATED); } }
BuildHelper { public BuildResults buildAndDeploy(final Module module) { return buildAndDeploy(module, DeploymentMode.VALIDATED); } BuildHelper(); @Inject BuildHelper(final POMService pomService, final ExtendedM2RepoService m2RepoService, final KieModuleService moduleServic...
BuildHelper { public BuildResults buildAndDeploy(final Module module) { return buildAndDeploy(module, DeploymentMode.VALIDATED); } BuildHelper(); @Inject BuildHelper(final POMService pomService, final ExtendedM2RepoService m2RepoService, final KieModuleService moduleServic...
BuildHelper { public BuildResults buildAndDeploy(final Module module) { return buildAndDeploy(module, DeploymentMode.VALIDATED); } BuildHelper(); @Inject BuildHelper(final POMService pomService, final ExtendedM2RepoService m2RepoService, final KieModuleService moduleServic...
@Test public void testBuildAndDeploySuppressHandlersSnapshot() { final GAV gav = new GAV(GROUP_ID, ARTIFACT_ID, SNAPSHOT_VERSION); prepareBuildAndDeploy(snapshotRootPath, gav); buildHelper.buildAndDeploy(module, true); verify(buildHelper, times(1)).buildAndDeploy(eq(module), eq(true), eq(DeploymentMode.VALIDATED)); ver...
public BuildResults buildAndDeploy(final Module module) { return buildAndDeploy(module, DeploymentMode.VALIDATED); }
BuildHelper { public BuildResults buildAndDeploy(final Module module) { return buildAndDeploy(module, DeploymentMode.VALIDATED); } }
BuildHelper { public BuildResults buildAndDeploy(final Module module) { return buildAndDeploy(module, DeploymentMode.VALIDATED); } BuildHelper(); @Inject BuildHelper(final POMService pomService, final ExtendedM2RepoService m2RepoService, final KieModuleService moduleServic...
BuildHelper { public BuildResults buildAndDeploy(final Module module) { return buildAndDeploy(module, DeploymentMode.VALIDATED); } BuildHelper(); @Inject BuildHelper(final POMService pomService, final ExtendedM2RepoService m2RepoService, final KieModuleService moduleServic...
BuildHelper { public BuildResults buildAndDeploy(final Module module) { return buildAndDeploy(module, DeploymentMode.VALIDATED); } BuildHelper(); @Inject BuildHelper(final POMService pomService, final ExtendedM2RepoService m2RepoService, final KieModuleService moduleServic...
@Test public void testBuildThatDoesNotUpdateTheCache() throws Exception { final Path path = path(); buildHelper.build(moduleService.resolveModule(path)); assertTrue(cachedFileSystemDoesNotChange()); }
public BuildResult build(final Module module) { try { cache.invalidateCache(module); Builder builder = cache.assertBuilder(module); final BuildResults results = builder.build(); BuildMessage infoMsg = new BuildMessage(); infoMsg.setLevel(Level.INFO); infoMsg.setText(buildResultMessage(module, results).toString()); resu...
BuildHelper { public BuildResult build(final Module module) { try { cache.invalidateCache(module); Builder builder = cache.assertBuilder(module); final BuildResults results = builder.build(); BuildMessage infoMsg = new BuildMessage(); infoMsg.setLevel(Level.INFO); infoMsg.setText(buildResultMessage(module, results).toS...
BuildHelper { public BuildResult build(final Module module) { try { cache.invalidateCache(module); Builder builder = cache.assertBuilder(module); final BuildResults results = builder.build(); BuildMessage infoMsg = new BuildMessage(); infoMsg.setLevel(Level.INFO); infoMsg.setText(buildResultMessage(module, results).toS...
BuildHelper { public BuildResult build(final Module module) { try { cache.invalidateCache(module); Builder builder = cache.assertBuilder(module); final BuildResults results = builder.build(); BuildMessage infoMsg = new BuildMessage(); infoMsg.setLevel(Level.INFO); infoMsg.setText(buildResultMessage(module, results).toS...
BuildHelper { public BuildResult build(final Module module) { try { cache.invalidateCache(module); Builder builder = cache.assertBuilder(module); final BuildResults results = builder.build(); BuildMessage infoMsg = new BuildMessage(); infoMsg.setLevel(Level.INFO); infoMsg.setText(buildResultMessage(module, results).toS...
@Test public void testBuilderSimpleKModule() throws Exception { LRUPomModelCache pomModelCache = getReference(LRUPomModelCache.class); URL url = this.getClass().getResource("/GuvnorM2RepoDependencyExample1"); SimpleFileSystemProvider p = new SimpleFileSystemProvider(); org.uberfire.java.nio.file.Path path = p.getPath(u...
public KieContainer getKieContainer() { BuildResults results = null; if (!isBuilt()) { results = build(); } else { results = new BuildResults(); results.addAllBuildMessages(convertMessages(kieBuilder.getResults().getMessages(), handles)); } if (results.getErrorMessages().isEmpty()) { final org.kie.api.builder.KieModule...
Builder implements Serializable { public KieContainer getKieContainer() { BuildResults results = null; if (!isBuilt()) { results = build(); } else { results = new BuildResults(); results.addAllBuildMessages(convertMessages(kieBuilder.getResults().getMessages(), handles)); } if (results.getErrorMessages().isEmpty()) { f...
Builder implements Serializable { public KieContainer getKieContainer() { BuildResults results = null; if (!isBuilt()) { results = build(); } else { results = new BuildResults(); results.addAllBuildMessages(convertMessages(kieBuilder.getResults().getMessages(), handles)); } if (results.getErrorMessages().isEmpty()) { f...
Builder implements Serializable { public KieContainer getKieContainer() { BuildResults results = null; if (!isBuilt()) { results = build(); } else { results = new BuildResults(); results.addAllBuildMessages(convertMessages(kieBuilder.getResults().getMessages(), handles)); } if (results.getErrorMessages().isEmpty()) { f...
Builder implements Serializable { public KieContainer getKieContainer() { BuildResults results = null; if (!isBuilt()) { results = build(); } else { results = new BuildResults(); results.addAllBuildMessages(convertMessages(kieBuilder.getResults().getMessages(), handles)); } if (results.getErrorMessages().isEmpty()) { f...
@Test public void testBuilderKModuleHasDependency() throws Exception { URL url = this.getClass().getResource("/GuvnorM2RepoDependencyExample2"); SimpleFileSystemProvider p = new SimpleFileSystemProvider(); org.uberfire.java.nio.file.Path path = p.getPath(url.toURI()); final Module module = moduleService.resolveModule(P...
public BuildResults build() { final BuildResults results = new BuildResults(projectGAV); synchronized (kieFileSystem) { kieBuilder = createKieBuilder(kieFileSystem); try { final Results kieResults = ((InternalKieBuilder) kieBuilder).buildAll(classFilter).getResults(); results.addAllBuildMessages(convertMessages(kieResu...
Builder implements Serializable { public BuildResults build() { final BuildResults results = new BuildResults(projectGAV); synchronized (kieFileSystem) { kieBuilder = createKieBuilder(kieFileSystem); try { final Results kieResults = ((InternalKieBuilder) kieBuilder).buildAll(classFilter).getResults(); results.addAllBui...
Builder implements Serializable { public BuildResults build() { final BuildResults results = new BuildResults(projectGAV); synchronized (kieFileSystem) { kieBuilder = createKieBuilder(kieFileSystem); try { final Results kieResults = ((InternalKieBuilder) kieBuilder).buildAll(classFilter).getResults(); results.addAllBui...
Builder implements Serializable { public BuildResults build() { final BuildResults results = new BuildResults(projectGAV); synchronized (kieFileSystem) { kieBuilder = createKieBuilder(kieFileSystem); try { final Results kieResults = ((InternalKieBuilder) kieBuilder).buildAll(classFilter).getResults(); results.addAllBui...
Builder implements Serializable { public BuildResults build() { final BuildResults results = new BuildResults(projectGAV); synchronized (kieFileSystem) { kieBuilder = createKieBuilder(kieFileSystem); try { final Results kieResults = ((InternalKieBuilder) kieBuilder).buildAll(classFilter).getResults(); results.addAllBui...
@Test public void testBuilderKModuleHasSnapshotDependency() throws Exception { M2ServletContextListener context = new M2ServletContextListener(); GAV gav = new GAV("org.kie.workbench.common.services.builder.tests", "dependency-test1-snapshot", "1.0-SNAPSHOT"); URL urlJar = this.getClass().getResource("/dependency-test1...
public BuildResults build() { final BuildResults results = new BuildResults(projectGAV); synchronized (kieFileSystem) { kieBuilder = createKieBuilder(kieFileSystem); try { final Results kieResults = ((InternalKieBuilder) kieBuilder).buildAll(classFilter).getResults(); results.addAllBuildMessages(convertMessages(kieResu...
Builder implements Serializable { public BuildResults build() { final BuildResults results = new BuildResults(projectGAV); synchronized (kieFileSystem) { kieBuilder = createKieBuilder(kieFileSystem); try { final Results kieResults = ((InternalKieBuilder) kieBuilder).buildAll(classFilter).getResults(); results.addAllBui...
Builder implements Serializable { public BuildResults build() { final BuildResults results = new BuildResults(projectGAV); synchronized (kieFileSystem) { kieBuilder = createKieBuilder(kieFileSystem); try { final Results kieResults = ((InternalKieBuilder) kieBuilder).buildAll(classFilter).getResults(); results.addAllBui...
Builder implements Serializable { public BuildResults build() { final BuildResults results = new BuildResults(projectGAV); synchronized (kieFileSystem) { kieBuilder = createKieBuilder(kieFileSystem); try { final Results kieResults = ((InternalKieBuilder) kieBuilder).buildAll(classFilter).getResults(); results.addAllBui...
Builder implements Serializable { public BuildResults build() { final BuildResults results = new BuildResults(projectGAV); synchronized (kieFileSystem) { kieBuilder = createKieBuilder(kieFileSystem); try { final Results kieResults = ((InternalKieBuilder) kieBuilder).buildAll(classFilter).getResults(); results.addAllBui...
@Test public void getPMMLDocumentsAsync() { final PMMLDocumentMetadata pmmlDocumentMetadata = new PMMLDocumentMetadata(PMML_PATH, PMML_FILE, PMML.getDefaultNamespace(), Collections.emptyList()); when(dmnImportsContentService.getModelsPMMLFilesURIs()).thenReturn(promises.resolve(new String[]{PMML_PATH})); when(dmnImport...
public Promise<Map<JSITImport, PMMLDocumentMetadata>> getPMMLDocumentsAsync(final Metadata metadata, final List<JSITImport> imports) { if (!imports.isEmpty()) { return loadPMMLDefinitions().then(otherDefinitions -> { final Map<JSITImport, PMMLDocumentMetadata> importDefinitions = new HashMap<>(); for (final Map.Entry<S...
DMNMarshallerImportsClientHelper implements DMNMarshallerImportsHelper<JSITImport, JSITDefinitions, JSITDRGElement, JSITItemDefinition> { public Promise<Map<JSITImport, PMMLDocumentMetadata>> getPMMLDocumentsAsync(final Metadata metadata, final List<JSITImport> imports) { if (!imports.isEmpty()) { return loadPMMLDefini...
DMNMarshallerImportsClientHelper implements DMNMarshallerImportsHelper<JSITImport, JSITDefinitions, JSITDRGElement, JSITItemDefinition> { public Promise<Map<JSITImport, PMMLDocumentMetadata>> getPMMLDocumentsAsync(final Metadata metadata, final List<JSITImport> imports) { if (!imports.isEmpty()) { return loadPMMLDefini...
DMNMarshallerImportsClientHelper implements DMNMarshallerImportsHelper<JSITImport, JSITDefinitions, JSITDRGElement, JSITItemDefinition> { public Promise<Map<JSITImport, PMMLDocumentMetadata>> getPMMLDocumentsAsync(final Metadata metadata, final List<JSITImport> imports) { if (!imports.isEmpty()) { return loadPMMLDefini...
DMNMarshallerImportsClientHelper implements DMNMarshallerImportsHelper<JSITImport, JSITDefinitions, JSITDRGElement, JSITItemDefinition> { public Promise<Map<JSITImport, PMMLDocumentMetadata>> getPMMLDocumentsAsync(final Metadata metadata, final List<JSITImport> imports) { if (!imports.isEmpty()) { return loadPMMLDefini...
@Test public void testKModuleContainsXLS() throws Exception { URL url = this.getClass().getResource("/ExampleWithExcel"); SimpleFileSystemProvider p = new SimpleFileSystemProvider(); org.uberfire.java.nio.file.Path path = p.getPath(url.toURI()); final Module module = moduleService.resolveModule(Paths.convert(path)); fi...
public BuildResults build() { final BuildResults results = new BuildResults(projectGAV); synchronized (kieFileSystem) { kieBuilder = createKieBuilder(kieFileSystem); try { final Results kieResults = ((InternalKieBuilder) kieBuilder).buildAll(classFilter).getResults(); results.addAllBuildMessages(convertMessages(kieResu...
Builder implements Serializable { public BuildResults build() { final BuildResults results = new BuildResults(projectGAV); synchronized (kieFileSystem) { kieBuilder = createKieBuilder(kieFileSystem); try { final Results kieResults = ((InternalKieBuilder) kieBuilder).buildAll(classFilter).getResults(); results.addAllBui...
Builder implements Serializable { public BuildResults build() { final BuildResults results = new BuildResults(projectGAV); synchronized (kieFileSystem) { kieBuilder = createKieBuilder(kieFileSystem); try { final Results kieResults = ((InternalKieBuilder) kieBuilder).buildAll(classFilter).getResults(); results.addAllBui...
Builder implements Serializable { public BuildResults build() { final BuildResults results = new BuildResults(projectGAV); synchronized (kieFileSystem) { kieBuilder = createKieBuilder(kieFileSystem); try { final Results kieResults = ((InternalKieBuilder) kieBuilder).buildAll(classFilter).getResults(); results.addAllBui...
Builder implements Serializable { public BuildResults build() { final BuildResults results = new BuildResults(projectGAV); synchronized (kieFileSystem) { kieBuilder = createKieBuilder(kieFileSystem); try { final Results kieResults = ((InternalKieBuilder) kieBuilder).buildAll(classFilter).getResults(); results.addAllBui...
@Test public void testBuilderKieContainerInstantiation() throws Exception { final URL url = this.getClass().getResource("/GuvnorM2RepoDependencyExample1"); final SimpleFileSystemProvider p = new SimpleFileSystemProvider(); final org.uberfire.java.nio.file.Path path = p.getPath(url.toURI()); final Module module = module...
public KieContainer getKieContainer() { BuildResults results = null; if (!isBuilt()) { results = build(); } else { results = new BuildResults(); results.addAllBuildMessages(convertMessages(kieBuilder.getResults().getMessages(), handles)); } if (results.getErrorMessages().isEmpty()) { final org.kie.api.builder.KieModule...
Builder implements Serializable { public KieContainer getKieContainer() { BuildResults results = null; if (!isBuilt()) { results = build(); } else { results = new BuildResults(); results.addAllBuildMessages(convertMessages(kieBuilder.getResults().getMessages(), handles)); } if (results.getErrorMessages().isEmpty()) { f...
Builder implements Serializable { public KieContainer getKieContainer() { BuildResults results = null; if (!isBuilt()) { results = build(); } else { results = new BuildResults(); results.addAllBuildMessages(convertMessages(kieBuilder.getResults().getMessages(), handles)); } if (results.getErrorMessages().isEmpty()) { f...
Builder implements Serializable { public KieContainer getKieContainer() { BuildResults results = null; if (!isBuilt()) { results = build(); } else { results = new BuildResults(); results.addAllBuildMessages(convertMessages(kieBuilder.getResults().getMessages(), handles)); } if (results.getErrorMessages().isEmpty()) { f...
Builder implements Serializable { public KieContainer getKieContainer() { BuildResults results = null; if (!isBuilt()) { results = build(); } else { results = new BuildResults(); results.addAllBuildMessages(convertMessages(kieBuilder.getResults().getMessages(), handles)); } if (results.getErrorMessages().isEmpty()) { f...
@Test public void buildDetectsFilesWithSpecialCharacters() throws Exception { LRUPomModelCache pomModelCache = getReference(LRUPomModelCache.class); URL url = this.getClass().getResource("/ModuleBuildTestFileWithSpecialCharacter"); SimpleFileSystemProvider p = new SimpleFileSystemProvider(); org.uberfire.java.nio.file....
public BuildResults build() { final BuildResults results = new BuildResults(projectGAV); synchronized (kieFileSystem) { kieBuilder = createKieBuilder(kieFileSystem); try { final Results kieResults = ((InternalKieBuilder) kieBuilder).buildAll(classFilter).getResults(); results.addAllBuildMessages(convertMessages(kieResu...
Builder implements Serializable { public BuildResults build() { final BuildResults results = new BuildResults(projectGAV); synchronized (kieFileSystem) { kieBuilder = createKieBuilder(kieFileSystem); try { final Results kieResults = ((InternalKieBuilder) kieBuilder).buildAll(classFilter).getResults(); results.addAllBui...
Builder implements Serializable { public BuildResults build() { final BuildResults results = new BuildResults(projectGAV); synchronized (kieFileSystem) { kieBuilder = createKieBuilder(kieFileSystem); try { final Results kieResults = ((InternalKieBuilder) kieBuilder).buildAll(classFilter).getResults(); results.addAllBui...
Builder implements Serializable { public BuildResults build() { final BuildResults results = new BuildResults(projectGAV); synchronized (kieFileSystem) { kieBuilder = createKieBuilder(kieFileSystem); try { final Results kieResults = ((InternalKieBuilder) kieBuilder).buildAll(classFilter).getResults(); results.addAllBui...
Builder implements Serializable { public BuildResults build() { final BuildResults results = new BuildResults(projectGAV); synchronized (kieFileSystem) { kieBuilder = createKieBuilder(kieFileSystem); try { final Results kieResults = ((InternalKieBuilder) kieBuilder).buildAll(classFilter).getResults(); results.addAllBui...
@Test public void testBuildProjectWithDmn() throws Exception { final LRUPomModelCache pomModelCache = getReference(LRUPomModelCache.class); final URL url = this.getClass().getResource("/ProjectWithDmn"); final SimpleFileSystemProvider p = new SimpleFileSystemProvider(); final org.uberfire.java.nio.file.Path path = p.ge...
public BuildResults build() { final BuildResults results = new BuildResults(projectGAV); synchronized (kieFileSystem) { kieBuilder = createKieBuilder(kieFileSystem); try { final Results kieResults = ((InternalKieBuilder) kieBuilder).buildAll(classFilter).getResults(); results.addAllBuildMessages(convertMessages(kieResu...
Builder implements Serializable { public BuildResults build() { final BuildResults results = new BuildResults(projectGAV); synchronized (kieFileSystem) { kieBuilder = createKieBuilder(kieFileSystem); try { final Results kieResults = ((InternalKieBuilder) kieBuilder).buildAll(classFilter).getResults(); results.addAllBui...
Builder implements Serializable { public BuildResults build() { final BuildResults results = new BuildResults(projectGAV); synchronized (kieFileSystem) { kieBuilder = createKieBuilder(kieFileSystem); try { final Results kieResults = ((InternalKieBuilder) kieBuilder).buildAll(classFilter).getResults(); results.addAllBui...
Builder implements Serializable { public BuildResults build() { final BuildResults results = new BuildResults(projectGAV); synchronized (kieFileSystem) { kieBuilder = createKieBuilder(kieFileSystem); try { final Results kieResults = ((InternalKieBuilder) kieBuilder).buildAll(classFilter).getResults(); results.addAllBui...
Builder implements Serializable { public BuildResults build() { final BuildResults results = new BuildResults(projectGAV); synchronized (kieFileSystem) { kieBuilder = createKieBuilder(kieFileSystem); try { final Results kieResults = ((InternalKieBuilder) kieBuilder).buildAll(classFilter).getResults(); results.addAllBui...
@Test public void testIncrementalBuildWithNoFile() throws Exception { final LRUPomModelCache pomModelCache = getReference(LRUPomModelCache.class); final URL url = this.getClass().getResource("/BuildHelperTest"); final SimpleFileSystemProvider p = new SimpleFileSystemProvider(); final org.uberfire.java.nio.file.Path pat...
public IncrementalBuildResults addResource(final Path resource) { IncrementalBuildResults results = new IncrementalBuildResults(projectGAV); if (ioService.exists(resource)) { results = addResource(resource, ioService.newInputStream(resource)); } return results; }
Builder implements Serializable { public IncrementalBuildResults addResource(final Path resource) { IncrementalBuildResults results = new IncrementalBuildResults(projectGAV); if (ioService.exists(resource)) { results = addResource(resource, ioService.newInputStream(resource)); } return results; } }
Builder implements Serializable { public IncrementalBuildResults addResource(final Path resource) { IncrementalBuildResults results = new IncrementalBuildResults(projectGAV); if (ioService.exists(resource)) { results = addResource(resource, ioService.newInputStream(resource)); } return results; } Builder(final Module p...
Builder implements Serializable { public IncrementalBuildResults addResource(final Path resource) { IncrementalBuildResults results = new IncrementalBuildResults(projectGAV); if (ioService.exists(resource)) { results = addResource(resource, ioService.newInputStream(resource)); } return results; } Builder(final Module p...
Builder implements Serializable { public IncrementalBuildResults addResource(final Path resource) { IncrementalBuildResults results = new IncrementalBuildResults(projectGAV); if (ioService.exists(resource)) { results = addResource(resource, ioService.newInputStream(resource)); } return results; } Builder(final Module p...
@Test public void testAcceptWithoutPNWLFile() { doReturn("Cheese.txt").when(path).getFileName(); assertFalse(observer.accept(path)); }
@Override public boolean accept(final Path path) { final String fileName = path.getFileName(); return fileName.equals(FILENAME); }
ObservablePackageNamesWhiteListFile implements ResourceChangeObservableFile { @Override public boolean accept(final Path path) { final String fileName = path.getFileName(); return fileName.equals(FILENAME); } }
ObservablePackageNamesWhiteListFile implements ResourceChangeObservableFile { @Override public boolean accept(final Path path) { final String fileName = path.getFileName(); return fileName.equals(FILENAME); } }
ObservablePackageNamesWhiteListFile implements ResourceChangeObservableFile { @Override public boolean accept(final Path path) { final String fileName = path.getFileName(); return fileName.equals(FILENAME); } @Override boolean accept(final Path path); }
ObservablePackageNamesWhiteListFile implements ResourceChangeObservableFile { @Override public boolean accept(final Path path) { final String fileName = path.getFileName(); return fileName.equals(FILENAME); } @Override boolean accept(final Path path); }
@Test public void testAcceptWithPNWLFile() { doReturn(ObservablePackageNamesWhiteListFile.FILENAME).when(path).getFileName(); assertTrue(observer.accept(path)); }
@Override public boolean accept(final Path path) { final String fileName = path.getFileName(); return fileName.equals(FILENAME); }
ObservablePackageNamesWhiteListFile implements ResourceChangeObservableFile { @Override public boolean accept(final Path path) { final String fileName = path.getFileName(); return fileName.equals(FILENAME); } }
ObservablePackageNamesWhiteListFile implements ResourceChangeObservableFile { @Override public boolean accept(final Path path) { final String fileName = path.getFileName(); return fileName.equals(FILENAME); } }
ObservablePackageNamesWhiteListFile implements ResourceChangeObservableFile { @Override public boolean accept(final Path path) { final String fileName = path.getFileName(); return fileName.equals(FILENAME); } @Override boolean accept(final Path path); }
ObservablePackageNamesWhiteListFile implements ResourceChangeObservableFile { @Override public boolean accept(final Path path) { final String fileName = path.getFileName(); return fileName.equals(FILENAME); } @Override boolean accept(final Path path); }
@Test public void testVerifyAlreadyDeployedValidatedNonSNAPSHOT() { prepareProjectIsDeployed(true); when(gav.isSnapshot()).thenReturn(false); try { deploymentVerifier.verifyWithException(module, DeploymentMode.VALIDATED); } catch (Exception e) { exception = e; } assertNotNull(exception); assertTrue(exception instanceof...
public void verifyWithException(final Module module, DeploymentMode deploymentMode) { if (DeploymentMode.VALIDATED.equals(deploymentMode)) { final GAV gav = module.getPom().getGav(); if (gav.isSnapshot()) { return; } final ModuleRepositories projectRepositories = moduleRepositoriesService.load(((KieModule) module).getR...
DeploymentVerifier { public void verifyWithException(final Module module, DeploymentMode deploymentMode) { if (DeploymentMode.VALIDATED.equals(deploymentMode)) { final GAV gav = module.getPom().getGav(); if (gav.isSnapshot()) { return; } final ModuleRepositories projectRepositories = moduleRepositoriesService.load(((Ki...
DeploymentVerifier { public void verifyWithException(final Module module, DeploymentMode deploymentMode) { if (DeploymentMode.VALIDATED.equals(deploymentMode)) { final GAV gav = module.getPom().getGav(); if (gav.isSnapshot()) { return; } final ModuleRepositories projectRepositories = moduleRepositoriesService.load(((Ki...
DeploymentVerifier { public void verifyWithException(final Module module, DeploymentMode deploymentMode) { if (DeploymentMode.VALIDATED.equals(deploymentMode)) { final GAV gav = module.getPom().getGav(); if (gav.isSnapshot()) { return; } final ModuleRepositories projectRepositories = moduleRepositoriesService.load(((Ki...
DeploymentVerifier { public void verifyWithException(final Module module, DeploymentMode deploymentMode) { if (DeploymentMode.VALIDATED.equals(deploymentMode)) { final GAV gav = module.getPom().getGav(); if (gav.isSnapshot()) { return; } final ModuleRepositories projectRepositories = moduleRepositoriesService.load(((Ki...
@Test public void testCacheIsInvalidatedWhenResourceThatMapsToProject() { final InvalidateDMOModuleCacheEvent event = new InvalidateDMOModuleCacheEvent(sessionInfo, module, resourcePath); doReturn(module).when(moduleService).resolveModule(resourcePath); cache.invalidateProjectCache(event); verify(cache).invalidateCache...
public void invalidateProjectCache(@Observes final InvalidateDMOModuleCacheEvent event) { PortablePreconditions.checkNotNull("event", event); final Path resourcePath = event.getResourcePath(); final KieModule module = moduleService.resolveModule(resourcePath); if (module != null) { invalidateCache(module); } }
LRUPomModelCache extends LRUCache<Module, PomModel> { public void invalidateProjectCache(@Observes final InvalidateDMOModuleCacheEvent event) { PortablePreconditions.checkNotNull("event", event); final Path resourcePath = event.getResourcePath(); final KieModule module = moduleService.resolveModule(resourcePath); if (m...
LRUPomModelCache extends LRUCache<Module, PomModel> { public void invalidateProjectCache(@Observes final InvalidateDMOModuleCacheEvent event) { PortablePreconditions.checkNotNull("event", event); final Path resourcePath = event.getResourcePath(); final KieModule module = moduleService.resolveModule(resourcePath); if (m...
LRUPomModelCache extends LRUCache<Module, PomModel> { public void invalidateProjectCache(@Observes final InvalidateDMOModuleCacheEvent event) { PortablePreconditions.checkNotNull("event", event); final Path resourcePath = event.getResourcePath(); final KieModule module = moduleService.resolveModule(resourcePath); if (m...
LRUPomModelCache extends LRUCache<Module, PomModel> { public void invalidateProjectCache(@Observes final InvalidateDMOModuleCacheEvent event) { PortablePreconditions.checkNotNull("event", event); final Path resourcePath = event.getResourcePath(); final KieModule module = moduleService.resolveModule(resourcePath); if (m...
@Test public void testAcceptWithoutDRLFile() { doReturn("cheese.txt").when(path).getFileName(); assertFalse(observer.accept(path)); }
@Override public boolean accept(final Path path) { try { final String fileName = path.getFileName(); if (!fileName.endsWith("." + EXTENSION)) { return false; } final String drl = ioService.readAllString(convert(path)); return PATTERN.matcher(drl.toLowerCase()).matches(); } catch (NoSuchFileException e) { return false; ...
ObservableDRLFile implements ResourceChangeObservableFile { @Override public boolean accept(final Path path) { try { final String fileName = path.getFileName(); if (!fileName.endsWith("." + EXTENSION)) { return false; } final String drl = ioService.readAllString(convert(path)); return PATTERN.matcher(drl.toLowerCase())...
ObservableDRLFile implements ResourceChangeObservableFile { @Override public boolean accept(final Path path) { try { final String fileName = path.getFileName(); if (!fileName.endsWith("." + EXTENSION)) { return false; } final String drl = ioService.readAllString(convert(path)); return PATTERN.matcher(drl.toLowerCase())...
ObservableDRLFile implements ResourceChangeObservableFile { @Override public boolean accept(final Path path) { try { final String fileName = path.getFileName(); if (!fileName.endsWith("." + EXTENSION)) { return false; } final String drl = ioService.readAllString(convert(path)); return PATTERN.matcher(drl.toLowerCase())...
ObservableDRLFile implements ResourceChangeObservableFile { @Override public boolean accept(final Path path) { try { final String fileName = path.getFileName(); if (!fileName.endsWith("." + EXTENSION)) { return false; } final String drl = ioService.readAllString(convert(path)); return PATTERN.matcher(drl.toLowerCase())...
@Test public void getPMMLDocumentsMetadataFromFilesEmptyFiles() { importsHelper.getPMMLDocumentsMetadataFromFiles(Collections.emptyList(), pmmlMetadataServiceCallback); importsHelper.getPMMLDocumentsMetadataFromFiles(null, pmmlMetadataServiceCallback); verify(pmmlMetadataServiceCallback, times(2)).onSuccess(eq(Collecti...
public void getPMMLDocumentsMetadataFromFiles(final List<PMMLIncludedModel> includedModels, final ServiceCallback<List<PMMLDocumentMetadata>> callback) { if (includedModels == null || includedModels.isEmpty()) { callback.onSuccess(Collections.emptyList()); return; } loadPMMLDefinitions().then(allDefinitions -> { final ...
DMNMarshallerImportsClientHelper implements DMNMarshallerImportsHelper<JSITImport, JSITDefinitions, JSITDRGElement, JSITItemDefinition> { public void getPMMLDocumentsMetadataFromFiles(final List<PMMLIncludedModel> includedModels, final ServiceCallback<List<PMMLDocumentMetadata>> callback) { if (includedModels == null |...
DMNMarshallerImportsClientHelper implements DMNMarshallerImportsHelper<JSITImport, JSITDefinitions, JSITDRGElement, JSITItemDefinition> { public void getPMMLDocumentsMetadataFromFiles(final List<PMMLIncludedModel> includedModels, final ServiceCallback<List<PMMLDocumentMetadata>> callback) { if (includedModels == null |...
DMNMarshallerImportsClientHelper implements DMNMarshallerImportsHelper<JSITImport, JSITDefinitions, JSITDRGElement, JSITItemDefinition> { public void getPMMLDocumentsMetadataFromFiles(final List<PMMLIncludedModel> includedModels, final ServiceCallback<List<PMMLDocumentMetadata>> callback) { if (includedModels == null |...
DMNMarshallerImportsClientHelper implements DMNMarshallerImportsHelper<JSITImport, JSITDefinitions, JSITDRGElement, JSITItemDefinition> { public void getPMMLDocumentsMetadataFromFiles(final List<PMMLIncludedModel> includedModels, final ServiceCallback<List<PMMLDocumentMetadata>> callback) { if (includedModels == null |...
@Test public void testAcceptWithDRLFileDeclaringTypeSingleLine() { doReturn("cheese." + ObservableDRLFile.EXTENSION).when(path).getFileName(); doReturn("declare MyType end").when(ioService).readAllString(eq(nioPath)); assertTrue(observer.accept(path)); }
@Override public boolean accept(final Path path) { try { final String fileName = path.getFileName(); if (!fileName.endsWith("." + EXTENSION)) { return false; } final String drl = ioService.readAllString(convert(path)); return PATTERN.matcher(drl.toLowerCase()).matches(); } catch (NoSuchFileException e) { return false; ...
ObservableDRLFile implements ResourceChangeObservableFile { @Override public boolean accept(final Path path) { try { final String fileName = path.getFileName(); if (!fileName.endsWith("." + EXTENSION)) { return false; } final String drl = ioService.readAllString(convert(path)); return PATTERN.matcher(drl.toLowerCase())...
ObservableDRLFile implements ResourceChangeObservableFile { @Override public boolean accept(final Path path) { try { final String fileName = path.getFileName(); if (!fileName.endsWith("." + EXTENSION)) { return false; } final String drl = ioService.readAllString(convert(path)); return PATTERN.matcher(drl.toLowerCase())...
ObservableDRLFile implements ResourceChangeObservableFile { @Override public boolean accept(final Path path) { try { final String fileName = path.getFileName(); if (!fileName.endsWith("." + EXTENSION)) { return false; } final String drl = ioService.readAllString(convert(path)); return PATTERN.matcher(drl.toLowerCase())...
ObservableDRLFile implements ResourceChangeObservableFile { @Override public boolean accept(final Path path) { try { final String fileName = path.getFileName(); if (!fileName.endsWith("." + EXTENSION)) { return false; } final String drl = ioService.readAllString(convert(path)); return PATTERN.matcher(drl.toLowerCase())...
@Test public void testAcceptWithDRLFileDeclaringTypeMultipleLines() { doReturn("cheese." + ObservableDRLFile.EXTENSION).when(path).getFileName(); doReturn("declare MyType\nend").when(ioService).readAllString(eq(nioPath)); assertTrue(observer.accept(path)); }
@Override public boolean accept(final Path path) { try { final String fileName = path.getFileName(); if (!fileName.endsWith("." + EXTENSION)) { return false; } final String drl = ioService.readAllString(convert(path)); return PATTERN.matcher(drl.toLowerCase()).matches(); } catch (NoSuchFileException e) { return false; ...
ObservableDRLFile implements ResourceChangeObservableFile { @Override public boolean accept(final Path path) { try { final String fileName = path.getFileName(); if (!fileName.endsWith("." + EXTENSION)) { return false; } final String drl = ioService.readAllString(convert(path)); return PATTERN.matcher(drl.toLowerCase())...
ObservableDRLFile implements ResourceChangeObservableFile { @Override public boolean accept(final Path path) { try { final String fileName = path.getFileName(); if (!fileName.endsWith("." + EXTENSION)) { return false; } final String drl = ioService.readAllString(convert(path)); return PATTERN.matcher(drl.toLowerCase())...
ObservableDRLFile implements ResourceChangeObservableFile { @Override public boolean accept(final Path path) { try { final String fileName = path.getFileName(); if (!fileName.endsWith("." + EXTENSION)) { return false; } final String drl = ioService.readAllString(convert(path)); return PATTERN.matcher(drl.toLowerCase())...
ObservableDRLFile implements ResourceChangeObservableFile { @Override public boolean accept(final Path path) { try { final String fileName = path.getFileName(); if (!fileName.endsWith("." + EXTENSION)) { return false; } final String drl = ioService.readAllString(convert(path)); return PATTERN.matcher(drl.toLowerCase())...
@Test public void testAcceptWithDRLFileDeclaringTypeMidFile() { doReturn("cheese." + ObservableDRLFile.EXTENSION).when(path).getFileName(); doReturn("MyType declaration \ndeclare MyType\nend").when(ioService).readAllString(eq(nioPath)); assertTrue(observer.accept(path)); }
@Override public boolean accept(final Path path) { try { final String fileName = path.getFileName(); if (!fileName.endsWith("." + EXTENSION)) { return false; } final String drl = ioService.readAllString(convert(path)); return PATTERN.matcher(drl.toLowerCase()).matches(); } catch (NoSuchFileException e) { return false; ...
ObservableDRLFile implements ResourceChangeObservableFile { @Override public boolean accept(final Path path) { try { final String fileName = path.getFileName(); if (!fileName.endsWith("." + EXTENSION)) { return false; } final String drl = ioService.readAllString(convert(path)); return PATTERN.matcher(drl.toLowerCase())...
ObservableDRLFile implements ResourceChangeObservableFile { @Override public boolean accept(final Path path) { try { final String fileName = path.getFileName(); if (!fileName.endsWith("." + EXTENSION)) { return false; } final String drl = ioService.readAllString(convert(path)); return PATTERN.matcher(drl.toLowerCase())...
ObservableDRLFile implements ResourceChangeObservableFile { @Override public boolean accept(final Path path) { try { final String fileName = path.getFileName(); if (!fileName.endsWith("." + EXTENSION)) { return false; } final String drl = ioService.readAllString(convert(path)); return PATTERN.matcher(drl.toLowerCase())...
ObservableDRLFile implements ResourceChangeObservableFile { @Override public boolean accept(final Path path) { try { final String fileName = path.getFileName(); if (!fileName.endsWith("." + EXTENSION)) { return false; } final String drl = ioService.readAllString(convert(path)); return PATTERN.matcher(drl.toLowerCase())...
@Test public void testAcceptWithDRLFileNotDeclaringType() { doReturn("cheese." + ObservableDRLFile.EXTENSION).when(path).getFileName(); doReturn("rule test when then end").when(ioService).readAllString(eq(nioPath)); assertFalse(observer.accept(path)); }
@Override public boolean accept(final Path path) { try { final String fileName = path.getFileName(); if (!fileName.endsWith("." + EXTENSION)) { return false; } final String drl = ioService.readAllString(convert(path)); return PATTERN.matcher(drl.toLowerCase()).matches(); } catch (NoSuchFileException e) { return false; ...
ObservableDRLFile implements ResourceChangeObservableFile { @Override public boolean accept(final Path path) { try { final String fileName = path.getFileName(); if (!fileName.endsWith("." + EXTENSION)) { return false; } final String drl = ioService.readAllString(convert(path)); return PATTERN.matcher(drl.toLowerCase())...
ObservableDRLFile implements ResourceChangeObservableFile { @Override public boolean accept(final Path path) { try { final String fileName = path.getFileName(); if (!fileName.endsWith("." + EXTENSION)) { return false; } final String drl = ioService.readAllString(convert(path)); return PATTERN.matcher(drl.toLowerCase())...
ObservableDRLFile implements ResourceChangeObservableFile { @Override public boolean accept(final Path path) { try { final String fileName = path.getFileName(); if (!fileName.endsWith("." + EXTENSION)) { return false; } final String drl = ioService.readAllString(convert(path)); return PATTERN.matcher(drl.toLowerCase())...
ObservableDRLFile implements ResourceChangeObservableFile { @Override public boolean accept(final Path path) { try { final String fileName = path.getFileName(); if (!fileName.endsWith("." + EXTENSION)) { return false; } final String drl = ioService.readAllString(convert(path)); return PATTERN.matcher(drl.toLowerCase())...
@Test public void testAcceptWithNoSuchFileException() { doThrow(new NoSuchFileException()).when(path).getFileName(); assertFalse(observer.accept(path)); }
@Override public boolean accept(final Path path) { try { final String fileName = path.getFileName(); if (!fileName.endsWith("." + EXTENSION)) { return false; } final String drl = ioService.readAllString(convert(path)); return PATTERN.matcher(drl.toLowerCase()).matches(); } catch (NoSuchFileException e) { return false; ...
ObservableDRLFile implements ResourceChangeObservableFile { @Override public boolean accept(final Path path) { try { final String fileName = path.getFileName(); if (!fileName.endsWith("." + EXTENSION)) { return false; } final String drl = ioService.readAllString(convert(path)); return PATTERN.matcher(drl.toLowerCase())...
ObservableDRLFile implements ResourceChangeObservableFile { @Override public boolean accept(final Path path) { try { final String fileName = path.getFileName(); if (!fileName.endsWith("." + EXTENSION)) { return false; } final String drl = ioService.readAllString(convert(path)); return PATTERN.matcher(drl.toLowerCase())...
ObservableDRLFile implements ResourceChangeObservableFile { @Override public boolean accept(final Path path) { try { final String fileName = path.getFileName(); if (!fileName.endsWith("." + EXTENSION)) { return false; } final String drl = ioService.readAllString(convert(path)); return PATTERN.matcher(drl.toLowerCase())...
ObservableDRLFile implements ResourceChangeObservableFile { @Override public boolean accept(final Path path) { try { final String fileName = path.getFileName(); if (!fileName.endsWith("." + EXTENSION)) { return false; } final String drl = ioService.readAllString(convert(path)); return PATTERN.matcher(drl.toLowerCase())...
@Test public void checkMessageWithKieBase() { final MessageImpl m = new MessageImpl(ID, Message.Level.ERROR, FILE, TEXT); m.setKieBaseName(KIE_BASE_NAME); final BuildMessage bm = MessageConverter.convertMessage(m, handles); assertConversion(bm, () -> "[KBase: " + KIE_BASE_NAME + "]: " + TEXT); }
static BuildMessage convertMessage(final Message message, Handles handles) { final BuildMessage m = new BuildMessage(); switch (message.getLevel()) { case ERROR: m.setLevel(Level.ERROR); break; case WARNING: m.setLevel(Level.WARNING); break; case INFO: m.setLevel(Level.INFO); break; } m.setId(message.getId()); m.setLin...
MessageConverter { static BuildMessage convertMessage(final Message message, Handles handles) { final BuildMessage m = new BuildMessage(); switch (message.getLevel()) { case ERROR: m.setLevel(Level.ERROR); break; case WARNING: m.setLevel(Level.WARNING); break; case INFO: m.setLevel(Level.INFO); break; } m.setId(message...
MessageConverter { static BuildMessage convertMessage(final Message message, Handles handles) { final BuildMessage m = new BuildMessage(); switch (message.getLevel()) { case ERROR: m.setLevel(Level.ERROR); break; case WARNING: m.setLevel(Level.WARNING); break; case INFO: m.setLevel(Level.INFO); break; } m.setId(message...
MessageConverter { static BuildMessage convertMessage(final Message message, Handles handles) { final BuildMessage m = new BuildMessage(); switch (message.getLevel()) { case ERROR: m.setLevel(Level.ERROR); break; case WARNING: m.setLevel(Level.WARNING); break; case INFO: m.setLevel(Level.INFO); break; } m.setId(message...
MessageConverter { static BuildMessage convertMessage(final Message message, Handles handles) { final BuildMessage m = new BuildMessage(); switch (message.getLevel()) { case ERROR: m.setLevel(Level.ERROR); break; case WARNING: m.setLevel(Level.WARNING); break; case INFO: m.setLevel(Level.INFO); break; } m.setId(message...
@Test public void checkMessageWithoutKieBase() { final Message m = new MessageImpl(ID, Message.Level.ERROR, FILE, TEXT); final BuildMessage bm = MessageConverter.convertMessage(m, handles); assertConversion(bm, () -> TEXT); }
static BuildMessage convertMessage(final Message message, Handles handles) { final BuildMessage m = new BuildMessage(); switch (message.getLevel()) { case ERROR: m.setLevel(Level.ERROR); break; case WARNING: m.setLevel(Level.WARNING); break; case INFO: m.setLevel(Level.INFO); break; } m.setId(message.getId()); m.setLin...
MessageConverter { static BuildMessage convertMessage(final Message message, Handles handles) { final BuildMessage m = new BuildMessage(); switch (message.getLevel()) { case ERROR: m.setLevel(Level.ERROR); break; case WARNING: m.setLevel(Level.WARNING); break; case INFO: m.setLevel(Level.INFO); break; } m.setId(message...
MessageConverter { static BuildMessage convertMessage(final Message message, Handles handles) { final BuildMessage m = new BuildMessage(); switch (message.getLevel()) { case ERROR: m.setLevel(Level.ERROR); break; case WARNING: m.setLevel(Level.WARNING); break; case INFO: m.setLevel(Level.INFO); break; } m.setId(message...
MessageConverter { static BuildMessage convertMessage(final Message message, Handles handles) { final BuildMessage m = new BuildMessage(); switch (message.getLevel()) { case ERROR: m.setLevel(Level.ERROR); break; case WARNING: m.setLevel(Level.WARNING); break; case INFO: m.setLevel(Level.INFO); break; } m.setId(message...
MessageConverter { static BuildMessage convertMessage(final Message message, Handles handles) { final BuildMessage m = new BuildMessage(); switch (message.getLevel()) { case ERROR: m.setLevel(Level.ERROR); break; case WARNING: m.setLevel(Level.WARNING); break; case INFO: m.setLevel(Level.INFO); break; } m.setId(message...
@Test public void testApplyForModuleFullBuild() { when(internalBuildConfig.getBuildType()).thenReturn(LocalBuildConfig.BuildType.FULL_BUILD); when(internalBuildConfig.getModule()).thenReturn(module); when(buildHelper.build(module)).thenReturn(buildResult); Optional<LocalBinaryConfig> result = executor.apply(internalBui...
@Override public Optional<LocalBinaryConfig> apply(LocalBuildConfigInternal localBuildConfigInternal, LocalBuildExecConfig localBuildExecConfig) { Optional<LocalBinaryConfig> result = Optional.empty(); BuildHelper.BuildResult buildResult; switch (localBuildConfigInternal.getBuildType()) { case FULL_BUILD: buildResult =...
LocalBuildExecConfigExecutor implements BiFunctionConfigExecutor<LocalBuildConfigInternal, LocalBuildExecConfig, LocalBinaryConfig> { @Override public Optional<LocalBinaryConfig> apply(LocalBuildConfigInternal localBuildConfigInternal, LocalBuildExecConfig localBuildExecConfig) { Optional<LocalBinaryConfig> result = Op...
LocalBuildExecConfigExecutor implements BiFunctionConfigExecutor<LocalBuildConfigInternal, LocalBuildExecConfig, LocalBinaryConfig> { @Override public Optional<LocalBinaryConfig> apply(LocalBuildConfigInternal localBuildConfigInternal, LocalBuildExecConfig localBuildExecConfig) { Optional<LocalBinaryConfig> result = Op...
LocalBuildExecConfigExecutor implements BiFunctionConfigExecutor<LocalBuildConfigInternal, LocalBuildExecConfig, LocalBinaryConfig> { @Override public Optional<LocalBinaryConfig> apply(LocalBuildConfigInternal localBuildConfigInternal, LocalBuildExecConfig localBuildExecConfig) { Optional<LocalBinaryConfig> result = Op...
LocalBuildExecConfigExecutor implements BiFunctionConfigExecutor<LocalBuildConfigInternal, LocalBuildExecConfig, LocalBinaryConfig> { @Override public Optional<LocalBinaryConfig> apply(LocalBuildConfigInternal localBuildConfigInternal, LocalBuildExecConfig localBuildExecConfig) { Optional<LocalBinaryConfig> result = Op...
@Test public void testApplyForIncrementalResourceAddBuild() { when(internalBuildConfig.getBuildType()).thenReturn(LocalBuildConfig.BuildType.INCREMENTAL_ADD_RESOURCE); when(internalBuildConfig.getResource()).thenReturn(path); when(buildHelper.addPackageResource(path)).thenReturn(incrementalBuildResults); Optional<Local...
@Override public Optional<LocalBinaryConfig> apply(LocalBuildConfigInternal localBuildConfigInternal, LocalBuildExecConfig localBuildExecConfig) { Optional<LocalBinaryConfig> result = Optional.empty(); BuildHelper.BuildResult buildResult; switch (localBuildConfigInternal.getBuildType()) { case FULL_BUILD: buildResult =...
LocalBuildExecConfigExecutor implements BiFunctionConfigExecutor<LocalBuildConfigInternal, LocalBuildExecConfig, LocalBinaryConfig> { @Override public Optional<LocalBinaryConfig> apply(LocalBuildConfigInternal localBuildConfigInternal, LocalBuildExecConfig localBuildExecConfig) { Optional<LocalBinaryConfig> result = Op...
LocalBuildExecConfigExecutor implements BiFunctionConfigExecutor<LocalBuildConfigInternal, LocalBuildExecConfig, LocalBinaryConfig> { @Override public Optional<LocalBinaryConfig> apply(LocalBuildConfigInternal localBuildConfigInternal, LocalBuildExecConfig localBuildExecConfig) { Optional<LocalBinaryConfig> result = Op...
LocalBuildExecConfigExecutor implements BiFunctionConfigExecutor<LocalBuildConfigInternal, LocalBuildExecConfig, LocalBinaryConfig> { @Override public Optional<LocalBinaryConfig> apply(LocalBuildConfigInternal localBuildConfigInternal, LocalBuildExecConfig localBuildExecConfig) { Optional<LocalBinaryConfig> result = Op...
LocalBuildExecConfigExecutor implements BiFunctionConfigExecutor<LocalBuildConfigInternal, LocalBuildExecConfig, LocalBinaryConfig> { @Override public Optional<LocalBinaryConfig> apply(LocalBuildConfigInternal localBuildConfigInternal, LocalBuildExecConfig localBuildExecConfig) { Optional<LocalBinaryConfig> result = Op...
@Test public void testApplyForIncrementalResourceUpdateBuild() { when(internalBuildConfig.getBuildType()).thenReturn(LocalBuildConfig.BuildType.INCREMENTAL_UPDATE_RESOURCE); when(internalBuildConfig.getResource()).thenReturn(path); when(buildHelper.updatePackageResource(path)).thenReturn(incrementalBuildResults); Optio...
@Override public Optional<LocalBinaryConfig> apply(LocalBuildConfigInternal localBuildConfigInternal, LocalBuildExecConfig localBuildExecConfig) { Optional<LocalBinaryConfig> result = Optional.empty(); BuildHelper.BuildResult buildResult; switch (localBuildConfigInternal.getBuildType()) { case FULL_BUILD: buildResult =...
LocalBuildExecConfigExecutor implements BiFunctionConfigExecutor<LocalBuildConfigInternal, LocalBuildExecConfig, LocalBinaryConfig> { @Override public Optional<LocalBinaryConfig> apply(LocalBuildConfigInternal localBuildConfigInternal, LocalBuildExecConfig localBuildExecConfig) { Optional<LocalBinaryConfig> result = Op...
LocalBuildExecConfigExecutor implements BiFunctionConfigExecutor<LocalBuildConfigInternal, LocalBuildExecConfig, LocalBinaryConfig> { @Override public Optional<LocalBinaryConfig> apply(LocalBuildConfigInternal localBuildConfigInternal, LocalBuildExecConfig localBuildExecConfig) { Optional<LocalBinaryConfig> result = Op...
LocalBuildExecConfigExecutor implements BiFunctionConfigExecutor<LocalBuildConfigInternal, LocalBuildExecConfig, LocalBinaryConfig> { @Override public Optional<LocalBinaryConfig> apply(LocalBuildConfigInternal localBuildConfigInternal, LocalBuildExecConfig localBuildExecConfig) { Optional<LocalBinaryConfig> result = Op...
LocalBuildExecConfigExecutor implements BiFunctionConfigExecutor<LocalBuildConfigInternal, LocalBuildExecConfig, LocalBinaryConfig> { @Override public Optional<LocalBinaryConfig> apply(LocalBuildConfigInternal localBuildConfigInternal, LocalBuildExecConfig localBuildExecConfig) { Optional<LocalBinaryConfig> result = Op...
@Test public void getPMMLDocumentsMetadataFromFiles() { final PMMLDocumentMetadata documentMetadata = new PMMLDocumentMetadata(PMML_FILE, PMML.getDefaultNamespace(), Collections.emptyList()); final List<PMMLIncludedModel> includedModels = Arrays.asList(new PMMLIncludedModel(PMML_MODEL_NAME, "", PMML_FILE, PMML.getDefau...
public void getPMMLDocumentsMetadataFromFiles(final List<PMMLIncludedModel> includedModels, final ServiceCallback<List<PMMLDocumentMetadata>> callback) { if (includedModels == null || includedModels.isEmpty()) { callback.onSuccess(Collections.emptyList()); return; } loadPMMLDefinitions().then(allDefinitions -> { final ...
DMNMarshallerImportsClientHelper implements DMNMarshallerImportsHelper<JSITImport, JSITDefinitions, JSITDRGElement, JSITItemDefinition> { public void getPMMLDocumentsMetadataFromFiles(final List<PMMLIncludedModel> includedModels, final ServiceCallback<List<PMMLDocumentMetadata>> callback) { if (includedModels == null |...
DMNMarshallerImportsClientHelper implements DMNMarshallerImportsHelper<JSITImport, JSITDefinitions, JSITDRGElement, JSITItemDefinition> { public void getPMMLDocumentsMetadataFromFiles(final List<PMMLIncludedModel> includedModels, final ServiceCallback<List<PMMLDocumentMetadata>> callback) { if (includedModels == null |...
DMNMarshallerImportsClientHelper implements DMNMarshallerImportsHelper<JSITImport, JSITDefinitions, JSITDRGElement, JSITItemDefinition> { public void getPMMLDocumentsMetadataFromFiles(final List<PMMLIncludedModel> includedModels, final ServiceCallback<List<PMMLDocumentMetadata>> callback) { if (includedModels == null |...
DMNMarshallerImportsClientHelper implements DMNMarshallerImportsHelper<JSITImport, JSITDefinitions, JSITDRGElement, JSITItemDefinition> { public void getPMMLDocumentsMetadataFromFiles(final List<PMMLIncludedModel> includedModels, final ServiceCallback<List<PMMLDocumentMetadata>> callback) { if (includedModels == null |...
@Test public void testLoadDataObjects_ResolvedJavaBoxedProperties() { final Maps.Builder<String, ModelField[]> modelFieldsBuilder = new Maps.Builder<>(); modelFieldsBuilder.put(APerson.class.getName(), new ModelField[]{ newModelField(DataType.TYPE_THIS, APerson.class.getName(), APerson.class.getSimpleName()), newModelF...
@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.getM...
DataObjectsServiceImpl implements DataObjectsService { @Override public List<DataObject> loadDataObjects(final WorkspaceProject workspaceProject) { final KieModule module = moduleService.resolveModule(workspaceProject.getRootPath()); final ClassLoader classLoader = moduleClassLoaderHelper.getModuleClassLoader(module); ...
DataObjectsServiceImpl implements DataObjectsService { @Override public List<DataObject> loadDataObjects(final WorkspaceProject workspaceProject) { final KieModule module = moduleService.resolveModule(workspaceProject.getRootPath()); final ClassLoader classLoader = moduleClassLoaderHelper.getModuleClassLoader(module); ...
DataObjectsServiceImpl implements DataObjectsService { @Override public List<DataObject> loadDataObjects(final WorkspaceProject workspaceProject) { final KieModule module = moduleService.resolveModule(workspaceProject.getRootPath()); final ClassLoader classLoader = moduleClassLoaderHelper.getModuleClassLoader(module); ...
DataObjectsServiceImpl implements DataObjectsService { @Override public List<DataObject> loadDataObjects(final WorkspaceProject workspaceProject) { final KieModule module = moduleService.resolveModule(workspaceProject.getRootPath()); final ClassLoader classLoader = moduleClassLoaderHelper.getModuleClassLoader(module); ...
@Test public void testApplyForIncrementalResourceDeleteBuild() { when(internalBuildConfig.getBuildType()).thenReturn(LocalBuildConfig.BuildType.INCREMENTAL_DELETE_RESOURCE); when(internalBuildConfig.getResource()).thenReturn(path); when(buildHelper.deletePackageResource(path)).thenReturn(incrementalBuildResults); Optio...
@Override public Optional<LocalBinaryConfig> apply(LocalBuildConfigInternal localBuildConfigInternal, LocalBuildExecConfig localBuildExecConfig) { Optional<LocalBinaryConfig> result = Optional.empty(); BuildHelper.BuildResult buildResult; switch (localBuildConfigInternal.getBuildType()) { case FULL_BUILD: buildResult =...
LocalBuildExecConfigExecutor implements BiFunctionConfigExecutor<LocalBuildConfigInternal, LocalBuildExecConfig, LocalBinaryConfig> { @Override public Optional<LocalBinaryConfig> apply(LocalBuildConfigInternal localBuildConfigInternal, LocalBuildExecConfig localBuildExecConfig) { Optional<LocalBinaryConfig> result = Op...
LocalBuildExecConfigExecutor implements BiFunctionConfigExecutor<LocalBuildConfigInternal, LocalBuildExecConfig, LocalBinaryConfig> { @Override public Optional<LocalBinaryConfig> apply(LocalBuildConfigInternal localBuildConfigInternal, LocalBuildExecConfig localBuildExecConfig) { Optional<LocalBinaryConfig> result = Op...
LocalBuildExecConfigExecutor implements BiFunctionConfigExecutor<LocalBuildConfigInternal, LocalBuildExecConfig, LocalBinaryConfig> { @Override public Optional<LocalBinaryConfig> apply(LocalBuildConfigInternal localBuildConfigInternal, LocalBuildExecConfig localBuildExecConfig) { Optional<LocalBinaryConfig> result = Op...
LocalBuildExecConfigExecutor implements BiFunctionConfigExecutor<LocalBuildConfigInternal, LocalBuildExecConfig, LocalBinaryConfig> { @Override public Optional<LocalBinaryConfig> apply(LocalBuildConfigInternal localBuildConfigInternal, LocalBuildExecConfig localBuildExecConfig) { Optional<LocalBinaryConfig> result = Op...
@Test public void testApplyForIncrementalBatchChangesBuild() { when(internalBuildConfig.getBuildType()).thenReturn(LocalBuildConfig.BuildType.INCREMENTAL_BATCH_CHANGES); when(internalBuildConfig.getModule()).thenReturn(module); when(buildHelper.applyBatchResourceChanges(eq(module), anyMap())).thenReturn(incrementalBuil...
@Override public Optional<LocalBinaryConfig> apply(LocalBuildConfigInternal localBuildConfigInternal, LocalBuildExecConfig localBuildExecConfig) { Optional<LocalBinaryConfig> result = Optional.empty(); BuildHelper.BuildResult buildResult; switch (localBuildConfigInternal.getBuildType()) { case FULL_BUILD: buildResult =...
LocalBuildExecConfigExecutor implements BiFunctionConfigExecutor<LocalBuildConfigInternal, LocalBuildExecConfig, LocalBinaryConfig> { @Override public Optional<LocalBinaryConfig> apply(LocalBuildConfigInternal localBuildConfigInternal, LocalBuildExecConfig localBuildExecConfig) { Optional<LocalBinaryConfig> result = Op...
LocalBuildExecConfigExecutor implements BiFunctionConfigExecutor<LocalBuildConfigInternal, LocalBuildExecConfig, LocalBinaryConfig> { @Override public Optional<LocalBinaryConfig> apply(LocalBuildConfigInternal localBuildConfigInternal, LocalBuildExecConfig localBuildExecConfig) { Optional<LocalBinaryConfig> result = Op...
LocalBuildExecConfigExecutor implements BiFunctionConfigExecutor<LocalBuildConfigInternal, LocalBuildExecConfig, LocalBinaryConfig> { @Override public Optional<LocalBinaryConfig> apply(LocalBuildConfigInternal localBuildConfigInternal, LocalBuildExecConfig localBuildExecConfig) { Optional<LocalBinaryConfig> result = Op...
LocalBuildExecConfigExecutor implements BiFunctionConfigExecutor<LocalBuildConfigInternal, LocalBuildExecConfig, LocalBinaryConfig> { @Override public Optional<LocalBinaryConfig> apply(LocalBuildConfigInternal localBuildConfigInternal, LocalBuildExecConfig localBuildExecConfig) { Optional<LocalBinaryConfig> result = Op...
@Test public void testFullBuildRequest() { when(buildRequest.getBuildType()).thenReturn(LocalBuildConfig.BuildType.FULL_BUILD); input = createFullBuildInput(ROOT_PATH_URI); preparePipeline(input); LocalBinaryConfig result = pipelineInvoker.invokeLocalBuildPipeLine(buildRequest); verifyPipelineInvocation(localBinaryConf...
public void invokeLocalBuildPipeLine(LocalBuildRequest buildRequest, Consumer<LocalBinaryConfig> consumer) { Pipeline pipe = pipelineRegistry.getPipelineByName(BuildPipelineInitializer.LOCAL_BUILD_PIPELINE); Input input = new Input() { { put(LocalSourceConfig.ROOT_PATH, buildRequest.getModule().getRootPath().toURI()); ...
BuildPipelineInvoker { public void invokeLocalBuildPipeLine(LocalBuildRequest buildRequest, Consumer<LocalBinaryConfig> consumer) { Pipeline pipe = pipelineRegistry.getPipelineByName(BuildPipelineInitializer.LOCAL_BUILD_PIPELINE); Input input = new Input() { { put(LocalSourceConfig.ROOT_PATH, buildRequest.getModule().g...
BuildPipelineInvoker { public void invokeLocalBuildPipeLine(LocalBuildRequest buildRequest, Consumer<LocalBinaryConfig> consumer) { Pipeline pipe = pipelineRegistry.getPipelineByName(BuildPipelineInitializer.LOCAL_BUILD_PIPELINE); Input input = new Input() { { put(LocalSourceConfig.ROOT_PATH, buildRequest.getModule().g...
BuildPipelineInvoker { public void invokeLocalBuildPipeLine(LocalBuildRequest buildRequest, Consumer<LocalBinaryConfig> consumer) { Pipeline pipe = pipelineRegistry.getPipelineByName(BuildPipelineInitializer.LOCAL_BUILD_PIPELINE); Input input = new Input() { { put(LocalSourceConfig.ROOT_PATH, buildRequest.getModule().g...
BuildPipelineInvoker { public void invokeLocalBuildPipeLine(LocalBuildRequest buildRequest, Consumer<LocalBinaryConfig> consumer) { Pipeline pipe = pipelineRegistry.getPipelineByName(BuildPipelineInitializer.LOCAL_BUILD_PIPELINE); Input input = new Input() { { put(LocalSourceConfig.ROOT_PATH, buildRequest.getModule().g...
@Test public void testIncrementalBuildResourceChanges() { Map<Path, Collection<ResourceChange>> resourceChanges = createResourceChanges(changes); when(buildRequest.getBuildType()).thenReturn(LocalBuildConfig.BuildType.INCREMENTAL_BATCH_CHANGES); when(buildRequest.isSingleResource()).thenReturn(false); when(buildRequest...
public void invokeLocalBuildPipeLine(LocalBuildRequest buildRequest, Consumer<LocalBinaryConfig> consumer) { Pipeline pipe = pipelineRegistry.getPipelineByName(BuildPipelineInitializer.LOCAL_BUILD_PIPELINE); Input input = new Input() { { put(LocalSourceConfig.ROOT_PATH, buildRequest.getModule().getRootPath().toURI()); ...
BuildPipelineInvoker { public void invokeLocalBuildPipeLine(LocalBuildRequest buildRequest, Consumer<LocalBinaryConfig> consumer) { Pipeline pipe = pipelineRegistry.getPipelineByName(BuildPipelineInitializer.LOCAL_BUILD_PIPELINE); Input input = new Input() { { put(LocalSourceConfig.ROOT_PATH, buildRequest.getModule().g...
BuildPipelineInvoker { public void invokeLocalBuildPipeLine(LocalBuildRequest buildRequest, Consumer<LocalBinaryConfig> consumer) { Pipeline pipe = pipelineRegistry.getPipelineByName(BuildPipelineInitializer.LOCAL_BUILD_PIPELINE); Input input = new Input() { { put(LocalSourceConfig.ROOT_PATH, buildRequest.getModule().g...
BuildPipelineInvoker { public void invokeLocalBuildPipeLine(LocalBuildRequest buildRequest, Consumer<LocalBinaryConfig> consumer) { Pipeline pipe = pipelineRegistry.getPipelineByName(BuildPipelineInitializer.LOCAL_BUILD_PIPELINE); Input input = new Input() { { put(LocalSourceConfig.ROOT_PATH, buildRequest.getModule().g...
BuildPipelineInvoker { public void invokeLocalBuildPipeLine(LocalBuildRequest buildRequest, Consumer<LocalBinaryConfig> consumer) { Pipeline pipe = pipelineRegistry.getPipelineByName(BuildPipelineInitializer.LOCAL_BUILD_PIPELINE); Input input = new Input() { { put(LocalSourceConfig.ROOT_PATH, buildRequest.getModule().g...
@Test public void testApply( ) { when( sourceConfig.getRootPath( ) ).thenReturn( ROOT_PATH_URI ); Optional< Source > result = executor.apply( sourceConfig ); assertTrue( result.isPresent( ) ); assertEquals( ROOT_PATH, result.get( ).getPath( ) ); }
@Override public Optional< Source > apply( LocalSourceConfig localSourceConfig ) { Path path = Paths.get( URI.create( localSourceConfig.getRootPath() ) ); return Optional.of( new LocalSource( path ) ); }
LocalSourceConfigExecutor implements FunctionConfigExecutor< LocalSourceConfig, Source > { @Override public Optional< Source > apply( LocalSourceConfig localSourceConfig ) { Path path = Paths.get( URI.create( localSourceConfig.getRootPath() ) ); return Optional.of( new LocalSource( path ) ); } }
LocalSourceConfigExecutor implements FunctionConfigExecutor< LocalSourceConfig, Source > { @Override public Optional< Source > apply( LocalSourceConfig localSourceConfig ) { Path path = Paths.get( URI.create( localSourceConfig.getRootPath() ) ); return Optional.of( new LocalSource( path ) ); } LocalSourceConfigExecutor...
LocalSourceConfigExecutor implements FunctionConfigExecutor< LocalSourceConfig, Source > { @Override public Optional< Source > apply( LocalSourceConfig localSourceConfig ) { Path path = Paths.get( URI.create( localSourceConfig.getRootPath() ) ); return Optional.of( new LocalSource( path ) ); } LocalSourceConfigExecutor...
LocalSourceConfigExecutor implements FunctionConfigExecutor< LocalSourceConfig, Source > { @Override public Optional< Source > apply( LocalSourceConfig localSourceConfig ) { Path path = Paths.get( URI.create( localSourceConfig.getRootPath() ) ); return Optional.of( new LocalSource( path ) ); } LocalSourceConfigExecutor...
@Test public void testApply() { Path pomPath = Paths.convert(POM_PATH); when(sourceConfig.getPath()).thenReturn(ROOT_PATH); when(moduleService.resolveModule(pomPath)).thenReturn(module); Optional<ProjectConfig> result = executor.apply(sourceConfig, projectConfig); assertTrue(result.isPresent()); assertEquals(module, ((...
@Override public Optional<ProjectConfig> apply(Source source, LocalProjectConfig localProjectConfig) { Module module = moduleService.resolveModule(Paths.convert(source.getPath().resolve("pom.xml"))); return Optional.of(new LocalModuleImpl(module)); }
LocalModuleConfigExecutor implements BiFunctionConfigExecutor<Source, LocalProjectConfig, ProjectConfig> { @Override public Optional<ProjectConfig> apply(Source source, LocalProjectConfig localProjectConfig) { Module module = moduleService.resolveModule(Paths.convert(source.getPath().resolve("pom.xml"))); return Option...
LocalModuleConfigExecutor implements BiFunctionConfigExecutor<Source, LocalProjectConfig, ProjectConfig> { @Override public Optional<ProjectConfig> apply(Source source, LocalProjectConfig localProjectConfig) { Module module = moduleService.resolveModule(Paths.convert(source.getPath().resolve("pom.xml"))); return Option...
LocalModuleConfigExecutor implements BiFunctionConfigExecutor<Source, LocalProjectConfig, ProjectConfig> { @Override public Optional<ProjectConfig> apply(Source source, LocalProjectConfig localProjectConfig) { Module module = moduleService.resolveModule(Paths.convert(source.getPath().resolve("pom.xml"))); return Option...
LocalModuleConfigExecutor implements BiFunctionConfigExecutor<Source, LocalProjectConfig, ProjectConfig> { @Override public Optional<ProjectConfig> apply(Source source, LocalProjectConfig localProjectConfig) { Module module = moduleService.resolveModule(Paths.convert(source.getPath().resolve("pom.xml"))); return Option...
@Test public void testApplyForModuleFullBuild() { when(localModule.getModule()).thenReturn(project); when(buildConfig.getBuildType()).thenReturn(LocalBuildConfig.BuildType.FULL_BUILD.name()); Optional<BuildConfig> result = executor.apply(localModule, buildConfig); assertTrue(result.isPresent()); assertEquals(LocalBuild...
@Override public Optional<BuildConfig> apply(LocalModule localModule, LocalBuildConfig localBuildConfig) { Optional<BuildConfig> result = Optional.empty(); LocalBuildConfig.BuildType buildType = decodeBuildType(localBuildConfig.getBuildType()); switch (buildType) { case FULL_BUILD: result = Optional.of(new LocalBuildCo...
LocalBuildConfigExecutor implements BiFunctionConfigExecutor<LocalModule, LocalBuildConfig, BuildConfig> { @Override public Optional<BuildConfig> apply(LocalModule localModule, LocalBuildConfig localBuildConfig) { Optional<BuildConfig> result = Optional.empty(); LocalBuildConfig.BuildType buildType = decodeBuildType(lo...
LocalBuildConfigExecutor implements BiFunctionConfigExecutor<LocalModule, LocalBuildConfig, BuildConfig> { @Override public Optional<BuildConfig> apply(LocalModule localModule, LocalBuildConfig localBuildConfig) { Optional<BuildConfig> result = Optional.empty(); LocalBuildConfig.BuildType buildType = decodeBuildType(lo...
LocalBuildConfigExecutor implements BiFunctionConfigExecutor<LocalModule, LocalBuildConfig, BuildConfig> { @Override public Optional<BuildConfig> apply(LocalModule localModule, LocalBuildConfig localBuildConfig) { Optional<BuildConfig> result = Optional.empty(); LocalBuildConfig.BuildType buildType = decodeBuildType(lo...
LocalBuildConfigExecutor implements BiFunctionConfigExecutor<LocalModule, LocalBuildConfig, BuildConfig> { @Override public Optional<BuildConfig> apply(LocalModule localModule, LocalBuildConfig localBuildConfig) { Optional<BuildConfig> result = Optional.empty(); LocalBuildConfig.BuildType buildType = decodeBuildType(lo...
@Test public void testAcceptJavaFile() { assertTrue( resolver.accept( "java" ) ); }
@Override public boolean accept(String resourceType) { return "java".equals(resourceType); }
JavaFileProjectResourcePathResolver implements ModuleResourcePathResolver { @Override public boolean accept(String resourceType) { return "java".equals(resourceType); } }
JavaFileProjectResourcePathResolver implements ModuleResourcePathResolver { @Override public boolean accept(String resourceType) { return "java".equals(resourceType); } JavaFileProjectResourcePathResolver(); }
JavaFileProjectResourcePathResolver implements ModuleResourcePathResolver { @Override public boolean accept(String resourceType) { return "java".equals(resourceType); } JavaFileProjectResourcePathResolver(); @Override int getPriority(); @Override boolean accept(String resourceType); @Override Path resolveDefaultPath(Pa...
JavaFileProjectResourcePathResolver implements ModuleResourcePathResolver { @Override public boolean accept(String resourceType) { return "java".equals(resourceType); } JavaFileProjectResourcePathResolver(); @Override int getPriority(); @Override boolean accept(String resourceType); @Override Path resolveDefaultPath(Pa...
@Test public void testDenyNonJavaFile() { assertFalse( resolver.accept( "txt" ) ); assertFalse( resolver.accept( null ) ); assertFalse( resolver.accept( "" ) ); }
@Override public boolean accept(String resourceType) { return "java".equals(resourceType); }
JavaFileProjectResourcePathResolver implements ModuleResourcePathResolver { @Override public boolean accept(String resourceType) { return "java".equals(resourceType); } }
JavaFileProjectResourcePathResolver implements ModuleResourcePathResolver { @Override public boolean accept(String resourceType) { return "java".equals(resourceType); } JavaFileProjectResourcePathResolver(); }
JavaFileProjectResourcePathResolver implements ModuleResourcePathResolver { @Override public boolean accept(String resourceType) { return "java".equals(resourceType); } JavaFileProjectResourcePathResolver(); @Override int getPriority(); @Override boolean accept(String resourceType); @Override Path resolveDefaultPath(Pa...
JavaFileProjectResourcePathResolver implements ModuleResourcePathResolver { @Override public boolean accept(String resourceType) { return "java".equals(resourceType); } JavaFileProjectResourcePathResolver(); @Override int getPriority(); @Override boolean accept(String resourceType); @Override Path resolveDefaultPath(Pa...
@Test public void testResolveByDefaultPath() { assertEquals( packageMainSrcPath, resolver.resolveDefaultPath( pkg ) ); verify( pkg, times( 1 ) ).getPackageMainSrcPath(); }
@Override public Path resolveDefaultPath(Package pkg) { return pkg.getPackageMainSrcPath(); }
JavaFileProjectResourcePathResolver implements ModuleResourcePathResolver { @Override public Path resolveDefaultPath(Package pkg) { return pkg.getPackageMainSrcPath(); } }
JavaFileProjectResourcePathResolver implements ModuleResourcePathResolver { @Override public Path resolveDefaultPath(Package pkg) { return pkg.getPackageMainSrcPath(); } JavaFileProjectResourcePathResolver(); }
JavaFileProjectResourcePathResolver implements ModuleResourcePathResolver { @Override public Path resolveDefaultPath(Package pkg) { return pkg.getPackageMainSrcPath(); } JavaFileProjectResourcePathResolver(); @Override int getPriority(); @Override boolean accept(String resourceType); @Override Path resolveDefaultPath(P...
JavaFileProjectResourcePathResolver implements ModuleResourcePathResolver { @Override public Path resolveDefaultPath(Package pkg) { return pkg.getPackageMainSrcPath(); } JavaFileProjectResourcePathResolver(); @Override int getPriority(); @Override boolean accept(String resourceType); @Override Path resolveDefaultPath(P...
@Test public void testGetDmnElementRefWithNamespace() { final Decision drgElement = mock(Decision.class); final View<? extends DMNElement> view = new ViewImpl<>(drgElement, null); final Name drgElementName = mock(Name.class); final Name importName = mock(Name.class); final Id id = mock(Id.class); final org.kie.workbenc...
static QName getDmnElementRef(final Definitions definitions, final View<? extends DMNElement> v, final String namespaceURI) { final DMNElement dmnElement = v.getDefinition(); final String dmnElementId = dmnElement.getId().getValue(); return getImportPrefix(definitions, dmnElement) .map(prefix -> new QName(namespaceURI,...
WrapperUtils { static QName getDmnElementRef(final Definitions definitions, final View<? extends DMNElement> v, final String namespaceURI) { final DMNElement dmnElement = v.getDefinition(); final String dmnElementId = dmnElement.getId().getValue(); return getImportPrefix(definitions, dmnElement) .map(prefix -> new QNam...
WrapperUtils { static QName getDmnElementRef(final Definitions definitions, final View<? extends DMNElement> v, final String namespaceURI) { final DMNElement dmnElement = v.getDefinition(); final String dmnElementId = dmnElement.getId().getValue(); return getImportPrefix(definitions, dmnElement) .map(prefix -> new QNam...
WrapperUtils { static QName getDmnElementRef(final Definitions definitions, final View<? extends DMNElement> v, final String namespaceURI) { final DMNElement dmnElement = v.getDefinition(); final String dmnElementId = dmnElement.getId().getValue(); return getImportPrefix(definitions, dmnElement) .map(prefix -> new QNam...
WrapperUtils { static QName getDmnElementRef(final Definitions definitions, final View<? extends DMNElement> v, final String namespaceURI) { final DMNElement dmnElement = v.getDefinition(); final String dmnElementId = dmnElement.getId().getValue(); return getImportPrefix(definitions, dmnElement) .map(prefix -> new QNam...
@Test public void testDuplicatedChildInManagedRepositoryPrevention() throws URISyntaxException, IOException { final POM parentPom = mock(POM.class); final POM newPOM = mock(POM.class); final Repository repository = mock(Repository.class); final File test = File.createTempFile("test", Long.toString(System.nanoTime())); ...
public KieModule save(final Path repositoryRoot, final POM pom) { try { ioService.startBatch(Paths.convert(repositoryRoot).getFileSystem(), commentedOptionFactory.makeCommentedOption("New module [" + pom.getName() + "]")); KieModule kieModule = createNewModuleCreator(repositoryRoot, pom).create(); newModuleEvent.fire(n...
ModuleSaver { public KieModule save(final Path repositoryRoot, final POM pom) { try { ioService.startBatch(Paths.convert(repositoryRoot).getFileSystem(), commentedOptionFactory.makeCommentedOption("New module [" + pom.getName() + "]")); KieModule kieModule = createNewModuleCreator(repositoryRoot, pom).create(); newModu...
ModuleSaver { public KieModule save(final Path repositoryRoot, final POM pom) { try { ioService.startBatch(Paths.convert(repositoryRoot).getFileSystem(), commentedOptionFactory.makeCommentedOption("New module [" + pom.getName() + "]")); KieModule kieModule = createNewModuleCreator(repositoryRoot, pom).create(); newModu...
ModuleSaver { public KieModule save(final Path repositoryRoot, final POM pom) { try { ioService.startBatch(Paths.convert(repositoryRoot).getFileSystem(), commentedOptionFactory.makeCommentedOption("New module [" + pom.getName() + "]")); KieModule kieModule = createNewModuleCreator(repositoryRoot, pom).create(); newModu...
ModuleSaver { public KieModule save(final Path repositoryRoot, final POM pom) { try { ioService.startBatch(Paths.convert(repositoryRoot).getFileSystem(), commentedOptionFactory.makeCommentedOption("New module [" + pom.getName() + "]")); KieModule kieModule = createNewModuleCreator(repositoryRoot, pom).create(); newModu...
@Test public void newModuleCreatorDefaultPackageTest() throws IOException { final POM pom = new POM(); String defaultPackageNameWhiteListEntry = GROUP_ID + ".**"; pom.setName(PROJECT_NAME); pom.getGav().setGroupId(GROUP_ID); pom.getGav().setArtifactId(ARTIFACT_ID); pom.getGav().setVersion(VERSION); runProjecCreationTes...
public NewModuleCreator createNewModuleCreator(final Path repositoryRoot, final POM pom) { return new NewModuleCreator(pom,repositoryRoot); }
ModuleSaver { public NewModuleCreator createNewModuleCreator(final Path repositoryRoot, final POM pom) { return new NewModuleCreator(pom,repositoryRoot); } }
ModuleSaver { public NewModuleCreator createNewModuleCreator(final Path repositoryRoot, final POM pom) { return new NewModuleCreator(pom,repositoryRoot); } ModuleSaver(); @Inject ModuleSaver(final @Named("ioStrategy") IOService ioService, final POMService pomService, final...
ModuleSaver { public NewModuleCreator createNewModuleCreator(final Path repositoryRoot, final POM pom) { return new NewModuleCreator(pom,repositoryRoot); } ModuleSaver(); @Inject ModuleSaver(final @Named("ioStrategy") IOService ioService, final POMService pomService, final...
ModuleSaver { public NewModuleCreator createNewModuleCreator(final Path repositoryRoot, final POM pom) { return new NewModuleCreator(pom,repositoryRoot); } ModuleSaver(); @Inject ModuleSaver(final @Named("ioStrategy") IOService ioService, final POMService pomService, final...
@Test public void testPackageNameWhiteList() throws URISyntaxException { when(ioService.exists(any(org.uberfire.java.nio.file.Path.class))).thenReturn(false); projectImportsService.saveProjectImports(pathToImports); verify(ioService).write(any(org.uberfire.java.nio.file.Path.class), importsArgumentCaptor.capture()); as...
public void saveProjectImports(final Path path) { if (ioService.exists(Paths.convert(path))) { throw new FileAlreadyExistsException(path.toString()); } else { ioService.write(Paths.convert(path), projectConfigurationContentHandler.toString(createProjectImports())); } }
ProjectImportsServiceImpl extends KieService<ProjectImportsContent> implements ProjectImportsService { public void saveProjectImports(final Path path) { if (ioService.exists(Paths.convert(path))) { throw new FileAlreadyExistsException(path.toString()); } else { ioService.write(Paths.convert(path), projectConfigurationC...
ProjectImportsServiceImpl extends KieService<ProjectImportsContent> implements ProjectImportsService { public void saveProjectImports(final Path path) { if (ioService.exists(Paths.convert(path))) { throw new FileAlreadyExistsException(path.toString()); } else { ioService.write(Paths.convert(path), projectConfigurationC...
ProjectImportsServiceImpl extends KieService<ProjectImportsContent> implements ProjectImportsService { public void saveProjectImports(final Path path) { if (ioService.exists(Paths.convert(path))) { throw new FileAlreadyExistsException(path.toString()); } else { ioService.write(Paths.convert(path), projectConfigurationC...
ProjectImportsServiceImpl extends KieService<ProjectImportsContent> implements ProjectImportsService { public void saveProjectImports(final Path path) { if (ioService.exists(Paths.convert(path))) { throw new FileAlreadyExistsException(path.toString()); } else { ioService.write(Paths.convert(path), projectConfigurationC...
@Test(expected = FileAlreadyExistsException.class) public void testPackageNameWhiteListFileExists() throws URISyntaxException { when(ioService.exists(any(org.uberfire.java.nio.file.Path.class))).thenReturn(true); projectImportsService.saveProjectImports(pathToImports); }
public void saveProjectImports(final Path path) { if (ioService.exists(Paths.convert(path))) { throw new FileAlreadyExistsException(path.toString()); } else { ioService.write(Paths.convert(path), projectConfigurationContentHandler.toString(createProjectImports())); } }
ProjectImportsServiceImpl extends KieService<ProjectImportsContent> implements ProjectImportsService { public void saveProjectImports(final Path path) { if (ioService.exists(Paths.convert(path))) { throw new FileAlreadyExistsException(path.toString()); } else { ioService.write(Paths.convert(path), projectConfigurationC...
ProjectImportsServiceImpl extends KieService<ProjectImportsContent> implements ProjectImportsService { public void saveProjectImports(final Path path) { if (ioService.exists(Paths.convert(path))) { throw new FileAlreadyExistsException(path.toString()); } else { ioService.write(Paths.convert(path), projectConfigurationC...
ProjectImportsServiceImpl extends KieService<ProjectImportsContent> implements ProjectImportsService { public void saveProjectImports(final Path path) { if (ioService.exists(Paths.convert(path))) { throw new FileAlreadyExistsException(path.toString()); } else { ioService.write(Paths.convert(path), projectConfigurationC...
ProjectImportsServiceImpl extends KieService<ProjectImportsContent> implements ProjectImportsService { public void saveProjectImports(final Path path) { if (ioService.exists(Paths.convert(path))) { throw new FileAlreadyExistsException(path.toString()); } else { ioService.write(Paths.convert(path), projectConfigurationC...
@Test public void testProjectImportsLoad_Exists() throws URISyntaxException { when(ioService.exists(any(org.uberfire.java.nio.file.Path.class))).thenReturn(true); final ProjectImports projectImports = projectImportsService.load(pathToImports); verify(ioService, never()).write(any(org.uberfire.java.nio.file.Path.class),...
@Override public ProjectImports load(final Path path) { try { final org.uberfire.java.nio.file.Path nioPath = Paths.convert(path); if (!ioService.exists(nioPath)) { saveProjectImports(path); } final String content = ioService.readAllString(Paths.convert(path)); final ProjectImports projectImports = projectConfiguration...
ProjectImportsServiceImpl extends KieService<ProjectImportsContent> implements ProjectImportsService { @Override public ProjectImports load(final Path path) { try { final org.uberfire.java.nio.file.Path nioPath = Paths.convert(path); if (!ioService.exists(nioPath)) { saveProjectImports(path); } final String content = i...
ProjectImportsServiceImpl extends KieService<ProjectImportsContent> implements ProjectImportsService { @Override public ProjectImports load(final Path path) { try { final org.uberfire.java.nio.file.Path nioPath = Paths.convert(path); if (!ioService.exists(nioPath)) { saveProjectImports(path); } final String content = i...
ProjectImportsServiceImpl extends KieService<ProjectImportsContent> implements ProjectImportsService { @Override public ProjectImports load(final Path path) { try { final org.uberfire.java.nio.file.Path nioPath = Paths.convert(path); if (!ioService.exists(nioPath)) { saveProjectImports(path); } final String content = i...
ProjectImportsServiceImpl extends KieService<ProjectImportsContent> implements ProjectImportsService { @Override public ProjectImports load(final Path path) { try { final org.uberfire.java.nio.file.Path nioPath = Paths.convert(path); if (!ioService.exists(nioPath)) { saveProjectImports(path); } final String content = i...
@Test public void testProjectImportsLoad_NotExists() throws URISyntaxException { when(ioService.exists(any(org.uberfire.java.nio.file.Path.class))).thenReturn(false); final ProjectImports projectImports = projectImportsService.load(pathToImports); verify(ioService, times(1)).write(any(org.uberfire.java.nio.file.Path.cl...
@Override public ProjectImports load(final Path path) { try { final org.uberfire.java.nio.file.Path nioPath = Paths.convert(path); if (!ioService.exists(nioPath)) { saveProjectImports(path); } final String content = ioService.readAllString(Paths.convert(path)); final ProjectImports projectImports = projectConfiguration...
ProjectImportsServiceImpl extends KieService<ProjectImportsContent> implements ProjectImportsService { @Override public ProjectImports load(final Path path) { try { final org.uberfire.java.nio.file.Path nioPath = Paths.convert(path); if (!ioService.exists(nioPath)) { saveProjectImports(path); } final String content = i...
ProjectImportsServiceImpl extends KieService<ProjectImportsContent> implements ProjectImportsService { @Override public ProjectImports load(final Path path) { try { final org.uberfire.java.nio.file.Path nioPath = Paths.convert(path); if (!ioService.exists(nioPath)) { saveProjectImports(path); } final String content = i...
ProjectImportsServiceImpl extends KieService<ProjectImportsContent> implements ProjectImportsService { @Override public ProjectImports load(final Path path) { try { final org.uberfire.java.nio.file.Path nioPath = Paths.convert(path); if (!ioService.exists(nioPath)) { saveProjectImports(path); } final String content = i...
ProjectImportsServiceImpl extends KieService<ProjectImportsContent> implements ProjectImportsService { @Override public ProjectImports load(final Path path) { try { final org.uberfire.java.nio.file.Path nioPath = Paths.convert(path); if (!ioService.exists(nioPath)) { saveProjectImports(path); } final String content = i...
@Test public void testInit() { projectImportsService.init(); verify(saveAndRenameService).init(projectImportsService); }
@PostConstruct public void init() { saveAndRenameService.init(this); }
ProjectImportsServiceImpl extends KieService<ProjectImportsContent> implements ProjectImportsService { @PostConstruct public void init() { saveAndRenameService.init(this); } }
ProjectImportsServiceImpl extends KieService<ProjectImportsContent> implements ProjectImportsService { @PostConstruct public void init() { saveAndRenameService.init(this); } ProjectImportsServiceImpl(); @Inject ProjectImportsServiceImpl(final @Named("ioStrategy") IOService ioService, ...
ProjectImportsServiceImpl extends KieService<ProjectImportsContent> implements ProjectImportsService { @PostConstruct public void init() { saveAndRenameService.init(this); } ProjectImportsServiceImpl(); @Inject ProjectImportsServiceImpl(final @Named("ioStrategy") IOService ioService, ...
ProjectImportsServiceImpl extends KieService<ProjectImportsContent> implements ProjectImportsService { @PostConstruct public void init() { saveAndRenameService.init(this); } ProjectImportsServiceImpl(); @Inject ProjectImportsServiceImpl(final @Named("ioStrategy") IOService ioService, ...
@Test public void testRename() { final Path path = mock(Path.class); final String newName = "newName"; final String comment = "comment"; projectImportsService.rename(path, newName, comment); verify(renameService).rename(path, newName, comment); }
@Override public Path rename(final Path path, final String newName, final String comment) { return renameService.rename(path, newName, comment); }
ProjectImportsServiceImpl extends KieService<ProjectImportsContent> implements ProjectImportsService { @Override public Path rename(final Path path, final String newName, final String comment) { return renameService.rename(path, newName, comment); } }
ProjectImportsServiceImpl extends KieService<ProjectImportsContent> implements ProjectImportsService { @Override public Path rename(final Path path, final String newName, final String comment) { return renameService.rename(path, newName, comment); } ProjectImportsServiceImpl(); @Inject ProjectImportsServiceImpl(final ...
ProjectImportsServiceImpl extends KieService<ProjectImportsContent> implements ProjectImportsService { @Override public Path rename(final Path path, final String newName, final String comment) { return renameService.rename(path, newName, comment); } ProjectImportsServiceImpl(); @Inject ProjectImportsServiceImpl(final ...
ProjectImportsServiceImpl extends KieService<ProjectImportsContent> implements ProjectImportsService { @Override public Path rename(final Path path, final String newName, final String comment) { return renameService.rename(path, newName, comment); } ProjectImportsServiceImpl(); @Inject ProjectImportsServiceImpl(final ...
@Test public void testSaveAndRename() { final Path path = mock(Path.class); final String newName = "newName"; final Metadata metadata = mock(Metadata.class); final ProjectImports content = mock(ProjectImports.class); final String comment = "comment"; projectImportsService.saveAndRename(path, newName, metadata, content,...
@Override public Path saveAndRename(final Path path, final String newFileName, final Metadata metadata, final ProjectImports content, final String comment) { return saveAndRenameService.saveAndRename(path, newFileName, metadata, content, comment); }
ProjectImportsServiceImpl extends KieService<ProjectImportsContent> implements ProjectImportsService { @Override public Path saveAndRename(final Path path, final String newFileName, final Metadata metadata, final ProjectImports content, final String comment) { return saveAndRenameService.saveAndRename(path, newFileName...
ProjectImportsServiceImpl extends KieService<ProjectImportsContent> implements ProjectImportsService { @Override public Path saveAndRename(final Path path, final String newFileName, final Metadata metadata, final ProjectImports content, final String comment) { return saveAndRenameService.saveAndRename(path, newFileName...
ProjectImportsServiceImpl extends KieService<ProjectImportsContent> implements ProjectImportsService { @Override public Path saveAndRename(final Path path, final String newFileName, final Metadata metadata, final ProjectImports content, final String comment) { return saveAndRenameService.saveAndRename(path, newFileName...
ProjectImportsServiceImpl extends KieService<ProjectImportsContent> implements ProjectImportsService { @Override public Path saveAndRename(final Path path, final String newFileName, final Metadata metadata, final ProjectImports content, final String comment) { return saveAndRenameService.saveAndRename(path, newFileName...
@Test public void returnModule() throws Exception { doReturn(new POM()).when(pomService).load(pathArgumentCaptor.capture()); assertNotNull(resolver.makeModule(Paths.convert(PathFactory.newPath("testFile", "file: final String pathThatWasUsedToLoadTheModulePomXml = pathArgumentCaptor.getValue().toURI(); assertThat(pathTh...
@Override protected KieModule makeModule(final org.uberfire.java.nio.file.Path nioModuleRootPath) { try { final KieModule module = simpleModuleInstance(nioModuleRootPath); final POM pom = pomService.load(module.getPomXMLPath()); module.setPom(pom); return module; } catch (final Exception e) { return null; } }
KieResourceResolver extends ResourceResolver<KieModule> { @Override protected KieModule makeModule(final org.uberfire.java.nio.file.Path nioModuleRootPath) { try { final KieModule module = simpleModuleInstance(nioModuleRootPath); final POM pom = pomService.load(module.getPomXMLPath()); module.setPom(pom); return module...
KieResourceResolver extends ResourceResolver<KieModule> { @Override protected KieModule makeModule(final org.uberfire.java.nio.file.Path nioModuleRootPath) { try { final KieModule module = simpleModuleInstance(nioModuleRootPath); final POM pom = pomService.load(module.getPomXMLPath()); module.setPom(pom); return module...
KieResourceResolver extends ResourceResolver<KieModule> { @Override protected KieModule makeModule(final org.uberfire.java.nio.file.Path nioModuleRootPath) { try { final KieModule module = simpleModuleInstance(nioModuleRootPath); final POM pom = pomService.load(module.getPomXMLPath()); module.setPom(pom); return module...
KieResourceResolver extends ResourceResolver<KieModule> { @Override protected KieModule makeModule(final org.uberfire.java.nio.file.Path nioModuleRootPath) { try { final KieModule module = simpleModuleInstance(nioModuleRootPath); final POM pom = pomService.load(module.getPomXMLPath()); module.setPom(pom); return module...
@Test public void testGetDmnElementRefWithNamespaceWhenImportHasAnOddName() { final Decision drgElement = mock(Decision.class); final View<? extends DMNElement> view = new ViewImpl<>(drgElement, null); final Name drgElementName = mock(Name.class); final Name importName = mock(Name.class); final Id id = mock(Id.class); ...
static QName getDmnElementRef(final Definitions definitions, final View<? extends DMNElement> v, final String namespaceURI) { final DMNElement dmnElement = v.getDefinition(); final String dmnElementId = dmnElement.getId().getValue(); return getImportPrefix(definitions, dmnElement) .map(prefix -> new QName(namespaceURI,...
WrapperUtils { static QName getDmnElementRef(final Definitions definitions, final View<? extends DMNElement> v, final String namespaceURI) { final DMNElement dmnElement = v.getDefinition(); final String dmnElementId = dmnElement.getId().getValue(); return getImportPrefix(definitions, dmnElement) .map(prefix -> new QNam...
WrapperUtils { static QName getDmnElementRef(final Definitions definitions, final View<? extends DMNElement> v, final String namespaceURI) { final DMNElement dmnElement = v.getDefinition(); final String dmnElementId = dmnElement.getId().getValue(); return getImportPrefix(definitions, dmnElement) .map(prefix -> new QNam...
WrapperUtils { static QName getDmnElementRef(final Definitions definitions, final View<? extends DMNElement> v, final String namespaceURI) { final DMNElement dmnElement = v.getDefinition(); final String dmnElementId = dmnElement.getId().getValue(); return getImportPrefix(definitions, dmnElement) .map(prefix -> new QNam...
WrapperUtils { static QName getDmnElementRef(final Definitions definitions, final View<? extends DMNElement> v, final String namespaceURI) { final DMNElement dmnElement = v.getDefinition(); final String dmnElementId = dmnElement.getId().getValue(); return getImportPrefix(definitions, dmnElement) .map(prefix -> new QNam...
@Test public void returnNullWhenSomethingGoesWrong() throws Exception { assertNull(resolver.makeModule(null)); }
@Override protected KieModule makeModule(final org.uberfire.java.nio.file.Path nioModuleRootPath) { try { final KieModule module = simpleModuleInstance(nioModuleRootPath); final POM pom = pomService.load(module.getPomXMLPath()); module.setPom(pom); return module; } catch (final Exception e) { return null; } }
KieResourceResolver extends ResourceResolver<KieModule> { @Override protected KieModule makeModule(final org.uberfire.java.nio.file.Path nioModuleRootPath) { try { final KieModule module = simpleModuleInstance(nioModuleRootPath); final POM pom = pomService.load(module.getPomXMLPath()); module.setPom(pom); return module...
KieResourceResolver extends ResourceResolver<KieModule> { @Override protected KieModule makeModule(final org.uberfire.java.nio.file.Path nioModuleRootPath) { try { final KieModule module = simpleModuleInstance(nioModuleRootPath); final POM pom = pomService.load(module.getPomXMLPath()); module.setPom(pom); return module...
KieResourceResolver extends ResourceResolver<KieModule> { @Override protected KieModule makeModule(final org.uberfire.java.nio.file.Path nioModuleRootPath) { try { final KieModule module = simpleModuleInstance(nioModuleRootPath); final POM pom = pomService.load(module.getPomXMLPath()); module.setPom(pom); return module...
KieResourceResolver extends ResourceResolver<KieModule> { @Override protected KieModule makeModule(final org.uberfire.java.nio.file.Path nioModuleRootPath) { try { final KieModule module = simpleModuleInstance(nioModuleRootPath); final POM pom = pomService.load(module.getPomXMLPath()); module.setPom(pom); return module...
@Test public void testResolvePackage() { final Package pkg = new Package(); doReturn(new HashSet<>()).when(packageServiceLoader).find(rootPath); doReturn(pkg).when(resourceResolver).resolvePackage(any()); final Package resolvedPackage = moduleService.resolvePackage(activeModule, "org.test"); assertNotNull(resolvedPacka...
@Override public Package resolvePackage(final Module activeModule, final String packageName) { final org.uberfire.java.nio.file.Path convert = Paths.convert(activeModule.getRootPath()); final String replace = packageName.replace(".", "/"); return resourceResolver.resolvePackage(Paths.convert(convert.resolve(MAIN_RESOUR...
KieModuleServiceImpl extends AbstractModuleService<KieModule> implements KieModuleFactory, org.kie.workbench.common.services.shared.project.KieModuleService { @Override public Package resolvePackage(final Module activeModule, final String packageName) { final org.uberfire.java.nio.file.Path convert =...
KieModuleServiceImpl extends AbstractModuleService<KieModule> implements KieModuleFactory, org.kie.workbench.common.services.shared.project.KieModuleService { @Override public Package resolvePackage(final Module activeModule, final String packageName) { final org.uberfire.java.nio.file.Path convert =...
KieModuleServiceImpl extends AbstractModuleService<KieModule> implements KieModuleFactory, org.kie.workbench.common.services.shared.project.KieModuleService { @Override public Package resolvePackage(final Module activeModule, final String packageName) { final org.uberfire.java.nio.file.Path convert =...
KieModuleServiceImpl extends AbstractModuleService<KieModule> implements KieModuleFactory, org.kie.workbench.common.services.shared.project.KieModuleService { @Override public Package resolvePackage(final Module activeModule, final String packageName) { final org.uberfire.java.nio.file.Path convert =...
@Test public void testNoPackages() { doReturn(new HashSet<>()).when(packageServiceLoader).find(rootPath); final KieModulePackages kieModulePackages = moduleService.resolveModulePackages(activeModule); assertEquals(1, kieModulePackages.getPackages().size()); assertEquals("", kieModulePackages.getPackages().iterator().ne...
@Override public KieModulePackages resolveModulePackages(Module activeModule) { final HashSet<PackageItem> packages = new HashSet<>(); packages.add(new PackageItem("", PackageItem.DEFAULT_PACKAGE_NAME)); for (final String packageName : packageServiceLoader.find(activeModule.getRootPath())) { final StringBuilder package...
KieModuleServiceImpl extends AbstractModuleService<KieModule> implements KieModuleFactory, org.kie.workbench.common.services.shared.project.KieModuleService { @Override public KieModulePackages resolveModulePackages(Module activeModule) { final HashSet<PackageItem> packages = new HashSet<>(); package...
KieModuleServiceImpl extends AbstractModuleService<KieModule> implements KieModuleFactory, org.kie.workbench.common.services.shared.project.KieModuleService { @Override public KieModulePackages resolveModulePackages(Module activeModule) { final HashSet<PackageItem> packages = new HashSet<>(); package...
KieModuleServiceImpl extends AbstractModuleService<KieModule> implements KieModuleFactory, org.kie.workbench.common.services.shared.project.KieModuleService { @Override public KieModulePackages resolveModulePackages(Module activeModule) { final HashSet<PackageItem> packages = new HashSet<>(); package...
KieModuleServiceImpl extends AbstractModuleService<KieModule> implements KieModuleFactory, org.kie.workbench.common.services.shared.project.KieModuleService { @Override public KieModulePackages resolveModulePackages(Module activeModule) { final HashSet<PackageItem> packages = new HashSet<>(); package...
@Test public void testPackages() { final HashSet<Object> packages = new HashSet<>(); packages.add("org.test"); doReturn(packages).when(packageServiceLoader).find(rootPath); final KieModulePackages kieModulePackages = moduleService.resolveModulePackages(activeModule); assertEquals(3, kieModulePackages.getPackages().size...
@Override public KieModulePackages resolveModulePackages(Module activeModule) { final HashSet<PackageItem> packages = new HashSet<>(); packages.add(new PackageItem("", PackageItem.DEFAULT_PACKAGE_NAME)); for (final String packageName : packageServiceLoader.find(activeModule.getRootPath())) { final StringBuilder package...
KieModuleServiceImpl extends AbstractModuleService<KieModule> implements KieModuleFactory, org.kie.workbench.common.services.shared.project.KieModuleService { @Override public KieModulePackages resolveModulePackages(Module activeModule) { final HashSet<PackageItem> packages = new HashSet<>(); package...
KieModuleServiceImpl extends AbstractModuleService<KieModule> implements KieModuleFactory, org.kie.workbench.common.services.shared.project.KieModuleService { @Override public KieModulePackages resolveModulePackages(Module activeModule) { final HashSet<PackageItem> packages = new HashSet<>(); package...
KieModuleServiceImpl extends AbstractModuleService<KieModule> implements KieModuleFactory, org.kie.workbench.common.services.shared.project.KieModuleService { @Override public KieModulePackages resolveModulePackages(Module activeModule) { final HashSet<PackageItem> packages = new HashSet<>(); package...
KieModuleServiceImpl extends AbstractModuleService<KieModule> implements KieModuleFactory, org.kie.workbench.common.services.shared.project.KieModuleService { @Override public KieModulePackages resolveModulePackages(Module activeModule) { final HashSet<PackageItem> packages = new HashSet<>(); package...
@Test public void testAddModuleRepository() { final ResourceUpdatedEvent event = new ResourceUpdatedEvent(pomPath, "", sessionInfo); final ModuleRepositories moduleRepositories = new ModuleRepositories(); when(moduleRepositoriesService.load(moduleRepositoriesPath)).thenReturn(moduleRepositories); when(repositoryResolve...
public void onResourceUpdated(@Observes final ResourceUpdatedEvent event) { if (observablePOMFile.accept(event.getPath())) { syncModuleRepositories(event.getPath()); } }
ModuleRepositoriesSynchronizer { public void onResourceUpdated(@Observes final ResourceUpdatedEvent event) { if (observablePOMFile.accept(event.getPath())) { syncModuleRepositories(event.getPath()); } } }
ModuleRepositoriesSynchronizer { public void onResourceUpdated(@Observes final ResourceUpdatedEvent event) { if (observablePOMFile.accept(event.getPath())) { syncModuleRepositories(event.getPath()); } } ModuleRepositoriesSynchronizer(); @Inject ModuleRepositoriesSynchronizer(final @Named("ioStrategy") IOService ioServ...
ModuleRepositoriesSynchronizer { public void onResourceUpdated(@Observes final ResourceUpdatedEvent event) { if (observablePOMFile.accept(event.getPath())) { syncModuleRepositories(event.getPath()); } } ModuleRepositoriesSynchronizer(); @Inject ModuleRepositoriesSynchronizer(final @Named("ioStrategy") IOService ioServ...
ModuleRepositoriesSynchronizer { public void onResourceUpdated(@Observes final ResourceUpdatedEvent event) { if (observablePOMFile.accept(event.getPath())) { syncModuleRepositories(event.getPath()); } } ModuleRepositoriesSynchronizer(); @Inject ModuleRepositoriesSynchronizer(final @Named("ioStrategy") IOService ioServ...
@Test public void testRemoveModuleRepository() { final ResourceUpdatedEvent event = new ResourceUpdatedEvent(pomPath, "", sessionInfo); final Set<ModuleRepositories.ModuleRepository> repositories = new HashSet<ModuleRepositories.ModuleRepository>() {{ add(new ModuleRepositories.ModuleRepository(true, new MavenRepositor...
public void onResourceUpdated(@Observes final ResourceUpdatedEvent event) { if (observablePOMFile.accept(event.getPath())) { syncModuleRepositories(event.getPath()); } }
ModuleRepositoriesSynchronizer { public void onResourceUpdated(@Observes final ResourceUpdatedEvent event) { if (observablePOMFile.accept(event.getPath())) { syncModuleRepositories(event.getPath()); } } }
ModuleRepositoriesSynchronizer { public void onResourceUpdated(@Observes final ResourceUpdatedEvent event) { if (observablePOMFile.accept(event.getPath())) { syncModuleRepositories(event.getPath()); } } ModuleRepositoriesSynchronizer(); @Inject ModuleRepositoriesSynchronizer(final @Named("ioStrategy") IOService ioServ...
ModuleRepositoriesSynchronizer { public void onResourceUpdated(@Observes final ResourceUpdatedEvent event) { if (observablePOMFile.accept(event.getPath())) { syncModuleRepositories(event.getPath()); } } ModuleRepositoriesSynchronizer(); @Inject ModuleRepositoriesSynchronizer(final @Named("ioStrategy") IOService ioServ...
ModuleRepositoriesSynchronizer { public void onResourceUpdated(@Observes final ResourceUpdatedEvent event) { if (observablePOMFile.accept(event.getPath())) { syncModuleRepositories(event.getPath()); } } ModuleRepositoriesSynchronizer(); @Inject ModuleRepositoriesSynchronizer(final @Named("ioStrategy") IOService ioServ...
@Test public void testAddAndRemoveModuleRepository() { final ResourceUpdatedEvent event = new ResourceUpdatedEvent(pomPath, "", sessionInfo); final Set<ModuleRepositories.ModuleRepository> repositories = new HashSet<ModuleRepositories.ModuleRepository>() {{ add(new ModuleRepositories.ModuleRepository(true, new MavenRep...
public void onResourceUpdated(@Observes final ResourceUpdatedEvent event) { if (observablePOMFile.accept(event.getPath())) { syncModuleRepositories(event.getPath()); } }
ModuleRepositoriesSynchronizer { public void onResourceUpdated(@Observes final ResourceUpdatedEvent event) { if (observablePOMFile.accept(event.getPath())) { syncModuleRepositories(event.getPath()); } } }
ModuleRepositoriesSynchronizer { public void onResourceUpdated(@Observes final ResourceUpdatedEvent event) { if (observablePOMFile.accept(event.getPath())) { syncModuleRepositories(event.getPath()); } } ModuleRepositoriesSynchronizer(); @Inject ModuleRepositoriesSynchronizer(final @Named("ioStrategy") IOService ioServ...
ModuleRepositoriesSynchronizer { public void onResourceUpdated(@Observes final ResourceUpdatedEvent event) { if (observablePOMFile.accept(event.getPath())) { syncModuleRepositories(event.getPath()); } } ModuleRepositoriesSynchronizer(); @Inject ModuleRepositoriesSynchronizer(final @Named("ioStrategy") IOService ioServ...
ModuleRepositoriesSynchronizer { public void onResourceUpdated(@Observes final ResourceUpdatedEvent event) { if (observablePOMFile.accept(event.getPath())) { syncModuleRepositories(event.getPath()); } } ModuleRepositoriesSynchronizer(); @Inject ModuleRepositoriesSynchronizer(final @Named("ioStrategy") IOService ioServ...
@Test public void testGetTimeZoneWhenTimeZoneIsHST() { doReturn("HST").when(loader).getSystemPropertyTimeZone(); assertEquals("-36000000", getLoaderOffset()); }
String getSystemPropertyTimeZone() { return System.getProperty("user.timezone"); }
KieTimeZonePreferencesLoader implements ApplicationPreferencesLoader { String getSystemPropertyTimeZone() { return System.getProperty("user.timezone"); } }
KieTimeZonePreferencesLoader implements ApplicationPreferencesLoader { String getSystemPropertyTimeZone() { return System.getProperty("user.timezone"); } }
KieTimeZonePreferencesLoader implements ApplicationPreferencesLoader { String getSystemPropertyTimeZone() { return System.getProperty("user.timezone"); } @Override Map<String, String> load(); }
KieTimeZonePreferencesLoader implements ApplicationPreferencesLoader { String getSystemPropertyTimeZone() { return System.getProperty("user.timezone"); } @Override Map<String, String> load(); }
@Test public void testGetTimeZoneWhenTimeZoneIsAmericaSaoPaulo() { doReturn("America/Sao_Paulo").when(loader).getSystemPropertyTimeZone(); assertEquals("-10800000", getLoaderOffset()); }
String getSystemPropertyTimeZone() { return System.getProperty("user.timezone"); }
KieTimeZonePreferencesLoader implements ApplicationPreferencesLoader { String getSystemPropertyTimeZone() { return System.getProperty("user.timezone"); } }
KieTimeZonePreferencesLoader implements ApplicationPreferencesLoader { String getSystemPropertyTimeZone() { return System.getProperty("user.timezone"); } }
KieTimeZonePreferencesLoader implements ApplicationPreferencesLoader { String getSystemPropertyTimeZone() { return System.getProperty("user.timezone"); } @Override Map<String, String> load(); }
KieTimeZonePreferencesLoader implements ApplicationPreferencesLoader { String getSystemPropertyTimeZone() { return System.getProperty("user.timezone"); } @Override Map<String, String> load(); }
@Test public void testLoad() { final Map<String, String> preferences = loader.load(); assertNotNull( preferences ); assertEquals( KieMeta.isProductized(), Boolean.parseBoolean( preferences.get( ApplicationPreferences.KIE_PRODUCTIZED ) ) ); }
@Override public Map<String, String> load() { final Map<String, String> preferences = new HashMap<String, String>(); final boolean isProductized = KieMeta.isProductized(); log.info( "Setting preference '" + ApplicationPreferences.KIE_PRODUCTIZED + "' to '" + Boolean.toString( isProductized ) + "'." ); preferences.put( ...
KieMetaDataPreferencesLoader implements ApplicationPreferencesLoader { @Override public Map<String, String> load() { final Map<String, String> preferences = new HashMap<String, String>(); final boolean isProductized = KieMeta.isProductized(); log.info( "Setting preference '" + ApplicationPreferences.KIE_PRODUCTIZED + "...
KieMetaDataPreferencesLoader implements ApplicationPreferencesLoader { @Override public Map<String, String> load() { final Map<String, String> preferences = new HashMap<String, String>(); final boolean isProductized = KieMeta.isProductized(); log.info( "Setting preference '" + ApplicationPreferences.KIE_PRODUCTIZED + "...
KieMetaDataPreferencesLoader implements ApplicationPreferencesLoader { @Override public Map<String, String> load() { final Map<String, String> preferences = new HashMap<String, String>(); final boolean isProductized = KieMeta.isProductized(); log.info( "Setting preference '" + ApplicationPreferences.KIE_PRODUCTIZED + "...
KieMetaDataPreferencesLoader implements ApplicationPreferencesLoader { @Override public Map<String, String> load() { final Map<String, String> preferences = new HashMap<String, String>(); final boolean isProductized = KieMeta.isProductized(); log.info( "Setting preference '" + ApplicationPreferences.KIE_PRODUCTIZED + "...
@Test public void testGetDmnElementRefWithFakeNamespace() { final Decision drgElement = mock(Decision.class); final View<? extends DMNElement> view = new ViewImpl<>(drgElement, null); final String defaultNamespace = ": final Name drgElementName = mock(Name.class); final Id id = mock(Id.class); final org.kie.workbench.c...
static QName getDmnElementRef(final Definitions definitions, final View<? extends DMNElement> v, final String namespaceURI) { final DMNElement dmnElement = v.getDefinition(); final String dmnElementId = dmnElement.getId().getValue(); return getImportPrefix(definitions, dmnElement) .map(prefix -> new QName(namespaceURI,...
WrapperUtils { static QName getDmnElementRef(final Definitions definitions, final View<? extends DMNElement> v, final String namespaceURI) { final DMNElement dmnElement = v.getDefinition(); final String dmnElementId = dmnElement.getId().getValue(); return getImportPrefix(definitions, dmnElement) .map(prefix -> new QNam...
WrapperUtils { static QName getDmnElementRef(final Definitions definitions, final View<? extends DMNElement> v, final String namespaceURI) { final DMNElement dmnElement = v.getDefinition(); final String dmnElementId = dmnElement.getId().getValue(); return getImportPrefix(definitions, dmnElement) .map(prefix -> new QNam...
WrapperUtils { static QName getDmnElementRef(final Definitions definitions, final View<? extends DMNElement> v, final String namespaceURI) { final DMNElement dmnElement = v.getDefinition(); final String dmnElementId = dmnElement.getId().getValue(); return getImportPrefix(definitions, dmnElement) .map(prefix -> new QNam...
WrapperUtils { static QName getDmnElementRef(final Definitions definitions, final View<? extends DMNElement> v, final String namespaceURI) { final DMNElement dmnElement = v.getDefinition(); final String dmnElementId = dmnElement.getId().getValue(); return getImportPrefix(definitions, dmnElement) .map(prefix -> new QNam...
@Test public void checkGetRuleNames() { final Collection<String> ruleNames = service.getRuleNames(path, ""); assertEquals(2, ruleNames.size()); assertTrue(ruleNames.stream().filter((r) -> r.equals("rule1")).findFirst().isPresent()); assertTrue(ruleNames.stream().filter((r) -> r.equals("rule2")).findFirst().isPresent())...
@Override public Collection<String> getRuleNames(final Path path, final String packageName) { final Module module = moduleService.resolveModule(path); if (module == null) { return Collections.emptyList(); } else { return queryRuleNames( packageName, module.getRootPath().toURI()); } }
RuleNameServiceImpl implements RuleNamesService { @Override public Collection<String> getRuleNames(final Path path, final String packageName) { final Module module = moduleService.resolveModule(path); if (module == null) { return Collections.emptyList(); } else { return queryRuleNames( packageName, module.getRootPath()...
RuleNameServiceImpl implements RuleNamesService { @Override public Collection<String> getRuleNames(final Path path, final String packageName) { final Module module = moduleService.resolveModule(path); if (module == null) { return Collections.emptyList(); } else { return queryRuleNames( packageName, module.getRootPath()...
RuleNameServiceImpl implements RuleNamesService { @Override public Collection<String> getRuleNames(final Path path, final String packageName) { final Module module = moduleService.resolveModule(path); if (module == null) { return Collections.emptyList(); } else { return queryRuleNames( packageName, module.getRootPath()...
RuleNameServiceImpl implements RuleNamesService { @Override public Collection<String> getRuleNames(final Path path, final String packageName) { final Module module = moduleService.resolveModule(path); if (module == null) { return Collections.emptyList(); } else { return queryRuleNames( packageName, module.getRootPath()...
@Test public void testClassAnnotationStringGeneration() { Annotation classReactive = new AnnotationImpl( annotationDefinitions.get( org.kie.api.definition.type.ClassReactive.class.getName() ) ); Annotation propReactive = new AnnotationImpl( annotationDefinitions.get( org.kie.api.definition.type.PropertyReactive.class.g...
public String generateAnnotationString(GenerationContext generationContext, Annotation annotation) throws Exception { VelocityContext vc = buildContext(generationContext); vc.put("annotation", annotation); return generateSubTemplateString(generationContext, "java_annotation"); }
GenerationEngine { public String generateAnnotationString(GenerationContext generationContext, Annotation annotation) throws Exception { VelocityContext vc = buildContext(generationContext); vc.put("annotation", annotation); return generateSubTemplateString(generationContext, "java_annotation"); } }
GenerationEngine { public String generateAnnotationString(GenerationContext generationContext, Annotation annotation) throws Exception { VelocityContext vc = buildContext(generationContext); vc.put("annotation", annotation); return generateSubTemplateString(generationContext, "java_annotation"); } }
GenerationEngine { public String generateAnnotationString(GenerationContext generationContext, Annotation annotation) throws Exception { VelocityContext vc = buildContext(generationContext); vc.put("annotation", annotation); return generateSubTemplateString(generationContext, "java_annotation"); } static GenerationEng...
GenerationEngine { public String generateAnnotationString(GenerationContext generationContext, Annotation annotation) throws Exception { VelocityContext vc = buildContext(generationContext); vc.put("annotation", annotation); return generateSubTemplateString(generationContext, "java_annotation"); } static GenerationEng...
@Test public void testDefaultConstructorStringGeneration() { DataModel dataModel = dataModelOracleDriver.createModel(); DataObject object = dataModel.addDataObject("com.test.Object1"); GenerationContext generationContext = new GenerationContext( dataModel ); try { String result = engine.generateDefaultConstructorString...
public String generateDefaultConstructorString(GenerationContext generationContext, DataObject dataObject) throws Exception { VelocityContext vc = buildContext(generationContext); vc.put("currentDataObject", dataObject); return generateSubTemplateString(generationContext, "java_default_constructor"); }
GenerationEngine { public String generateDefaultConstructorString(GenerationContext generationContext, DataObject dataObject) throws Exception { VelocityContext vc = buildContext(generationContext); vc.put("currentDataObject", dataObject); return generateSubTemplateString(generationContext, "java_default_constructor");...
GenerationEngine { public String generateDefaultConstructorString(GenerationContext generationContext, DataObject dataObject) throws Exception { VelocityContext vc = buildContext(generationContext); vc.put("currentDataObject", dataObject); return generateSubTemplateString(generationContext, "java_default_constructor");...
GenerationEngine { public String generateDefaultConstructorString(GenerationContext generationContext, DataObject dataObject) throws Exception { VelocityContext vc = buildContext(generationContext); vc.put("currentDataObject", dataObject); return generateSubTemplateString(generationContext, "java_default_constructor");...
GenerationEngine { public String generateDefaultConstructorString(GenerationContext generationContext, DataObject dataObject) throws Exception { VelocityContext vc = buildContext(generationContext); vc.put("currentDataObject", dataObject); return generateSubTemplateString(generationContext, "java_default_constructor");...
@Test public void testAllFieldsConstructorStringGeneration() { DataModel dataModel = dataModelOracleDriver.createModel(); DataObject object1 = dataModel.addDataObject("com.test.Object1"); DataObject object2 = dataModel.addDataObject("com.test.sub.Object2"); object1.addProperty("attribute1", "java.lang.String"); object1...
public String generateAllFieldsConstructorString(GenerationContext generationContext, DataObject dataObject) throws Exception { VelocityContext vc = buildContext(generationContext); vc.put("currentDataObject", dataObject); return generateSubTemplateString(generationContext, "java_allfields_constructor"); }
GenerationEngine { public String generateAllFieldsConstructorString(GenerationContext generationContext, DataObject dataObject) throws Exception { VelocityContext vc = buildContext(generationContext); vc.put("currentDataObject", dataObject); return generateSubTemplateString(generationContext, "java_allfields_constructo...
GenerationEngine { public String generateAllFieldsConstructorString(GenerationContext generationContext, DataObject dataObject) throws Exception { VelocityContext vc = buildContext(generationContext); vc.put("currentDataObject", dataObject); return generateSubTemplateString(generationContext, "java_allfields_constructo...
GenerationEngine { public String generateAllFieldsConstructorString(GenerationContext generationContext, DataObject dataObject) throws Exception { VelocityContext vc = buildContext(generationContext); vc.put("currentDataObject", dataObject); return generateSubTemplateString(generationContext, "java_allfields_constructo...
GenerationEngine { public String generateAllFieldsConstructorString(GenerationContext generationContext, DataObject dataObject) throws Exception { VelocityContext vc = buildContext(generationContext); vc.put("currentDataObject", dataObject); return generateSubTemplateString(generationContext, "java_allfields_constructo...
@Test public void testKeyFieldsConstructorStringGeneration() { DataModel dataModel = dataModelOracleDriver.createModel(); DataObject object1 = dataModel.addDataObject("com.test.Object1"); DataObject object2 = dataModel.addDataObject("com.test.sub.Object2"); ObjectProperty prop1 = object1.addProperty("attribute1", "java...
public String generateKeyFieldsConstructorString(GenerationContext generationContext, DataObject dataObject) throws Exception { VelocityContext vc = buildContext(generationContext); vc.put("currentDataObject", dataObject); return generateSubTemplateString(generationContext, "java_keyfields_constructor"); }
GenerationEngine { public String generateKeyFieldsConstructorString(GenerationContext generationContext, DataObject dataObject) throws Exception { VelocityContext vc = buildContext(generationContext); vc.put("currentDataObject", dataObject); return generateSubTemplateString(generationContext, "java_keyfields_constructo...
GenerationEngine { public String generateKeyFieldsConstructorString(GenerationContext generationContext, DataObject dataObject) throws Exception { VelocityContext vc = buildContext(generationContext); vc.put("currentDataObject", dataObject); return generateSubTemplateString(generationContext, "java_keyfields_constructo...
GenerationEngine { public String generateKeyFieldsConstructorString(GenerationContext generationContext, DataObject dataObject) throws Exception { VelocityContext vc = buildContext(generationContext); vc.put("currentDataObject", dataObject); return generateSubTemplateString(generationContext, "java_keyfields_constructo...
GenerationEngine { public String generateKeyFieldsConstructorString(GenerationContext generationContext, DataObject dataObject) throws Exception { VelocityContext vc = buildContext(generationContext); vc.put("currentDataObject", dataObject); return generateSubTemplateString(generationContext, "java_keyfields_constructo...
@Test public void testAllConstructorsStringGeneration() { DataModel dataModel = dataModelOracleDriver.createModel(); DataObject object1 = dataModel.addDataObject("com.test.Object1"); DataObject object2 = dataModel.addDataObject("com.test.sub.Object2"); ObjectProperty prop1 = object1.addProperty("attribute1", "java.lang...
public String generateAllConstructorsString(GenerationContext generationContext, DataObject dataObject) throws Exception { return generateAllConstructorsString( generationContext, dataObject, null ); }
GenerationEngine { public String generateAllConstructorsString(GenerationContext generationContext, DataObject dataObject) throws Exception { return generateAllConstructorsString( generationContext, dataObject, null ); } }
GenerationEngine { public String generateAllConstructorsString(GenerationContext generationContext, DataObject dataObject) throws Exception { return generateAllConstructorsString( generationContext, dataObject, null ); } }
GenerationEngine { public String generateAllConstructorsString(GenerationContext generationContext, DataObject dataObject) throws Exception { return generateAllConstructorsString( generationContext, dataObject, null ); } static GenerationEngine getInstance(); void generate(GenerationContext generationContext); void ge...
GenerationEngine { public String generateAllConstructorsString(GenerationContext generationContext, DataObject dataObject) throws Exception { return generateAllConstructorsString( generationContext, dataObject, null ); } static GenerationEngine getInstance(); void generate(GenerationContext generationContext); void ge...
@Test public void testMaxFieldsForConstructorsStringGeneration1() { DataModel dataModel = dataModelOracleDriver.createModel(); DataObject object1 = dataModel.addDataObject("com.test.MaxFieldsForConstructor1"); ObjectProperty prop1; for (int i = 0; i < GenerationTools.MAX_FIELDS_FOR_DEFAULT_CONSTRUCTOR-1; i++) { prop1 =...
public String generateAllConstructorsString(GenerationContext generationContext, DataObject dataObject) throws Exception { return generateAllConstructorsString( generationContext, dataObject, null ); }
GenerationEngine { public String generateAllConstructorsString(GenerationContext generationContext, DataObject dataObject) throws Exception { return generateAllConstructorsString( generationContext, dataObject, null ); } }
GenerationEngine { public String generateAllConstructorsString(GenerationContext generationContext, DataObject dataObject) throws Exception { return generateAllConstructorsString( generationContext, dataObject, null ); } }
GenerationEngine { public String generateAllConstructorsString(GenerationContext generationContext, DataObject dataObject) throws Exception { return generateAllConstructorsString( generationContext, dataObject, null ); } static GenerationEngine getInstance(); void generate(GenerationContext generationContext); void ge...
GenerationEngine { public String generateAllConstructorsString(GenerationContext generationContext, DataObject dataObject) throws Exception { return generateAllConstructorsString( generationContext, dataObject, null ); } static GenerationEngine getInstance(); void generate(GenerationContext generationContext); void ge...
@Test public void testMaxFieldsForConstructorsStringGeneration2() { DataModel dataModel = dataModelOracleDriver.createModel(); DataObject object1 = dataModel.addDataObject("com.test.MaxFieldsForConstructor2"); ObjectProperty prop1; for (int i = 0; i < GenerationTools.MAX_FIELDS_FOR_DEFAULT_CONSTRUCTOR; i++) { prop1 = o...
public String generateAllConstructorsString(GenerationContext generationContext, DataObject dataObject) throws Exception { return generateAllConstructorsString( generationContext, dataObject, null ); }
GenerationEngine { public String generateAllConstructorsString(GenerationContext generationContext, DataObject dataObject) throws Exception { return generateAllConstructorsString( generationContext, dataObject, null ); } }
GenerationEngine { public String generateAllConstructorsString(GenerationContext generationContext, DataObject dataObject) throws Exception { return generateAllConstructorsString( generationContext, dataObject, null ); } }
GenerationEngine { public String generateAllConstructorsString(GenerationContext generationContext, DataObject dataObject) throws Exception { return generateAllConstructorsString( generationContext, dataObject, null ); } static GenerationEngine getInstance(); void generate(GenerationContext generationContext); void ge...
GenerationEngine { public String generateAllConstructorsString(GenerationContext generationContext, DataObject dataObject) throws Exception { return generateAllConstructorsString( generationContext, dataObject, null ); } static GenerationEngine getInstance(); void generate(GenerationContext generationContext); void ge...
@Test public void testFieldAnnotationStringGeneration() { Annotation label = new AnnotationImpl( annotationDefinitions.get( org.kie.api.definition.type.Label.class.getName() ) ); label.setValue( "value", "Attribute 1" ); Annotation desc = new AnnotationImpl( annotationDefinitions.get( org.kie.api.definition.type.Descri...
public String generateAnnotationString(GenerationContext generationContext, Annotation annotation) throws Exception { VelocityContext vc = buildContext(generationContext); vc.put("annotation", annotation); return generateSubTemplateString(generationContext, "java_annotation"); }
GenerationEngine { public String generateAnnotationString(GenerationContext generationContext, Annotation annotation) throws Exception { VelocityContext vc = buildContext(generationContext); vc.put("annotation", annotation); return generateSubTemplateString(generationContext, "java_annotation"); } }
GenerationEngine { public String generateAnnotationString(GenerationContext generationContext, Annotation annotation) throws Exception { VelocityContext vc = buildContext(generationContext); vc.put("annotation", annotation); return generateSubTemplateString(generationContext, "java_annotation"); } }
GenerationEngine { public String generateAnnotationString(GenerationContext generationContext, Annotation annotation) throws Exception { VelocityContext vc = buildContext(generationContext); vc.put("annotation", annotation); return generateSubTemplateString(generationContext, "java_annotation"); } static GenerationEng...
GenerationEngine { public String generateAnnotationString(GenerationContext generationContext, Annotation annotation) throws Exception { VelocityContext vc = buildContext(generationContext); vc.put("annotation", annotation); return generateSubTemplateString(generationContext, "java_annotation"); } static GenerationEng...
@Test public void testAllFieldAnnotationsStringGeneration() { DataModel dataModel = dataModelOracleDriver.createModel(); DataObject object1 = dataModel.addDataObject("com.test.Object1"); ObjectProperty prop1 = object1.addProperty("attribute1", "java.lang.String"); Annotation label = new AnnotationImpl( annotationDefini...
public String generateAllAnnotationsString(GenerationContext generationContext, HasAnnotations hasAnnotations) throws Exception { return generateAllAnnotationsString( generationContext, hasAnnotations, null ); }
GenerationEngine { public String generateAllAnnotationsString(GenerationContext generationContext, HasAnnotations hasAnnotations) throws Exception { return generateAllAnnotationsString( generationContext, hasAnnotations, null ); } }
GenerationEngine { public String generateAllAnnotationsString(GenerationContext generationContext, HasAnnotations hasAnnotations) throws Exception { return generateAllAnnotationsString( generationContext, hasAnnotations, null ); } }
GenerationEngine { public String generateAllAnnotationsString(GenerationContext generationContext, HasAnnotations hasAnnotations) throws Exception { return generateAllAnnotationsString( generationContext, hasAnnotations, null ); } static GenerationEngine getInstance(); void generate(GenerationContext generationContext...
GenerationEngine { public String generateAllAnnotationsString(GenerationContext generationContext, HasAnnotations hasAnnotations) throws Exception { return generateAllAnnotationsString( generationContext, hasAnnotations, null ); } static GenerationEngine getInstance(); void generate(GenerationContext generationContext...
@Test public void testGetDmnElementRefWithoutNamespace() { final Decision drgElement = mock(Decision.class); final View<? extends DMNElement> view = new ViewImpl<>(drgElement, null); final String defaultNamespace = ": final Name drgElementName = mock(Name.class); final Id id = mock(Id.class); final org.kie.workbench.co...
static QName getDmnElementRef(final Definitions definitions, final View<? extends DMNElement> v, final String namespaceURI) { final DMNElement dmnElement = v.getDefinition(); final String dmnElementId = dmnElement.getId().getValue(); return getImportPrefix(definitions, dmnElement) .map(prefix -> new QName(namespaceURI,...
WrapperUtils { static QName getDmnElementRef(final Definitions definitions, final View<? extends DMNElement> v, final String namespaceURI) { final DMNElement dmnElement = v.getDefinition(); final String dmnElementId = dmnElement.getId().getValue(); return getImportPrefix(definitions, dmnElement) .map(prefix -> new QNam...
WrapperUtils { static QName getDmnElementRef(final Definitions definitions, final View<? extends DMNElement> v, final String namespaceURI) { final DMNElement dmnElement = v.getDefinition(); final String dmnElementId = dmnElement.getId().getValue(); return getImportPrefix(definitions, dmnElement) .map(prefix -> new QNam...
WrapperUtils { static QName getDmnElementRef(final Definitions definitions, final View<? extends DMNElement> v, final String namespaceURI) { final DMNElement dmnElement = v.getDefinition(); final String dmnElementId = dmnElement.getId().getValue(); return getImportPrefix(definitions, dmnElement) .map(prefix -> new QNam...
WrapperUtils { static QName getDmnElementRef(final Definitions definitions, final View<? extends DMNElement> v, final String namespaceURI) { final DMNElement dmnElement = v.getDefinition(); final String dmnElementId = dmnElement.getId().getValue(); return getImportPrefix(definitions, dmnElement) .map(prefix -> new QNam...
@Test public void testFieldStringGeneration() { DataModel dataModel = dataModelOracleDriver.createModel(); DataObject object = dataModel.addDataObject("com.test.Object1"); ObjectProperty property = object.addProperty("attribute1", "java.lang.String"); GenerationContext generationContext = new GenerationContext( dataMod...
public String generateFieldString(GenerationContext generationContext, ObjectProperty attribute) throws Exception { VelocityContext vc = buildContext(generationContext); vc.put("attr", attribute); return generateSubTemplateString(generationContext, "java_attribute_2"); }
GenerationEngine { public String generateFieldString(GenerationContext generationContext, ObjectProperty attribute) throws Exception { VelocityContext vc = buildContext(generationContext); vc.put("attr", attribute); return generateSubTemplateString(generationContext, "java_attribute_2"); } }
GenerationEngine { public String generateFieldString(GenerationContext generationContext, ObjectProperty attribute) throws Exception { VelocityContext vc = buildContext(generationContext); vc.put("attr", attribute); return generateSubTemplateString(generationContext, "java_attribute_2"); } }
GenerationEngine { public String generateFieldString(GenerationContext generationContext, ObjectProperty attribute) throws Exception { VelocityContext vc = buildContext(generationContext); vc.put("attr", attribute); return generateSubTemplateString(generationContext, "java_attribute_2"); } static GenerationEngine getI...
GenerationEngine { public String generateFieldString(GenerationContext generationContext, ObjectProperty attribute) throws Exception { VelocityContext vc = buildContext(generationContext); vc.put("attr", attribute); return generateSubTemplateString(generationContext, "java_attribute_2"); } static GenerationEngine getI...
@Test public void testMethodStringGeneration() { DataModel dataModel = dataModelOracleDriver.createModel(); Parameter parameter1 = new ParameterImpl( new TypeImpl( "com.test.Object1" ), "o1" ); Parameter parameter2 = new ParameterImpl( new TypeImpl( "com.test.Object1" ), "o2" ); Type returnType = new TypeImpl( "com.tes...
public String generateMethodString(GenerationContext generationContext, Method method, String indent) throws Exception { return indentLines( generateMethodString( generationContext, method), indent); }
GenerationEngine { public String generateMethodString(GenerationContext generationContext, Method method, String indent) throws Exception { return indentLines( generateMethodString( generationContext, method), indent); } }
GenerationEngine { public String generateMethodString(GenerationContext generationContext, Method method, String indent) throws Exception { return indentLines( generateMethodString( generationContext, method), indent); } }
GenerationEngine { public String generateMethodString(GenerationContext generationContext, Method method, String indent) throws Exception { return indentLines( generateMethodString( generationContext, method), indent); } static GenerationEngine getInstance(); void generate(GenerationContext generationContext); void ge...
GenerationEngine { public String generateMethodString(GenerationContext generationContext, Method method, String indent) throws Exception { return indentLines( generateMethodString( generationContext, method), indent); } static GenerationEngine getInstance(); void generate(GenerationContext generationContext); void ge...
@Test public void testClassWithNestedClassStringGeneration() { DataModel dataModel = dataModelOracleDriver.createModel(); DataObject object = dataModel.addDataObject("com.test.Object1"); GenerationContext generationContext = new GenerationContext( dataModel ); try { String result = engine.generateNestedClassString(gene...
public String generateNestedClassString(GenerationContext generationContext, JavaClass javaClass, String indent) throws Exception { return indentLines( generateNestedClassString( generationContext, javaClass ), indent); }
GenerationEngine { public String generateNestedClassString(GenerationContext generationContext, JavaClass javaClass, String indent) throws Exception { return indentLines( generateNestedClassString( generationContext, javaClass ), indent); } }
GenerationEngine { public String generateNestedClassString(GenerationContext generationContext, JavaClass javaClass, String indent) throws Exception { return indentLines( generateNestedClassString( generationContext, javaClass ), indent); } }
GenerationEngine { public String generateNestedClassString(GenerationContext generationContext, JavaClass javaClass, String indent) throws Exception { return indentLines( generateNestedClassString( generationContext, javaClass ), indent); } static GenerationEngine getInstance(); void generate(GenerationContext generat...
GenerationEngine { public String generateNestedClassString(GenerationContext generationContext, JavaClass javaClass, String indent) throws Exception { return indentLines( generateNestedClassString( generationContext, javaClass ), indent); } static GenerationEngine getInstance(); void generate(GenerationContext generat...
@Test public void testCompleteFieldStringGeneration() { DataModel dataModel = dataModelOracleDriver.createModel(); DataObject object1 = dataModel.addDataObject("com.test.Object1"); ObjectProperty prop1 = object1.addProperty("attribute1", "java.lang.String"); Annotation label = new AnnotationImpl( annotationDefinitions....
public String generateCompleteFieldString(GenerationContext generationContext, ObjectProperty attribute) throws Exception { return generateCompleteFieldString( generationContext, attribute, null ); }
GenerationEngine { public String generateCompleteFieldString(GenerationContext generationContext, ObjectProperty attribute) throws Exception { return generateCompleteFieldString( generationContext, attribute, null ); } }
GenerationEngine { public String generateCompleteFieldString(GenerationContext generationContext, ObjectProperty attribute) throws Exception { return generateCompleteFieldString( generationContext, attribute, null ); } }
GenerationEngine { public String generateCompleteFieldString(GenerationContext generationContext, ObjectProperty attribute) throws Exception { return generateCompleteFieldString( generationContext, attribute, null ); } static GenerationEngine getInstance(); void generate(GenerationContext generationContext); void gene...
GenerationEngine { public String generateCompleteFieldString(GenerationContext generationContext, ObjectProperty attribute) throws Exception { return generateCompleteFieldString( generationContext, attribute, null ); } static GenerationEngine getInstance(); void generate(GenerationContext generationContext); void gene...
@Test public void testFieldAccessorStringGeneration() { DataModel dataModel = dataModelOracleDriver.createModel(); DataObject object = dataModel.addDataObject("com.test.Object1"); ObjectProperty property = object.addProperty("attribute1", "java.lang.String"); GenerationContext generationContext = new GenerationContext(...
public String generateFieldGetterString(GenerationContext generationContext, ObjectProperty attribute) throws Exception { VelocityContext vc = buildContext(generationContext); vc.put("attr", attribute); return generateSubTemplateString(generationContext, "java_getter"); }
GenerationEngine { public String generateFieldGetterString(GenerationContext generationContext, ObjectProperty attribute) throws Exception { VelocityContext vc = buildContext(generationContext); vc.put("attr", attribute); return generateSubTemplateString(generationContext, "java_getter"); } }
GenerationEngine { public String generateFieldGetterString(GenerationContext generationContext, ObjectProperty attribute) throws Exception { VelocityContext vc = buildContext(generationContext); vc.put("attr", attribute); return generateSubTemplateString(generationContext, "java_getter"); } }
GenerationEngine { public String generateFieldGetterString(GenerationContext generationContext, ObjectProperty attribute) throws Exception { VelocityContext vc = buildContext(generationContext); vc.put("attr", attribute); return generateSubTemplateString(generationContext, "java_getter"); } static GenerationEngine get...
GenerationEngine { public String generateFieldGetterString(GenerationContext generationContext, ObjectProperty attribute) throws Exception { VelocityContext vc = buildContext(generationContext); vc.put("attr", attribute); return generateSubTemplateString(generationContext, "java_getter"); } static GenerationEngine get...
@Test public void testFieldMutatorStringGeneration() { DataModel dataModel = dataModelOracleDriver.createModel(); DataObject object = dataModel.addDataObject("com.test.Object1"); ObjectProperty property = object.addProperty("attribute1", "java.lang.String"); GenerationContext generationContext = new GenerationContext( ...
public String generateFieldSetterString(GenerationContext generationContext, ObjectProperty attribute) throws Exception { VelocityContext vc = buildContext(generationContext); vc.put("attr", attribute); return generateSubTemplateString(generationContext, "java_setter"); }
GenerationEngine { public String generateFieldSetterString(GenerationContext generationContext, ObjectProperty attribute) throws Exception { VelocityContext vc = buildContext(generationContext); vc.put("attr", attribute); return generateSubTemplateString(generationContext, "java_setter"); } }
GenerationEngine { public String generateFieldSetterString(GenerationContext generationContext, ObjectProperty attribute) throws Exception { VelocityContext vc = buildContext(generationContext); vc.put("attr", attribute); return generateSubTemplateString(generationContext, "java_setter"); } }
GenerationEngine { public String generateFieldSetterString(GenerationContext generationContext, ObjectProperty attribute) throws Exception { VelocityContext vc = buildContext(generationContext); vc.put("attr", attribute); return generateSubTemplateString(generationContext, "java_setter"); } static GenerationEngine get...
GenerationEngine { public String generateFieldSetterString(GenerationContext generationContext, ObjectProperty attribute) throws Exception { VelocityContext vc = buildContext(generationContext); vc.put("attr", attribute); return generateSubTemplateString(generationContext, "java_setter"); } static GenerationEngine get...
@Test public void testEqualsStringGeneration() { DataModel dataModel = dataModelOracleDriver.createModel(); DataObject object1 = dataModel.addDataObject("com.test.Object1"); DataObject object2 = dataModel.addDataObject("com.test.sub.Object2"); ObjectPropertyImpl prop1 = (ObjectPropertyImpl) object1.addProperty("attribu...
public String generateEqualsString(GenerationContext generationContext, DataObject dataObject, String indent) throws Exception { return indentLines( generateEqualsString( generationContext, dataObject ), indent ); }
GenerationEngine { public String generateEqualsString(GenerationContext generationContext, DataObject dataObject, String indent) throws Exception { return indentLines( generateEqualsString( generationContext, dataObject ), indent ); } }
GenerationEngine { public String generateEqualsString(GenerationContext generationContext, DataObject dataObject, String indent) throws Exception { return indentLines( generateEqualsString( generationContext, dataObject ), indent ); } }
GenerationEngine { public String generateEqualsString(GenerationContext generationContext, DataObject dataObject, String indent) throws Exception { return indentLines( generateEqualsString( generationContext, dataObject ), indent ); } static GenerationEngine getInstance(); void generate(GenerationContext generationCon...
GenerationEngine { public String generateEqualsString(GenerationContext generationContext, DataObject dataObject, String indent) throws Exception { return indentLines( generateEqualsString( generationContext, dataObject ), indent ); } static GenerationEngine getInstance(); void generate(GenerationContext generationCon...
@Test public void testHashCodeStringGeneration() { DataModel dataModel = dataModelOracleDriver.createModel(); DataObject object1 = dataModel.addDataObject("com.test.Object1"); DataObject object2 = dataModel.addDataObject("com.test.sub.Object2"); ObjectProperty prop1 = object1.addProperty("attribute1", "java.lang.String...
public String generateHashCodeString(GenerationContext generationContext, DataObject dataObject, String indent) throws Exception { return indentLines( generateHashCodeString( generationContext, dataObject ), indent ); }
GenerationEngine { public String generateHashCodeString(GenerationContext generationContext, DataObject dataObject, String indent) throws Exception { return indentLines( generateHashCodeString( generationContext, dataObject ), indent ); } }
GenerationEngine { public String generateHashCodeString(GenerationContext generationContext, DataObject dataObject, String indent) throws Exception { return indentLines( generateHashCodeString( generationContext, dataObject ), indent ); } }
GenerationEngine { public String generateHashCodeString(GenerationContext generationContext, DataObject dataObject, String indent) throws Exception { return indentLines( generateHashCodeString( generationContext, dataObject ), indent ); } static GenerationEngine getInstance(); void generate(GenerationContext generatio...
GenerationEngine { public String generateHashCodeString(GenerationContext generationContext, DataObject dataObject, String indent) throws Exception { return indentLines( generateHashCodeString( generationContext, dataObject ), indent ); } static GenerationEngine getInstance(); void generate(GenerationContext generatio...
@Test public void testJavaClassStringGeneration() { DataModel dataModel = dataModelOracleDriver.createModel(); DataObject object1 = dataModel.addDataObject("com.test.Object1"); DataObject object2 = dataModel.addDataObject("com.test.sub.Object2"); Annotation label = new AnnotationImpl( annotationDefinitions.get( org.kie...
public String generateJavaClassString(GenerationContext generationContext, DataObject dataObject) throws Exception { VelocityContext vc = buildContext(generationContext); vc.put("currentDataObject", dataObject); return generateSubTemplateString(generationContext, "java_class2"); }
GenerationEngine { public String generateJavaClassString(GenerationContext generationContext, DataObject dataObject) throws Exception { VelocityContext vc = buildContext(generationContext); vc.put("currentDataObject", dataObject); return generateSubTemplateString(generationContext, "java_class2"); } }
GenerationEngine { public String generateJavaClassString(GenerationContext generationContext, DataObject dataObject) throws Exception { VelocityContext vc = buildContext(generationContext); vc.put("currentDataObject", dataObject); return generateSubTemplateString(generationContext, "java_class2"); } }
GenerationEngine { public String generateJavaClassString(GenerationContext generationContext, DataObject dataObject) throws Exception { VelocityContext vc = buildContext(generationContext); vc.put("currentDataObject", dataObject); return generateSubTemplateString(generationContext, "java_class2"); } static GenerationE...
GenerationEngine { public String generateJavaClassString(GenerationContext generationContext, DataObject dataObject) throws Exception { VelocityContext vc = buildContext(generationContext); vc.put("currentDataObject", dataObject); return generateSubTemplateString(generationContext, "java_class2"); } static GenerationE...
@Test public void testGetAssetType() { Path path = mock(Path.class); String fileName = "file."; when(path.getFileName()).thenReturn(fileName + RESOURCE_TYPE); String resourceType = displayer.getAssetType(path); assertEquals(RESOURCE_TYPE, resourceType); when(path.getFileName()).thenReturn(fileName + "fail"); resourceTy...
@Override public String getAssetType(Path path) { String extension = ""; String fileName = path.getFileName(); if (fileName.contains(".")) { extension = fileName.substring(fileName.lastIndexOf(".") + 1); } ResourceTypeDefinition typeDefinition = existingResourceTypes.get(extension); if (typeDefinition != null) { return...
ShowAssetUsagesDisplayer implements ShowAssetUsagesDisplayerView.Presenter { @Override public String getAssetType(Path path) { String extension = ""; String fileName = path.getFileName(); if (fileName.contains(".")) { extension = fileName.substring(fileName.lastIndexOf(".") + 1); } ResourceTypeDefinition typeDefinition...
ShowAssetUsagesDisplayer implements ShowAssetUsagesDisplayerView.Presenter { @Override public String getAssetType(Path path) { String extension = ""; String fileName = path.getFileName(); if (fileName.contains(".")) { extension = fileName.substring(fileName.lastIndexOf(".") + 1); } ResourceTypeDefinition typeDefinition...
ShowAssetUsagesDisplayer implements ShowAssetUsagesDisplayerView.Presenter { @Override public String getAssetType(Path path) { String extension = ""; String fileName = path.getFileName(); if (fileName.contains(".")) { extension = fileName.substring(fileName.lastIndexOf(".") + 1); } ResourceTypeDefinition typeDefinition...
ShowAssetUsagesDisplayer implements ShowAssetUsagesDisplayerView.Presenter { @Override public String getAssetType(Path path) { String extension = ""; String fileName = path.getFileName(); if (fileName.contains(".")) { extension = fileName.substring(fileName.lastIndexOf(".") + 1); } ResourceTypeDefinition typeDefinition...
@Test public void testGetPrefixedId() { assertEquals("1111#2222", getPrefixedId("1111", "2222")); assertEquals("2222", getPrefixedId("", "2222")); assertEquals("2222", getPrefixedId(null, "2222")); }
public static String getPrefixedId(final String prefixId, final String rawId) { return Stream.of(prefixId, rawId) .filter(s -> !isEmpty(s)) .collect(Collectors.joining(SEPARATOR_DELIMITER)); }
IdUtils { public static String getPrefixedId(final String prefixId, final String rawId) { return Stream.of(prefixId, rawId) .filter(s -> !isEmpty(s)) .collect(Collectors.joining(SEPARATOR_DELIMITER)); } }
IdUtils { public static String getPrefixedId(final String prefixId, final String rawId) { return Stream.of(prefixId, rawId) .filter(s -> !isEmpty(s)) .collect(Collectors.joining(SEPARATOR_DELIMITER)); } }
IdUtils { public static String getPrefixedId(final String prefixId, final String rawId) { return Stream.of(prefixId, rawId) .filter(s -> !isEmpty(s)) .collect(Collectors.joining(SEPARATOR_DELIMITER)); } static String getPrefixedId(final String prefixId, final String rawId); stati...
IdUtils { public static String getPrefixedId(final String prefixId, final String rawId) { return Stream.of(prefixId, rawId) .filter(s -> !isEmpty(s)) .collect(Collectors.joining(SEPARATOR_DELIMITER)); } static String getPrefixedId(final String prefixId, final String rawId); stati...
@Test public void testShowAssetUsagesWithoutResponse() { displayer.showAssetUsages(currentAssetPath, RESOURCE_FQN, ResourceType.JAVA, okCommand, cancelCommand); verify(translationService).format(anyString(), anyString()); verify(view).getDefaultMessageContainer(); verify(htmlElement).setInnerHTML(anyString()); verify(a...
public void showAssetUsages(final Path path, final String resourceFQN, final ResourceType resourceType, final Command okCommand, final Command cancelCommand) { showAssetUsages(translationService.format(RefactoringConstants.ShowAssetUsagesDisplayerViewViewImplAssetUsages, resourceFQN), path, resourceFQN, resourceType, o...
ShowAssetUsagesDisplayer implements ShowAssetUsagesDisplayerView.Presenter { public void showAssetUsages(final Path path, final String resourceFQN, final ResourceType resourceType, final Command okCommand, final Command cancelCommand) { showAssetUsages(translationService.format(RefactoringConstants.ShowAssetUsagesDispl...
ShowAssetUsagesDisplayer implements ShowAssetUsagesDisplayerView.Presenter { public void showAssetUsages(final Path path, final String resourceFQN, final ResourceType resourceType, final Command okCommand, final Command cancelCommand) { showAssetUsages(translationService.format(RefactoringConstants.ShowAssetUsagesDispl...
ShowAssetUsagesDisplayer implements ShowAssetUsagesDisplayerView.Presenter { public void showAssetUsages(final Path path, final String resourceFQN, final ResourceType resourceType, final Command okCommand, final Command cancelCommand) { showAssetUsages(translationService.format(RefactoringConstants.ShowAssetUsagesDispl...
ShowAssetUsagesDisplayer implements ShowAssetUsagesDisplayerView.Presenter { public void showAssetUsages(final Path path, final String resourceFQN, final ResourceType resourceType, final Command okCommand, final Command cancelCommand) { showAssetUsages(translationService.format(RefactoringConstants.ShowAssetUsagesDispl...
@Test public void testShowAssetPartUsagesWithoutResponse() { displayer.showAssetPartUsages(currentAssetPath, RESOURCE_FQN, RESOURCE_PART, PartType.FIELD, okCommand, cancelCommand); verify(translationService).format(anyString(), anyString()); verify(view).getDefaultMessageContainer(); verify(htmlElement).setInnerHTML(an...
public void showAssetPartUsages(Path path, String resourceFQN, String resourcePart, PartType partType, Command okCommand, Command cancelCommand) { showAssetPartUsages(translationService.format(RefactoringConstants.ShowAssetUsagesDisplayerViewViewImplPartUsages, resourcePart), path, resourceFQN, resourcePart, partType, ...
ShowAssetUsagesDisplayer implements ShowAssetUsagesDisplayerView.Presenter { public void showAssetPartUsages(Path path, String resourceFQN, String resourcePart, PartType partType, Command okCommand, Command cancelCommand) { showAssetPartUsages(translationService.format(RefactoringConstants.ShowAssetUsagesDisplayerViewV...
ShowAssetUsagesDisplayer implements ShowAssetUsagesDisplayerView.Presenter { public void showAssetPartUsages(Path path, String resourceFQN, String resourcePart, PartType partType, Command okCommand, Command cancelCommand) { showAssetPartUsages(translationService.format(RefactoringConstants.ShowAssetUsagesDisplayerViewV...
ShowAssetUsagesDisplayer implements ShowAssetUsagesDisplayerView.Presenter { public void showAssetPartUsages(Path path, String resourceFQN, String resourcePart, PartType partType, Command okCommand, Command cancelCommand) { showAssetPartUsages(translationService.format(RefactoringConstants.ShowAssetUsagesDisplayerViewV...
ShowAssetUsagesDisplayer implements ShowAssetUsagesDisplayerView.Presenter { public void showAssetPartUsages(Path path, String resourceFQN, String resourcePart, PartType partType, Command okCommand, Command cancelCommand) { showAssetPartUsages(translationService.format(RefactoringConstants.ShowAssetUsagesDisplayerViewV...
@Test(expected = IllegalArgumentException.class) public void nullPath() { fileLoader.loadPaths(null, "test"); }
public List<Path> loadPaths(final Path path, final String suffix) { PortablePreconditions.checkNotNull("path", path); PortablePreconditions.checkNotNull("suffix", suffix); org.uberfire.java.nio.file.Path nioPath = Paths.convert(path); final List<Path> items = new ArrayList<>(); if (!Files.exists(nioPath)) { return item...
FileLoader { public List<Path> loadPaths(final Path path, final String suffix) { PortablePreconditions.checkNotNull("path", path); PortablePreconditions.checkNotNull("suffix", suffix); org.uberfire.java.nio.file.Path nioPath = Paths.convert(path); final List<Path> items = new ArrayList<>(); if (!Files.exists(nioPath)) ...
FileLoader { public List<Path> loadPaths(final Path path, final String suffix) { PortablePreconditions.checkNotNull("path", path); PortablePreconditions.checkNotNull("suffix", suffix); org.uberfire.java.nio.file.Path nioPath = Paths.convert(path); final List<Path> items = new ArrayList<>(); if (!Files.exists(nioPath)) ...
FileLoader { public List<Path> loadPaths(final Path path, final String suffix) { PortablePreconditions.checkNotNull("path", path); PortablePreconditions.checkNotNull("suffix", suffix); org.uberfire.java.nio.file.Path nioPath = Paths.convert(path); final List<Path> items = new ArrayList<>(); if (!Files.exists(nioPath)) ...
FileLoader { public List<Path> loadPaths(final Path path, final String suffix) { PortablePreconditions.checkNotNull("path", path); PortablePreconditions.checkNotNull("suffix", suffix); org.uberfire.java.nio.file.Path nioPath = Paths.convert(path); final List<Path> items = new ArrayList<>(); if (!Files.exists(nioPath)) ...