當前位置: 首頁>>代碼示例>>Java>>正文


Java KieModuleService.resolveModule方法代碼示例

本文整理匯總了Java中org.kie.workbench.common.services.shared.project.KieModuleService.resolveModule方法的典型用法代碼示例。如果您正苦於以下問題:Java KieModuleService.resolveModule方法的具體用法?Java KieModuleService.resolveModule怎麽用?Java KieModuleService.resolveModule使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在org.kie.workbench.common.services.shared.project.KieModuleService的用法示例。


在下文中一共展示了KieModuleService.resolveModule方法的13個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: testResolveModuleWithRootPath

import org.kie.workbench.common.services.shared.project.KieModuleService; //導入方法依賴的package包/類
@Test
public void testResolveModuleWithRootPath() throws Exception {

    final Bean moduleServiceBean = (Bean) beanManager.getBeans(KieModuleService.class).iterator().next();
    final CreationalContext cc = beanManager.createCreationalContext(moduleServiceBean);
    final KieModuleService moduleService = (KieModuleService) beanManager.getReference(moduleServiceBean,
                                                                                       KieModuleService.class,
                                                                                       cc);

    final URL rootUrl = this.getClass().getResource("/ModuleBackendTestModuleStructureInvalidNoKModule");
    final org.uberfire.java.nio.file.Path nioRootPath = fs.getPath(rootUrl.toURI());
    final Path rootPath = paths.convert(nioRootPath);

    //Test a non-Module Path resolves to null
    final Module result = moduleService.resolveModule(rootPath);
    assertNull(result);
}
 
開發者ID:kiegroup,項目名稱:kie-wb-common,代碼行數:18,代碼來源:ModuleServiceImplResolveModuleInvalidNoKModuleTest.java

示例2: testResolveModuleWithChildPath

import org.kie.workbench.common.services.shared.project.KieModuleService; //導入方法依賴的package包/類
@Test
public void testResolveModuleWithChildPath() throws Exception {

    final Bean moduleServiceBean = (Bean) beanManager.getBeans(KieModuleService.class).iterator().next();
    final CreationalContext cc = beanManager.createCreationalContext(moduleServiceBean);
    final KieModuleService moduleService = (KieModuleService) beanManager.getReference(moduleServiceBean,
                                                                                       KieModuleService.class,
                                                                                       cc);

    final URL rootUrl = this.getClass().getResource("/ModuleBackendTestModuleStructureInvalidNoKModule");
    final org.uberfire.java.nio.file.Path nioRootPath = fs.getPath(rootUrl.toURI());
    final Path rootPath = paths.convert(nioRootPath);

    final URL testUrl = this.getClass().getResource("/ModuleBackendTestModuleStructureInvalidNoKModule/src");
    final org.uberfire.java.nio.file.Path nioTestPath = fs.getPath(testUrl.toURI());
    final Path testPath = paths.convert(nioTestPath);

    //Test a non-Module Path resolves to null
    final Module result = moduleService.resolveModule(testPath);
    assertNull(result);
}
 
開發者ID:kiegroup,項目名稱:kie-wb-common,代碼行數:22,代碼來源:ModuleServiceImplResolveModuleInvalidNoKModuleTest.java

示例3: testResolveModuleWithJavaFile

import org.kie.workbench.common.services.shared.project.KieModuleService; //導入方法依賴的package包/類
@Test
public void testResolveModuleWithJavaFile() throws Exception {

    final Bean moduleServiceBean = (Bean) beanManager.getBeans(KieModuleService.class).iterator().next();
    final CreationalContext cc = beanManager.createCreationalContext(moduleServiceBean);
    final KieModuleService moduleService = (KieModuleService) beanManager.getReference(moduleServiceBean,
                                                                                       KieModuleService.class,
                                                                                       cc);

    final URL rootUrl = this.getClass().getResource("/ModuleBackendTestModuleStructureInvalidNoKModule");
    final org.uberfire.java.nio.file.Path nioRootPath = fs.getPath(rootUrl.toURI());
    final Path rootPath = paths.convert(nioRootPath);

    final URL testUrl = this.getClass().getResource("/ModuleBackendTestModuleStructureInvalidNoKModule/src/main/java/org/kie/test/Bean.java");
    final org.uberfire.java.nio.file.Path nioTestPath = fs.getPath(testUrl.toURI());
    final Path testPath = paths.convert(nioTestPath);

    //Test a non-Module Path resolves to null
    final Module result = moduleService.resolveModule(testPath);
    assertNull(result);
}
 
