public class RemoteDistributionPackageImporter extends Object implements DistributionPackageImporter
DistributionPackageImporter
Constructor and Description |
---|
RemoteDistributionPackageImporter(DefaultDistributionLog log,
org.apache.sling.distribution.transport.DistributionTransportSecretProvider distributionTransportSecretProvider,
Map<String,String> endpointsMap) |
Modifier and Type | Method and Description |
---|---|
void |
importPackage(org.apache.sling.api.resource.ResourceResolver resourceResolver,
DistributionPackage distributionPackage)
Imports the given distribution package into the underlying system
|
DistributionPackageInfo |
importStream(org.apache.sling.api.resource.ResourceResolver resourceResolver,
InputStream stream)
Tries to convert an
InputStream to a DistributionPackage and then imports it into the underlying system |
public RemoteDistributionPackageImporter(DefaultDistributionLog log, org.apache.sling.distribution.transport.DistributionTransportSecretProvider distributionTransportSecretProvider, Map<String,String> endpointsMap)
public void importPackage(@Nonnull org.apache.sling.api.resource.ResourceResolver resourceResolver, @Nonnull DistributionPackage distributionPackage) throws DistributionException
DistributionPackageImporter
importPackage
in interface DistributionPackageImporter
resourceResolver
- - the resource resolver used to import the resourcesdistributionPackage
- - the package to be importedDistributionException
- if any error occurs during import@Nonnull public DistributionPackageInfo importStream(@Nonnull org.apache.sling.api.resource.ResourceResolver resourceResolver, @Nonnull InputStream stream) throws DistributionException
DistributionPackageImporter
InputStream
to a DistributionPackage
and then imports it into the underlying systemimportStream
in interface DistributionPackageImporter
resourceResolver
- - the resource resolver used to read the packagestream
- the InputStream
of the package to be converted and installedDistributionPackageInfo
if the stream has been successfully converted and installedDistributionException
- when the stream cannot be read as a DistributionPackage
and installedCopyright © 2007–2016 The Apache Software Foundation. All rights reserved.