|
Eclipse Platform Release 3.6 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IArtifactRepository
A repository containing artifacts.
This interface is not intended to be implemented by clients. Artifact repository
implementations must subclass AbstractArtifactRepository
rather than
implementing this interface directly.
AbstractArtifactRepository
.Field Summary | |
---|---|
static int |
CODE_RETRY
The return code to use when a client could/should retry a failed getArtifact() operation. |
Fields inherited from interface org.eclipse.equinox.p2.repository.IRepository |
---|
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 |
Method Summary | |
---|---|
void |
addDescriptor(IArtifactDescriptor descriptor)
Add the given descriptor to the set of descriptors in this repository. |
void |
addDescriptors(IArtifactDescriptor[] descriptors)
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()
Remove the all keys, descriptors, and contents from this repository. |
void |
removeDescriptor(IArtifactDescriptor descriptor)
Remove the given descriptor and its corresponding content in this repository. |
void |
removeDescriptor(IArtifactKey key)
Remove the given key and all related content and descriptors from this repository. |
Methods inherited from interface org.eclipse.equinox.p2.repository.IRepository |
---|
getDescription, getLocation, getName, getProperties, getProperty, getProvider, getProvisioningAgent, getType, getVersion, isModifiable, setProperty |
Methods inherited from interface org.eclipse.core.runtime.IAdaptable |
---|
getAdapter |
Methods inherited from interface org.eclipse.equinox.p2.query.IQueryable |
---|
query |
Field Detail |
---|
static final int CODE_RETRY
Method Detail |
---|
IArtifactDescriptor createArtifactDescriptor(IArtifactKey key)
IArtifactDescriptor
based on the given key
key
- IArtifactKey
IArtifactKey createArtifactKey(String classifier, String id, Version version)
IArtifactKey
classifier
- id
- version
-
void addDescriptor(IArtifactDescriptor descriptor)
descriptor
- the descriptor to add.void addDescriptors(IArtifactDescriptor[] descriptors)
descriptors
- the artifact descriptors to addboolean contains(IArtifactDescriptor descriptor)
descriptor
- the descriptor to query
boolean contains(IArtifactKey key)
key
- the key to query
IStatus 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 desired
IStatus 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 desired
IArtifactDescriptor[] getArtifactDescriptors(IArtifactKey key)
key
- the artifact key to lookup
IStatus 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 stream
IStateful
.
ProvisionException
- if the output stream could not be created. Reasons include:
ProvisionException.REPOSITORY_FAILED_WRITE
) .ProvisionException.ARTIFACT_EXISTS
).IQueryable<IArtifactDescriptor> descriptorQueryable()
void removeAll()
void removeDescriptor(IArtifactDescriptor descriptor)
descriptor
- the descriptor to remove.void removeDescriptor(IArtifactKey key)
key
- the key to remove.IStatus executeBatch(IRunnableWithProgress runnable, IProgressMonitor monitor)
runnable
- The runnable to executemonitor
- A progress monitor that will be passed to the runnable
|
Eclipse Platform Release 3.6 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Guidelines for using Eclipse APIs.
Copyright (c) Eclipse contributors and others 2000, 2010. All rights reserved.