Package io.wcm.tooling.commons.packmgr
Class PackageManagerProperties
java.lang.Object
io.wcm.tooling.commons.packmgr.PackageManagerProperties
Configuration properties for
PackageManagerHelper.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionPatterns for symbolic names of bundles that are expected to be not present in bundle list.Bundle status JSON URL.intNumber of seconds to wait as maximum for a positive bundle status check.Patterns for symbolic names of bundles that are ignored in bundle list.OAuth 2 access token to authenticate against the remote CRX system (Felix console).The password to authenticate against the remote CRX system (Felix console).The user name to authenticate as against the remote CRX system (Felix console).intHTTP connection timeout (in seconds).intHTTP socket timeout (in seconds).OAuth 2 access token to authenticate against the remote CRX system (package manager).Package Manager installation status JSON URL.intNumber of seconds to wait as maximum for a positive package manager install status check.Log level to be used to log responses from package manager (which may get huge for large packages).The URL of the HTTP service API of the CRX package manager.The password to authenticate against the remote CRX system (package manager).HTTP proxies from maven settingsintNumber of times to retry upload and install via CRX HTTP interface if it fails.intNumber of seconds between retry attempts.System ready status JSON URL.intNumber of seconds to wait as maximum for a positive system ready status check.The user name to authenticate as against the remote CRX system (package manager).booleanIf set to true also self-signed certificates are accepted.voidsetBundleStatusBlacklistBundleNames(List<String> bundleStatusBlacklistBundleNames) voidsetBundleStatusUrl(String bundleStatusUrl) voidsetBundleStatusWaitLimitSec(int bundleStatusWaitLimitSec) voidsetBundleStatusWhitelistBundleNames(List<String> bundleStatusWhitelistBundleNames) voidvoidsetConsolePassword(String consolePassword) voidsetConsoleUserId(String consoleUserId) voidsetHttpConnectTimeoutSec(int httpConnectTimeoutSec) voidsetHttpSocketTimeoutSec(int httpSocketTimeoutSec) voidsetOAuth2AccessToken(String value) voidsetPackageManagerInstallStatusURL(String packageManagerInstallStatusURL) voidsetPackageManagerInstallStatusWaitLimitSec(int packageManagerInstallStatusWaitLimitSec) voidsetPackageManagerOutputLogLevel(String packageManagerOutputLogLevel) voidsetPackageManagerUrl(String packageManagerUrl) voidsetPassword(String password) voidsetProxies(List<Proxy> proxies) voidsetRelaxedSSLCheck(boolean relaxedSSLCheck) voidsetRetryCount(int retryCount) voidsetRetryDelaySec(int retryDelaySec) voidsetSystemReadyUrl(String systemReadyUrl) voidsetSystemReadyWaitLimitSec(int systemReadyWaitLimitSec) void
-
Constructor Details
-
PackageManagerProperties
public PackageManagerProperties()
-
-
Method Details
-
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
- Parameters:
packageManagerUrl- The URL of the HTTP service API of the CRX package manager.
-
getUserId
The user name to authenticate as against the remote CRX system (package manager).- Returns:
- User ID
-
setUserId
- Parameters:
userId- The user name to authenticate as against the remote CRX system (package manager).
-
getPassword
The password to authenticate against the remote CRX system (package manager).- Returns:
- Password
-
setPassword
- Parameters:
password- The password to authenticate against the remote CRX system (package manager).
-
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
- Parameters:
value- OAuth 2 access token to authenticate against the remote CRX system (package manager).
-
getConsoleUserId
The user name to authenticate as against the remote CRX system (Felix console). Fallback togetUserId()if not set.- Returns:
- User ID
-
setConsoleUserId
- Parameters:
consoleUserId- The user name to authenticate as against the remote CRX system (Felix console).
-
getConsolePassword
The password to authenticate against the remote CRX system (Felix console). Fallback togetPassword()if not set.- Returns:
- Password
-
setConsolePassword
- Parameters:
consolePassword- The password to authenticate against the remote CRX system (Felix console).
-
getConsoleOAuth2AccessToken
OAuth 2 access token to authenticate against the remote CRX system (Felix console). If this is configured, username and password are ignored. Fallback togetOAuth2AccessToken()if not set.- Returns:
- OAuth 2 access token.
-
setConsoleOAuth2AccessToken
- 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
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
- 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
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
- Parameters:
bundleStatusBlacklistBundleNames- Patterns for symbolic names of bundles that are expected to be not present in bundle list
-
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
- Parameters:
bundleStatusWhitelistBundleNames- Patterns for symbolic names of bundles that are ignored in bundle list
-
getSystemReadyUrl
System ready status JSON URL. If an URL is configured the system ready status is checked.- Returns:
- URL
-
setSystemReadyUrl
- 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
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
- 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
HTTP proxies from maven settings- Returns:
- List of proxies
-
setProxies
- Parameters:
proxies- HTTP proxies from maven settings
-
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
- Parameters:
packageManagerOutputLogLevel- Log level to be used to log responses from package manager
-