Package com.atlassian.confluence.setup
Class DefaultDatabaseVerifier
- java.lang.Object
- 
- com.atlassian.confluence.setup.DefaultDatabaseVerifier
 
- 
- All Implemented Interfaces:
- DatabaseCollationVerifier,- DatabaseVerifier
 
 @Internal public class DefaultDatabaseVerifier extends Object implements DatabaseVerifier - Since:
- 6.4
 
- 
- 
Constructor SummaryConstructors Constructor Description DefaultDatabaseVerifier()
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description BootstrapManagergetBootstrapManager()voidsetBootstrapManager(BootstrapManager bootstrapManager)Optional<DatabaseVerificationResult>verifyCollationOfDatabase(Connection connection, String script, String[] supportedCollations, String doc)Validates the database collation for a given connection.voidverifyDatabase(String databaseType, Connection connection)Validates the database connection by performing various checks according to the db type e.g., the collation and isolation level for MySQL.voidverifyDatabaseDetails(String databaseType, com.atlassian.config.db.DatabaseDetails databaseDetails)Validates the given connection details by checking whether a connection can be returned, next checking the collation for MS SQL Server and MySQL.voidverifyDatasource(String databaseType, String datasourceName)Validates the given datasource by checking whether a connection can be returned, next checking the collation for MS SQL Server and MySQL.
 
- 
- 
- 
Method Detail- 
getBootstrapManagerpublic BootstrapManager getBootstrapManager() 
 - 
setBootstrapManagerpublic void setBootstrapManager(BootstrapManager bootstrapManager) 
 - 
verifyDatabasepublic void verifyDatabase(String databaseType, Connection connection) throws SQLException, DatabaseVerifyException Description copied from interface:DatabaseVerifierValidates the database connection by performing various checks according to the db type e.g., the collation and isolation level for MySQL.- Specified by:
- verifyDatabasein interface- DatabaseVerifier
- Parameters:
- databaseType- - the database type, such as mssql
- Throws:
- SQLException- - indicates sql error occurs during the verification
- DatabaseVerifyException- - indicates the database was not configured properly.
 
 - 
verifyDatasourcepublic void verifyDatasource(String databaseType, String datasourceName) throws SQLException, DatabaseVerifyException Description copied from interface:DatabaseVerifierValidates the given datasource by checking whether a connection can be returned, next checking the collation for MS SQL Server and MySQL.- Specified by:
- verifyDatasourcein interface- DatabaseVerifier
- Parameters:
- databaseType- - the database type, such as mssql
- datasourceName- - the JNDI datasource name input by customer at database setup stage
- Throws:
- SQLException- - indicates the connection could not be created with the provided details
- DatabaseVerifyException- - indicates the database was not configured successfully.
 
 - 
verifyDatabaseDetailspublic void verifyDatabaseDetails(String databaseType, com.atlassian.config.db.DatabaseDetails databaseDetails) throws SQLException, DatabaseVerifyException Description copied from interface:DatabaseVerifierValidates the given connection details by checking whether a connection can be returned, next checking the collation for MS SQL Server and MySQL.- Specified by:
- verifyDatabaseDetailsin interface- DatabaseVerifier
- Parameters:
- databaseType- - the database type, such as mssql
- databaseDetails- - the connection details input by customer at database setup stage
- Throws:
- SQLException- - indicates the connection could not be created with the provided details
- DatabaseVerifyException- - indicates the database was not configured successfully using the provided details
- See Also:
- DatabaseDetails
 
 - 
verifyCollationOfDatabasepublic Optional<DatabaseVerificationResult> verifyCollationOfDatabase(Connection connection, String script, String[] supportedCollations, String doc) throws SQLException Description copied from interface:DatabaseCollationVerifierValidates the database collation for a given connection.- Specified by:
- verifyCollationOfDatabasein interface- DatabaseCollationVerifier
- Parameters:
- connection- the database connection to validate against.
- script- the script used to check the collation.
- supportedCollations- collations which are supported for the given database.
- doc- link to the Confluence document.
- Returns:
- the verification result or empty if successful.
- Throws:
- SQLException- - indicates sql error occurs during the verification
 
 
- 
 
-