com.android.repository.impl.manager
Class RemoteRepoLoader

java.lang.Object
  extended by com.android.repository.impl.manager.RemoteRepoLoader

public class RemoteRepoLoader
extends java.lang.Object

Utility class that loads Repositorys from RepositorySources.


Constructor Summary
RemoteRepoLoader(java.util.Collection<RepositorySourceProvider> sources, org.w3c.dom.ls.LSResourceResolver resourceResolver, FallbackRemoteRepoLoader fallback)
          Constructor
 
Method Summary
 java.util.Map<java.lang.String,RemotePackage> fetchPackages(ProgressIndicator progress, Downloader downloader, SettingsController settings)
          Actually loads RemotePackages from the given sources.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RemoteRepoLoader

public RemoteRepoLoader(@NonNull
                        java.util.Collection<RepositorySourceProvider> sources,
                        @Nullable
                        org.w3c.dom.ls.LSResourceResolver resourceResolver,
                        @Nullable
                        FallbackRemoteRepoLoader fallback)
Constructor

Parameters:
sources - The RepositorySourceProviders to get the RepositorySources to load from.
resourceResolver - The resolver to use to find imported XSDs, if necessary for the SchemaModules used by the RepositorySources.
fallback - The FallbackRemoteRepoLoader to use if we can't parse an XML file.
Method Detail

fetchPackages

@NonNull
public java.util.Map<java.lang.String,RemotePackage> fetchPackages(@NonNull
                                                                           ProgressIndicator progress,
                                                                           @NonNull
                                                                           Downloader downloader,
                                                                           @Nullable
                                                                           SettingsController settings)
Actually loads RemotePackages from the given sources.

Parameters:
progress - ProgressIndicator for logging and showing progress (TODO).
downloader - The Downloader to use for RepositorySourceProviders to use if needed.
settings - The SettingsController for RepositorySourceProviders to use if needed.
Returns:
A Multimap of install paths to RemotePackages. Usually there should be at most two versions for a given package: a stable version and/or a preview version.