public interface IArtifactRepository extends IRepository<IArtifactKey>
This interface is not intended to be implemented by clients. Artifact repository
implementations must subclass AbstractArtifactRepository
rather than
implementing this interface directly.
AbstractArtifactRepository
.Modifier and Type | Field and Description |
---|---|
static int |
CODE_RETRY
The return code to use when a client could/should retry a failed getArtifact() operation.
|
static String |
PROP_RUNNABLE
The key for a boolean indicating if the repository is in runnable format.
|
ENABLED, NONE, PREFERENCE_NODE, PROP_COMPRESSED, PROP_DESCRIPTION, PROP_MIRRORS_BASE_URL, PROP_MIRRORS_URL, PROP_NAME, PROP_NICKNAME, PROP_PASSWORD, PROP_SYSTEM, PROP_TIMESTAMP, PROP_USERNAME, TYPE_ARTIFACT, TYPE_METADATA
Modifier and Type | Method and Description |
---|---|
void |
addDescriptor(IArtifactDescriptor descriptor)
Deprecated.
|
void |
addDescriptor(IArtifactDescriptor descriptor,
IProgressMonitor monitor)
Add the given descriptor to the set of descriptors in this repository.
|
void |
addDescriptors(IArtifactDescriptor[] descriptors)
Deprecated.
|
void |
addDescriptors(IArtifactDescriptor[] descriptors,
IProgressMonitor monitor)
Add the given artifact descriptors to this repository
|
boolean |
contains(IArtifactDescriptor descriptor)
Returns true if this repository contains the given descriptor.
|
boolean |
contains(IArtifactKey key)
Returns true if this repository contains the given artifact key.
|
IArtifactDescriptor |
createArtifactDescriptor(IArtifactKey key)
Create an instance of
IArtifactDescriptor based on the given key |
IArtifactKey |
createArtifactKey(String classifier,
String id,
Version version)
Create an instance of
IArtifactKey |
IQueryable<IArtifactDescriptor> |
descriptorQueryable()
Returns a queryable that can be queried for artifact descriptors contained in this repository
|
IStatus |
executeBatch(IRunnableWithProgress runnable,
IProgressMonitor monitor)
Executes a runnable against this repository.
|
IStatus |
getArtifact(IArtifactDescriptor descriptor,
OutputStream destination,
IProgressMonitor monitor)
Writes to the given output stream the bytes represented by the artifact descriptor.
|
IArtifactDescriptor[] |
getArtifactDescriptors(IArtifactKey key)
Return the set of artifact descriptors describing the ways that this repository
can supply the artifact associated with the given artifact key
|
IStatus |
getArtifacts(IArtifactRequest[] requests,
IProgressMonitor monitor)
Executes the given artifact requests on this byte server.
|
OutputStream |
getOutputStream(IArtifactDescriptor descriptor)
Open an output stream to which a client can write the data for the given
artifact descriptor.
|
IStatus |
getRawArtifact(IArtifactDescriptor descriptor,
OutputStream destination,
IProgressMonitor monitor)
Writes to the given output stream the bytes represented by the artifact descriptor.
|
void |
removeAll()
Deprecated.
|
void |
removeAll(IProgressMonitor monitor)
Remove the all keys, descriptors, and contents from this repository.
|
void |
removeDescriptor(IArtifactDescriptor descriptor)
Deprecated.
|
void |
removeDescriptor(IArtifactDescriptor descriptor,
IProgressMonitor monitor)
Remove the given descriptor and its corresponding content in this repository.
|
void |
removeDescriptor(IArtifactKey key)
Deprecated.
|
void |
removeDescriptor(IArtifactKey key,
IProgressMonitor monitor)
Remove the given key and all related content and descriptors from this repository.
|
void |
removeDescriptors(IArtifactDescriptor[] descriptors)
Deprecated.
|
void |
removeDescriptors(IArtifactDescriptor[] descriptors,
IProgressMonitor monitor)
Remove the given list of artifact descriptors and their corresponding content
in this repository.
|
void |
removeDescriptors(IArtifactKey[] keys)
Deprecated.
|
void |
removeDescriptors(IArtifactKey[] keys,
IProgressMonitor monitor)
Remove the given list of keys and all related content and descriptors from this
repository.
|
getDescription, getLocation, getName, getProperties, getProperty, getProvider, getProvisioningAgent, getType, getVersion, isModifiable, setProperty, setProperty
getAdapter
query
static final String PROP_RUNNABLE
IRepository.getProperties()
,
Constant Field Valuesstatic final int CODE_RETRY
IArtifactDescriptor createArtifactDescriptor(IArtifactKey key)
IArtifactDescriptor
based on the given keykey
- IArtifactKey
IArtifactKey createArtifactKey(String classifier, String id, Version version)
IArtifactKey
classifier
- id
- version
- void addDescriptor(IArtifactDescriptor descriptor)
addDescriptor(IArtifactDescriptor, IProgressMonitor)
descriptor
- the descriptor to add.void addDescriptor(IArtifactDescriptor descriptor, IProgressMonitor monitor)
descriptor
- the descriptor to add.monitor
- A progress monitor use to track progress and cancel the operation. This may
be a long running operation if another process holds the lock on this locationvoid addDescriptors(IArtifactDescriptor[] descriptors)
addDescriptors(IArtifactDescriptor[], IProgressMonitor)
descriptors
- the artifact descriptors to addvoid addDescriptors(IArtifactDescriptor[] descriptors, IProgressMonitor monitor)
descriptors
- the artifact descriptors to addmonitor
- A progress monitor use to track progress and cancel the operation. This may
be a long running operation if another process holds the lock on this locationboolean contains(IArtifactDescriptor descriptor)
descriptor
- the descriptor to queryboolean contains(IArtifactKey key)
key
- the key to queryIStatus getArtifact(IArtifactDescriptor descriptor, OutputStream destination, IProgressMonitor monitor)
descriptor
- the descriptor to transferdestination
- the stream to write the final artifact output tomonitor
- a progress monitor, or null
if progress
reporting and cancellation are not desiredIStatus getRawArtifact(IArtifactDescriptor descriptor, OutputStream destination, IProgressMonitor monitor)
descriptor
- the descriptor to transferdestination
- the stream to write the final artifact output tomonitor
- a progress monitor, or null
if progress
reporting and cancellation are not desiredIArtifactDescriptor[] getArtifactDescriptors(IArtifactKey key)
key
- the artifact key to lookupIStatus getArtifacts(IArtifactRequest[] requests, IProgressMonitor monitor)
requests
- The artifact requestsmonitor
- OK
if requests were
processed successfully. Otherwise, a status indicating information,
warnings, or errors that occurred while executing the artifact requestsOutputStream getOutputStream(IArtifactDescriptor descriptor) throws ProvisionException
descriptor
- the descriptor describing the artifact data to be written to the
resultant streamIStateful
.ProvisionException
- if the output stream could not be created. Reasons include:
ProvisionException.REPOSITORY_FAILED_WRITE
) .ProvisionException.ARTIFACT_EXISTS
).IQueryable<IArtifactDescriptor> descriptorQueryable()
void removeAll()
removeAll(IProgressMonitor)
void removeAll(IProgressMonitor monitor)
monitor
- A progress monitor use to track progress and cancel the operation. This may
be a long running operation if another process holds the lock on this locationvoid removeDescriptor(IArtifactDescriptor descriptor)
removeDescriptor(IArtifactDescriptor, IProgressMonitor)
descriptor
- the descriptor to remove.void removeDescriptor(IArtifactDescriptor descriptor, IProgressMonitor monitor)
descriptor
- the descriptor to remove.monitor
- A progress monitor use to track progress and cancel the operation. This may
be a long running operation if another process holds the lock on this locationvoid removeDescriptor(IArtifactKey key)
removeDescriptor(IArtifactKey, IProgressMonitor)
key
- the key to remove.void removeDescriptor(IArtifactKey key, IProgressMonitor monitor)
key
- the key to remove.monitor
- A progress monitor use to track progress and cancel the operation. This may
be a long running operation if another process holds the lock on this locationvoid removeDescriptors(IArtifactDescriptor[] descriptors)
removeDescriptors(IArtifactDescriptor[], IProgressMonitor)
descriptors
- the list of descriptors to removevoid removeDescriptors(IArtifactDescriptor[] descriptors, IProgressMonitor monitor)
descriptors
- the list of descriptors to removemonitor
- A progress monitor use to track progress and cancel the operation. This may
be a long running operation if another process holds the lock on this locationvoid removeDescriptors(IArtifactKey[] keys)
removeDescriptors(IArtifactKey[], IProgressMonitor)
keys
- void removeDescriptors(IArtifactKey[] keys, IProgressMonitor monitor)
keys
- monitor
- A progress monitor use to track progress and cancel the operation. This may
be a long running operation if another process holds the lock on this locationIStatus executeBatch(IRunnableWithProgress runnable, IProgressMonitor monitor)
runnable
- The runnable to executemonitor
- A progress monitor that will be passed to the runnable
Copyright (c) 2000, 2015 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.