Interface DirectContentAccess


  • public interface DirectContentAccess
    This 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 the ContentManager (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
      boolean exists​(org.commonjava.indy.model.core.ArtifactStore store, String path)  
      org.commonjava.maven.galley.model.Transfer getTransfer​(org.commonjava.indy.model.core.ArtifactStore store, String path)
      Retrieve a Transfer object suitable for use in the specified operation.
      org.commonjava.maven.galley.model.Transfer getTransfer​(org.commonjava.indy.model.core.StoreKey storeKey, String path)
      Retrieve a Transfer object 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.Transfer retrieveRaw​(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 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. This method will NOT expand a Group to retrieve content from its members; instead, it's up to the caller to detect this scenario and call retrieveAllRaw(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 IndyWorkflowException
        Retrieve a Transfer object suitable for use in the specified operation.
        Parameters:
        store - The store in which the Transfer should reside
        path - 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 IndyWorkflowException
        Retrieve a Transfer object suitable for use in the specified operation. This method handles the selection logic in the event the store is a Group, and doesn't fire any events (the returned Transfer object 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 reside
        path - 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