開發者ID:kiegroup,項目名稱:kie-wb-common,代碼行數:22,代碼來源:ModuleServiceImplResolveModuleInvalidNoKModuleTest.java

示例4: testResolveModuleWithResourcesFile

import org.kie.workbench.common.services.shared.project.KieModuleService; //導入方法依賴的package包/類
@Test
public void testResolveModuleWithResourcesFile() throws Exception {

    final Bean moduleServiceBean = (Bean) beanManager.getBeans(KieModuleService.class).iterator().next();
    final CreationalContext cc = beanManager.createCreationalContext(moduleServiceBean);
    final KieModuleService moduleService = (KieModuleService) beanManager.getReference(moduleServiceBean,
                                                                                       KieModuleService.class,
                                                                                       cc);

    final URL rootUrl = this.getClass().getResource("/ModuleBackendTestModuleStructureInvalidNoKModule");
    final org.uberfire.java.nio.file.Path nioRootPath = fs.getPath(rootUrl.toURI());
    final Path rootPath = paths.convert(nioRootPath);

    final URL testUrl = this.getClass().getResource("/ModuleBackendTestModuleStructureInvalidNoKModule/src/main/resources/rule1.drl");
    final org.uberfire.java.nio.file.Path nioTestPath = fs.getPath(testUrl.toURI());
    final Path testPath = paths.convert(nioTestPath);

    //Test a non-Module Path resolves to null
    final Module result = moduleService.resolveModule(testPath);
    assertNull(result);
}
 
開發者ID:kiegroup,項目名稱:kie-wb-common,代碼行數:22,代碼來源:ModuleServiceImplResolveModuleInvalidNoKModuleTest.java

示例5: testResolveModuleWithRootPath

import org.kie.workbench.common.services.shared.project.KieModuleService; //導入方法依賴的package包/類
@Test
public void testResolveModuleWithRootPath() throws Exception {

    final Bean moduleServiceBean = (Bean) beanManager.getBeans(KieModuleService.class).iterator().next();
    final CreationalContext cc = beanManager.createCreationalContext(moduleServiceBean);
    final KieModuleService moduleService = (KieModuleService) beanManager.getReference(moduleServiceBean,
                                                                                       KieModuleService.class,
                                                                                       cc);

    final URL rootUrl = this.getClass().getResource("/ModuleBackendTestModuleStructureValid");
    final org.uberfire.java.nio.file.Path nioRootPath = fs.getPath(rootUrl.toURI());
    final Path rootPath = paths.convert(nioRootPath);

    //Test a root resolves to the Module's root
    final Module result = moduleService.resolveModule(rootPath);
    assertEquals(rootPath.toURI(),
                 result.getRootPath().toURI());
}
 
開發者ID:kiegroup,項目名稱:kie-wb-common,代碼行數:19,代碼來源:ModuleImplResolveModuleValidTest.java

示例6: testResolveModuleWithChildPath

import org.kie.workbench.common.services.shared.project.KieModuleService; //導入方法依賴的package包/類
@Test
public void testResolveModuleWithChildPath() throws Exception {

    final Bean moduleServiceBean = (Bean) beanManager.getBeans(KieModuleService.class).iterator().next();
    final CreationalContext cc = beanManager.createCreationalContext(moduleServiceBean);
    final KieModuleService moduleService = (KieModuleService) beanManager.getReference(moduleServiceBean,
                                                                                       KieModuleService.class,
                                                                                       cc);

    final URL rootUrl = this.getClass().getResource("/ModuleBackendTestModuleStructureValid");
    final org.uberfire.java.nio.file.Path nioRootPath = fs.getPath(rootUrl.toURI());
    final Path rootPath = paths.convert(nioRootPath);

    final URL testUrl = this.getClass().getResource("/ModuleBackendTestModuleStructureValid/src");
    final org.uberfire.java.nio.file.Path nioTestPath = fs.getPath(testUrl.toURI());
    final Path testPath = paths.convert(nioTestPath);

    //Test a child folder resolves to the Module's root
    final Module result = moduleService.resolveModule(testPath);
    assertEquals(rootPath.toURI(),
                 result.getRootPath().toURI());
}
 
開發者ID:kiegroup,項目名稱:kie-wb-common,代碼行數:23,代碼來源:ModuleImplResolveModuleValidTest.java

示例7: testResolveModuleWithJavaFile

