Package de.xima.fc.config
Class XfcConfig
- java.lang.Object
-
- de.xima.fc.config.XfcConfig
-
public final class XfcConfig extends Object
-
-
Field Summary
Fields Modifier and Type Field Description static de.xima.cmn.props.FileBasedPropertiesConfiguration
APPLICATION
General settings related to the formcycle application.static de.xima.cmn.props.FileBasedPropertiesConfiguration
CACHE
Settings related to caches, such as the form or data cache.static de.xima.cmn.props.FileBasedPropertiesConfiguration
CLUSTER
Settings related to the cluster configuration when using multiple master servers in a cluster.static de.xima.cmn.props.FileBasedPropertiesConfiguration
DATABASE
Settings related to the database configuration, such as the JDBC URL and credentials.static de.xima.cmn.props.FileBasedPropertiesConfiguration
KERBEROS
Settings related to the Kerberos authenticator configuration.static String
LIST_PROPERTY_PREFIX
static de.xima.cmn.props.FileBasedPropertiesConfiguration
LOGGING
Settings related to the logging configuration, such as the log level and log files.static de.xima.cmn.props.FileBasedPropertiesConfiguration
MAIL
Settings related to the system email server configuration.static de.xima.cmn.props.FileBasedPropertiesConfiguration
NTLMAUTH
Deprecated.since version 8.0.0 Settings related to the NTLM authenticator configuration.static String
THEME_FILE_PATH
-
Constructor Summary
Constructors Constructor Description XfcConfig()
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static <E extends org.apache.commons.configuration2.event.Event>
voidaddBuilderEventListener(EXfcConfigType configType, org.apache.commons.configuration2.event.EventType<E> eventType, org.apache.commons.configuration2.event.EventListener<? super E> eventListener)
Adds an event listener to theConfigurationBuilder
of a given formcycle properties file.static void
configureLocale()
static void
configureLog4j()
static boolean
getBoolean(org.apache.commons.configuration2.ImmutableConfiguration props, String key, boolean defaultValue)
Retrieves a value from the given properties object and converts it to a boolean.static javax.servlet.ServletContext
getContext()
Deprecated.Since version 8.0.1.static String
getInlineTheme()
static long
getInlineThemeLastModified()
static long
getLong(org.apache.commons.configuration2.ImmutableConfiguration props, String key, long defaultValue)
Retrieves a value from the given properties object and converts it to a long.static String
getPluginStoreKey()
Gets default store key for the official formcycle PROMA plugin store.static de.xima.cmn.props.FileBasedPropertiesConfiguration
getPropertiesConfiguration(String fileName)
Gets the properties configuration by its file name.static int
getRateLimitResendEmailVerificationInMinutes()
static String
getServerInfo()
Deprecated.Since version 8.0.1.static List<String>
getTransformedNamesList(List<String> nameList)
static int
getValidityPeriodEmailVerificationInDays()
static boolean
hasGuiCommonModule()
Deprecated.Since version 8.0.1.static boolean
hasInboxModule()
Deprecated.Since version 8.0.1.static boolean
hasNTLMConfig()
Prüft, ob Konfigurationswerte für NTLM-Authentifizierung existierenstatic void
init(javax.servlet.ServletContext ctx)
static void
initApplication()
static void
initCacheConfig()
static void
initClusterConfig()
static void
initDatabase()
static void
initKerberosConfig()
static void
initLDAPAuthConfig()
static void
initMail()
static void
initThemeCss()
static boolean
isFrontendServer()
Deprecated.UseIWebAppDescriptor.getServerType()
viaWebAppContext
instead.static boolean
isKerberosActive()
static boolean
isKerberosUseForSSO()
static boolean
isNTLMActive()
Deprecated.NTLM is deprecated.static boolean
isNTLMUseForSSO()
Deprecated.NTLM is deprecated.static boolean
isSystemMailActive()
Prüft, ob die System-Mail-Einstellung aktiviert ist und die entsprechenden Properties vorhanden sind.static <E extends org.apache.commons.configuration2.event.Event>
voidremoveBuilderEventListener(EXfcConfigType configType, org.apache.commons.configuration2.event.EventType<E> eventType, org.apache.commons.configuration2.event.EventListener<? super E> eventListener)
Removes an event listener from theConfigurationBuilder
of a given formcycle properties file.static void
setFrontendServer(boolean frontendServer)
Deprecated.UseIWebAppDescriptor.getServerType()
viaWebAppContext
instead for checking if the current web app is a frontend server.static void
shutdown(javax.servlet.ServletContext ctx)
-
-
-
Field Detail
-
APPLICATION
public static de.xima.cmn.props.FileBasedPropertiesConfiguration APPLICATION
General settings related to the formcycle application.
-
CACHE
public static de.xima.cmn.props.FileBasedPropertiesConfiguration CACHE
Settings related to caches, such as the form or data cache.
-
CLUSTER
public static de.xima.cmn.props.FileBasedPropertiesConfiguration CLUSTER
Settings related to the cluster configuration when using multiple master servers in a cluster.
-
DATABASE
public static de.xima.cmn.props.FileBasedPropertiesConfiguration DATABASE
Settings related to the database configuration, such as the JDBC URL and credentials.
-
KERBEROS
public static de.xima.cmn.props.FileBasedPropertiesConfiguration KERBEROS
Settings related to the Kerberos authenticator configuration.
-
LOGGING
public static de.xima.cmn.props.FileBasedPropertiesConfiguration LOGGING
Settings related to the logging configuration, such as the log level and log files.
-
MAIL
public static de.xima.cmn.props.FileBasedPropertiesConfiguration MAIL
Settings related to the system email server configuration.
-
NTLMAUTH
@Deprecated public static de.xima.cmn.props.FileBasedPropertiesConfiguration NTLMAUTH
Deprecated.since version 8.0.0 Settings related to the NTLM authenticator configuration.
-
THEME_FILE_PATH
public static String THEME_FILE_PATH
-
LIST_PROPERTY_PREFIX
public static String LIST_PROPERTY_PREFIX
-
-
Method Detail
-
initApplication
public static void initApplication()
-
initMail
public static void initMail()
-
initDatabase
public static void initDatabase()
-
initLDAPAuthConfig
public static void initLDAPAuthConfig()
-
initKerberosConfig
public static void initKerberosConfig()
-
initClusterConfig
public static void initClusterConfig()
-
initCacheConfig
public static void initCacheConfig()
-
initThemeCss
public static void initThemeCss()
-
getBoolean
public static boolean getBoolean(org.apache.commons.configuration2.ImmutableConfiguration props, String key, boolean defaultValue)
Retrieves a value from the given properties object and converts it to a boolean. Compared withImmutableConfiguration.getBoolean(String, Boolean)
, this never throws and returns the default value for non-boolean values.- Parameters:
props
- Properties object from which to get a boolean.key
- Key to access on the properties object.defaultValue
- Default value used when the properties object does not contain a valid boolean value.- Returns:
- The boolean value at the given key, or the default when it does not contain a valid boolean value for the key.
-
getLong
public static long getLong(org.apache.commons.configuration2.ImmutableConfiguration props, String key, long defaultValue)
Retrieves a value from the given properties object and converts it to a long. Compared withImmutableConfiguration.getLong(String, Long)
, this never throws and returns the default value for non-boolean values.- Parameters:
props
- Properties object from which to get a boolean.key
- Key to access on the properties object.defaultValue
- Default value used when the properties object does not contain a valid long value.- Returns:
- The long value at the given key, or the default when it does not contain a valid long value for the key.
-
configureLog4j
public static void configureLog4j()
-
configureLocale
public static void configureLocale()
-
shutdown
public static void shutdown(javax.servlet.ServletContext ctx)
-
init
public static void init(javax.servlet.ServletContext ctx)
-
hasNTLMConfig
public static boolean hasNTLMConfig()
Prüft, ob Konfigurationswerte für NTLM-Authentifizierung existieren- Returns:
- true oder false, wenn ein Wert fehlt
-
isKerberosActive
public static boolean isKerberosActive()
-
isKerberosUseForSSO
public static boolean isKerberosUseForSSO()
-
isSystemMailActive
public static boolean isSystemMailActive()
Prüft, ob die System-Mail-Einstellung aktiviert ist und die entsprechenden Properties vorhanden sind.- Returns:
true
wenn aktiviert,false
wenn nicht
-
getValidityPeriodEmailVerificationInDays
public static int getValidityPeriodEmailVerificationInDays()
- Returns:
- the validity period for email verification links / tokens in days.
-
getRateLimitResendEmailVerificationInMinutes
public static int getRateLimitResendEmailVerificationInMinutes()
- Returns:
- the rate limit in minutes at which email verification link / tokens can be re-issued.
-
getInlineTheme
public static String getInlineTheme()
-
getInlineThemeLastModified
public static long getInlineThemeLastModified()
-
getPropertiesConfiguration
public static de.xima.cmn.props.FileBasedPropertiesConfiguration getPropertiesConfiguration(String fileName)
Gets the properties configuration by its file name.- Parameters:
fileName
- of the properties file.- Returns:
- the properties configuration with the given file name.
-
getPluginStoreKey
public static String getPluginStoreKey()
Gets default store key for the official formcycle PROMA plugin store.- Returns:
- The key of the formcycle plugin store in PROMA.
-
addBuilderEventListener
public static <E extends org.apache.commons.configuration2.event.Event> void addBuilderEventListener(EXfcConfigType configType, org.apache.commons.configuration2.event.EventType<E> eventType, org.apache.commons.configuration2.event.EventListener<? super E> eventListener)
Adds an event listener to theConfigurationBuilder
of a given formcycle properties file. When a listener exists already, it is not added again.- Type Parameters:
E
- Type of the event model class.- Parameters:
configType
- Type of the properties file for which to add a listener.eventType
- Type of the event for which to add a listener.eventListener
- Listener to add.
-
removeBuilderEventListener
public static <E extends org.apache.commons.configuration2.event.Event> void removeBuilderEventListener(EXfcConfigType configType, org.apache.commons.configuration2.event.EventType<E> eventType, org.apache.commons.configuration2.event.EventListener<? super E> eventListener)
Removes an event listener from theConfigurationBuilder
of a given formcycle properties file. When a listener does not exist, this is a no-op.- Type Parameters:
E
- Type of the event model class.- Parameters:
configType
- Type of the properties file for which to remove a listener.eventType
- Type of the event for which to remove a listener.eventListener
- Listener to remove.
-
getServerInfo
@Deprecated public static String getServerInfo()
Deprecated.Since version 8.0.1. UseIServletContextInfo.getServerInfo()
viaWebAppContext.getServletContextInfo()
instead.- Returns:
- the server info of the current web app.
-
isFrontendServer
@Deprecated public static boolean isFrontendServer()
Deprecated.UseIWebAppDescriptor.getServerType()
viaWebAppContext
instead.- Returns:
true
if the current web app is a frontend server andfalse
otherwise.
-
setFrontendServer
@Deprecated public static void setFrontendServer(boolean frontendServer)
Deprecated.UseIWebAppDescriptor.getServerType()
viaWebAppContext
instead for checking if the current web app is a frontend server.- Parameters:
frontendServer
- whether the current web app is a frontend server.
-
getContext
@Deprecated public static javax.servlet.ServletContext getContext()
Deprecated.Since version 8.0.1. UseWebAppContext.getServletContextInfo()
for accessing servlet context information instead.- Returns:
- the current servlet context.
-
hasGuiCommonModule
@Deprecated public static boolean hasGuiCommonModule()
Deprecated.Since version 8.0.1. UseIWebAppDescriptor.hasFeature(EFcWebAppFeature)
of theweb context's descriptor
for checking features of the current web app instead.Returns whether the current web app provides the GUI common module. Formerly set via context parameterxfc.modules.gui-common
. This parameter is now deprecated.- Returns:
true
if the current web app provides the GUI common module.
-
hasInboxModule
@Deprecated public static boolean hasInboxModule()
Deprecated.Since version 8.0.1. Check forINBOX
viaIWebAppDescriptor.hasFeature(EFcWebAppFeature)
of theweb context's descriptor
instead.Returns whether the current web app provides the INBOX feature. Formerly set via context parameterxfc.modules.inbox
.- Returns:
true
if the current web app provides the INBOX feature.
-
isNTLMActive
@Deprecated public static boolean isNTLMActive()
Deprecated.NTLM is deprecated.
-
isNTLMUseForSSO
@Deprecated public static boolean isNTLMUseForSSO()
Deprecated.NTLM is deprecated.
-
-