private List<String> getListRepositoryProperty(IRepository<?> repository, String key) { List<String> listProperty = new ArrayList<String>(); String dropinRepositories = repository.getProperties().get(key); if (dropinRepositories != null) { StringTokenizer tokenizer = new StringTokenizer(dropinRepositories, PIPE); while (tokenizer.hasMoreTokens()) { listProperty.add(tokenizer.nextToken()); } } return listProperty; }
/** * Initialize {@link #mirrors} for {@link #repository}, or <code>null</code> if * they could not be computed. */ private void initMirrors(IProgressMonitor monitor) { if (mirrors != null) return; String mirrorsURL = repository.getProperties().get(IRepository.PROP_MIRRORS_URL); if (mirrorsURL != null) mirrors = computeMirrors(mirrorsURL, monitor); }
/** * Returns the mirror locations for this repository, or <code>null</code> if * they could not be computed. */ private MirrorInfo[] initMirrors(IProgressMonitor monitor) { if (mirrors != null) return mirrors; String mirrorsURL = repository.getProperties().get(IRepository.PROP_MIRRORS_URL); if (mirrorsURL != null) mirrors = computeMirrors(mirrorsURL, monitor); return mirrors; }
/** * Returns the mirror locations for this repository, or <code>null</code> if * they could not be computed. */ private MirrorInfo[] initMirrors(IProgressMonitor monitor) { if (mirrors != null) return mirrors; String mirrorsURL = repository.getProperties().get(IRepository.PROP_MIRRORS_URL); if (mirrorsURL != null) mirrors = computeMirrors(mirrorsURL, monitor); return mirrors; }
/** * Returns the mirror locations for this repository, or <code>null</code> if * they could not be computed. */ private MirrorInfo[] initMirrors(IProgressMonitor monitor) { if (mirrors != null) return mirrors; String mirrorsURL = repository.getProperties().get(IRepository.PROP_MIRRORS_URL); if (mirrorsURL != null) mirrors = computeMirrors(mirrorsURL, monitor); return mirrors; }
/** * Constructs a mirror support class for the given repository. Mirrors are * not contacted and the mirrorsURL document is not parsed until a * mirror location request is sent. */ public MirrorSelector(IRepository<?> repository, Transport transport) { this.repository = repository; this.transport = transport; try { String base = repository.getProperties().get(IRepository.PROP_MIRRORS_BASE_URL); if (base != null) { this.baseURI = new URI(base); } else { URI repositoryLocation = repository.getLocation(); if (repositoryLocation != null) this.baseURI = repositoryLocation; } } catch (URISyntaxException e) { log("Error initializing mirrors for: " + repository.getLocation(), e); //$NON-NLS-1$ } }
/** * Constructs a mirror support class for the given repository. Mirrors are * not contacted and the mirrorsURL document is not parsed until a * mirror location request is sent. */ public MirrorSelector(IRepository<?> repository, Transport transport) { this.repository = repository; this.transport = transport; try { String base = repository.getProperties().get(IRepository.PROP_MIRRORS_BASE_URL); if (base != null) { this.baseURI = new URI(base); } else { URI repositoryLocation = repository.getLocation(); if (repositoryLocation != null) this.baseURI = repositoryLocation; } } catch (URISyntaxException e) { log("Error initializing mirrors for: " + repository.getLocation(), e); //$NON-NLS-1$ } }
/** * Constructs a mirror support class for the given repository. Mirrors are * not contacted and the mirrorsURL document is not parsed until a * mirror location request is sent. */ public MirrorSelector(IRepository<?> repository, Transport transport) { this.repository = repository; this.transport = transport; try { String base = repository.getProperties().get(IRepository.PROP_MIRRORS_BASE_URL); if (base != null) { this.baseURI = new URI(base); } else { URI repositoryLocation = repository.getLocation(); if (repositoryLocation != null) this.baseURI = repositoryLocation; } } catch (URISyntaxException e) { log("Error initializing mirrors for: " + repository.getLocation(), e); //$NON-NLS-1$ } }
/** * Constructs a mirror support class for the given repository. Mirrors are * not contacted and the mirrorsURL document is not parsed until a * mirror location request is sent. */ public MirrorSelector(IRepository<?> repository, Transport transport) { this.repository = repository; this.transport = transport; try { String base = repository.getProperties().get(IRepository.PROP_MIRRORS_BASE_URL); if (base != null) { this.baseURI = new URI(base); } else { URI repositoryLocation = repository.getLocation(); if (repositoryLocation != null) this.baseURI = repositoryLocation; } } catch (URISyntaxException e) { log("Error initializing mirrors for: " + repository.getLocation(), e); //$NON-NLS-1$ } }
info.description = repository.getDescription(); info.location = repository.getLocation(); String value = repository.getProperties().get(IRepository.PROP_SYSTEM); if (value != null) info.isSystem = Boolean.valueOf(value).booleanValue();
info.description = repository.getDescription(); info.location = repository.getLocation(); String value = repository.getProperties().get(IRepository.PROP_SYSTEM); if (value != null) info.isSystem = Boolean.valueOf(value).booleanValue();
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 } }