Package org.commonjava.indy.content
Interface DownloadManager
-
public interface DownloadManagerOrganizes resolution of content from cached locations, remote locations, and group membership. This is a low-level interface intended to be used byContentManagerandContentGeneratorimplementations. It does not include results from generator sources (i.e. ContentProducer).
-
-
Field Summary
Fields Modifier and Type Field Description static StringHTTP_PARAM_REPOKey used to bindRemoteRepositoryinstances to the HTTP client in order to extract SSL/authentication info.static StringROOT_PATHRoot path used when retrieving the root of aLocation's cache.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleandelete(org.commonjava.indy.model.core.ArtifactStore store, String path)booleandelete(org.commonjava.indy.model.core.ArtifactStore store, String path, org.commonjava.maven.galley.event.EventMetadata eventMetadata)booleandeleteAll(List<? extends org.commonjava.indy.model.core.ArtifactStore> stores, String path)booleanexists(org.commonjava.indy.model.core.ArtifactStore store, String path)Artifact existence check for given store and path.org.commonjava.maven.galley.model.TransfergetStorageReference(List<org.commonjava.indy.model.core.ArtifactStore> stores, String path, org.commonjava.maven.galley.model.TransferOperation op)Retrieve aTransferobject suitable for use in the specified operation.org.commonjava.maven.galley.model.TransfergetStorageReference(org.commonjava.indy.model.core.ArtifactStore store, String... path)org.commonjava.maven.galley.model.TransfergetStorageReference(org.commonjava.indy.model.core.ArtifactStore store, String path, org.commonjava.maven.galley.model.TransferOperation op)Retrieve aTransferobject suitable for use in the specified operation.org.commonjava.maven.galley.model.TransfergetStorageReference(org.commonjava.indy.model.core.StoreKey key, String... path)org.commonjava.maven.galley.model.TransfergetStoreRootDirectory(org.commonjava.indy.model.core.ArtifactStore store)org.commonjava.maven.galley.model.TransfergetStoreRootDirectory(org.commonjava.indy.model.core.StoreKey key)List<StoreResource>list(List<? extends org.commonjava.indy.model.core.ArtifactStore> stores, String path)List<StoreResource>list(List<? extends org.commonjava.indy.model.core.ArtifactStore> stores, String path, org.commonjava.maven.galley.event.EventMetadata eventMetadata)List<StoreResource>list(org.commonjava.indy.model.core.ArtifactStore store, String path)List<StoreResource>list(org.commonjava.indy.model.core.ArtifactStore store, String path, org.commonjava.maven.galley.event.EventMetadata eventMetadatada)List<org.commonjava.maven.galley.model.Transfer>listRecursively(org.commonjava.indy.model.core.StoreKey src, String startPath)voidrescan(org.commonjava.indy.model.core.ArtifactStore store)voidrescan(org.commonjava.indy.model.core.ArtifactStore store, org.commonjava.maven.galley.event.EventMetadata eventMetadata)voidrescanAll(List<? extends org.commonjava.indy.model.core.ArtifactStore> stores)voidrescanAll(List<? extends org.commonjava.indy.model.core.ArtifactStore> stores, org.commonjava.maven.galley.event.EventMetadata eventMetadata)org.commonjava.maven.galley.model.Transferretrieve(org.commonjava.indy.model.core.ArtifactStore store, String path)Retrieve the content at the given path from the given store, then return the transfer that references the content.org.commonjava.maven.galley.model.Transferretrieve(org.commonjava.indy.model.core.ArtifactStore store, String path, org.commonjava.maven.galley.event.EventMetadata eventMetadata)Retrieve the content at the given path from the given store, then return the transfer that references the content.List<org.commonjava.maven.galley.model.Transfer>retrieveAll(List<? extends org.commonjava.indy.model.core.ArtifactStore> stores, String path)Retrieve the content at the given path from all stores, then return the set of transfers that reference the content.List<org.commonjava.maven.galley.model.Transfer>retrieveAll(List<? extends org.commonjava.indy.model.core.ArtifactStore> stores, String path, org.commonjava.maven.galley.event.EventMetadata eventMetadata)Retrieve the content at the given path from all stores, then return the set of transfers that reference the content.org.commonjava.maven.galley.model.TransferretrieveFirst(List<? extends org.commonjava.indy.model.core.ArtifactStore> stores, String path)Retrieve the content at the given path from the first store possible, then return then return the transfer that references the content without iterating any farther.org.commonjava.maven.galley.model.TransferretrieveFirst(List<? extends org.commonjava.indy.model.core.ArtifactStore> stores, String path, org.commonjava.maven.galley.event.EventMetadata eventMetadata)Retrieve the content at the given path from the first store possible, then return then return the transfer that references the content without iterating any farther.org.commonjava.maven.galley.model.Transferstore(List<? extends org.commonjava.indy.model.core.ArtifactStore> stores, String path, InputStream stream, org.commonjava.maven.galley.model.TransferOperation op)Store the content contained in theInputStreamunder the given path within the storage directory for first appropriate instance among the givenArtifactStore's.org.commonjava.maven.galley.model.Transferstore(List<? extends org.commonjava.indy.model.core.ArtifactStore> stores, String path, InputStream stream, org.commonjava.maven.galley.model.TransferOperation op, org.commonjava.maven.galley.event.EventMetadata eventMetadata)Store the content contained in theInputStreamunder the given path within the storage directory for first appropriate instance among the givenArtifactStore's.org.commonjava.maven.galley.model.Transferstore(org.commonjava.indy.model.core.ArtifactStore store, String path, InputStream stream, org.commonjava.maven.galley.model.TransferOperation op)Store the content contained in theInputStreamunder the given path within the storage directory for the givenArtifactStore.org.commonjava.maven.galley.model.Transferstore(org.commonjava.indy.model.core.ArtifactStore store, String path, InputStream stream, org.commonjava.maven.galley.model.TransferOperation op, org.commonjava.maven.galley.event.EventMetadata eventMetadata)Store the content contained in theInputStreamunder the given path within the storage directory for the givenArtifactStore.
-
-
-
Field Detail
-
HTTP_PARAM_REPO
static final String HTTP_PARAM_REPO
Key used to bindRemoteRepositoryinstances to the HTTP client in order to extract SSL/authentication info. TODO: Given the attribute methods in the GalleyLocationapi, this should be obsolete.- See Also:
- Constant Field Values
-
ROOT_PATH
static final String ROOT_PATH
Root path used when retrieving the root of aLocation's cache.- See Also:
- Constant Field Values
-
-
Method Detail
-
retrieveFirst
org.commonjava.maven.galley.model.Transfer retrieveFirst(List<? extends org.commonjava.indy.model.core.ArtifactStore> stores, String path) throws IndyWorkflowException
Retrieve the content at the given path from the first store possible, then return then return the transfer that references the content without iterating any farther.- Throws:
IndyWorkflowException
-
retrieveFirst
org.commonjava.maven.galley.model.Transfer retrieveFirst(List<? extends org.commonjava.indy.model.core.ArtifactStore> stores, String path, org.commonjava.maven.galley.event.EventMetadata eventMetadata) throws IndyWorkflowException
Retrieve the content at the given path from the first store possible, then return then return the transfer that references the content without iterating any farther.- Parameters:
eventMetadata- TODO- Throws:
IndyWorkflowException
-
retrieveAll
List<org.commonjava.maven.galley.model.Transfer> retrieveAll(List<? extends org.commonjava.indy.model.core.ArtifactStore> stores, String path) throws IndyWorkflowException
Retrieve the content at the given path from all stores, then return the set of transfers that reference the content.- Throws:
IndyWorkflowException
-
retrieveAll
List<org.commonjava.maven.galley.model.Transfer> retrieveAll(List<? extends org.commonjava.indy.model.core.ArtifactStore> stores, String path, org.commonjava.maven.galley.event.EventMetadata eventMetadata) throws IndyWorkflowException
Retrieve the content at the given path from all stores, then return the set of transfers that reference the content.- Parameters:
eventMetadata- TODO- Throws:
IndyWorkflowException
-
retrieve
org.commonjava.maven.galley.model.Transfer retrieve(org.commonjava.indy.model.core.ArtifactStore store, String path) throws IndyWorkflowExceptionRetrieve the content at the given path from the given store, then return the transfer that references the content.- Throws:
IndyWorkflowException
-
retrieve
org.commonjava.maven.galley.model.Transfer retrieve(org.commonjava.indy.model.core.ArtifactStore store, String path, org.commonjava.maven.galley.event.EventMetadata eventMetadata) throws IndyWorkflowExceptionRetrieve the content at the given path from the given store, then return the transfer that references the content.- Parameters:
eventMetadata- TODO- Throws:
IndyWorkflowException
-
store
org.commonjava.maven.galley.model.Transfer store(org.commonjava.indy.model.core.ArtifactStore store, String path, InputStream stream, org.commonjava.maven.galley.model.TransferOperation op) throws IndyWorkflowExceptionStore the content contained in theInputStreamunder the given path within the storage directory for the givenArtifactStore. Use the givenTransferOperationto trigger the appropriate tangential maintenance, etc. actions. Return theTransferthat references the stored content.
If the givenArtifactStoreisn't aHostedRepository, or is aGroupthat doesn't contain aHostedRepository, fail. If theHostedRepositoryinstances involved don't allow deployment/storage, or don't allow appropriate deployment (releases-only for snapshot content, or vice versa), then fail.- Throws:
IndyWorkflowException
-
store
org.commonjava.maven.galley.model.Transfer store(org.commonjava.indy.model.core.ArtifactStore store, String path, InputStream stream, org.commonjava.maven.galley.model.TransferOperation op, org.commonjava.maven.galley.event.EventMetadata eventMetadata) throws IndyWorkflowExceptionStore the content contained in theInputStreamunder the given path within the storage directory for the givenArtifactStore. Use the givenTransferOperationto trigger the appropriate tangential maintenance, etc. actions. Return theTransferthat references the stored content.
If the givenArtifactStoreisn't aHostedRepository, or is aGroupthat doesn't contain aHostedRepository, fail. If theHostedRepositoryinstances involved don't allow deployment/storage, or don't allow appropriate deployment (releases-only for snapshot content, or vice versa), then fail.- Parameters:
eventMetadata- TODO- Throws:
IndyWorkflowException
-
store
org.commonjava.maven.galley.model.Transfer store(List<? extends org.commonjava.indy.model.core.ArtifactStore> stores, String path, InputStream stream, org.commonjava.maven.galley.model.TransferOperation op) throws IndyWorkflowException
Store the content contained in theInputStreamunder the given path within the storage directory for first appropriate instance among the givenArtifactStore's. Use the givenTransferOperationto trigger the appropriate tangential maintenance, etc. actions. Return theTransferthat references the stored content.
If the givenArtifactStoreisn't aHostedRepository, or is aGroupthat doesn't contain aHostedRepository, fail. If theHostedRepositoryinstances involved don't allow deployment/storage, or don't allow appropriate deployment (releases-only for snapshot content, or vice versa), then fail.- Throws:
IndyWorkflowException
-
store
org.commonjava.maven.galley.model.Transfer store(List<? extends org.commonjava.indy.model.core.ArtifactStore> stores, String path, InputStream stream, org.commonjava.maven.galley.model.TransferOperation op, org.commonjava.maven.galley.event.EventMetadata eventMetadata) throws IndyWorkflowException
Store the content contained in theInputStreamunder the given path within the storage directory for first appropriate instance among the givenArtifactStore's. Use the givenTransferOperationto trigger the appropriate tangential maintenance, etc. actions. Return theTransferthat references the stored content.
If the givenArtifactStoreisn't aHostedRepository, or is aGroupthat doesn't contain aHostedRepository, fail. If theHostedRepositoryinstances involved don't allow deployment/storage, or don't allow appropriate deployment (releases-only for snapshot content, or vice versa), then fail.- Parameters:
eventMetadata- TODO- Throws:
IndyWorkflowException
-
delete
boolean delete(org.commonjava.indy.model.core.ArtifactStore store, String path) throws IndyWorkflowException- Throws:
IndyWorkflowException
-
delete
boolean delete(org.commonjava.indy.model.core.ArtifactStore store, String path, org.commonjava.maven.galley.event.EventMetadata eventMetadata) throws IndyWorkflowException- Throws:
IndyWorkflowException
-
deleteAll
boolean deleteAll(List<? extends org.commonjava.indy.model.core.ArtifactStore> stores, String path) throws IndyWorkflowException
- Throws:
IndyWorkflowException
-
rescan
void rescan(org.commonjava.indy.model.core.ArtifactStore store) throws IndyWorkflowException- Throws:
IndyWorkflowException
-
rescan
void rescan(org.commonjava.indy.model.core.ArtifactStore store, org.commonjava.maven.galley.event.EventMetadata eventMetadata) throws IndyWorkflowException- Throws:
IndyWorkflowException
-
rescanAll
void rescanAll(List<? extends org.commonjava.indy.model.core.ArtifactStore> stores) throws IndyWorkflowException
- Throws:
IndyWorkflowException
-
rescanAll
void rescanAll(List<? extends org.commonjava.indy.model.core.ArtifactStore> stores, org.commonjava.maven.galley.event.EventMetadata eventMetadata) throws IndyWorkflowException
- Throws:
IndyWorkflowException
-
list
List<StoreResource> list(org.commonjava.indy.model.core.ArtifactStore store, String path) throws IndyWorkflowException
- Throws:
IndyWorkflowException
-
list
List<StoreResource> list(org.commonjava.indy.model.core.ArtifactStore store, String path, org.commonjava.maven.galley.event.EventMetadata eventMetadatada) throws IndyWorkflowException
- Throws:
IndyWorkflowException
-
list
List<StoreResource> list(List<? extends org.commonjava.indy.model.core.ArtifactStore> stores, String path) throws IndyWorkflowException
- Throws:
IndyWorkflowException
-
list
List<StoreResource> list(List<? extends org.commonjava.indy.model.core.ArtifactStore> stores, String path, org.commonjava.maven.galley.event.EventMetadata eventMetadata) throws IndyWorkflowException
- Throws:
IndyWorkflowException
-
getStoreRootDirectory
org.commonjava.maven.galley.model.Transfer getStoreRootDirectory(org.commonjava.indy.model.core.StoreKey key) throws IndyWorkflowException- Throws:
IndyWorkflowException
-
getStoreRootDirectory
org.commonjava.maven.galley.model.Transfer getStoreRootDirectory(org.commonjava.indy.model.core.ArtifactStore store)
-
getStorageReference
org.commonjava.maven.galley.model.Transfer getStorageReference(org.commonjava.indy.model.core.StoreKey key, String... path) throws IndyWorkflowException- Throws:
IndyWorkflowException
-
getStorageReference
org.commonjava.maven.galley.model.Transfer getStorageReference(org.commonjava.indy.model.core.ArtifactStore store, String... path)
-
listRecursively
List<org.commonjava.maven.galley.model.Transfer> listRecursively(org.commonjava.indy.model.core.StoreKey src, String startPath) throws IndyWorkflowException
- Throws:
IndyWorkflowException
-
getStorageReference
org.commonjava.maven.galley.model.Transfer getStorageReference(List<org.commonjava.indy.model.core.ArtifactStore> stores, String path, org.commonjava.maven.galley.model.TransferOperation op) throws IndyWorkflowException
Retrieve aTransferobject suitable for use in the specified operation. This method handles the selection logic, and doesn't fire any events (the returnedTransferobject handles that in this case). The first suitable store is used to hold the Transfer.- Parameters:
stores- The stores in which the Transfer should residepath- The path of the Transfer inside the storeop- The operation we want to execute on the returned Transfer- Returns:
- A suitable transfer object (not null; those cases result in an exception) NOTE: the returned transfer may not exist!
- Throws:
IndyWorkflowException- in case no suitable storage location can be found
-
getStorageReference
org.commonjava.maven.galley.model.Transfer getStorageReference(org.commonjava.indy.model.core.ArtifactStore store, String path, org.commonjava.maven.galley.model.TransferOperation op) throws IndyWorkflowExceptionRetrieve aTransferobject suitable for use in the specified operation. This method handles the selection logic in the event the store is aGroup, and doesn't fire any events (the returnedTransferobject handles that in this case).- Parameters:
store- The store in which the Transfer should residepath- The path of the Transfer inside the storeop- The operation we want to execute on the returned Transfer- Returns:
- A suitable transfer object (not null; those cases result in an exception) NOTE: the returned transfer may not exist!
- Throws:
IndyWorkflowException- in case no suitable storage location can be found
-
exists
boolean exists(org.commonjava.indy.model.core.ArtifactStore store, String path) throws IndyWorkflowExceptionArtifact existence check for given store and path. This method doesn't fire any events.- Parameters:
store- The store in which the check is performedpath- The path of the Transfer inside the store- Throws:
IndyWorkflowException- in case no suitable storage location can be found
-
-