com.atlassian.jira.appconsistency.db
Class PublicSchemaConfigCheck

java.lang.Object
  extended by com.atlassian.jira.appconsistency.db.PublicSchemaConfigCheck
All Implemented Interfaces:
StartupCheck

public class PublicSchemaConfigCheck
extends Object
implements StartupCheck

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.


Constructor Summary
PublicSchemaConfigCheck(com.google.common.base.Supplier<org.ofbiz.core.entity.config.DatasourceInfo> datasourceInfoSupplier)
          Uses the given databaseConfigurationManager to acquire a reference to the DatasourceInfo to use to perform this configuration check.
 
Method Summary
 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 tenant / instance is coming down
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PublicSchemaConfigCheck

public PublicSchemaConfigCheck(com.google.common.base.Supplier<org.ofbiz.core.entity.config.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.
Method Detail

getName

public String getName()
Description copied from interface: StartupCheck
Implement this method to return the name of this check

Specified by:
getName in interface StartupCheck
Returns:
name

isOk

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.

Specified by:
isOk in interface StartupCheck
Returns:
the result of the check

getFaultDescription

public String getFaultDescription()
Description copied from interface: StartupCheck
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

Specified by:
getFaultDescription in interface StartupCheck
Returns:
fault description

getHTMLFaultDescription

public String getHTMLFaultDescription()
Description copied from interface: StartupCheck
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.

Specified by:
getHTMLFaultDescription in interface StartupCheck
Returns:
HTML formatted fault description

stop

public void stop()
Description copied from interface: StartupCheck
Called when the tenant / instance is coming down

Specified by:
stop in interface StartupCheck

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2002-2013 Atlassian. All Rights Reserved.