TSK-1746: removed hardcoded schema name in ConfigurationMapper.
This commit is contained in:
parent
331bf2998b
commit
48ed6da956
|
|
@ -14,9 +14,9 @@ public interface ConfigurationMapper {
|
||||||
@Insert("INSERT INTO CONFIGURATION(ENFORCE_SECURITY) VALUES (#{securityEnabled})")
|
@Insert("INSERT INTO CONFIGURATION(ENFORCE_SECURITY) VALUES (#{securityEnabled})")
|
||||||
void setSecurityEnabled(@Param("securityEnabled") boolean securityEnabled);
|
void setSecurityEnabled(@Param("securityEnabled") boolean securityEnabled);
|
||||||
|
|
||||||
@Select("SELECT CUSTOM_ATTRIBUTES FROM TASKANA.CONFIGURATION")
|
@Select("SELECT CUSTOM_ATTRIBUTES FROM CONFIGURATION")
|
||||||
Map<String, Object> getAllCustomAttributes();
|
Map<String, Object> getAllCustomAttributes();
|
||||||
|
|
||||||
@Update("UPDATE TASKANA.CONFIGURATION SET CUSTOM_ATTRIBUTES = #{customAttributes}")
|
@Update("UPDATE CONFIGURATION SET CUSTOM_ATTRIBUTES = #{customAttributes}")
|
||||||
void setAllCustomAttributes(@Param("customAttributes") Map<String, ?> customAttributes);
|
void setAllCustomAttributes(@Param("customAttributes") Map<String, ?> customAttributes);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -86,7 +86,6 @@ public class TaskanaEngineImpl implements TaskanaEngine {
|
||||||
private final WorkingDaysToDaysConverter workingDaysToDaysConverter;
|
private final WorkingDaysToDaysConverter workingDaysToDaysConverter;
|
||||||
private final HistoryEventManager historyEventManager;
|
private final HistoryEventManager historyEventManager;
|
||||||
private final CurrentUserContext currentUserContext;
|
private final CurrentUserContext currentUserContext;
|
||||||
private final ConfigurationServiceImpl configurationService;
|
|
||||||
protected TaskanaEngineConfiguration taskanaEngineConfiguration;
|
protected TaskanaEngineConfiguration taskanaEngineConfiguration;
|
||||||
protected TransactionFactory transactionFactory;
|
protected TransactionFactory transactionFactory;
|
||||||
protected SqlSessionManager sessionManager;
|
protected SqlSessionManager sessionManager;
|
||||||
|
|
@ -109,9 +108,7 @@ public class TaskanaEngineImpl implements TaskanaEngine {
|
||||||
new CurrentUserContextImpl(TaskanaEngineConfiguration.shouldUseLowerCaseForAccessIds());
|
new CurrentUserContextImpl(TaskanaEngineConfiguration.shouldUseLowerCaseForAccessIds());
|
||||||
createTransactionFactory(taskanaEngineConfiguration.getUseManagedTransactions());
|
createTransactionFactory(taskanaEngineConfiguration.getUseManagedTransactions());
|
||||||
sessionManager = createSqlSessionManager();
|
sessionManager = createSqlSessionManager();
|
||||||
configurationService =
|
|
||||||
new ConfigurationServiceImpl(
|
|
||||||
internalTaskanaEngineImpl, sessionManager.getMapper(ConfigurationMapper.class));
|
|
||||||
initializeDbSchema(taskanaEngineConfiguration);
|
initializeDbSchema(taskanaEngineConfiguration);
|
||||||
|
|
||||||
// IMPORTANT: SPI has to be initialized last (and in this order) in order
|
// IMPORTANT: SPI has to be initialized last (and in this order) in order
|
||||||
|
|
@ -134,6 +131,12 @@ public class TaskanaEngineImpl implements TaskanaEngine {
|
||||||
return new TaskanaEngineImpl(taskanaEngineConfiguration, connectionManagementMode);
|
return new TaskanaEngineImpl(taskanaEngineConfiguration, connectionManagementMode);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ConfigurationService getConfigurationService() {
|
||||||
|
return new ConfigurationServiceImpl(
|
||||||
|
internalTaskanaEngineImpl, sessionManager.getMapper(ConfigurationMapper.class));
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public TaskService getTaskService() {
|
public TaskService getTaskService() {
|
||||||
return new TaskServiceImpl(
|
return new TaskServiceImpl(
|
||||||
|
|
@ -187,11 +190,6 @@ public class TaskanaEngineImpl implements TaskanaEngine {
|
||||||
internalTaskanaEngineImpl, sessionManager.getMapper(UserMapper.class));
|
internalTaskanaEngineImpl, sessionManager.getMapper(UserMapper.class));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public ConfigurationService getConfigurationService() {
|
|
||||||
return configurationService;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public TaskanaEngineConfiguration getConfiguration() {
|
public TaskanaEngineConfiguration getConfiguration() {
|
||||||
return this.taskanaEngineConfiguration;
|
return this.taskanaEngineConfiguration;
|
||||||
|
|
@ -369,8 +367,9 @@ public class TaskanaEngineImpl implements TaskanaEngine {
|
||||||
"The Database Schema Version doesn't match the expected minimal version "
|
"The Database Schema Version doesn't match the expected minimal version "
|
||||||
+ MINIMAL_TASKANA_SCHEMA_VERSION);
|
+ MINIMAL_TASKANA_SCHEMA_VERSION);
|
||||||
}
|
}
|
||||||
configurationService.checkSecureAccess(taskanaEngineConfiguration.isSecurityEnabled());
|
((ConfigurationServiceImpl) getConfigurationService())
|
||||||
configurationService.setupDefaultCustomAttributes();
|
.checkSecureAccess(taskanaEngineConfiguration.isSecurityEnabled());
|
||||||
|
((ConfigurationServiceImpl) getConfigurationService()).setupDefaultCustomAttributes();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue