public abstract class RepositoryTracker extends Object
Modifier and Type | Field and Description |
---|---|
static int |
STATUS_INVALID_REPOSITORY_LOCATION
A status code used to indicate that a repository location was not valid.
|
Constructor and Description |
---|
RepositoryTracker() |
Modifier and Type | Method and Description |
---|---|
void |
addNotFound(URI location)
Add the specified location to the list of "not found" repositories.
|
abstract void |
addRepository(URI location,
String nickname,
ProvisioningSession session)
Add a repository at the specified location.
|
void |
clearRepositoriesNotFound()
Clear the list of repositories that have already been reported as not found.
|
void |
clearRepositoryNotFound(URI location)
Remove the specified repository from the list of repositories that
have already been reported as not found.
|
protected boolean |
contains(URI location,
ProvisioningSession session)
Return a boolean indicating whether this tracker already contains the specified
repository location.
|
int |
getArtifactRepositoryFlags()
Return the repository flags suitable for retrieving known repositories from
a repository manager
|
IStatus |
getInvalidLocationStatus(String locationText)
Return a status appropriate for reporting an invalid repository location.
|
abstract URI[] |
getKnownRepositories(ProvisioningSession session)
Return an array of repository locations known for the specified provisioning session.
|
int |
getMetadataRepositoryFlags()
Return the repository flags suitable for retrieving known repositories from
a repository manager
|
boolean |
hasNotFoundStatusBeenReported(URI location)
Answer a boolean indicating whether not found status has already been
reported for the specified location.
|
URI |
locationFromString(String locationString)
Return a repository location represented by the supplied string.
|
abstract void |
refreshRepositories(URI[] locations,
ProvisioningSession session,
IProgressMonitor monitor)
Refresh the repositories at the specified locations
|
abstract void |
removeRepositories(URI[] locations,
ProvisioningSession session)
Remove the repositories at the specified locations
|
void |
reportLoadFailure(URI location,
ProvisionException exception)
Report a failure to load the specified repository.
|
void |
setArtifactRepositoryFlags(int flags)
Set the repository flags suitable for retrieving known repositories from
a repository manager
|
void |
setMetadataRepositoryFlags(int flags)
Set the repository flags suitable for retrieving known repositories from
a repository manager
|
IStatus |
validateRepositoryLocation(ProvisioningSession session,
URI location,
boolean contactRepositories,
IProgressMonitor monitor)
Validate the specified repository location.
|
public static final int STATUS_INVALID_REPOSITORY_LOCATION
public abstract URI[] getKnownRepositories(ProvisioningSession session)
session
- the provisioning session providing the provisioning servicespublic IStatus getInvalidLocationStatus(String locationText)
locationText
- the text representation of the locationpublic URI locationFromString(String locationString)
locationString
- a text representation of the locationnull
if the
text could not be interpreted.public IStatus validateRepositoryLocation(ProvisioningSession session, URI location, boolean contactRepositories, IProgressMonitor monitor)
session
- the provisioning session providing the repository serviceslocation
- the location in questioncontactRepositories
- true
if the appropriate repository manager(s) should be
consulted regarding the validity of the location, or false
if the repository manager
should not be consulted.monitor
- the progress monitorprotected boolean contains(URI location, ProvisioningSession session)
location
- the location in questionsession
- the provisioning session providing the repository servicespublic void addNotFound(URI location)
location
- the location of the repository that cannot be foundpublic boolean hasNotFoundStatusBeenReported(URI location)
location
- the location in questiontrue
if the repository has already been reported as
being not found, false
if no status has been reported for this
location.public void clearRepositoriesNotFound()
public void clearRepositoryNotFound(URI location)
location
- the location in questionpublic int getArtifactRepositoryFlags()
public void setArtifactRepositoryFlags(int flags)
flags
- the repository flagspublic int getMetadataRepositoryFlags()
public void setMetadataRepositoryFlags(int flags)
flags
- the repository flagspublic void reportLoadFailure(URI location, ProvisionException exception)
This default implementation simply logs the failure. Subclasses may override to provide additional error reporting.
location
- the location of the failed repositoryexception
- the failure that occurredpublic abstract void addRepository(URI location, String nickname, ProvisioningSession session)
location
- the location of the new repositorynickname
- the nickname for the repository, or null
if there is no nicknamesession
- the session to use for provisioning servicespublic abstract void removeRepositories(URI[] locations, ProvisioningSession session)
locations
- the locationssession
- the session to use for provisioning servicespublic abstract void refreshRepositories(URI[] locations, ProvisioningSession session, IProgressMonitor monitor)
locations
- the locationssession
- the session to use for provisioning servicesmonitor
- the progress monitor to use
Copyright (c) 2000, 2015 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.