Interface DatabaseVerifier

    • Method Detail

      • verifyDatabase

        void verifyDatabase​(String databaseType,
                            Connection connection)
                     throws SQLException,
                            DatabaseVerifyException
        Validates the database connection by performing various checks according to the db type e.g., the collation and isolation level for MySQL.
        Parameters:
        databaseType - - the database type, such as mssql
        Throws:
        DatabaseVerifyException - - indicates the database was not configured properly.
        SQLException - - indicates sql error occurs during the verification
        Since:
        6.5
      • verifyDatasource

        void verifyDatasource​(String databaseType,
                              String datasourceName)
                       throws SQLException,
                              DatabaseVerifyException
        Deprecated.
        since 6.5, Use verifyDatabase(String, Connection) instead
        Validates the given datasource by checking whether a connection can be returned, next checking the collation for MS SQL Server and MySQL.
        Parameters:
        databaseType - - the database type, such as mssql
        datasourceName - - the JNDI datasource name input by customer at database setup stage
        Throws:
        DatabaseVerifyException - - indicates the database was not configured successfully.
        SQLException - - indicates the connection could not be created with the provided details
      • verifyDatabaseDetails

        void verifyDatabaseDetails​(String databaseType,
                                   com.atlassian.config.db.DatabaseDetails databaseDetails)
                            throws SQLException,
                                   DatabaseVerifyException
        Deprecated.
        since 6.5, Use verifyDatabase(String, Connection) instead
        Validates the given connection details by checking whether a connection can be returned, next checking the collation for MS SQL Server and MySQL.
        Parameters:
        databaseType - - the database type, such as mssql
        databaseDetails - - the connection details input by customer at database setup stage
        Throws:
        DatabaseVerifyException - - indicates the database was not configured successfully using the provided details
        SQLException - - indicates the connection could not be created with the provided details
        See Also:
        DatabaseDetails