@Test public void testGetServerInstances() { ServerInstanceKeyList found = runtimeManagementService.getServerInstances(serverTemplate.getId()); assertNotNull(found); assertEquals(0, found.getServerInstanceKeys().length); serverTemplate.addServerInstance(new ServerInstanceKey(serverTemplate.getId(), "test server","instanceId" , "http: specManagementService.saveServerTemplate(serverTemplate); found = runtimeManagementService.getServerInstances(serverTemplate.getId()); assertNotNull(found); assertEquals(1, found.getServerInstanceKeys().length); org.kie.server.controller.api.model.runtime.ServerInstanceKey server = found.getServerInstanceKeys()[0]; assertNotNull(server); assertEquals(serverTemplate.getId(), server.getServerTemplateId()); assertEquals("instanceId", server.getServerInstanceId()); assertEquals("test server", server.getServerName()); assertEquals("http: }
@Override public ServerInstanceKeyList getServerInstances(final String serverTemplateId) { ServerTemplate serverTemplate = getServerTemplate(serverTemplateId); return new ServerInstanceKeyList(serverTemplate.getServerInstanceKeys()); }
RuntimeManagementServiceImpl implements RuntimeManagementService { @Override public ServerInstanceKeyList getServerInstances(final String serverTemplateId) { ServerTemplate serverTemplate = getServerTemplate(serverTemplateId); return new ServerInstanceKeyList(serverTemplate.getServerInstanceKeys()); } }
RuntimeManagementServiceImpl implements RuntimeManagementService { @Override public ServerInstanceKeyList getServerInstances(final String serverTemplateId) { ServerTemplate serverTemplate = getServerTemplate(serverTemplateId); return new ServerInstanceKeyList(serverTemplate.getServerInstanceKeys()); }  }
RuntimeManagementServiceImpl implements RuntimeManagementService { @Override public ServerInstanceKeyList getServerInstances(final String serverTemplateId) { ServerTemplate serverTemplate = getServerTemplate(serverTemplateId); return new ServerInstanceKeyList(serverTemplate.getServerInstanceKeys()); }  @Override ServerInstanceKeyList getServerInstances(final String serverTemplateId); @Override ContainerList getContainers(final ServerTemplate serverTemplate,
                                       final ContainerSpec containerSpec); ContainerList getServerTemplateContainers(final String serverTemplateId,
                                                        final String containerSpecId); ContainerList getServerInstanceContainers(final String serverTemplateId,
                                                        final String serverInstanceId); @Override ContainerList getContainers(ServerInstanceKey serverInstanceKey); KieServerTemplateStorage getTemplateStorage(); void setTemplateStorage(KieServerTemplateStorage templateStorage); KieServerInstanceManager getKieServerInstanceManager(); void setKieServerInstanceManager(KieServerInstanceManager kieServerInstanceManager); }
RuntimeManagementServiceImpl implements RuntimeManagementService { @Override public ServerInstanceKeyList getServerInstances(final String serverTemplateId) { ServerTemplate serverTemplate = getServerTemplate(serverTemplateId); return new ServerInstanceKeyList(serverTemplate.getServerInstanceKeys()); }  @Override ServerInstanceKeyList getServerInstances(final String serverTemplateId); @Override ContainerList getContainers(final ServerTemplate serverTemplate,
                                       final ContainerSpec containerSpec); ContainerList getServerTemplateContainers(final String serverTemplateId,
                                                        final String containerSpecId); ContainerList getServerInstanceContainers(final String serverTemplateId,
                                                        final String serverInstanceId); @Override ContainerList getContainers(ServerInstanceKey serverInstanceKey); KieServerTemplateStorage getTemplateStorage(); void setTemplateStorage(KieServerTemplateStorage templateStorage); KieServerInstanceManager getKieServerInstanceManager(); void setKieServerInstanceManager(KieServerInstanceManager kieServerInstanceManager);  }