public abstract class AbstractArtifactRepository extends AbstractRepository<IArtifactKey> implements IArtifactRepository
This base class provides default implementations of all methods that modify the repository.
These default methods throw an exception if AbstractRepository.isModifiable() returns false.
Therefore a client can implement a read-only repository by overriding only the abstract methods.
CODE_RETRY, PROP_RUNNABLEENABLED, 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 | Constructor and Description |
|---|---|
protected |
AbstractArtifactRepository(IProvisioningAgent agent,
String name,
String type,
String version,
URI location,
String description,
String provider,
Map<String,String> properties) |
| Modifier and Type | Method and Description |
|---|---|
void |
addDescriptor(IArtifactDescriptor descriptor)
Deprecated.
Use
addDescriptor(IArtifactDescriptor, IProgressMonitor) instead. |
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
|
abstract boolean |
contains(IArtifactDescriptor descriptor)
Returns true if this repository contains the given descriptor.
|
abstract 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 |
boolean |
equals(Object o) |
IStatus |
executeBatch(IRunnableWithProgress runnable,
IProgressMonitor monitor)
Executes a runnable against this repository.
|
abstract IStatus |
getArtifact(IArtifactDescriptor descriptor,
OutputStream destination,
IProgressMonitor monitor)
Writes to the given output stream the bytes represented by the artifact descriptor.
|
abstract 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
|
abstract IStatus |
getArtifacts(IArtifactRequest[] requests,
IProgressMonitor monitor)
Executes the given artifact requests on this byte server.
|
abstract OutputStream |
getOutputStream(IArtifactDescriptor descriptor)
Open an output stream to which a client can write the data for the given
artifact descriptor.
|
int |
hashCode() |
void |
removeAll()
Deprecated.
Use
removeAll(IProgressMonitor) instead. |
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.
Use
removeDescriptor(IArtifactKey, IProgressMonitor) instead. |
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.
Use
removeDescriptors(IArtifactKey[], IProgressMonitor) instead. |
void |
removeDescriptors(IArtifactKey[] keys,
IProgressMonitor monitor)
Remove the given list of keys and all related content and descriptors from this
repository.
|
assertModifiable, getDescription, getLocation, getName, getProperties, getProperty, getProvider, getProvisioningAgent, getType, getVersion, isModifiable, setDescription, setLocation, setName, setProperties, setProperty, setProperty, setProvider, setType, setVersiongetAdapterclone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitdescriptorQueryable, getRawArtifactgetDescription, getLocation, getName, getProperties, getProperty, getProvider, getProvisioningAgent, getType, getVersion, isModifiable, setProperty, setPropertygetAdapterquerypublic abstract boolean contains(IArtifactDescriptor descriptor)
IArtifactRepositorycontains in interface IArtifactRepositorydescriptor - the descriptor to querypublic abstract boolean contains(IArtifactKey key)
IArtifactRepositorycontains in interface IArtifactRepositorykey - the key to querypublic abstract IStatus getArtifact(IArtifactDescriptor descriptor, OutputStream destination, IProgressMonitor monitor)
IArtifactRepositorygetArtifact in interface IArtifactRepositorydescriptor - 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 desiredpublic abstract IArtifactDescriptor[] getArtifactDescriptors(IArtifactKey key)
IArtifactRepositorygetArtifactDescriptors in interface IArtifactRepositorykey - the artifact key to lookuppublic abstract IStatus getArtifacts(IArtifactRequest[] requests, IProgressMonitor monitor)
IArtifactRepositorygetArtifacts in interface IArtifactRepositoryrequests - The artifact requestsOK if requests were
processed successfully. Otherwise, a status indicating information,
warnings, or errors that occurred while executing the artifact requestspublic abstract OutputStream getOutputStream(IArtifactDescriptor descriptor) throws ProvisionException
IArtifactRepositorygetOutputStream in interface IArtifactRepositorydescriptor - 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).public void addDescriptor(IArtifactDescriptor descriptor, IProgressMonitor monitor)
IArtifactRepositoryaddDescriptor in interface IArtifactRepositorydescriptor - 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 locationpublic void addDescriptor(IArtifactDescriptor descriptor)
addDescriptor(IArtifactDescriptor, IProgressMonitor) instead.IArtifactRepositoryaddDescriptor in interface IArtifactRepositorydescriptor - the descriptor to add.public void addDescriptors(IArtifactDescriptor[] descriptors, IProgressMonitor monitor)
addDescriptors in interface IArtifactRepositorydescriptors - 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 locationpublic void addDescriptors(IArtifactDescriptor[] descriptors)
addDescriptors(IArtifactDescriptor[], IProgressMonitor) instead.IArtifactRepositoryaddDescriptors in interface IArtifactRepositorydescriptors - the artifact descriptors to addpublic void removeDescriptor(IArtifactDescriptor descriptor, IProgressMonitor monitor)
removeDescriptor in interface IArtifactRepositorydescriptor - 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 locationpublic void removeDescriptor(IArtifactDescriptor descriptor)
removeDescriptor(IArtifactDescriptor, IProgressMonitor) instead.IArtifactRepositoryremoveDescriptor in interface IArtifactRepositorydescriptor - the descriptor to remove.public void removeDescriptors(IArtifactDescriptor[] descriptors, IProgressMonitor monitor)
removeDescriptors in interface IArtifactRepositorydescriptors - 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 locationpublic void removeDescriptors(IArtifactDescriptor[] descriptors)
removeDescriptors(IArtifactDescriptor[], IProgressMonitor) instead.removeDescriptors in interface IArtifactRepositorydescriptors - the list of descriptors to removepublic void removeDescriptor(IArtifactKey key, IProgressMonitor monitor)
removeDescriptor in interface IArtifactRepositorykey - 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 locationpublic void removeDescriptor(IArtifactKey key)
removeDescriptor(IArtifactKey, IProgressMonitor) instead.IArtifactRepositoryremoveDescriptor in interface IArtifactRepositorykey - the key to remove.public void removeDescriptors(IArtifactKey[] keys, IProgressMonitor monitor)
removeDescriptors in interface IArtifactRepositorymonitor - 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 locationpublic void removeDescriptors(IArtifactKey[] keys)
removeDescriptors(IArtifactKey[], IProgressMonitor) instead.removeDescriptors in interface IArtifactRepositorypublic void removeAll(IProgressMonitor monitor)
IArtifactRepositoryremoveAll in interface IArtifactRepositorymonitor - 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 locationpublic void removeAll()
removeAll(IProgressMonitor) instead.IArtifactRepositoryremoveAll in interface IArtifactRepositorypublic IArtifactDescriptor createArtifactDescriptor(IArtifactKey key)
IArtifactRepositoryIArtifactDescriptor based on the given keycreateArtifactDescriptor in interface IArtifactRepositorykey - IArtifactKeypublic IArtifactKey createArtifactKey(String classifier, String id, Version version)
IArtifactRepositoryIArtifactKeycreateArtifactKey in interface IArtifactRepositorypublic IStatus executeBatch(IRunnableWithProgress runnable, IProgressMonitor monitor)
IArtifactRepositoryexecuteBatch in interface IArtifactRepositoryrunnable - The runnable to executemonitor - A progress monitor that will be passed to the runnable
Copyright (c) 2000, 2018 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.