com.android.repository.impl.sources
Class RemoteListSourceProviderImpl

java.lang.Object
  extended by com.android.repository.api.RemoteListSourceProvider
      extended by com.android.repository.impl.sources.RemoteListSourceProviderImpl
All Implemented Interfaces:
RepositorySourceProvider

public class RemoteListSourceProviderImpl
extends RemoteListSourceProvider

A RepositorySourceProvider that downloads a list of sources.


Nested Class Summary
static class RemoteListSourceProviderImpl.SiteList
          Superclass for xjc-created JAXB-usable classes into which a site list can be unmarshalled.
 
Nested classes/interfaces inherited from class com.android.repository.api.RemoteListSourceProvider
RemoteListSourceProvider.GenericSite
 
Constructor Summary
RemoteListSourceProviderImpl(java.lang.String url, SchemaModule sourceListModule, java.util.Map<java.lang.Class<? extends RepositorySource>,java.util.Collection<SchemaModule>> permittedSchemaModules)
          Create a RemoteListSourceProviderImpl
 
Method Summary
 boolean addSource(RepositorySource source)
          Not supported by this provider.
 java.util.List<RepositorySource> getSources(Downloader downloader, SettingsController settingsController, ProgressIndicator progress, boolean forceRefresh)
          Gets the sources from this provider.
 boolean isModifiable()
          Not supported by this provider.
 boolean removeSource(RepositorySource source)
          Not supported by this provider.
 void save(ProgressIndicator progress)
          Not supported by this provider.
 
Methods inherited from class com.android.repository.api.RemoteListSourceProvider
create
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RemoteListSourceProviderImpl

public RemoteListSourceProviderImpl(@NonNull
                                    java.lang.String url,
                                    @Nullable
                                    SchemaModule sourceListModule,
                                    @NonNull
                                    java.util.Map<java.lang.Class<? extends RepositorySource>,java.util.Collection<SchemaModule>> permittedSchemaModules)
                             throws java.net.URISyntaxException
Create a RemoteListSourceProviderImpl

Parameters:
url - The URL to download from
sourceListModule - Extension to the common source list schema, if any.
permittedSchemaModules - Map of concrete RepositorySource type, as defined in sourceListModule, to collection of SchemaModules allowed to be used by that source type.
Throws:
java.net.URISyntaxException - If url can't be parsed into a URL.
Method Detail

getSources

@NonNull
public java.util.List<RepositorySource> getSources(@Nullable
                                                           Downloader downloader,
                                                           @Nullable
                                                           SettingsController settingsController,
                                                           @NonNull
                                                           ProgressIndicator progress,
                                                           boolean forceRefresh)
Gets the sources from this provider.

Parameters:
downloader - The Downloader to use to download the source list. Required.
settingsController - The SettingsController to use for the download settings. Required if required by the downloader.
progress - ProgressIndicator for logging.
forceRefresh - If true, this provider should refresh its list of sources, rather than return cached ones.
Returns:
The fetched RepositorySources.

addSource

public boolean addSource(@NonNull
                         RepositorySource source)
Not supported by this provider.

Parameters:
source - The source to add.
Returns:
false.

isModifiable

public boolean isModifiable()
Not supported by this provider.

Returns:
false.

save

public void save(@NonNull
                 ProgressIndicator progress)
Not supported by this provider.


removeSource

public boolean removeSource(@NonNull
                            RepositorySource source)
Not supported by this provider.

Parameters:
source - The source to remove.
Returns:
false.
See Also:
RepositorySourceProvider.addSource(RepositorySource)