Interface ContentManager


  • public interface ContentManager
    High-level interface for retrieving, storing, etc. content which includes both produced (i.e. generated) content as well as downloaded and stored content. This is intended to be used by end users, REST API bindings, etc. That's in contrast to DownloadManager, which is a lower-level interface for accessing stored and remote content, and is meant to be used by this interface and its derivatives, along with ContentGenerator implementations.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      boolean delete​(org.commonjava.indy.model.core.ArtifactStore store, String path)  
      boolean delete​(org.commonjava.indy.model.core.ArtifactStore store, String path, org.commonjava.maven.galley.event.EventMetadata eventMetadata)  
      boolean deleteAll​(List<? extends org.commonjava.indy.model.core.ArtifactStore> stores, String path)  
      boolean deleteAll​(List<? extends org.commonjava.indy.model.core.ArtifactStore> stores, String path, org.commonjava.maven.galley.event.EventMetadata eventMetadata)  
      boolean exists​(org.commonjava.indy.model.core.ArtifactStore store, String path)  
      org.commonjava.maven.galley.transport.htcli.model.HttpExchangeMetadata getHttpMetadata​(org.commonjava.indy.model.core.StoreKey storeKey, String path)  
      org.commonjava.maven.galley.transport.htcli.model.HttpExchangeMetadata getHttpMetadata​(org.commonjava.maven.galley.model.Transfer txfr)  
      org.commonjava.maven.galley.model.Transfer getTransfer​(List<org.commonjava.indy.model.core.ArtifactStore> stores, String path, org.commonjava.maven.galley.model.TransferOperation op)
      Retrieve a Transfer object suitable for use in the specified operation.
      org.commonjava.maven.galley.model.Transfer getTransfer​(org.commonjava.indy.model.core.ArtifactStore store, String path, org.commonjava.maven.galley.model.TransferOperation op)
      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, org.commonjava.maven.galley.model.TransferOperation op)
      Retrieve a Transfer object suitable for use in the specified operation.
      List<StoreResource> list​(List<? extends org.commonjava.indy.model.core.ArtifactStore> stores, String path)  
      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 eventMetadata)  
      void rescan​(org.commonjava.indy.model.core.ArtifactStore store)  
      void rescan​(org.commonjava.indy.model.core.ArtifactStore store, org.commonjava.maven.galley.event.EventMetadata eventMetadata)  
      void rescanAll​(List<? extends org.commonjava.indy.model.core.ArtifactStore> stores)  
      void rescanAll​(List<? extends org.commonjava.indy.model.core.ArtifactStore> stores, org.commonjava.maven.galley.event.EventMetadata eventMetadata)  
      org.commonjava.maven.galley.model.Transfer retrieve​(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.Transfer retrieve​(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.Transfer retrieveFirst​(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.Transfer retrieveFirst​(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.Transfer store​(List<? extends org.commonjava.indy.model.core.ArtifactStore> stores, org.commonjava.indy.model.core.StoreKey topKey, String path, InputStream stream, org.commonjava.maven.galley.model.TransferOperation op, org.commonjava.maven.galley.event.EventMetadata eventMetadata)
      Store the content contained in the InputStream under the given path within the storage directory for first appropriate instance among the given ArtifactStore's.
      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)
      Store the content contained in the InputStream under the given path within the storage directory for the given ArtifactStore.
      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)
      Store the content contained in the InputStream under the given path within the storage directory for the given ArtifactStore.
    • 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 IndyWorkflowException
        Retrieve 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 IndyWorkflowException
        Retrieve the content at the given path from the given store, then return the transfer that references the content.
        Parameters:
        eventMetadata - TODO
        Throws:
        IndyWorkflowException
      • getTransfer

        org.commonjava.maven.galley.model.Transfer getTransfer​(org.commonjava.indy.model.core.ArtifactStore store,
                                                               String path,
                                                               org.commonjava.maven.galley.model.TransferOperation op)
                                                        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:
        store - The store in which the Transfer should reside
        path - The path of the Transfer inside the store
        op - 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
      • getTransfer

        org.commonjava.maven.galley.model.Transfer getTransfer​(org.commonjava.indy.model.core.StoreKey storeKey,
                                                               String path,
                                                               org.commonjava.maven.galley.model.TransferOperation op)
                                                        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
        op - 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
      • getTransfer

        org.commonjava.maven.galley.model.Transfer getTransfer​(List<org.commonjava.indy.model.core.ArtifactStore> stores,
                                                               String path,
                                                               org.commonjava.maven.galley.model.TransferOperation op)
                                                        throws IndyWorkflowException
        Retrieve a Transfer object suitable for use in the specified operation. This method handles the selection logic, and doesn't fire any events (the returned Transfer object handles that in this case). The first suitable store is used to hold the Transfer.
        No content generators are called in this method.
        Parameters:
        stores - The stores in which the Transfer should reside
        path - The path of the Transfer inside the store
        op - 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
      • 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 IndyWorkflowException
        Store the content contained in the InputStream under the given path within the storage directory for the given ArtifactStore. Use the given TransferOperation to trigger the appropriate tangential maintenance, etc. actions. Return the Transfer that references the stored content.
        If the given ArtifactStore isn't a HostedRepository, or is a Group that doesn't contain a HostedRepository, fail. If the HostedRepository instances 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 IndyWorkflowException
        Store the content contained in the InputStream under the given path within the storage directory for the given ArtifactStore. Use the given TransferOperation to trigger the appropriate tangential maintenance, etc. actions. Return the Transfer that references the stored content.
        If the given ArtifactStore isn't a HostedRepository, or is a Group that doesn't contain a HostedRepository, fail. If the HostedRepository instances 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,
                                                         org.commonjava.indy.model.core.StoreKey topKey,
                                                         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 the InputStream under the given path within the storage directory for first appropriate instance among the given ArtifactStore's. Use the given TransferOperation to trigger the appropriate tangential maintenance, etc. actions. Return the Transfer that references the stored content.
        If the given ArtifactStore isn't a HostedRepository, or is a Group that doesn't contain a HostedRepository, fail. If the HostedRepository instances involved don't allow deployment/storage, or don't allow appropriate deployment (releases-only for snapshot content, or vice versa), then fail.
        Parameters:
        topKey -
        eventMetadata - TODO
        Throws:
        IndyWorkflowException
      • getHttpMetadata

        org.commonjava.maven.galley.transport.htcli.model.HttpExchangeMetadata getHttpMetadata​(org.commonjava.maven.galley.model.Transfer txfr)
                                                                                        throws IndyWorkflowException
        Throws:
        IndyWorkflowException