public class

PublicSchemaConfigCheck

extends Object
implements StartupCheck
java.lang.Object
   ↳ com.atlassian.jira.appconsistency.db.PublicSchemaConfigCheck

Class Overview

A DatabaseCheck that looks in the entityengine.xml for an anticipated misconfiguration, the combination of setting schema-name to PUBLIC (upper case) on a database other than HSQL.

Summary

Public Constructors
PublicSchemaConfigCheck(Supplier<DatasourceInfo> datasourceInfoSupplier)
Uses the given databaseConfigurationManager to acquire a reference to the DatasourceInfo to use to perform this configuration check.
Public Methods
String getFaultDescription()
Implement this method to return the description of the fault.
String getHTMLFaultDescription()
Implement this method to return the error message of the fault.
String getName()
Implement this method to return the name of this check
boolean isOk()
Returns false if the schema is PUBLIC (all caps) and the field type ain't HSQL.
void stop()
Called when the instance is coming down
String toString()
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.atlassian.jira.startup.StartupCheck

Public Constructors

public PublicSchemaConfigCheck (Supplier<DatasourceInfo> datasourceInfoSupplier)

Uses the given databaseConfigurationManager to acquire a reference to the DatasourceInfo to use to perform this configuration check.

Parameters
datasourceInfoSupplier to get the DatasourceInfo.

Public Methods

public String getFaultDescription ()

Implement this method to return the description of the fault. This method should return null in the case the check was positive. This message is used to present the user with a message to the console

Returns
  • fault description

public String getHTMLFaultDescription ()

Implement this method to return the error message of the fault. This method should return null in the case the check was positive. This message is used to present the user with a message viewable in a web browser.

Returns
  • HTML formatted fault description

public String getName ()

Implement this method to return the name of this check

Returns
  • name

public boolean isOk ()

Returns false if the schema is PUBLIC (all caps) and the field type ain't HSQL. Returns false otherwise. This check can also be disabled by setting the #KEY_PUBLIC_SCHEMA_CONFIG_DISABLED property to "true". If disabled, it'll always return true.

Returns
  • the result of the check

public void stop ()

Called when the instance is coming down

public String toString ()