public class PackageManager
extends InstanceService
Allows to communicate with CRX Package Manager.
@NotNull public static java.lang.String PATH
@NotNull public static java.lang.String JSON_PATH
@NotNull public static java.lang.String HTML_PATH
@NotNull public static java.lang.String LIST_JSON
@NotNull public static java.lang.String DEFINITION_PATH
@NotNull public static java.lang.String METADATA_PATH
@NotNull public static java.lang.String METADATA_PATH_PROP
@NotNull public static java.lang.String METADATA_CHECKSUM_PROP
@NotNull public static java.lang.String METADATA_LAST_UNPACKED_PROP
public static com.cognifide.gradle.aem.common.instance.service.pkg.PackageManager.Companion Companion
public PackageManager(@NotNull
InstanceSync sync)
Allows to communicate with CRX Package Manager.
public org.gradle.api.provider.Property<java.lang.Boolean> getUploadForce()
Force upload CRX package regardless if it was previously uploaded.
@NotNull public com.cognifide.gradle.common.build.Retry getUploadRetry()
Repeat upload when failed (brute-forcing).
public void setUploadRetry(@NotNull
com.cognifide.gradle.common.build.Retry p)
Repeat upload when failed (brute-forcing).
@NotNull public com.cognifide.gradle.common.build.Retry getInstallRetry()
Repeat install when failed (brute-forcing).
public void setInstallRetry(@NotNull
com.cognifide.gradle.common.build.Retry p)
Repeat install when failed (brute-forcing).
public org.gradle.api.provider.Property<java.lang.Boolean> getInstallRecursive()
Determines if when on package install, sub-packages included in CRX package content should be also installed.
public org.gradle.api.provider.Property<java.lang.Boolean> getDeployAvoidance()
Deploys only if package is changed (checksum based) or reinstalled on instance in the meantime.
public org.gradle.api.provider.MapProperty<java.lang.String,java.lang.Boolean> getWorkflowToggle()
Allows to temporarily enable or disable workflows during CRX package deployment.
@NotNull public com.cognifide.gradle.common.build.Retry getListRetry()
Repeat listing package when failed (brute-forcing).
public void setListRetry(@NotNull
com.cognifide.gradle.common.build.Retry p)
Repeat listing package when failed (brute-forcing).
public org.gradle.api.provider.Property<java.lang.Boolean> getListRefresh()
Packages are installed lazy which means already installed will no be installed again. By default, information about currently installed packages is being retrieved from AEM only once.
This flag can change that behavior, so that information will be refreshed after each package installation.
@NotNull public com.cognifide.gradle.common.build.Retry getDownloadRetry()
Repeat download when failed (brute-forcing).
public void setDownloadRetry(@NotNull
com.cognifide.gradle.common.build.Retry p)
Repeat download when failed (brute-forcing).
public org.gradle.api.provider.ListProperty<java.lang.String> getErrors()
Define patterns for known exceptions which could be thrown during package installation making it impossible to succeed.
When declared exception is encountered during package installation process, no more retries will be applied.
public org.gradle.api.provider.ListProperty<java.lang.String> getSnapshots()
CRX package name conventions (with wildcard) indicating that package can change over time while having same version specified. Affects CRX packages composed and satisfied.
public org.gradle.api.provider.Property<java.lang.Integer> getResponseBuffer()
Determines number of lines to process at once during reading Package Manager HTML responses.
The higher the value, the bigger consumption of memory but shorter execution time. It is a protection against exceeding max Java heap size.
@NotNull public Package get(@NotNull java.io.File file)
@NotNull public Package get(@NotNull VaultDefinition definition)
@NotNull public Package get(@NotNull java.lang.String group, @NotNull java.lang.String name, @NotNull java.lang.String version)
@Nullable public Package find(@NotNull java.io.File file)
@Nullable public Package find(@NotNull VaultDefinition definition)
@Nullable public Package find(@NotNull java.lang.String group, @NotNull java.lang.String name, @NotNull java.lang.String version)
@NotNull public ListResponse list()
@NotNull public UploadResponse upload(@NotNull java.io.File file)
@NotNull
public java.io.File download(@NotNull
kotlin.jvm.functions.Function1<? super com.cognifide.gradle.aem.common.pkg.PackageDefinition,kotlin.Unit> definition)
Create package on the fly, upload it to instance then build it. Next built package is downloaded - replacing initially created package. Finally built package is deleted on instance (preventing messing up).
@NotNull
public java.io.File download(@NotNull
PackageDefinition definition)
Create package on the fly, upload it to instance then build it. Next built package is downloaded - replacing initially created package. Finally built package is deleted on instance (preventing messing up).
public void download(@NotNull
java.lang.String remotePath,
@NotNull
java.io.File targetFile)
@NotNull public BuildResponse build(@NotNull java.lang.String remotePath)
@NotNull public InstallResponse install(@NotNull java.io.File file)
@NotNull public InstallResponse install(@NotNull java.lang.String remotePath)
public boolean isSnapshot(@NotNull
java.io.File file)
public boolean deploy(@NotNull
java.io.File file,
boolean activate)
public boolean distribute(@NotNull
java.io.File file)
@NotNull public UploadResponse activate(@NotNull java.io.File file)
@NotNull public UploadResponse activate(@NotNull java.lang.String remotePath)
@NotNull public DeleteResponse delete(@NotNull java.io.File file)
@NotNull public DeleteResponse delete(@NotNull java.lang.String remotePath)
@NotNull public UninstallResponse uninstall(@NotNull java.io.File file)
@NotNull public UninstallResponse uninstall(@NotNull java.lang.String remotePath)
public void purge(@NotNull
java.io.File file)