public interface DistributionPackageExporter
Modifier and Type | Method and Description |
---|---|
void |
exportPackages(@NotNull org.apache.sling.api.resource.ResourceResolver resourceResolver,
@NotNull org.apache.sling.distribution.DistributionRequest distributionRequest,
@NotNull DistributionPackageProcessor packageProcessor)
Exports the
DistributionPackage s built from the
passed DistributionRequest . |
@Nullable DistributionPackage |
getPackage(@NotNull org.apache.sling.api.resource.ResourceResolver resourceResolver,
@NotNull String distributionPackageId)
Retrieves a
DistributionPackage given its identifier, if it already exists. |
void exportPackages(@NotNull @NotNull org.apache.sling.api.resource.ResourceResolver resourceResolver, @NotNull @NotNull org.apache.sling.distribution.DistributionRequest distributionRequest, @NotNull @NotNull DistributionPackageProcessor packageProcessor) throws DistributionException
DistributionPackage
s built from the
passed DistributionRequest
.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 packageDistributionException
@Nullable @Nullable DistributionPackage getPackage(@NotNull @NotNull org.apache.sling.api.resource.ResourceResolver resourceResolver, @NotNull @NotNull String distributionPackageId) throws DistributionException
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.resourceResolver
- - the resource resolver use to obtain the package.distributionPackageId
- - the id of the package
to be retrievedDistributionPackage
if available, null
otherwiseDistributionException
Copyright © 2007–2018 The Apache Software Foundation. All rights reserved.