Class UnityServerConfiguration

  • All Implemented Interfaces:
    eu.unicore.util.configuration.PropertiesHelperAPI, eu.unicore.util.configuration.UpdateableConfiguration, java.lang.Cloneable, java.lang.Runnable

    @Component
    public class UnityServerConfiguration
    extends UnityFilePropertiesHelper
    Principal options are defined here: ids and corresponding default values.
    Author:
    K. Benedyczak
    • Field Detail

      • PROFILE_PRODUCTION

        public static final java.lang.String PROFILE_PRODUCTION
        See Also:
        Constant Field Values
      • CONFIGURATION_FILE

        public static final java.lang.String CONFIGURATION_FILE
        See Also:
        Constant Field Values
      • DEFAULT_EMAIL_CHANNEL

        public static final java.lang.String DEFAULT_EMAIL_CHANNEL
        See Also:
        Constant Field Values
      • DEFAULT_SMS_CHANNEL

        public static final java.lang.String DEFAULT_SMS_CHANNEL
        See Also:
        Constant Field Values
      • SYSTEM_ALLOW_FULL_HTML

        public static final java.lang.String SYSTEM_ALLOW_FULL_HTML
        See Also:
        Constant Field Values
      • THREAD_POOL_SIZE

        public static final java.lang.String THREAD_POOL_SIZE
        See Also:
        Constant Field Values
      • USE_CONFIG_FILE_AS_INITIAL_TEMPLATE_ONLY

        public static final java.lang.String USE_CONFIG_FILE_AS_INITIAL_TEMPLATE_ONLY
        See Also:
        Constant Field Values
      • IGNORE_CONFIGURED_CONTENTS_SETTING

        public static final java.lang.String IGNORE_CONFIGURED_CONTENTS_SETTING
        See Also:
        Constant Field Values
      • RELOAD_MSG_TEMPLATES

        public static final java.lang.String RELOAD_MSG_TEMPLATES
        See Also:
        Constant Field Values
      • CONFIG_ONLY_ERA_CONTROL

        public static final java.lang.String CONFIG_ONLY_ERA_CONTROL
        See Also:
        Constant Field Values
      • DEFAULT_WEB_CONTENT_PATH

        public static final java.lang.String DEFAULT_WEB_CONTENT_PATH
        See Also:
        Constant Field Values
      • MESSAGES_DIRECTORY

        public static final java.lang.String MESSAGES_DIRECTORY
        See Also:
        Constant Field Values
      • CONFIRMATION_THEME

        public static final java.lang.String CONFIRMATION_THEME
        See Also:
        Constant Field Values
      • CONFIRMATION_TEMPLATE

        public static final java.lang.String CONFIRMATION_TEMPLATE
        See Also:
        Constant Field Values
      • WELL_KNOWN_URL_THEME

        public static final java.lang.String WELL_KNOWN_URL_THEME
        See Also:
        Constant Field Values
      • WELL_KNOWN_URL_TEMPLATE

        public static final java.lang.String WELL_KNOWN_URL_TEMPLATE
        See Also:
        Constant Field Values
      • UNITYGW_WEB_CONTENT_PATH

        public static final java.lang.String UNITYGW_WEB_CONTENT_PATH
        See Also:
        Constant Field Values
      • DEFAULT_WEB_PATH

        public static final java.lang.String DEFAULT_WEB_PATH
        See Also:
        Constant Field Values
      • AUDITEVENTLOGS_ENABLED

        public static final java.lang.String AUDITEVENTLOGS_ENABLED
        See Also:
        Constant Field Values
      • ENDPOINT_DESCRIPTION

        public static final java.lang.String ENDPOINT_DESCRIPTION
        See Also:
        Constant Field Values
      • ENDPOINT_CONFIGURATION

        public static final java.lang.String ENDPOINT_CONFIGURATION
        See Also:
        Constant Field Values
      • ENDPOINT_ADDRESS

        public static final java.lang.String ENDPOINT_ADDRESS
        See Also:
        Constant Field Values
      • ENDPOINT_DISPLAYED_NAME

        public static final java.lang.String ENDPOINT_DISPLAYED_NAME
        See Also:
        Constant Field Values
      • ENDPOINT_AUTHENTICATORS

        public static final java.lang.String ENDPOINT_AUTHENTICATORS
        See Also:
        Constant Field Values
      • WORKSPACE_DIRECTORY

        public static final java.lang.String WORKSPACE_DIRECTORY
        See Also:
        Constant Field Values
      • REALM_DESCRIPTION

        public static final java.lang.String REALM_DESCRIPTION
        See Also:
        Constant Field Values
      • REALM_BLOCK_AFTER_UNSUCCESSFUL

        public static final java.lang.String REALM_BLOCK_AFTER_UNSUCCESSFUL
        See Also:
        Constant Field Values
      • REALM_MAX_INACTIVITY

        public static final java.lang.String REALM_MAX_INACTIVITY
        See Also:
        Constant Field Values
      • REALM_REMEMBER_ME_FOR

        public static final java.lang.String REALM_REMEMBER_ME_FOR
        See Also:
        Constant Field Values
      • REALM_REMEMBER_ME_POLICY

        public static final java.lang.String REALM_REMEMBER_ME_POLICY
        See Also:
        Constant Field Values
      • AUTHENTICATOR_NAME

        public static final java.lang.String AUTHENTICATOR_NAME
        See Also:
        Constant Field Values
      • AUTHENTICATOR_TYPE

        public static final java.lang.String AUTHENTICATOR_TYPE
        See Also:
        Constant Field Values
      • AUTHENTICATOR_CREDENTIAL

        public static final java.lang.String AUTHENTICATOR_CREDENTIAL
        See Also:
        Constant Field Values
      • AUTHENTICATOR_VERIFICATOR_CONFIG

        public static final java.lang.String AUTHENTICATOR_VERIFICATOR_CONFIG
        See Also:
        Constant Field Values
      • AUTHENTICATION_FLOW

        public static final java.lang.String AUTHENTICATION_FLOW
        See Also:
        Constant Field Values
      • AUTHENTICATION_FLOW_NAME

        public static final java.lang.String AUTHENTICATION_FLOW_NAME
        See Also:
        Constant Field Values
      • AUTHENTICATION_FLOW_POLICY

        public static final java.lang.String AUTHENTICATION_FLOW_POLICY
        See Also:
        Constant Field Values
      • AUTHENTICATION_FLOW_FIRST_FACTOR_AUTHENTICATORS

        public static final java.lang.String AUTHENTICATION_FLOW_FIRST_FACTOR_AUTHENTICATORS
        See Also:
        Constant Field Values
      • AUTHENTICATION_FLOW_SECOND_FACTOR_AUTHENTICATORS

        public static final java.lang.String AUTHENTICATION_FLOW_SECOND_FACTOR_AUTHENTICATORS
        See Also:
        Constant Field Values
      • RE_AUTHENTICATION_POLICY

        public static final java.lang.String RE_AUTHENTICATION_POLICY
        See Also:
        Constant Field Values
      • RE_AUTHENTICATION_GRACE_TIME

        public static final java.lang.String RE_AUTHENTICATION_GRACE_TIME
        See Also:
        Constant Field Values
      • RE_AUTHENTICATION_BLOCK_ON_NONE

        public static final java.lang.String RE_AUTHENTICATION_BLOCK_ON_NONE
        See Also:
        Constant Field Values
      • CREDENTIAL_DESCRIPTION

        public static final java.lang.String CREDENTIAL_DESCRIPTION
        See Also:
        Constant Field Values
      • CREDENTIAL_CONFIGURATION

        public static final java.lang.String CREDENTIAL_CONFIGURATION
        See Also:
        Constant Field Values
      • CREDENTIAL_REQ_NAME

        public static final java.lang.String CREDENTIAL_REQ_NAME
        See Also:
        Constant Field Values
      • CREDENTIAL_REQ_DESCRIPTION

        public static final java.lang.String CREDENTIAL_REQ_DESCRIPTION
        See Also:
        Constant Field Values
      • CREDENTIAL_REQ_CONTENTS

        public static final java.lang.String CREDENTIAL_REQ_CONTENTS
        See Also:
        Constant Field Values
      • INITIAL_ADMIN_USER

        public static final java.lang.String INITIAL_ADMIN_USER
        See Also:
        Constant Field Values
      • INITIAL_ADMIN_PASSWORD

        public static final java.lang.String INITIAL_ADMIN_PASSWORD
        See Also:
        Constant Field Values
      • INITIAL_ADMIN_USER_OUTDATED

        public static final java.lang.String INITIAL_ADMIN_USER_OUTDATED
        See Also:
        Constant Field Values
      • TRANSLATION_PROFILES

        public static final java.lang.String TRANSLATION_PROFILES
        See Also:
        Constant Field Values
      • EMAIL_CONFIRMATION_REQUEST_LIMIT_OLD

        public static final java.lang.String EMAIL_CONFIRMATION_REQUEST_LIMIT_OLD
        See Also:
        Constant Field Values
      • EMAIL_CONFIRMATION_REQUEST_LIMIT

        public static final java.lang.String EMAIL_CONFIRMATION_REQUEST_LIMIT
        See Also:
        Constant Field Values
      • CONFIRMATION_DEFAULT_RETURN_URL

        public static final java.lang.String CONFIRMATION_DEFAULT_RETURN_URL
        See Also:
        Constant Field Values
      • CONFIRMATION_AUTO_REDIRECT

        public static final java.lang.String CONFIRMATION_AUTO_REDIRECT
        See Also:
        Constant Field Values
      • ACCOUNT_REMOVED_NOTIFICATION

        public static final java.lang.String ACCOUNT_REMOVED_NOTIFICATION
        See Also:
        Constant Field Values
      • ACCOUNT_DISABLED_NOTIFICATION

        public static final java.lang.String ACCOUNT_DISABLED_NOTIFICATION
        See Also:
        Constant Field Values
      • ACCOUNT_ACTIVATED_NOTIFICATION

        public static final java.lang.String ACCOUNT_ACTIVATED_NOTIFICATION
        See Also:
        Constant Field Values
      • MOBILE_CONFIRMATION_REQUEST_LIMIT

        public static final java.lang.String MOBILE_CONFIRMATION_REQUEST_LIMIT
        See Also:
        Constant Field Values
      • EXTERNAL_NOTIFICATION_PFX

        public static final java.lang.String EXTERNAL_NOTIFICATION_PFX
        See Also:
        Constant Field Values
      • EXTERNAL_NOTIFICATION_NAME

        public static final java.lang.String EXTERNAL_NOTIFICATION_NAME
        See Also:
        Constant Field Values
      • EXTERNAL_NOTIFICATION_SUPPORTS_TEMPLATES

        public static final java.lang.String EXTERNAL_NOTIFICATION_SUPPORTS_TEMPLATES
        See Also:
        Constant Field Values
      • EXTERNAL_NOTIFICATION_FILE

        public static final java.lang.String EXTERNAL_NOTIFICATION_FILE
        See Also:
        Constant Field Values
      • ENABLE_LOW_LEVEL_EVENTS

        public static final java.lang.String ENABLE_LOW_LEVEL_EVENTS
        See Also:
        Constant Field Values
      • RESTRICT_FILE_SYSTEM_ACCESS

        public static final java.lang.String RESTRICT_FILE_SYSTEM_ACCESS
        See Also:
        Constant Field Values
      • MAX_CONCURRENT_PASSWORD_CHECKS

        public static final java.lang.String MAX_CONCURRENT_PASSWORD_CHECKS
        See Also:
        Constant Field Values
      • defaults

        public static final java.util.Map<java.lang.String,​eu.unicore.util.configuration.PropertyMD> defaults
      • SUPPORTED_LOCALES

        public static final java.util.Map<java.lang.String,​java.util.Locale> SUPPORTED_LOCALES
    • Constructor Detail

      • UnityServerConfiguration

        @Autowired
        public UnityServerConfiguration​(org.springframework.core.env.Environment env,
                                        ConfigurationLocationProvider locProvider)
                                 throws eu.unicore.util.configuration.ConfigurationException,
                                        java.io.IOException
        Throws:
        eu.unicore.util.configuration.ConfigurationException
        java.io.IOException
    • Method Detail

      • isLocaleSupported

        public boolean isLocaleSupported​(java.util.Locale toSearch)
      • safeLocaleDecode

        public static java.util.Locale safeLocaleDecode​(java.lang.String inputRaw)
      • getDefaultLocale

        public java.util.Locale getDefaultLocale()
      • getEnabledLocales

        public java.util.Map<java.lang.String,​java.util.Locale> getEnabledLocales()
      • getFileSizeLimit

        public int getFileSizeLimit()
      • getEndpointAuth

        public java.util.List<java.lang.String> getEndpointAuth​(java.lang.String endpointKey)
      • getConfiguredTheme

        public java.lang.String getConfiguredTheme​(java.lang.String themeConfigKey,
                                                   java.lang.String defaultTheme)
        Returns either a theme configured with the key given as argument or the default theme if the specific one is not defined. If neither is available returns default theme.
        Parameters:
        themeConfigKey -
        Returns:
        configuration theme
      • getContentInitializersConfiguration

        public java.util.List<ScriptConfiguration> getContentInitializersConfiguration()
      • getSortedListKeys

        public java.util.List<java.lang.String> getSortedListKeys​(java.lang.String listPrefix)
        Returns:
        list of keys which have a common prefix 'listPrefix'. Values have only the suffix.
      • getProperties

        public java.util.Properties getProperties()
      • getEmailConfirmationRequestLimit

        public int getEmailConfirmationRequestLimit()
      • getMaxConcurrentPasswordChecks

        public int getMaxConcurrentPasswordChecks()