Class ConfigurationUtils
java.lang.Object
org.frankframework.configuration.util.ConfigurationUtils
Functions to manipulate the configuration.
- Author:
- Peter Leeuwenburgh, Jaco de Groot
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanactivateConfig(org.springframework.context.ApplicationContext applicationContext, String name, String version, String dataSourceName) Set the all ACTIVECONFIG to false and specified version to truestatic StringaddConfigToDatabase(org.springframework.context.ApplicationContext applicationContext, String datasource, boolean activate_config, boolean automatic_reload, String fileName, InputStream file, String ruser) static booleanaddConfigToDatabase(org.springframework.context.ApplicationContext applicationContext, String dataSourceName, boolean activateConfig, boolean automaticReload, String name, String version, String fileName, InputStream file, String ruser) static booleanautoReloadConfig(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 StringGet the application version (instance.version + instance.timestamp)getConfigFromDatabase(org.springframework.context.ApplicationContext applicationContext, String name, String dataSourceName, String version) static Pathstatic StringgetConfigurationFile(ClassLoader classLoader, String currentConfigurationName) static StringgetConfigurationVersion(ClassLoader classLoader) Get the version (configuration.version + configuration.timestamp) from the configuration's AppConstants.protected static StringgetConfigurationVersion(Properties properties) static booleanisConfigurationStubbed(ClassLoader classLoader) Checks if a configuration is stubbed or notstatic booleanisConfigurationXmlOptional(Configuration configuration) processMultiConfigZipFile(org.springframework.context.ApplicationContext applicationContext, String datasource, boolean activate_config, boolean automatic_reload, InputStream file, String ruser) static voidremoveConfigFromDatabase(org.springframework.context.ApplicationContext applicationContext, String name, String datasourceName, String version) static Map<String, Class<? extends IConfigurationClassLoader>> retrieveAllConfigNames(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:
-
-
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:
IOExceptionConfigurationException
-
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 -
getConfigurationDirectory
- Throws:
IOException
-
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)
-