Package com.android.repository.api
Interface RepositorySource
-
- All Known Subinterfaces:
RemoteListSourceProvider.GenericSite
- All Known Implementing Classes:
GenericSiteType,RemoteSource,SimpleRepositorySource,SiteType
public interface RepositorySourceA site from which repository XML files can be downloaded.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.StringgetDisplayName()java.lang.StringgetFetchError()Gets the error (if any) encountered when fetching content from this source.java.util.Collection<SchemaModule<?>>getPermittedModules()Gets theSchemaModules that are allowed to be used to parse XML from this source.RepositorySourceProvidergetProvider()java.lang.StringgetUrl()booleanisEnabled()voidsetEnabled(boolean enabled)voidsetFetchError(java.lang.String error)If an error was encountered loading from this source, it can be set here for display to the user.
-
-
-
Method Detail
-
getPermittedModules
@NonNull java.util.Collection<SchemaModule<?>> getPermittedModules()
Gets theSchemaModules that are allowed to be used to parse XML from this source.
-
isEnabled
boolean isEnabled()
- Returns:
- true if this source is enabled.
-
setEnabled
void setEnabled(boolean enabled)
- Parameters:
enabled- Whether this source should be enabled or disabled.
-
getDisplayName
@Nullable java.lang.String getDisplayName()
- Returns:
- The user-friendly name for this source.
-
getUrl
@NonNull java.lang.String getUrl()
- Returns:
- The URL from which to download.
-
setFetchError
void setFetchError(@Nullable java.lang.String error)If an error was encountered loading from this source, it can be set here for display to the user.
-
getFetchError
@Nullable java.lang.String getFetchError()
Gets the error (if any) encountered when fetching content from this source.- Returns:
- The error, or
nullif the load was successful.
-
getProvider
@NonNull RepositorySourceProvider getProvider()
- Returns:
- The provider that created this source.
-
-