com.android.repository.api
Interface RepositorySource

All Known Subinterfaces:
RemoteListSourceProvider.GenericSite
All Known Implementing Classes:
GenericSiteType, RemoteSource, SimpleRepositorySource, SiteType

public interface RepositorySource

A site from which repository XML files can be downloaded.


Method Summary
 java.lang.String getDisplayName()
           
 java.lang.String getFetchError()
          Gets the error (if any) encountered when fetching content from this source.
 java.util.Collection<SchemaModule> getPermittedModules()
          Gets the SchemaModules that are allowed to be used to parse XML from this source.
 RepositorySourceProvider getProvider()
           
 java.lang.String getUrl()
           
 boolean isEnabled()
           
 void setEnabled(boolean enabled)
           
 void setFetchError(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 the SchemaModules 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

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 null if the load was successful.

getProvider

@NonNull
RepositorySourceProvider getProvider()
Returns:
The provider that created this source.