@Override public void internalRemoveComponent(Component component) throws RegistryException { throw new RegistryException("Not yet implemented"); }
@Override public void delete() throws RegistryException { throw new RegistryException("deletion forbidden"); } }
@Override public void internalRemoveComponent(Component component) throws RegistryException { throw new RegistryException("Not yet implemented"); }
@Override public Set<Version.ID> searchForComponents(String prefixString, String text) throws RegistryException { throw new RegistryException("Local registries cannot be searched yet"); }
protected ComponentRegistry(File fileDir) throws RegistryException { try { this.registryBase = fileDir.toURI().toURL(); } catch (MalformedURLException e) { throw new RegistryException(e); } }
private static URL contentUrl(ComponentProfileType cpt) throws RegistryException { try { return new URL(cpt.getContentUri()); } catch (MalformedURLException e) { throw new RegistryException("bad profile location", e); } }
private static URL getLocationURL(Description cpd) throws RegistryException { try { return new URL(getElementString(cpd, LOCATION)); } catch (MalformedURLException e) { throw new RegistryException("bad profile location", e); } }
@Override protected final void internalRemoveComponent(Component component) throws RegistryException { File componentDir = new File(componentFamilyDir, component.getName()); try { deleteDirectory(componentDir); } catch (IOException e) { throw new RegistryException("Unable to delete component", e); } } }
private static URL contentUrl(ComponentProfileType cpt) throws RegistryException { try { return new URL(cpt.getContentUri()); } catch (MalformedURLException e) { throw new RegistryException("bad profile location", e); } }
private static URL getLocationURL(Description cpd) throws RegistryException { try { return new URL(getElementString(cpd, LOCATION)); } catch (MalformedURLException e) { throw new RegistryException("bad profile location", e); } }
public static JAXBElement<?> getElement(Description d, String name) throws RegistryException { for (Object o : d.getContent()) if (o instanceof JAXBElement) { JAXBElement<?> el = (JAXBElement<?>) o; if (el.getName().getLocalPart().equals(name)) return el; } throw new RegistryException("no " + name + " element"); }
public static JAXBElement<?> getElement(Description d, String name) throws RegistryException { for (Object o : d.getContent()) if (o instanceof JAXBElement) { JAXBElement<?> el = (JAXBElement<?>) o; if (el.getName().getLocalPart().equals(name)) return el; } throw new RegistryException("no " + name + " element"); }
private void checkClientCreated() throws RegistryException { if (client == null) { try { client = new Client(jaxbContext, super.getRegistryBase()); } catch (Exception e) { throw new RegistryException("Unable to access registry", e); } } }
public void deleteResource(String uri) throws RegistryException { try { ServerResponse response = myExperimentClient .doMyExperimentDELETE(uri); checkResponseCode(response); } catch (Exception e) { throw new RegistryException("Failed to delete " + uri, e); } }
public void deleteResource(String uri) throws RegistryException { try { ServerResponse response = myExperimentClient .doMyExperimentDELETE(uri); checkResponseCode(response); } catch (Exception e) { throw new RegistryException("Failed to delete " + uri, e); } }
public Element snapshotPack(String packUri) throws RegistryException { try { ServerResponse response = myExperimentClient.doMyExperimentPOST( packUri, "<snapshot/>"); checkResponseCode(response); return response.getResponseBody().getRootElement(); } catch (Exception e) { throw new RegistryException(e); } }
MyExperimentComponentRegistry(URL registryURL) throws RegistryException { super(registryURL); try { myExperimentClient = new MyExperimentClient(logger); myExperimentClient.setBaseURL(registryURL.toExternalForm()); myExperimentClient.doLogin(); } catch (Exception e) { throw new RegistryException("Unable to access registry", e); } }
public Element snapshotPack(String packUri) throws RegistryException { try { ServerResponse response = myExperimentClient.doMyExperimentPOST( packUri, "<snapshot/>"); checkResponseCode(response); return response.getResponseBody().getRootElement(); } catch (Exception e) { throw new RegistryException(e); } }
MyExperimentComponentRegistry(URL registryURL) throws RegistryException { super(registryURL); try { myExperimentClient = new MyExperimentClient(logger); myExperimentClient.setBaseURL(registryURL.toExternalForm()); myExperimentClient.doLogin(); } catch (Exception e) { throw new RegistryException("Unable to access registry", e); } }
public void tagResource(String tag, String resource) throws RegistryException { String taggingToSend = "<tagging><subject resource=\"" + resource + "\"/><label>" + tag + "</label></tagging>"; try { ServerResponse response = myExperimentClient.doMyExperimentPOST( getRegistryBaseString() + "/tagging.xml", taggingToSend); checkResponseCode(response); } catch (Exception e) { throw new RegistryException(e); } }