Class AgentDistributionPackageExporter

java.lang.Object
org.apache.sling.distribution.packaging.impl.exporter.AgentDistributionPackageExporter
All Implemented Interfaces:
org.apache.sling.distribution.packaging.impl.DistributionPackageExporter

public class AgentDistributionPackageExporter extends Object implements org.apache.sling.distribution.packaging.impl.DistributionPackageExporter
a DistributionPackageExporter that picks DistributionPackage from a specific DistributionAgent's queue.
  • Constructor Details

    • AgentDistributionPackageExporter

      public AgentDistributionPackageExporter(String queueName, DistributionAgent agent, org.apache.sling.distribution.packaging.impl.DistributionPackageBuilderProvider packageBuilderProvider, String name, boolean dropInvalidItems)
  • Method Details

    • exportPackages

      public void exportPackages(@NotNull @NotNull org.apache.sling.api.resource.ResourceResolver resourceResolver, @NotNull @NotNull org.apache.sling.distribution.DistributionRequest distributionRequest, @NotNull @NotNull org.apache.sling.distribution.packaging.impl.DistributionPackageProcessor packageProcessor) throws DistributionException
      Description copied from interface: org.apache.sling.distribution.packaging.impl.DistributionPackageExporter
      Exports the DistributionPackages built from the passed DistributionRequest.
      Specified by:
      exportPackages in interface org.apache.sling.distribution.packaging.impl.DistributionPackageExporter
      Parameters:
      resourceResolver - the resource resolver used to export the packages, for example a 'local' exporter will use the resource resolver to read the content and assemble the binary in a certain location in the repository while a 'remote' exporter will use the resolver just to store the binary of the remotely fetched packages in the repository.
      distributionRequest - the request containing the needed information for content to be exported
      packageProcessor - a callback to process the exported package
      Throws:
      DistributionException
    • getPackage

      public DistributionPackage getPackage(@NotNull @NotNull org.apache.sling.api.resource.ResourceResolver resourceResolver, @NotNull @NotNull String distributionPackageId)
      Description copied from interface: org.apache.sling.distribution.packaging.impl.DistributionPackageExporter
      Retrieves a DistributionPackage given its identifier, if it already exists. This will be used for example to get already created (and cached) packages that were not yet distributed to the target instance.
      Specified by:
      getPackage in interface org.apache.sling.distribution.packaging.impl.DistributionPackageExporter
      Parameters:
      resourceResolver - - the resource resolver use to obtain the package.
      distributionPackageId - - the id of the package to be retrieved
      Returns:
      a DistributionPackage if available, null otherwise