@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().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().toURI()); } } RuleNameServiceImpl(); @Inject  RuleNameServiceImpl(final RefactoringQueryService queryService,
                               final KieModuleService moduleService); }
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().toURI()); } } RuleNameServiceImpl(); @Inject  RuleNameServiceImpl(final RefactoringQueryService queryService,
                               final KieModuleService moduleService); @Override Collection<String> getRuleNames(final Path path,
                                           final String packageName); }
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().toURI()); } } RuleNameServiceImpl(); @Inject  RuleNameServiceImpl(final RefactoringQueryService queryService,
                               final KieModuleService moduleService); @Override Collection<String> getRuleNames(final Path path,
                                           final String packageName);  }