|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.android.repository.impl.sources.LocalSourceProvider
public class LocalSourceProvider
Reads RepositorySources saved locally. Allows sources to be saved, modified, and
deleted.
| Constructor Summary | |
|---|---|
LocalSourceProvider(java.io.File location,
java.util.Collection<SchemaModule> allowedModules,
FileOp fop)
Create a new LocalSourceProvider. |
|
| Method Summary | |
|---|---|
boolean |
addSource(RepositorySource source)
Add a source to this provider. |
java.util.List<RepositorySource> |
getSources(Downloader downloader,
SettingsController settings,
ProgressIndicator logger,
boolean forceRefresh)
Gets the RepositorySources from this provider. |
boolean |
isModifiable()
Whether this source is modifiable. |
boolean |
removeSource(RepositorySource source)
Remove the specified source from this provider. |
void |
save(ProgressIndicator progress)
Saves any changes in the sources to the specified file. |
void |
setRepoManager(RepoManager manager)
Sets the RepoManager that will use this provider. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public LocalSourceProvider(@NonNull
java.io.File location,
@NonNull
java.util.Collection<SchemaModule> allowedModules,
@NonNull
FileOp fop)
LocalSourceProvider.
location - The file to load from and save to.allowedModules - The SchemaModules that are allowed to be used by sources
provided by this provider.fop - The FileOp to use for local file operations. For normal use
should probably be FileOpImpl.| Method Detail |
|---|
public void setRepoManager(@NonNull
RepoManager manager)
RepoManager that will use this provider.
@NonNull
public java.util.List<RepositorySource> getSources(@Nullable
Downloader downloader,
@Nullable
SettingsController settings,
@NonNull
ProgressIndicator logger,
boolean forceRefresh)
RepositorySources from this provider.
getSources in interface RepositorySourceProviderdownloader - Unused by this provider.settings - Unused by this provider.logger - A ProgressIndicator to be used for showing progress and logging.forceRefresh - If true, this provider should refresh its list of sources, rather than
return any cached sources.
public boolean addSource(@NonNull
RepositorySource source)
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 for this class.
public void save(@NonNull
ProgressIndicator progress)
save in interface RepositorySourceProviderprogress - ProgressIndicator for logging.
public boolean removeSource(@NonNull
RepositorySource source)
save(ProgressIndicator) is called.
removeSource in interface RepositorySourceProvidersource - The source to remove.
true if a matching source was found and actually removed.RepositorySourceProvider.addSource(RepositorySource)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||