public class ConfigurationUtils extends Object
Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_CONFIGURATION_FILE |
static String |
FRANK_CONFIG_XSD |
static String |
STUB4TESTTOOL_CONFIGURATION_KEY |
static String |
STUB4TESTTOOL_VALIDATORS_DISABLED_KEY |
static String |
STUB4TESTTOOL_XSLT |
static String |
STUB4TESTTOOL_XSLT_VALIDATORS_PARAM |
Constructor and Description |
---|
ConfigurationUtils() |
Modifier and Type | Method and Description |
---|---|
static boolean |
activateConfig(org.springframework.context.ApplicationContext applicationContext,
String name,
String version,
String dataSourceName)
Set the all ACTIVECONFIG to false and specified version to true
|
static 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 AUTORELOAD
|
static Map<String,Object> |
getActiveConfigFromDatabase(org.springframework.context.ApplicationContext applicationContext,
String name,
String dataSourceName) |
static String |
getApplicationVersion()
Get the application version (instance.version + instance.timestamp)
|
static Map<String,Object> |
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.timestmap)
from the configuration's AppConstants
|
protected static String |
getConfigurationVersion(Properties properties) |
static boolean |
isConfigurationStubbed(ClassLoader classLoader)
Checks if a configuration is stubbed or not
|
static Map<String,String> |
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) |
static List<String> |
retrieveConfigNamesFromDatabase(org.springframework.context.ApplicationContext applicationContext) |
public static final String STUB4TESTTOOL_CONFIGURATION_KEY
public static final String STUB4TESTTOOL_VALIDATORS_DISABLED_KEY
public static final String STUB4TESTTOOL_XSLT_VALIDATORS_PARAM
public static final String STUB4TESTTOOL_XSLT
public static final String FRANK_CONFIG_XSD
public static final String DEFAULT_CONFIGURATION_FILE
public static boolean isConfigurationStubbed(ClassLoader classLoader)
public static String getConfigurationFile(ClassLoader classLoader, String currentConfigurationName)
public static String getConfigurationVersion(ClassLoader classLoader)
protected static String getConfigurationVersion(Properties properties)
public static String getApplicationVersion()
public static Map<String,Object> getActiveConfigFromDatabase(org.springframework.context.ApplicationContext applicationContext, String name, String dataSourceName) throws ConfigurationException
ConfigurationException
public static Map<String,Object> getConfigFromDatabase(org.springframework.context.ApplicationContext applicationContext, String name, String dataSourceName, String version) throws ConfigurationException
ConfigurationException
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
ConfigurationException
- when SQL error occurs or filename validation failspublic 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
IOException
ConfigurationException
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
ConfigurationException
public static void removeConfigFromDatabase(org.springframework.context.ApplicationContext applicationContext, String name, String datasourceName, String version) throws ConfigurationException
ConfigurationException
public static boolean activateConfig(org.springframework.context.ApplicationContext applicationContext, String name, String version, String dataSourceName) throws SenderException, ConfigurationException, JdbcException, SQLException
public static boolean autoReloadConfig(org.springframework.context.ApplicationContext applicationContext, String name, String version, boolean booleanValue, String dataSourceName) throws SenderException, ConfigurationException, JdbcException, SQLException
public 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)
@Nonnull public static List<String> retrieveConfigNamesFromDatabase(org.springframework.context.ApplicationContext applicationContext) throws ConfigurationException
ConfigurationException
Copyright © 2023 Frank!Framework. All rights reserved.