info.description = repository.getDescription(); info.location = repository.getLocation(); String value = repository.getProperties().get(IRepository.PROP_SYSTEM);
info.description = repository.getDescription(); info.location = repository.getLocation(); String value = repository.getProperties().get(IRepository.PROP_SYSTEM);
private void remember(IRepository<T> repository, String suffix) { boolean changed = false; Preferences node = getPreferences(); // Ensure we retrieved preferences if (node == null) return; node = node.node(getKey(repository.getLocation())); try { changed |= putValue(node, KEY_URI, repository.getLocation().toString()); changed |= putValue(node, KEY_URL, null); changed |= putValue(node, KEY_DESCRIPTION, repository.getDescription()); changed |= putValue(node, KEY_NAME, repository.getName()); changed |= putValue(node, KEY_PROVIDER, repository.getProvider()); changed |= putValue(node, KEY_TYPE, repository.getType()); changed |= putValue(node, KEY_VERSION, repository.getVersion()); //allow repository manager to define system property if it is undefined in the repository itself String value = repository.getProperties().get(IRepository.PROP_SYSTEM); if (value != null) changed |= putValue(node, KEY_SYSTEM, value); changed |= putValue(node, KEY_SUFFIX, suffix); if (changed) saveToPreferences(); } catch (IllegalStateException e) { //the repository was removed concurrently, so we don't need to save it } }
private void remember(IRepository<T> repository, String suffix) { boolean changed = false; Preferences node = getPreferences(); // Ensure we retrieved preferences if (node == null) return; node = node.node(getKey(repository.getLocation())); try { changed |= putValue(node, KEY_URI, repository.getLocation().toString()); changed |= putValue(node, KEY_URL, null); changed |= putValue(node, KEY_DESCRIPTION, repository.getDescription()); changed |= putValue(node, KEY_NAME, repository.getName()); changed |= putValue(node, KEY_PROVIDER, repository.getProvider()); changed |= putValue(node, KEY_TYPE, repository.getType()); changed |= putValue(node, KEY_VERSION, repository.getVersion()); //allow repository manager to define system property if it is undefined in the repository itself String value = repository.getProperties().get(IRepository.PROP_SYSTEM); if (value != null) changed |= putValue(node, KEY_SYSTEM, value); changed |= putValue(node, KEY_SUFFIX, suffix); if (changed) saveToPreferences(); } catch (IllegalStateException e) { //the repository was removed concurrently, so we don't need to save it } }