Package com.android.repository.api
Class RemoteSource
- java.lang.Object
-
- com.android.repository.api.RemoteSource
-
- All Implemented Interfaces:
RepositorySource
- Direct Known Subclasses:
SiteType
public abstract class RemoteSource extends java.lang.Object implements RepositorySource
ARepositorySourcethat was created by aRemoteListSourceProviderand superclass for xjc-generated classes used to parse the sites list xml. Generated classes provide the url and UI name; the permitted extensions must be set by the provider. If you implement a new site type, it should extend siteType in repo-sites-common-N.xsd, and thus transitively extend this class.
-
-
Constructor Summary
Constructors Constructor Description RemoteSource()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete 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.lang.StringgetName()java.util.Collection<SchemaModule<?>>getPermittedModules()Gets theSchemaModules that are allowed to be used to parse XML from this source.RepositorySourceProvidergetProvider()abstract java.lang.StringgetUrl()booleanisEnabled()Currently not implemented.voidsetEnabled(boolean enabled)Currently not implemented.voidsetFetchError(java.lang.String error)If an error was encountered loading from this source, it can be set here for display to the user.voidsetPermittedSchemaModules(java.util.Collection<SchemaModule<?>> modules)Sets the list of modules allowed to be used when parsing XML fetched from this source.voidsetProvider(RepositorySourceProvider provider)voidsetUrl(java.lang.String url)
-
-
-
Method Detail
-
setPermittedSchemaModules
public void setPermittedSchemaModules(@NonNull java.util.Collection<SchemaModule<?>> modules)Sets the list of modules allowed to be used when parsing XML fetched from this source.
-
getPermittedModules
@NonNull public java.util.Collection<SchemaModule<?>> getPermittedModules()
Description copied from interface:RepositorySourceGets theSchemaModules that are allowed to be used to parse XML from this source.- Specified by:
getPermittedModulesin interfaceRepositorySource- Returns:
- The list of schema modules allowed to be used when parsing XML fetched from this source.
-
isEnabled
public boolean isEnabled()
Currently not implemented.- Specified by:
isEnabledin interfaceRepositorySource- Returns:
- true if this source is enabled.
-
setEnabled
public void setEnabled(boolean enabled)
Currently not implemented.- Specified by:
setEnabledin interfaceRepositorySource- Parameters:
enabled- Whether this source should be enabled or disabled.
-
getUrl
@NonNull public abstract java.lang.String getUrl()
- Specified by:
getUrlin interfaceRepositorySource- Returns:
- The URL from which to download.
-
setUrl
public void setUrl(@NonNull java.lang.String url)
-
setFetchError
public void setFetchError(@Nullable java.lang.String error)Description copied from interface:RepositorySourceIf an error was encountered loading from this source, it can be set here for display to the user.- Specified by:
setFetchErrorin interfaceRepositorySource
-
getFetchError
@Nullable public java.lang.String getFetchError()
Description copied from interface:RepositorySourceGets the error (if any) encountered when fetching content from this source.- Specified by:
getFetchErrorin interfaceRepositorySource- Returns:
- The error, or
nullif the load was successful.
-
getProvider
@NonNull public RepositorySourceProvider getProvider()
- Specified by:
getProviderin interfaceRepositorySource- Returns:
- The provider that created this source.
-
setProvider
public void setProvider(@NonNull RepositorySourceProvider provider)
-
getDisplayName
@Nullable public java.lang.String getDisplayName()
- Specified by:
getDisplayNamein interfaceRepositorySource- Returns:
- The user-friendly name for this source.
-
getName
@Nullable public java.lang.String getName()
-
-