Class XfcConfig


  • public final class XfcConfig
    extends Object
    • 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
    • Constructor Detail

      • XfcConfig

        public XfcConfig()
    • 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 with ImmutableConfiguration.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 with ImmutableConfiguration.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
      • 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 the ConfigurationBuilder 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 the ConfigurationBuilder 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.
      • getTransformedNamesList

        public static List<String> getTransformedNamesList​(List<String> nameList)
      • setFrontendServer

        @Deprecated
        public static void setFrontendServer​(boolean frontendServer)
        Deprecated.
        Use IWebAppDescriptor.getServerType() via WebAppContext 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. Use WebAppContext.getServletContextInfo() for accessing servlet context information instead.
        Returns:
        the current servlet context.
      • hasGuiCommonModule

        @Deprecated
        public static boolean hasGuiCommonModule()
        Deprecated.
        Since version 8.0.1. Use IWebAppDescriptor.hasFeature(EFcWebAppFeature) of the web 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 parameter xfc.modules.gui-common. This parameter is now deprecated.
        Returns:
        true if the current web app provides the GUI common module.
      • isNTLMActive

        @Deprecated
        public static boolean isNTLMActive()
        Deprecated.
        NTLM is deprecated.
      • isNTLMUseForSSO

        @Deprecated
        public static boolean isNTLMUseForSSO()
        Deprecated.
        NTLM is deprecated.