Class PackageDownloader

java.lang.Object
io.wcm.tooling.commons.packmgr.download.PackageDownloader
All Implemented Interfaces:
Closeable, AutoCloseable

public final class PackageDownloader extends Object implements Closeable
Downloads a single AEM content package.
  • Constructor Details

    • PackageDownloader

      public PackageDownloader(PackageManagerProperties props)
      Parameters:
      props - Package manager configuration properties.
  • Method Details

    • uploadPackageDefinition

      public String uploadPackageDefinition(File file)
      Upload the given local package definition (without actually installing it).
      Parameters:
      file - Package definition file
      Returns:
      Package path
    • downloadContentPackage

      public File downloadContentPackage(String packagePath, String ouputFilePath, boolean rebuildPackage)
      Download content package from CRX package manager.
      Parameters:
      packagePath - Content Package path in AEM instance.
      ouputFilePath - Path to download package from AEM instance to.
      rebuildPackage - Whether to rebuild the package within the CRX package manager before downloading it to include the latest content from repository.
      Returns:
      Downloaded content package file
    • close

      public void close() throws IOException
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
      Throws:
      IOException