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
aDistributionPackageExporterthat picksDistributionPackagefrom a specificDistributionAgent's queue.
-
-
Constructor Summary
Constructors Constructor Description AgentDistributionPackageExporter(String queueName, DistributionAgent agent, org.apache.sling.distribution.packaging.impl.DistributionPackageBuilderProvider packageBuilderProvider, String name, boolean dropInvalidItems)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidexportPackages(@NotNull org.apache.sling.api.resource.ResourceResolver resourceResolver, @NotNull org.apache.sling.distribution.DistributionRequest distributionRequest, @NotNull org.apache.sling.distribution.packaging.impl.DistributionPackageProcessor packageProcessor)Exports theDistributionPackages built from the passedDistributionRequest.DistributionPackagegetPackage(@NotNull org.apache.sling.api.resource.ResourceResolver resourceResolver, @NotNull String distributionPackageId)Retrieves aDistributionPackagegiven its identifier, if it already exists.
-
-
-
Constructor Detail
-
AgentDistributionPackageExporter
public AgentDistributionPackageExporter(String queueName, DistributionAgent agent, org.apache.sling.distribution.packaging.impl.DistributionPackageBuilderProvider packageBuilderProvider, String name, boolean dropInvalidItems)
-
-
Method Detail
-
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 DistributionExceptionDescription copied from interface:org.apache.sling.distribution.packaging.impl.DistributionPackageExporterExports theDistributionPackages built from the passedDistributionRequest.- Specified by:
exportPackagesin interfaceorg.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 exportedpackageProcessor- 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.DistributionPackageExporterRetrieves aDistributionPackagegiven 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:
getPackagein interfaceorg.apache.sling.distribution.packaging.impl.DistributionPackageExporter- Parameters:
resourceResolver- - the resource resolver use to obtain the package.distributionPackageId- - theid of the packageto be retrieved- Returns:
- a
DistributionPackageif available,nullotherwise
-
-