Search in sources :

Example 11 with RuntimeChangeEvent

use of org.guvnor.ala.ui.events.RuntimeChangeEvent in project kie-wb-common by kiegroup.

the class RuntimeServiceImpl method deleteRuntime.

@Override
public void deleteRuntime(final RuntimeKey runtimeKey, final boolean forced) {
    checkNotNull("runtimeKey", runtimeKey);
    runtimeProvisioningService.destroyRuntime(runtimeKey.getId(), forced);
    runtimeChangeEvent.fire(new RuntimeChangeEvent(RuntimeChange.DELETED, runtimeKey));
}
Also used : RuntimeChangeEvent(org.guvnor.ala.ui.events.RuntimeChangeEvent)

Example 12 with RuntimeChangeEvent

use of org.guvnor.ala.ui.events.RuntimeChangeEvent in project kie-wb-common by kiegroup.

the class RuntimeServiceImplTest method testDeleteRuntime.

private void testDeleteRuntime(boolean forced) {
    ProviderKey providerKey = mock(ProviderKey.class);
    RuntimeKey runtimeKey = new RuntimeKey(providerKey, RUNTIME_ID);
    service.deleteRuntime(runtimeKey, forced);
    verify(runtimeProvisioningService, times(1)).destroyRuntime(RUNTIME_ID, forced);
    verify(runtimeChangeEvent, times(1)).fire(new RuntimeChangeEvent(RuntimeChange.DELETED, runtimeKey));
}
Also used : ProviderKey(org.guvnor.ala.ui.model.ProviderKey) RuntimeKey(org.guvnor.ala.ui.model.RuntimeKey) RuntimeChangeEvent(org.guvnor.ala.ui.events.RuntimeChangeEvent)

Aggregations

RuntimeChangeEvent (org.guvnor.ala.ui.events.RuntimeChangeEvent)12 RuntimeKey (org.guvnor.ala.ui.model.RuntimeKey)9 Test (org.junit.Test)8 ProviderKey (org.guvnor.ala.ui.model.ProviderKey)3 ProviderSelectedEvent (org.guvnor.ala.ui.client.events.ProviderSelectedEvent)2