Class PackageManagerProperties


  • public final class PackageManagerProperties
    extends java.lang.Object
    Configuration properties for PackageManagerHelper.
    • Constructor Detail

      • PackageManagerProperties

        public PackageManagerProperties()
    • Method Detail

      • getPackageManagerUrl

        public java.lang.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​(java.lang.String packageManagerUrl)
        Parameters:
        packageManagerUrl - The URL of the HTTP service API of the CRX package manager.
      • getUserId

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

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

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

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

        public java.lang.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​(java.lang.String value)
        Parameters:
        value - OAuth 2 access token to authenticate against the remote CRX system (package manager).
      • getConsoleUserId

        public java.lang.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​(java.lang.String consoleUserId)
        Parameters:
        consoleUserId - The user name to authenticate as against the remote CRX system (Felix console).
      • getConsolePassword

        public java.lang.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​(java.lang.String consolePassword)
        Parameters:
        consolePassword - The password to authenticate against the remote CRX system (Felix console).
      • getConsoleOAuth2AccessToken

        public java.lang.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​(java.lang.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 java.lang.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​(java.lang.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 java.util.List<java.util.regex.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​(java.util.List<java.lang.String> bundleStatusBlacklistBundleNames)
        Parameters:
        bundleStatusBlacklistBundleNames - Patterns for symbolic names of bundles that are expected to be not present in bundle list
      • getBundleStatusWhitelistBundleNames

        public java.util.List<java.util.regex.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​(java.util.List<java.lang.String> bundleStatusWhitelistBundleNames)
        Parameters:
        bundleStatusWhitelistBundleNames - Patterns for symbolic names of bundles that are ignored in bundle list
      • getPackageManagerInstallStatusURL

        public java.lang.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​(java.lang.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 java.util.List<Proxy> getProxies()
        HTTP proxies from maven settings
        Returns:
        List of proxies
      • setProxies

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

        public java.lang.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​(java.lang.String packageManagerOutputLogLevel)
        Parameters:
        packageManagerOutputLogLevel - Log level to be used to log responses from package manager