import org.kie.workbench.common.services.shared.project.KieModuleService; //導入方法依賴的package包/類
@Test
public void testResolveModuleWithJavaFile() throws Exception {

    final Bean moduleServiceBean = (Bean) beanManager.getBeans(KieModuleService.class).iterator().next();
    final CreationalContext cc = beanManager.createCreationalContext(moduleServiceBean);
    final KieModuleService moduleService = (KieModuleService) beanManager.getReference(moduleServiceBean,
                                                                                       KieModuleService.class,
                                                                                       cc);

    final URL rootUrl = this.getClass().getResource("/ModuleBackendTestModuleStructureValid");
    final org.uberfire.java.nio.file.Path nioRootPath = fs.getPath(rootUrl.toURI());
    final Path rootPath = paths.convert(nioRootPath);

    final URL testUrl = this.getClass().getResource("/ModuleBackendTestModuleStructureValid/src/main/java/org/kie/test/Bean.java");
    final org.uberfire.java.nio.file.Path nioTestPath = fs.getPath(testUrl.toURI());
    final Path testPath = paths.convert(nioTestPath);

    //Test a child folder resolves to the Module's root
    final Module result = moduleService.resolveModule(testPath);
    assertEquals(rootPath.toURI(),
                 result.getRootPath().toURI());
}
 
開發者ID:kiegroup,項目名稱:kie-wb-common,代碼行數:23,代碼來源:ModuleImplResolveModuleValidTest.java

示例8: testResolveModuleWithResourcesFile

import org.kie.workbench.common.services.shared.project.KieModuleService; //導入方法依賴的package包/類
@Test
public void testResolveModuleWithResourcesFile() throws Exception {

    final Bean moduleServiceBean = (Bean) beanManager.getBeans(KieModuleService.class).iterator().next();
    final CreationalContext cc = beanManager.createCreationalContext(moduleServiceBean);
    final KieModuleService moduleService = (KieModuleService) beanManager.getReference(moduleServiceBean,
                                                                                       KieModuleService.class,
                                                                                       cc);

    final URL rootUrl = this.getClass().getResource("/ModuleBackendTestModuleStructureValid");
    final org.uberfire.java.nio.file.Path nioRootPath = fs.getPath(rootUrl.toURI());
    final Path rootPath = paths.convert(nioRootPath);

    final URL testUrl = this.getClass().getResource("/ModuleBackendTestModuleStructureValid/src/main/resources/rule1.drl");
    final org.uberfire.java.nio.file.Path nioTestPath = fs.getPath(testUrl.toURI());
    final Path testPath = paths.convert(nioTestPath);

    //Test a child folder resolves to the Module's root
    final Module result = moduleService.resolveModule(testPath);
    assertEquals(rootPath.toURI(),
                 result.getRootPath().toURI());
}
 
開發者ID:kiegroup,項目名稱:kie-wb-common,代碼行數:23,代碼來源:ModuleImplResolveModuleValidTest.java

示例9: testResolveModuleWithGlobalFile

import org.kie.workbench.common.services.shared.project.KieModuleService; //導入方法依賴的package包/類
@Test
public void testResolveModuleWithGlobalFile() throws Exception {

    final Bean moduleServiceBean = (Bean) beanManager.getBeans(KieModuleService.class).iterator().next();
    final CreationalContext cc = beanManager.createCreationalContext(moduleServiceBean);
    final KieModuleService moduleService = (KieModuleService) beanManager.getReference(moduleServiceBean,
                                                                                       KieModuleService.class,
                                                                                       cc);

    final URL rootUrl = this.getClass().getResource("/ModuleBackendTestModuleStructureValid");
    final org.uberfire.java.nio.file.Path nioRootPath = fs.getPath(rootUrl.toURI());
    final Path rootPath = paths.convert(nioRootPath);

    final URL testUrl = this.getClass().getResource("/ModuleBackendTestModuleStructureValid/global/themes.json");
    final org.uberfire.java.nio.file.Path nioTestPath = fs.getPath(testUrl.toURI());
    final Path testPath = paths.convert(nioTestPath);

    //Test a child folder resolves to the Module's root
    final Module result = moduleService.resolveModule(testPath);
    assertEquals(rootPath.toURI(),
                 result.getRootPath().toURI());
}
 
開發者ID:kiegroup,項目名稱:kie-wb-common,代碼行數:23,代碼來源:ModuleImplResolveModuleValidTest.java

示例10: testResolveModuleWithRootPath

