public IStatus getArtifact(IArtifactDescriptor descriptor, OutputStream destination, IProgressMonitor monitor) { return innerRepo.getArtifact(descriptor, destination, monitor); }
public IStatus getArtifact(IArtifactDescriptor descriptor, OutputStream destination, IProgressMonitor monitor) { return delegate.getArtifact(descriptor, destination, monitor); }
protected IStatus getArtifact(IArtifactDescriptor sourceDescriptor, OutputStream destination, IProgressMonitor monitor) { return getSourceRepository().getArtifact(sourceDescriptor, destination, monitor); }
protected IStatus getArtifact(IArtifactDescriptor sourceDescriptor, OutputStream destination, IProgressMonitor monitor) { return getSourceRepository().getArtifact(sourceDescriptor, destination, monitor); }
protected IStatus getArtifact(IArtifactDescriptor sourceDescriptor, OutputStream destination, IProgressMonitor monitor) { return getSourceRepository().getArtifact(sourceDescriptor, destination, monitor); }
protected IStatus getArtifact(IArtifactDescriptor sourceDescriptor, OutputStream destination, IProgressMonitor monitor) { return getSourceRepository().getArtifact(sourceDescriptor, destination, monitor); }
private IStatus getRawOrNormalArtifact(IArtifactDescriptor descriptor, OutputStream destination, IProgressMonitor monitor, boolean raw) { for (Iterator<ChildInfo> childIterator = loadedRepos.iterator(); childIterator.hasNext();) { ChildInfo current = childIterator.next(); if (current.isGood() && current.repo.contains(descriptor)) { // Child hasn't failed & contains descriptor IStatus status = raw ? current.repo.getRawArtifact(descriptor, destination, monitor) : current.repo.getArtifact(descriptor, destination, monitor); if (status.isOK()) { //we are done with this artifact so forgive bad children so they can try again on next artifact resetChildFailures(); return Status.OK_STATUS; } // Download failed if (status.getCode() == CODE_RETRY || status.getCode() == IStatus.CANCEL) // Child has mirrors & wants to be retried, or we were canceled return status; // Child has failed us, mark it bad current.setBad(true); // If more children are available, set retry if (childIterator.hasNext()) return new MultiStatus(Activator.ID, CODE_RETRY, new IStatus[] {status}, NLS.bind(Messages.retryRequest, descriptor.getArtifactKey(), current.repo.getLocation()), null); // Nothing that can be done, pass child's failure on resetChildFailures(); return status; } if (monitor.isCanceled()) return Status.CANCEL_STATUS; } return new Status(IStatus.ERROR, Activator.ID, NLS.bind(Messages.artifact_not_found, descriptor)); }
private IStatus getRawOrNormalArtifact(IArtifactDescriptor descriptor, OutputStream destination, IProgressMonitor monitor, boolean raw) { for (Iterator<ChildInfo> childIterator = loadedRepos.iterator(); childIterator.hasNext();) { ChildInfo current = childIterator.next(); if (current.isGood() && current.repo.contains(descriptor)) { // Child hasn't failed & contains descriptor IStatus status = raw ? current.repo.getRawArtifact(descriptor, destination, monitor) : current.repo.getArtifact(descriptor, destination, monitor); if (status.isOK()) { //we are done with this artifact so forgive bad children so they can try again on next artifact resetChildFailures(); return Status.OK_STATUS; } // Download failed if (status.getCode() == CODE_RETRY || status.getCode() == IStatus.CANCEL) // Child has mirrors & wants to be retried, or we were canceled return status; // Child has failed us, mark it bad current.setBad(true); // If more children are available, set retry if (childIterator.hasNext()) return new MultiStatus(Activator.ID, CODE_RETRY, new IStatus[] {status}, NLS.bind(Messages.retryRequest, descriptor.getArtifactKey(), current.repo.getLocation()), null); // Nothing that can be done, pass child's failure on resetChildFailures(); return status; } if (monitor.isCanceled()) return Status.CANCEL_STATUS; } return new Status(IStatus.ERROR, Activator.ID, NLS.bind(Messages.artifact_not_found, descriptor)); }
private IStatus getRawOrNormalArtifact(IArtifactDescriptor descriptor, OutputStream destination, IProgressMonitor monitor, boolean raw) { for (Iterator<ChildInfo> childIterator = loadedRepos.iterator(); childIterator.hasNext();) { ChildInfo current = childIterator.next(); if (current.isGood() && current.repo.contains(descriptor)) { // Child hasn't failed & contains descriptor IStatus status = raw ? current.repo.getRawArtifact(descriptor, destination, monitor) : current.repo.getArtifact(descriptor, destination, monitor); if (status.isOK()) { //we are done with this artifact so forgive bad children so they can try again on next artifact resetChildFailures(); return Status.OK_STATUS; } // Download failed if (status.getCode() == CODE_RETRY || status.getCode() == IStatus.CANCEL) // Child has mirrors & wants to be retried, or we were canceled return status; // Child has failed us, mark it bad current.setBad(true); // If more children are available, set retry if (childIterator.hasNext()) return new MultiStatus(Activator.ID, CODE_RETRY, new IStatus[] {status}, NLS.bind(Messages.retryRequest, descriptor.getArtifactKey(), current.repo.getLocation()), null); // Nothing that can be done, pass child's failure on resetChildFailures(); return status; } if (monitor.isCanceled()) return Status.CANCEL_STATUS; } return new Status(IStatus.ERROR, Activator.ID, NLS.bind(Messages.artifact_not_found, descriptor)); }
private IStatus getRawOrNormalArtifact(IArtifactDescriptor descriptor, OutputStream destination, IProgressMonitor monitor, boolean raw) { for (Iterator<ChildInfo> childIterator = loadedRepos.iterator(); childIterator.hasNext();) { ChildInfo current = childIterator.next(); if (current.isGood() && current.repo.contains(descriptor)) { // Child hasn't failed & contains descriptor IStatus status = raw ? current.repo.getRawArtifact(descriptor, destination, monitor) : current.repo.getArtifact(descriptor, destination, monitor); if (status.isOK()) { //we are done with this artifact so forgive bad children so they can try again on next artifact resetChildFailures(); return Status.OK_STATUS; } // Download failed if (status.getCode() == CODE_RETRY || status.getCode() == IStatus.CANCEL) // Child has mirrors & wants to be retried, or we were canceled return status; // Child has failed us, mark it bad current.setBad(true); // If more children are available, set retry if (childIterator.hasNext()) return new MultiStatus(Activator.ID, CODE_RETRY, new IStatus[] {status}, NLS.bind(Messages.retryRequest, descriptor.getArtifactKey(), current.repo.getLocation()), null); // Nothing that can be done, pass child's failure on resetChildFailures(); return status; } if (monitor.isCanceled()) return Status.CANCEL_STATUS; } return new Status(IStatus.ERROR, Activator.ID, NLS.bind(Messages.artifact_not_found, descriptor)); }