Package org.commonjava.indy.content
Interface DirectContentAccess
-
public interface DirectContentAccessThis component is useful for content generators, that need access to raw files used as inputs for generating other files. For instance, the maven-metadata.xml files from each constituent repository in a group are used to generate the merged file. However, since we don't want to end up in an infinite recursion, we don't want to call back into theContentManager(which decorates its content accesses). Created by jdcasey on 5/2/16.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanexists(org.commonjava.indy.model.core.ArtifactStore store, String path)org.commonjava.maven.galley.model.TransfergetTransfer(org.commonjava.indy.model.core.ArtifactStore store, String path)Retrieve aTransferobject suitable for use in the specified operation.org.commonjava.maven.galley.model.TransfergetTransfer(org.commonjava.indy.model.core.StoreKey storeKey, String path)Retrieve aTransferobject suitable for use in the specified operation.List<StoreResource>listRaw(org.commonjava.indy.model.core.ArtifactStore store, String parentPath)List<StoreResource>listRaw(org.commonjava.indy.model.core.ArtifactStore store, String parentPath, org.commonjava.maven.galley.event.EventMetadata eventMetadata)Map<String,List<StoreResource>>listRaw(org.commonjava.indy.model.core.ArtifactStore store, List<String> parentPathList)Map<String,List<StoreResource>>listRaw(org.commonjava.indy.model.core.ArtifactStore store, List<String> parentPathList, org.commonjava.maven.galley.event.EventMetadata eventMetadata)List<org.commonjava.maven.galley.model.Transfer>retrieveAllRaw(List<? extends org.commonjava.indy.model.core.ArtifactStore> stores, String path, org.commonjava.maven.galley.event.EventMetadata eventMetadata)Mainly useful for content generators, this provides a mechanism for bypassing the content generation aspects of the content manager and access whatever concrete content there is.org.commonjava.maven.galley.model.TransferretrieveRaw(org.commonjava.indy.model.core.ArtifactStore store, String path, org.commonjava.maven.galley.event.EventMetadata eventMetadata)Mainly useful for content generators, this provides a mechanism for bypassing the content generation aspects of the content manager and access whatever concrete content there is.
-
-
-
Method Detail
-
retrieveRaw
org.commonjava.maven.galley.model.Transfer retrieveRaw(org.commonjava.indy.model.core.ArtifactStore store, String path, org.commonjava.maven.galley.event.EventMetadata eventMetadata) throws IndyWorkflowExceptionMainly useful for content generators, this provides a mechanism for bypassing the content generation aspects of the content manager and access whatever concrete content there is. This method will NOT expand aGroupto retrieve content from its members; instead, it's up to the caller to detect this scenario and callretrieveAllRaw(List, String, EventMetadata)instead.- Throws:
IndyWorkflowException
-
retrieveAllRaw
List<org.commonjava.maven.galley.model.Transfer> retrieveAllRaw(List<? extends org.commonjava.indy.model.core.ArtifactStore> stores, String path, org.commonjava.maven.galley.event.EventMetadata eventMetadata) throws IndyWorkflowException
Mainly useful for content generators, this provides a mechanism for bypassing the content generation aspects of the content manager and access whatever concrete content there is.- Throws:
IndyWorkflowException
-
getTransfer
org.commonjava.maven.galley.model.Transfer getTransfer(org.commonjava.indy.model.core.ArtifactStore store, String path) throws IndyWorkflowExceptionRetrieve aTransferobject suitable for use in the specified operation.- Parameters:
store- The store in which the Transfer should residepath- The path of the Transfer inside the store- Returns:
- A suitable transfer object (not null; those cases result in an exception) NOTE: the returned transfer may not exist!
- Throws:
IndyWorkflowException
-
getTransfer
org.commonjava.maven.galley.model.Transfer getTransfer(org.commonjava.indy.model.core.StoreKey storeKey, String path) 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).
No content generators are called in this method.- Parameters:
storeKey- The key to the store in which the Transfer should residepath- The path of the Transfer inside the store- 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 IndyWorkflowException- Throws:
IndyWorkflowException
-
listRaw
List<StoreResource> listRaw(org.commonjava.indy.model.core.ArtifactStore store, String parentPath) throws IndyWorkflowException
- Throws:
IndyWorkflowException
-
listRaw
List<StoreResource> listRaw(org.commonjava.indy.model.core.ArtifactStore store, String parentPath, org.commonjava.maven.galley.event.EventMetadata eventMetadata) throws IndyWorkflowException
- Throws:
IndyWorkflowException
-
listRaw
Map<String,List<StoreResource>> listRaw(org.commonjava.indy.model.core.ArtifactStore store, List<String> parentPathList) throws IndyWorkflowException
- Throws:
IndyWorkflowException
-
listRaw
Map<String,List<StoreResource>> listRaw(org.commonjava.indy.model.core.ArtifactStore store, List<String> parentPathList, org.commonjava.maven.galley.event.EventMetadata eventMetadata) throws IndyWorkflowException
- Throws:
IndyWorkflowException
-
-