Package org.frankframework.configuration
Class ConfigurationUtils
java.lang.Object
org.frankframework.configuration.ConfigurationUtils
Functions to manipulate the configuration.
- Author:
- Peter Leeuwenburgh, Jaco de Groot
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
activateConfig
(org.springframework.context.ApplicationContext applicationContext, String name, String version, String dataSourceName) Set the all ACTIVECONFIG to false and specified version to truestatic String
addConfigToDatabase
(org.springframework.context.ApplicationContext applicationContext, String datasource, boolean activate_config, boolean automatic_reload, String fileName, InputStream file, String ruser) static boolean
addConfigToDatabase
(org.springframework.context.ApplicationContext applicationContext, String dataSourceName, boolean activateConfig, boolean automaticReload, String name, String version, String fileName, InputStream file, String ruser) static boolean
autoReloadConfig
(org.springframework.context.ApplicationContext applicationContext, String name, String version, boolean booleanValue, String dataSourceName) Toggle AUTORELOADgetActiveConfigFromDatabase
(org.springframework.context.ApplicationContext applicationContext, String name, String dataSourceName) getActiveConfigsFromDatabase
(org.springframework.context.ApplicationContext applicationContext, String dataSourceName) static String
Get the application version (instance.version + instance.timestamp)getConfigFromDatabase
(org.springframework.context.ApplicationContext applicationContext, String name, String dataSourceName, String version) static String
getConfigurationFile
(ClassLoader classLoader, String currentConfigurationName) static String
getConfigurationVersion
(ClassLoader classLoader) Get the version (configuration.version + configuration.timestamp) from the configuration's AppConstants.protected static String
getConfigurationVersion
(Properties properties) static boolean
isConfigurationStubbed
(ClassLoader classLoader) Checks if a configuration is stubbed or notstatic boolean
isConfigurationXmlOptional
(Configuration configuration) processMultiConfigZipFile
(org.springframework.context.ApplicationContext applicationContext, String datasource, boolean activate_config, boolean automatic_reload, InputStream file, String ruser) static void
removeConfigFromDatabase
(org.springframework.context.ApplicationContext applicationContext, String name, String datasourceName, String version) static Map<String,
Class<? extends IConfigurationClassLoader>> retrieveAllConfigNames
(org.springframework.context.ApplicationContext applicationContext) protected static Map<String,
Class<? extends IConfigurationClassLoader>> retrieveAllConfigNames
(org.springframework.context.ApplicationContext applicationContext, boolean directoryConfigurations, boolean databaseConfigurations) retrieveConfigNamesFromDatabase
(org.springframework.context.ApplicationContext applicationContext)
-
Field Details
-
STUB4TESTTOOL_CONFIGURATION_KEY
- See Also:
-
STUB4TESTTOOL_VALIDATORS_DISABLED_KEY
- See Also:
-
STUB4TESTTOOL_XSLT_VALIDATORS_PARAM
- See Also:
-
STUB4TESTTOOL_XSLT_KEY
- See Also:
-
STUB4TESTTOOL_XSLT_DEFAULT
- See Also:
-
FRANK_CONFIG_XSD
- See Also:
-
DEFAULT_CONFIGURATION_FILE
- See Also:
-
-
Constructor Details
-
ConfigurationUtils
public ConfigurationUtils()
-
-
Method Details
-
isConfigurationStubbed
Checks if a configuration is stubbed or not -
isConfigurationXmlOptional
-
getConfigurationFile
-
getConfigurationVersion
Get the version (configuration.version + configuration.timestamp) from the configuration's AppConstants. -
getConfigurationVersion
-
getApplicationVersion
Get the application version (instance.version + instance.timestamp) -
getActiveConfigsFromDatabase
public static List<Map<String,Object>> getActiveConfigsFromDatabase(org.springframework.context.ApplicationContext applicationContext, String dataSourceName) throws ConfigurationException - Throws:
ConfigurationException
-
getActiveConfigFromDatabase
public static Map<String,Object> getActiveConfigFromDatabase(org.springframework.context.ApplicationContext applicationContext, String name, String dataSourceName) throws ConfigurationException - Throws:
ConfigurationException
-
getConfigFromDatabase
public static Map<String,Object> getConfigFromDatabase(org.springframework.context.ApplicationContext applicationContext, String name, String dataSourceName, String version) throws ConfigurationException - Throws:
ConfigurationException
-
addConfigToDatabase
public static String addConfigToDatabase(org.springframework.context.ApplicationContext applicationContext, String datasource, boolean activate_config, boolean automatic_reload, String fileName, InputStream file, String ruser) throws ConfigurationException - Returns:
- name of the configuration if successful SQL update
- Throws:
ConfigurationException
- when SQL error occurs or filename validation fails
-
processMultiConfigZipFile
public static Map<String,String> processMultiConfigZipFile(org.springframework.context.ApplicationContext applicationContext, String datasource, boolean activate_config, boolean automatic_reload, InputStream file, String ruser) throws IOException, ConfigurationException - Throws:
IOException
ConfigurationException
-
addConfigToDatabase
public static boolean addConfigToDatabase(org.springframework.context.ApplicationContext applicationContext, String dataSourceName, boolean activateConfig, boolean automaticReload, String name, String version, String fileName, InputStream file, String ruser) throws ConfigurationException - Throws:
ConfigurationException
-
removeConfigFromDatabase
public static void removeConfigFromDatabase(org.springframework.context.ApplicationContext applicationContext, String name, String datasourceName, String version) throws ConfigurationException - Throws:
ConfigurationException
-
activateConfig
public static boolean activateConfig(org.springframework.context.ApplicationContext applicationContext, String name, String version, String dataSourceName) throws ConfigurationException, JdbcException, SQLException Set the all ACTIVECONFIG to false and specified version to true -
autoReloadConfig
public static boolean autoReloadConfig(org.springframework.context.ApplicationContext applicationContext, String name, String version, boolean booleanValue, String dataSourceName) throws ConfigurationException, JdbcException, SQLException Toggle AUTORELOAD -
retrieveAllConfigNames
public static Map<String,Class<? extends IConfigurationClassLoader>> retrieveAllConfigNames(org.springframework.context.ApplicationContext applicationContext) - Returns:
- A map with all configurations to load (KEY = ConfigurationName, VALUE = ClassLoaderType)
-
retrieveAllConfigNames
protected static Map<String,Class<? extends IConfigurationClassLoader>> retrieveAllConfigNames(org.springframework.context.ApplicationContext applicationContext, boolean directoryConfigurations, boolean databaseConfigurations) -
retrieveConfigNamesFromDatabase
@Nonnull public static List<String> retrieveConfigNamesFromDatabase(org.springframework.context.ApplicationContext applicationContext) throws ConfigurationException - Throws:
ConfigurationException
-