@Service(value=DistributionPackageExporter.class) @Property(name="webconsole.configurationFactory.nameHint", value="Exporter name: {name}") public class LocalDistributionPackageExporterFactory extends Object implements DistributionPackageExporter
LocalDistributionPackageExporters.| Modifier and Type | Field and Description |
|---|---|
static String |
NAME
name of this exporter.
|
| Constructor and Description |
|---|
LocalDistributionPackageExporterFactory() |
| Modifier and Type | Method and Description |
|---|---|
void |
activate(Map<String,Object> config) |
void |
exportPackages(org.apache.sling.api.resource.ResourceResolver resourceResolver,
org.apache.sling.distribution.DistributionRequest distributionRequest,
DistributionPackageProcessor packageProcessor)
Exports the
DistributionPackages built from the
passed DistributionRequest. |
DistributionPackage |
getPackage(org.apache.sling.api.resource.ResourceResolver resourceResolver,
String distributionPackageId)
Retrieves a
DistributionPackage given its identifier, if it already exists. |
@Property(label="Name",
description="The name of the exporter.")
public static final String NAME
public LocalDistributionPackageExporterFactory()
public void exportPackages(@Nonnull org.apache.sling.api.resource.ResourceResolver resourceResolver, @Nonnull org.apache.sling.distribution.DistributionRequest distributionRequest, @Nonnull DistributionPackageProcessor packageProcessor) throws DistributionException
DistributionPackageExporterDistributionPackages built from the
passed DistributionRequest.exportPackages in interface DistributionPackageExporterresourceResolver - 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 packageDistributionExceptionpublic DistributionPackage getPackage(@Nonnull org.apache.sling.api.resource.ResourceResolver resourceResolver, @Nonnull String distributionPackageId) throws DistributionException
DistributionPackageExporterDistributionPackage 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.getPackage in interface DistributionPackageExporterresourceResolver - - the resource resolver use to obtain the package.distributionPackageId - - the id of the package to be retrievedDistributionPackage if available, null otherwiseDistributionExceptionCopyright © 2007–2017 The Apache Software Foundation. All rights reserved.