public abstract class ArtifactRepositoryFactory extends Object
Constructor and Description |
---|
ArtifactRepositoryFactory() |
Modifier and Type | Method and Description |
---|---|
abstract IArtifactRepository |
create(URI location,
String name,
String type,
Map<String,String> properties)
Creates and returns a new empty artifact repository of the given type at
the given location.
|
protected IProvisioningAgent |
getAgent()
Returns the provisioning agent associated with this factory, or
null
if this factory is not associated with an agent. |
abstract IArtifactRepository |
load(URI location,
int flags,
IProgressMonitor monitor)
Loads and returns the repository of this factory's type at the given location.
|
void |
setAgent(IProvisioningAgent agent)
Sets the provisioning agent associated with this repository factory.
|
public abstract IArtifactRepository create(URI location, String name, String type, Map<String,String> properties) throws ProvisionException
location
- the location for the new repositoryname
- the name of the new repositorytype
- the kind of repository to createproperties
- the properties to set on the repositoryProvisionException
- if the repository could not be created. Reasons include:
protected IProvisioningAgent getAgent()
null
if this factory is not associated with an agent.null
public abstract IArtifactRepository load(URI location, int flags, IProgressMonitor monitor) throws ProvisionException
The error code returned in the case of failure is significant. In particular an
error code of ProvisionException.REPOSITORY_FAILED_READ
indicates
that the location definitely identifies a repository of this type, but an error occurred
while loading the repository. The repository manager will not attempt to load
a repository from that location using any other factory. An error code of
ProvisionException.REPOSITORY_NOT_FOUND
indicates there is no
repository of this type at the given location, and the repository manager is free
to try again with a different repository factory.
The flags passed in should be taken as a hint for the type of repository to load. If the factory knows it will not load a repository that satisfies these hints, it can fail fast and return null.
location
- the location in which to look for a repository descriptionflags
- to consider while loading the repositorymonitor
- a progress monitor, or null
if progress
reporting is not desiredProvisionException
- if the repository could not be created. Reasons include:
public void setAgent(IProvisioningAgent agent)
agent
- The provisioning agent
Copyright (c) 2000, 2015 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.