public class SimpleRepositorySource extends java.lang.Object implements RepositorySource
RepositorySource.| Constructor and Description |
|---|
SimpleRepositorySource(java.lang.String url,
java.lang.String displayName,
boolean enabled,
java.util.Collection<SchemaModule> allowedModules,
RepositorySourceProvider provider)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
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.
|
java.lang.String |
toString()
Returns a debug string representation of this object.
|
public SimpleRepositorySource(@NonNull
java.lang.String url,
@Nullable
java.lang.String displayName,
boolean enabled,
@NonNull
java.util.Collection<SchemaModule> allowedModules,
@NonNull
RepositorySourceProvider provider)
url - The URL this source will fetch from.displayName - The user-friendly name for this sourceenabled - Whether this source is enabled.allowedModules - The SchemaModules allowed to be used when parsing the xml
downloaded from this source.provider - The RepositorySourceProvider that created this source.@NonNull public java.util.Collection<SchemaModule> getPermittedModules()
RepositorySourceSchemaModules that are allowed to be used to parse XML from this
source.getPermittedModules in interface RepositorySourcepublic boolean isEnabled()
isEnabled in interface RepositorySourcepublic void setEnabled(boolean enabled)
setEnabled in interface RepositorySourceenabled - Whether this source should be enabled or disabled.@Nullable public java.lang.String getDisplayName()
getDisplayName in interface RepositorySource@NonNull public java.lang.String getUrl()
getUrl in interface RepositorySource@NonNull public java.lang.String toString()
toString in class java.lang.Objectpublic void setFetchError(@Nullable
java.lang.String error)
RepositorySourcesetFetchError in interface RepositorySource@Nullable public java.lang.String getFetchError()
RepositorySourcegetFetchError in interface RepositorySourcenull if the load was successful.@NonNull public RepositorySourceProvider getProvider()
getProvider in interface RepositorySource