Class PackageManagerProperties

java.lang.Object
io.wcm.tooling.commons.packmgr.PackageManagerProperties

public final class PackageManagerProperties extends Object
Configuration properties for PackageManagerHelper.
  • Constructor Details

    • PackageManagerProperties

      public PackageManagerProperties()
  • Method Details

    • getPackageManagerUrl

      public String getPackageManagerUrl()
      The URL of the HTTP service API of the CRX package manager. See CRX HTTP service Interface for details on this interface.
      Returns:
      URL
    • setPackageManagerUrl

      public void setPackageManagerUrl(String packageManagerUrl)
      Parameters:
      packageManagerUrl - The URL of the HTTP service API of the CRX package manager.
    • getUserId

      public String getUserId()
      The user name to authenticate as against the remote CRX system (package manager).
      Returns:
      User ID
    • setUserId

      public void setUserId(String userId)
      Parameters:
      userId - The user name to authenticate as against the remote CRX system (package manager).
    • getPassword

      public String getPassword()
      The password to authenticate against the remote CRX system (package manager).
      Returns:
      Password
    • setPassword

      public void setPassword(String password)
      Parameters:
      password - The password to authenticate against the remote CRX system (package manager).
    • getOAuth2AccessToken

      public String getOAuth2AccessToken()
      OAuth 2 access token to authenticate against the remote CRX system (package manager). If this is configured, username and password are ignored.
      Returns:
      OAuth 2 access token.
    • setOAuth2AccessToken

      public void setOAuth2AccessToken(String value)
      Parameters:
      value - OAuth 2 access token to authenticate against the remote CRX system (package manager).
    • getConsoleUserId

      public String getConsoleUserId()
      The user name to authenticate as against the remote CRX system (Felix console). Fallback to getUserId() if not set.
      Returns:
      User ID
    • setConsoleUserId

      public void setConsoleUserId(String consoleUserId)
      Parameters:
      consoleUserId - The user name to authenticate as against the remote CRX system (Felix console).
    • getConsolePassword

      public String getConsolePassword()
      The password to authenticate against the remote CRX system (Felix console). Fallback to getPassword() if not set.
      Returns:
      Password
    • setConsolePassword

      public void setConsolePassword(String consolePassword)
      Parameters:
      consolePassword - The password to authenticate against the remote CRX system (Felix console).
    • getConsoleOAuth2AccessToken

      public String getConsoleOAuth2AccessToken()
      OAuth 2 access token to authenticate against the remote CRX system (Felix console). If this is configured, username and password are ignored. Fallback to getOAuth2AccessToken() if not set.
      Returns:
      OAuth 2 access token.
    • setConsoleOAuth2AccessToken

      public void setConsoleOAuth2AccessToken(String value)
      Parameters:
      value - OAuth 2 access token to authenticate against the remote CRX system (Felix console).
    • getRetryCount

      public int getRetryCount()
      Number of times to retry upload and install via CRX HTTP interface if it fails.
      Returns:
      Retry count
    • setRetryCount

      public void setRetryCount(int retryCount)
      Parameters:
      retryCount - Number of times to retry upload and install via CRX HTTP interface if it fails.
    • getRetryDelaySec

      public int getRetryDelaySec()
      Number of seconds between retry attempts.
      Returns:
      Retry delay
    • setRetryDelaySec

      public void setRetryDelaySec(int retryDelaySec)
      Parameters:
      retryDelaySec - Number of seconds between retry attempts.
    • getBundleStatusUrl

      public String getBundleStatusUrl()
      Bundle status JSON URL. If an URL is configured the activation status of all bundles in the system is checked before it is tried to upload and install a new package and after each upload. If not all bundles are activated the upload is delayed up to {link #getBundleStatusWaitLimitSec()} seconds, every 5 seconds the activation status is checked anew. Expected is an URL like: http://localhost:4502/system/console/bundles/.json
      Returns:
      URL
    • setBundleStatusUrl

      public void setBundleStatusUrl(String bundleStatusUrl)
      Parameters:
      bundleStatusUrl - Bundle status JSON URL
    • getBundleStatusWaitLimitSec

      public int getBundleStatusWaitLimitSec()
      Number of seconds to wait as maximum for a positive bundle status check. If this limit is reached and the bundle status is still not positive the install of the package proceeds anyway.
      Returns:
      Limit in seconds
    • setBundleStatusWaitLimitSec

      public void setBundleStatusWaitLimitSec(int bundleStatusWaitLimitSec)
      Parameters:
      bundleStatusWaitLimitSec - Number of seconds to wait as maximum for a positive bundle status
    • getBundleStatusBlacklistBundleNames

      public List<Pattern> getBundleStatusBlacklistBundleNames()
      Patterns for symbolic names of bundles that are expected to be not present in bundle list. If any of these bundles are found in the bundle list, this system is assumed as not ready for installing further packages because a previous installation (e.g. of AEM service pack) is still in progress.
      Returns:
      List of regular expressions for symbolic bundle names.
    • setBundleStatusBlacklistBundleNames

      public void setBundleStatusBlacklistBundleNames(List<String> bundleStatusBlacklistBundleNames)
      Parameters:
      bundleStatusBlacklistBundleNames - Patterns for symbolic names of bundles that are expected to be not present in bundle list
    • getBundleStatusWhitelistBundleNames

      public List<Pattern> getBundleStatusWhitelistBundleNames()
      Patterns for symbolic names of bundles that are ignored in bundle list. The state of these bundles has no effect on the bundle status check.
      Returns:
      List of regular expressions for symbolic bundle names.
    • setBundleStatusWhitelistBundleNames

      public void setBundleStatusWhitelistBundleNames(List<String> bundleStatusWhitelistBundleNames)
      Parameters:
      bundleStatusWhitelistBundleNames - Patterns for symbolic names of bundles that are ignored in bundle list
    • getSystemReadyUrl

      public String getSystemReadyUrl()
      System ready status JSON URL. If an URL is configured the system ready status is checked.
      Returns:
      URL
    • setSystemReadyUrl

      public void setSystemReadyUrl(String systemReadyUrl)
      Parameters:
      systemReadyUrl - System ready status JSON URL. If an URL is configured the system ready status is checked.
    • getSystemReadyWaitLimitSec

      public int getSystemReadyWaitLimitSec()
      Number of seconds to wait as maximum for a positive system ready status check. If this limit is reached and the system ready status is still not positive the install of the package proceeds anyway.
      Returns:
      Limit in seconds
    • setSystemReadyWaitLimitSec

      public void setSystemReadyWaitLimitSec(int systemReadyWaitLimitSec)
      Parameters:
      systemReadyWaitLimitSec - Number of seconds to wait as maximum for a positive system ready status check
    • getPackageManagerInstallStatusURL

      public String getPackageManagerInstallStatusURL()
      Package Manager installation status JSON URL. If an URL is configured the installation status of packages and embedded packages is checked before it is tried to upload and install a new package and after each upload. If not all packages are installed the upload is delayed up to {link #getPackageManagerInstallStatusWaitLimit()} seconds, every 5 seconds the activation status is checked anew. Expected is an URL like: http://localhost:4502/crx/packmgr/installstatus.jsp
      Returns:
      URL
    • setPackageManagerInstallStatusURL

      public void setPackageManagerInstallStatusURL(String packageManagerInstallStatusURL)
      Parameters:
      packageManagerInstallStatusURL - Package Manager installation status JSON URL
    • getPackageManagerInstallStatusWaitLimitSec

      public int getPackageManagerInstallStatusWaitLimitSec()
      Number of seconds to wait as maximum for a positive package manager install status check. If this limit is reached and the packager manager install status is still not positive the install of the package proceeds anyway.
      Returns:
      Limit in seconds
    • setPackageManagerInstallStatusWaitLimitSec

      public void setPackageManagerInstallStatusWaitLimitSec(int packageManagerInstallStatusWaitLimitSec)
      Parameters:
      packageManagerInstallStatusWaitLimitSec - Number of seconds to wait as maximum for a positive package manager install status check
    • isRelaxedSSLCheck

      public boolean isRelaxedSSLCheck()
      If set to true also self-signed certificates are accepted.
      Returns:
      Relaced SSL check
    • setRelaxedSSLCheck

      public void setRelaxedSSLCheck(boolean relaxedSSLCheck)
      Parameters:
      relaxedSSLCheck - If set to true also self-signed certificates are accepted
    • getHttpConnectTimeoutSec

      public int getHttpConnectTimeoutSec()
      HTTP connection timeout (in seconds).
      Returns:
      Timeout
    • setHttpConnectTimeoutSec

      public void setHttpConnectTimeoutSec(int httpConnectTimeoutSec)
      Parameters:
      httpConnectTimeoutSec - HTTP connection timeout (in seconds)
    • getHttpSocketTimeoutSec

      public int getHttpSocketTimeoutSec()
      HTTP socket timeout (in seconds).
      Returns:
      Timeout
    • setHttpSocketTimeoutSec

      public void setHttpSocketTimeoutSec(int httpSocketTimeoutSec)
      Parameters:
      httpSocketTimeoutSec - HTTP socket timeout (in seconds)
    • getProxies

      public List<Proxy> getProxies()
      HTTP proxies from maven settings
      Returns:
      List of proxies
    • setProxies

      public void setProxies(List<Proxy> proxies)
      Parameters:
      proxies - HTTP proxies from maven settings
    • getPackageManagerOutputLogLevel

      public String getPackageManagerOutputLogLevel()
      Log level to be used to log responses from package manager (which may get huge for large packages).
      Returns:
      Log level (DEBUG or INFO). Default is INFO.
    • setPackageManagerOutputLogLevel

      public void setPackageManagerOutputLogLevel(String packageManagerOutputLogLevel)
      Parameters:
      packageManagerOutputLogLevel - Log level to be used to log responses from package manager