import org.kie.workbench.common.services.shared.project.KieModuleService; //導入方法依賴的package包/類
@Test
public void testResolveModuleWithRootPath() throws Exception {

    final Bean moduleServiceBean = (Bean) beanManager.getBeans(KieModuleService.class).iterator().next();
    final CreationalContext cc = beanManager.createCreationalContext(moduleServiceBean);
    final KieModuleService moduleService = (KieModuleService) beanManager.getReference(moduleServiceBean,
                                                                                       KieModuleService.class,
                                                                                       cc);

    final URL rootUrl = this.getClass().getResource("/ModuleBackendTestModuleStructureInvalidNoPOM");
    final org.uberfire.java.nio.file.Path nioRootPath = fs.getPath(rootUrl.toURI());
    final Path rootPath = paths.convert(nioRootPath);

    final Module result = moduleService.resolveModule(rootPath);
    assertEquals("org.kie.workbench.services", result.getPom().getGav().getGroupId());
}
 
開發者ID:kiegroup,項目名稱:kie-wb-common,代碼行數:17,代碼來源:ModuleServiceImplResolveModuleInvalidNoPOMTest.java

示例11: testResolveModuleWithChildPath

import org.kie.workbench.common.services.shared.project.KieModuleService; //導入方法依賴的package包/類
@Test
public void testResolveModuleWithChildPath() throws Exception {

    final Bean moduleServiceBean = (Bean) beanManager.getBeans(KieModuleService.class).iterator().next();
    final CreationalContext cc = beanManager.createCreationalContext(moduleServiceBean);
    final KieModuleService moduleService = (KieModuleService) beanManager.getReference(moduleServiceBean,
                                                                                       KieModuleService.class,
                                                                                       cc);

    final URL testUrl = this.getClass().getResource("/ModuleBackendTestModuleStructureInvalidNoPOM/src");
    final org.uberfire.java.nio.file.Path nioTestPath = fs.getPath(testUrl.toURI());
    final Path testPath = paths.convert(nioTestPath);

    final Module result = moduleService.resolveModule(testPath);
    assertEquals("org.kie.workbench.services", result.getPom().getGav().getGroupId());
}
 
開發者ID:kiegroup,項目名稱:kie-wb-common,代碼行數:17,代碼來源:ModuleServiceImplResolveModuleInvalidNoPOMTest.java

示例12: testResolveModuleWithJavaFile

import org.kie.workbench.common.services.shared.project.KieModuleService; //導入方法依賴的package包/類
@Test
public void testResolveModuleWithJavaFile() throws Exception {

    final Bean moduleServiceBean = (Bean) beanManager.getBeans(KieModuleService.class).iterator().next();
    final CreationalContext cc = beanManager.createCreationalContext(moduleServiceBean);
    final KieModuleService moduleService = (KieModuleService) beanManager.getReference(moduleServiceBean,
                                                                                       KieModuleService.class,
                                                                                       cc);

    final URL testUrl = this.getClass().getResource("/ModuleBackendTestModuleStructureInvalidNoPOM/src/main/java/org/kie/test/Bean.java");
    final org.uberfire.java.nio.file.Path nioTestPath = fs.getPath(testUrl.toURI());
    final Path testPath = paths.convert(nioTestPath);

    final Module result = moduleService.resolveModule(testPath);
    assertEquals("org.kie.workbench.services", result.getPom().getGav().getGroupId());
}
 
開發者ID:kiegroup,項目名稱:kie-wb-common,代碼行數:17,代碼來源:ModuleServiceImplResolveModuleInvalidNoPOMTest.java

示例13: testResolveModuleWithResourcesFile

import org.kie.workbench.common.services.shared.project.KieModuleService; //導入方法依賴的package包/類
@Test
public void testResolveModuleWithResourcesFile() throws Exception {

    final Bean moduleServiceBean = (Bean) beanManager.getBeans(KieModuleService.class).iterator().next();
    final CreationalContext cc = beanManager.createCreationalContext(moduleServiceBean);
    final KieModuleService moduleService = (KieModuleService) beanManager.getReference(moduleServiceBean,
                                                                                       KieModuleService.class,
                                                                                       cc);

    final URL testUrl = this.getClass().getResource("/ModuleBackendTestModuleStructureInvalidNoPOM/src/main/resources/rule1.drl");
    final org.uberfire.java.nio.file.Path nioTestPath = fs.getPath(testUrl.toURI());
    final Path testPath = paths.convert(nioTestPath);

    final Module result = moduleService.resolveModule(testPath);
    assertEquals("org.kie.workbench.services", result.getPom().getGav().getGroupId());
}
 
開發者ID:kiegroup,項目名稱:kie-wb-common,代碼行數:17,代碼來源:ModuleServiceImplResolveModuleInvalidNoPOMTest.java


注:本文中的org.kie.workbench.common.services.shared.project.KieModuleService.resolveModule方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。