Search in sources :

Example 1 with ExamplesMetaData

use of org.kie.workbench.common.screens.examples.model.ExamplesMetaData 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)

Example 2 with ExamplesMetaData

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

the class ExamplesServiceImplTest method testGetMetaData.

@Test
public void testGetMetaData() {
    // Emulate @PostConstruct mechanism
    service.initPlaygroundRepository();
    final ExamplesMetaData metaData = service.getMetaData();
    assertNotNull(metaData);
    assertNotNull(metaData.getRepository());
    assertNotNull(metaData.getRepository().getUrl());
}
Also used : ExamplesMetaData(org.kie.workbench.common.screens.examples.model.ExamplesMetaData) Test(org.junit.Test)

Aggregations

ExamplesMetaData (org.kie.workbench.common.screens.examples.model.ExamplesMetaData)2 RemoteCallback (org.jboss.errai.common.client.api.RemoteCallback)1 Test (org.junit.Test)1 ExamplesWizardPage (org.kie.workbench.common.screens.examples.client.wizard.pages.ExamplesWizardPage)1 ExampleRepository (org.kie.workbench.common.screens.examples.model.ExampleRepository)1 WizardPage (org.uberfire.ext.widgets.core.client.wizards.WizardPage)1