Package org.opencms.letsencrypt
Class CmsLetsEncryptConfiguration
java.lang.Object
org.opencms.letsencrypt.CmsLetsEncryptConfiguration
- All Implemented Interfaces:
I_CmsConfigurationParameterHandler
public class CmsLetsEncryptConfiguration
extends Object
implements I_CmsConfigurationParameterHandler
Configuration class containing the LetsEncrypt configuration settings OpenCms needed by OpenCms.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
Enum which represents different modes that control which domains OpenCms puts into the certificate configuration.static enum
Enum which represents the different types of events that LetsEncrypt updates should be triggered by. -
Field Summary
Modifier and TypeFieldDescriptionstatic final String
Attribute name for the certificate configuration path.static final String
Attribute name for the host.static final String
Attribute name for the mode.static final String
Attribute name for the port.static final String
Attribute name for the trigger mode.static final CmsElementWithAttrsParamConfigHelper
Helper for parsing / generating the configuration.static final CmsLetsEncryptConfiguration.Trigger
The default trigger mode.static final String
Node name.Fields inherited from interface org.opencms.configuration.I_CmsConfigurationParameterHandler
ADD_PARAMETER_METHOD, INIT_CONFIGURATION_METHOD
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addConfigurationParameter
(String paramName, String paramValue) Adds a configuration parameter to this parameter configurable class instance.Gets the path where the certificate configuration should be written to.Returns the parameters of this configurable class instance, ornull
if the class does not need any parameters.getHost()
Gets the host name for the LetsEncrypt docker container.getMode()
Gets the configured mode, or null if no mode or an invalid mode have been configured.int
getPort()
Gets the configured port, or -1 if the port is not set or has an invalid value.Gets the trigger mode.void
Initializes a configuration after all parameters have been added.boolean
Checks if the configuration is enabled and does not have missing settings.
-
Field Details
-
ATTR_CERTCONFIG
Attribute name for the certificate configuration path.- See Also:
-
ATTR_HOST
Attribute name for the host.- See Also:
-
ATTR_MODE
Attribute name for the mode.- See Also:
-
ATTR_PORT
Attribute name for the port.- See Also:
-
ATTR_TRIGGER
Attribute name for the trigger mode.- See Also:
-
N_LETSENCRYPT
Node name.- See Also:
-
CONFIG_HELPER
Helper for parsing / generating the configuration. -
DEFAULT_TRIGGER
The default trigger mode.
-
-
Constructor Details
-
CmsLetsEncryptConfiguration
public CmsLetsEncryptConfiguration()
-
-
Method Details
-
addConfigurationParameter
Description copied from interface:I_CmsConfigurationParameterHandler
Adds a configuration parameter to this parameter configurable class instance.- Specified by:
addConfigurationParameter
in interfaceI_CmsConfigurationParameterHandler
- Parameters:
paramName
- the name of the parameterparamValue
- the value for the parameter- See Also:
-
getCertConfigPath
Gets the path where the certificate configuration should be written to.- Returns:
- the certificate configuration target path
-
getConfiguration
Description copied from interface:I_CmsConfigurationParameterHandler
Returns the parameters of this configurable class instance, ornull
if the class does not need any parameters.- Specified by:
getConfiguration
in interfaceI_CmsConfigurationParameterHandler
- Returns:
- the parameters of this configurable class instance,
or
null
if the class does not need any parameters - See Also:
-
getHost
Gets the host name for the LetsEncrypt docker container.The host name is used to signal to the LetsEncrypt container that the configuration has been updated.
- Returns:
- the host name of the LetsEncrypt container
-
getMode
Gets the configured mode, or null if no mode or an invalid mode have been configured.- Returns:
- the mode
-
getPort
Gets the configured port, or -1 if the port is not set or has an invalid value.The port is used to signal to the LetsEncrypt docker container that the certificate configuration has changed.
- Returns:
- the configured port
-
getTrigger
Gets the trigger mode.- Returns:
- the trigger mode
-
initConfiguration
Description copied from interface:I_CmsConfigurationParameterHandler
Initializes a configuration after all parameters have been added.- Specified by:
initConfiguration
in interfaceI_CmsConfigurationParameterHandler
- See Also:
-
isValidAndEnabled
Checks if the configuration is enabled and does not have missing settings.- Returns:
- true if the configuration is enabled and does not have missing settings
-