Search in sources :

Example 26 with ExampleRepository

use of org.kie.workbench.common.screens.examples.model.ExampleRepository in project kie-wb-common by kiegroup.

the class ExamplesServiceImplTest method testGetProjects_NullRepositoryUrl.

@Test
public void testGetProjects_NullRepositoryUrl() {
    final Set<ExampleProject> modules = service.getProjects(new ExampleRepository(null));
    assertNotNull(modules);
    assertEquals(0, modules.size());
}
Also used : ExampleRepository(org.kie.workbench.common.screens.examples.model.ExampleRepository) ExampleProject(org.kie.workbench.common.screens.examples.model.ExampleProject) Test(org.junit.Test)

Example 27 with ExampleRepository

use of org.kie.workbench.common.screens.examples.model.ExampleRepository in project kie-wb-common by kiegroup.

the class ExamplesWizard method start.

@Override
public void start() {
    for (WizardPage page : pages) {
        page.initialise();
        ((ExamplesWizardPage) page).setModel(model);
    }
    examplesService.call(new RemoteCallback<ExamplesMetaData>() {

        @Override
        public void callback(final ExamplesMetaData metaData) {
            final ExampleRepository repository = metaData.getRepository();
            sourceRepositoryPage.setPlaygroundRepository(repository);
            ExamplesWizard.super.start();
        }
    }).getMetaData();
}
Also used : ExamplesWizardPage(org.kie.workbench.common.screens.examples.client.wizard.pages.ExamplesWizardPage) ExampleRepository(org.kie.workbench.common.screens.examples.model.ExampleRepository) WizardPage(org.uberfire.ext.widgets.core.client.wizards.WizardPage) ExamplesWizardPage(org.kie.workbench.common.screens.examples.client.wizard.pages.ExamplesWizardPage) ExamplesMetaData(org.kie.workbench.common.screens.examples.model.ExamplesMetaData) RemoteCallback(org.jboss.errai.common.client.api.RemoteCallback)

Aggregations

ExampleRepository (org.kie.workbench.common.screens.examples.model.ExampleRepository)27 Test (org.junit.Test)19 ExampleProject (org.kie.workbench.common.screens.examples.model.ExampleProject)11 GitRepository (org.guvnor.structure.repositories.impl.git.GitRepository)6 ConfigGroup (org.guvnor.structure.server.config.ConfigGroup)6 Module (org.guvnor.common.services.project.model.Module)4 Branch (org.guvnor.structure.repositories.Branch)3 Repository (org.guvnor.structure.repositories.Repository)3 KieModule (org.kie.workbench.common.services.shared.project.KieModule)3 Path (org.uberfire.backend.vfs.Path)3 HashSet (java.util.HashSet)2 ConfigType (org.guvnor.structure.server.config.ConfigType)2 File (java.io.File)1 FileOutputStream (java.io.FileOutputStream)1 URL (java.net.URL)1 HashMap (java.util.HashMap)1 ZipEntry (java.util.zip.ZipEntry)1 ZipInputStream (java.util.zip.ZipInputStream)1 PostConstruct (javax.annotation.PostConstruct)1 Git (org.eclipse.jgit.api.Git)1