@Service(value=DistributionPackageImporter.class) @Property(name="webconsole.configurationFactory.nameHint", value="Importer name: {name}") public class LocalDistributionPackageImporterFactory extends Object implements DistributionPackageImporter
LocalDistributionPackageImporters.| Constructor and Description |
|---|
LocalDistributionPackageImporterFactory() |
| Modifier and Type | Method and Description |
|---|---|
void |
activate(Map<String,Object> config) |
void |
importPackage(@NotNull org.apache.sling.api.resource.ResourceResolver resourceResolver,
@NotNull DistributionPackage distributionPackage)
Imports the given distribution package into the underlying system
|
@NotNull DistributionPackageInfo |
importStream(@NotNull org.apache.sling.api.resource.ResourceResolver resourceResolver,
@NotNull InputStream stream)
Tries to convert an
InputStream to a DistributionPackage and then imports it into the underlying system |
public LocalDistributionPackageImporterFactory()
public void importPackage(@NotNull
@NotNull org.apache.sling.api.resource.ResourceResolver resourceResolver,
@NotNull
@NotNull DistributionPackage distributionPackage)
throws DistributionException
DistributionPackageImporterimportPackage in interface DistributionPackageImporterresourceResolver - - the resource resolver used to import the resourcesdistributionPackage - - the package to be importedDistributionException - if any error occurs during import@NotNull public @NotNull DistributionPackageInfo importStream(@NotNull @NotNull org.apache.sling.api.resource.ResourceResolver resourceResolver, @NotNull @NotNull InputStream stream) throws DistributionException
DistributionPackageImporterInputStream to a DistributionPackage and then imports it into the underlying systemimportStream in interface DistributionPackageImporterresourceResolver - - the resource resolver used to read the packagestream - the InputStream of the package to be converted and importedDistributionPackageInfo if the stream has been successfully converted and importedDistributionException - when the stream cannot be read as a DistributionPackage and importedCopyright © 2007–2020 The Apache Software Foundation. All rights reserved.