TSK-318: Add Security-switch to EngineConfiguration-Constructor.

This commit is contained in:
Marcel Lengl 2018-02-19 16:30:37 +01:00 committed by Holger Hagen
parent 7200a826fe
commit 1ee7b1d5fc
3 changed files with 16 additions and 2 deletions

View File

@ -36,7 +36,7 @@ public class DbSchemaCreator {
* Run all db scripts. * Run all db scripts.
* *
* @throws SQLException * @throws SQLException
* TODO * will be thrown if there will be some incorrect SQL statements invoked.
*/ */
public void run() throws SQLException { public void run() throws SQLException {
Connection connection = dataSource.getConnection(); Connection connection = dataSource.getConnection();

View File

@ -30,7 +30,8 @@ public class TaskanaEngineConfiguration {
protected boolean securityEnabled; protected boolean securityEnabled;
protected boolean useManagedTransactions; protected boolean useManagedTransactions;
public TaskanaEngineConfiguration() { public TaskanaEngineConfiguration(boolean enableSecurity) {
this.securityEnabled = enableSecurity;
} }
public TaskanaEngineConfiguration(DataSource dataSource, boolean useManagedTransactions) public TaskanaEngineConfiguration(DataSource dataSource, boolean useManagedTransactions)

View File

@ -17,6 +17,19 @@ public class SpringTaskanaEngineConfiguration extends TaskanaEngineConfiguration
private static final Logger logger = LoggerFactory.getLogger(SpringTaskanaEngineConfiguration.class); private static final Logger logger = LoggerFactory.getLogger(SpringTaskanaEngineConfiguration.class);
public SpringTaskanaEngineConfiguration() {
super(false);
}
public SpringTaskanaEngineConfiguration(boolean enableSecurity) {
super(enableSecurity);
}
public SpringTaskanaEngineConfiguration(DataSource dataSource, boolean useManagedTransactions,
boolean securityEnabled) throws SQLException {
super(dataSource, useManagedTransactions, securityEnabled);
}
/** /**
* This method creates the Spring-based TaskanaEngine without an sqlSessionFactory * This method creates the Spring-based TaskanaEngine without an sqlSessionFactory
* *