private Family getFamily(URL registryBase, String familyName) throws RegistryException { return getRegistry(registryBase).getComponentFamily(familyName); }
private Family getFamily(URL registryBase, String familyName) throws RegistryException { return getRegistry(registryBase).getComponentFamily(familyName); }
private Component getComponent(URL registryBase, String familyName, String componentName) throws RegistryException { return getRegistry(registryBase).getComponentFamily(familyName) .getComponent(componentName); }
if (chosenRegistry.getComponentFamily(newName) != null) { showMessageDialog(null, newName + " is already used", "Duplicate component family name", ERROR_MESSAGE);
private Component getComponent(URL registryBase, String familyName, String componentName) throws RegistryException { return getRegistry(registryBase).getComponentFamily(familyName) .getComponent(componentName); }
private Version getVersion(URL registryBase, String familyName, String componentName, Integer componentVersion) throws RegistryException { return getRegistry(registryBase).getComponentFamily(familyName) .getComponent(componentName) .getComponentVersion(componentVersion); }
private Version getVersion(URL registryBase, String familyName, String componentName, Integer componentVersion) throws RegistryException { return getRegistry(registryBase).getComponentFamily(familyName) .getComponent(componentName) .getComponentVersion(componentVersion); }
@Test public void testGetComponentFamily() throws Exception { assertNull(componentRegistry.getComponentFamily("TestComponentFamily")); assertNull(componentRegistry.getComponentFamily("TestComponentFamily")); Family componentFamily = componentRegistry.createComponentFamily( "TestComponentFamily", componentProfile, "Some description", null, null); assertNotNull(componentRegistry .getComponentFamily("TestComponentFamily")); assertNotNull(componentRegistry .getComponentFamily("TestComponentFamily")); assertEquals(componentFamily, componentRegistry.getComponentFamily("TestComponentFamily")); componentRegistry.removeComponentFamily(componentFamily); assertNull(componentRegistry.getComponentFamily("TestComponentFamily")); }
@Test public void testGetComponentFamily() throws Exception { assertNull(componentRegistry.getComponentFamily("TestComponentFamily")); assertNull(componentRegistry.getComponentFamily("TestComponentFamily")); Family componentFamily = componentRegistry.createComponentFamily( "TestComponentFamily", componentProfile, "Some description", null, null); assertNotNull(componentRegistry .getComponentFamily("TestComponentFamily")); assertNotNull(componentRegistry .getComponentFamily("TestComponentFamily")); assertEquals(componentFamily, componentRegistry.getComponentFamily("TestComponentFamily")); componentRegistry.removeComponentFamily(componentFamily); assertNull(componentRegistry.getComponentFamily("TestComponentFamily")); }
private Profile getComponentProfile() { Object dataflowSource = fileManager.getDataflowSource(fileManager .getCurrentDataflow()); if (dataflowSource instanceof Version.ID) { Version.ID identification = (Version.ID) dataflowSource; try { Registry componentRegistry = calculateRegistry(identification .getRegistryBase()); Family componentFamily = componentRegistry .getComponentFamily(identification.getFamilyName()); return componentFamily.getComponentProfile(); } catch (RegistryException e) { logger.warn( format("No component profile found for component family %s at component registry %s", identification.getFamilyName(), identification.getRegistryBase()), e); } } return null; }
private Profile getComponentProfile() { Object dataflowSource = fileManager.getDataflowSource(fileManager .getCurrentDataflow()); if (dataflowSource instanceof Version.ID) { Version.ID identification = (Version.ID) dataflowSource; try { Registry componentRegistry = calculateRegistry(identification .getRegistryBase()); Family componentFamily = componentRegistry .getComponentFamily(identification.getFamilyName()); return componentFamily.getComponentProfile(); } catch (RegistryException e) { logger.warn( format("No component profile found for component family %s at component registry %s", identification.getFamilyName(), identification.getRegistryBase()), e); } } return null; }
@Test public void testRemoveComponentFamily() throws Exception { assertEquals(0, componentRegistry.getComponentFamilies().size()); assertNull(componentRegistry.getComponentFamily("TestComponentFamily")); Family componentFamily = componentRegistry.createComponentFamily( "TestComponentFamily", componentProfile, "Some description", null, null); assertEquals(1, componentRegistry.getComponentFamilies().size()); assertNotNull(componentRegistry .getComponentFamily("TestComponentFamily")); assertEquals(componentFamily, componentRegistry.getComponentFamily("TestComponentFamily")); componentRegistry.removeComponentFamily(componentFamily); assertEquals(0, componentRegistry.getComponentFamilies().size()); assertNull(componentRegistry.getComponentFamily("TestComponentFamily")); }
@Test public void testRemoveComponentFamily() throws Exception { assertEquals(0, componentRegistry.getComponentFamilies().size()); assertNull(componentRegistry.getComponentFamily("TestComponentFamily")); Family componentFamily = componentRegistry.createComponentFamily( "TestComponentFamily", componentProfile, "Some description", null, null); assertEquals(1, componentRegistry.getComponentFamilies().size()); assertNotNull(componentRegistry .getComponentFamily("TestComponentFamily")); assertEquals(componentFamily, componentRegistry.getComponentFamily("TestComponentFamily")); componentRegistry.removeComponentFamily(componentFamily); assertEquals(0, componentRegistry.getComponentFamilies().size()); assertNull(componentRegistry.getComponentFamily("TestComponentFamily")); }
try { Registry registry = calculateRegistry(ident.getRegistryBase()); family = registry.getComponentFamily(ident.getFamilyName()); } catch (RegistryException e1) { throw new SaveException("Unable to read component", e1);
@Test public void testCreateComponentFamily() throws Exception { assertEquals(0, componentRegistry.getComponentFamilies().size()); assertNull(componentRegistry.getComponentFamily("TestComponentFamily")); Family componentFamily = componentRegistry.createComponentFamily( "TestComponentFamily", componentProfile, "Some description", null, null); assertEquals("TestComponentFamily", componentFamily.getName()); assertEquals(componentRegistry, componentFamily.getComponentRegistry()); assertEquals(0, componentFamily.getComponents().size()); // assertEquals(componentProfile, // componentFamily.getComponentProfile()); assertEquals(1, componentRegistry.getComponentFamilies().size()); assertNotNull(componentRegistry .getComponentFamily("TestComponentFamily")); assertEquals(componentFamily, componentRegistry.getComponentFamily("TestComponentFamily")); }
@Test public void testCreateComponentFamily() throws Exception { assertEquals(0, componentRegistry.getComponentFamilies().size()); assertNull(componentRegistry.getComponentFamily("TestComponentFamily")); Family componentFamily = componentRegistry.createComponentFamily( "TestComponentFamily", componentProfile, "Some description", null, null); assertEquals("TestComponentFamily", componentFamily.getName()); assertEquals(componentRegistry, componentFamily.getComponentRegistry()); assertEquals(0, componentFamily.getComponents().size()); // assertEquals(componentProfile, // componentFamily.getComponentProfile()); assertEquals(1, componentRegistry.getComponentFamilies().size()); assertNotNull(componentRegistry .getComponentFamily("TestComponentFamily")); assertEquals(componentFamily, componentRegistry.getComponentFamily("TestComponentFamily")); }