|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.android.repository.api.ConstantSourceProvider
public class ConstantSourceProvider
A RepositorySourceProvider that provides a single source allowing a single set of schema
modules.
| Constructor Summary | |
|---|---|
ConstantSourceProvider(java.lang.String url,
java.lang.String uiName,
java.util.Collection<SchemaModule> permittedSchemaModules)
|
|
| Method Summary | |
|---|---|
boolean |
addSource(RepositorySource source)
Add a source to this provider, if this provider is editable. |
java.util.List<RepositorySource> |
getSources(Downloader downloader,
SettingsController settings,
ProgressIndicator indicator,
boolean forceRefresh)
Gets the RepositorySources from this provider. |
boolean |
isModifiable()
|
boolean |
removeSource(RepositorySource source)
Remove the given source from this provider, if this provider is editable. |
void |
save(ProgressIndicator progress)
If any changes have been made, persist them. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ConstantSourceProvider(@NonNull
java.lang.String url,
@NonNull
java.lang.String uiName,
@NonNull
java.util.Collection<SchemaModule> permittedSchemaModules)
| Method Detail |
|---|
@NonNull
public java.util.List<RepositorySource> getSources(@Nullable
Downloader downloader,
@Nullable
SettingsController settings,
@Nullable
ProgressIndicator indicator,
boolean forceRefresh)
RepositorySourceProviderRepositorySources from this provider.
getSources in interface RepositorySourceProviderdownloader - The Downloader, if required by this provider.settings - The SettingsController, if required by this provider.indicator - A ProgressIndicator to be used for showing progress and logging.forceRefresh - If true, this provider should refresh its list of sources, rather than
using a cached version.
public boolean addSource(@NonNull
RepositorySource source)
RepositorySourceProviderRepositorySourceProvider.getSources(Downloader, SettingsController, ProgressIndicator, boolean), but not
persisted until RepositorySourceProvider.save(ProgressIndicator) is called.
addSource in interface RepositorySourceProvidersource - The source to add.
true if the source was successfully added, false otherwise.public boolean isModifiable()
isModifiable in interface RepositorySourceProvidertrue if this provider can be edited (that is, it has a facility for saving
and loading changes), false otherwise.
public void save(@NonNull
ProgressIndicator progress)
RepositorySourceProvider
save in interface RepositorySourceProvider
public boolean removeSource(@NonNull
RepositorySource source)
RepositorySourceProvider
removeSource in interface RepositorySourceProvidersource - The source to remove.
true if the source was successfully removed, false otherwise.RepositorySourceProvider.addSource(RepositorySource)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||