Class JiraHomeStartupCheck

java.lang.Object
com.atlassian.jira.startup.JiraHomeStartupCheck
All Implemented Interfaces:
FaultDescription, StartupCheck

public class JiraHomeStartupCheck extends Object implements StartupCheck
This StartupCheck will check that there is a valid jira.home configured that we can get an exclusive lock on.

Note: this has the side effect that the jira.home directory is created, if required, and "locked". These side-effects are REQUIRED in order to return valid results.

Since:
v4.0
  • Method Details

    • getInstance

      public static JiraHomeStartupCheck getInstance()
    • 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()
      When called the first time it runs the startup checks and the creation of the JIRA home directory. Returns if those checks and the creation were successful.
      Specified by:
      isOk in interface StartupCheck
      Returns:
      true if all checks and JIRA home creation were successful.
    • isInitialised

      public boolean isInitialised()
      Returns:
      true if the start up checks have been run.
    • stop

      public void stop()
      Releases the lock to the JIRA home directory.
      Specified by:
      stop in interface StartupCheck
    • getJiraHomeDirectory

      public io.atlassian.fugue.Either<JiraHomeStartupCheckFailure,File> getJiraHomeDirectory()
      Runs the JIRA home checks and creation process. Returns the JIRA home File if everything is successful or the failure reason otherwise.
      Returns:
      the JIRA home dir File or Check failure
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getFaultDescription

      @Nullable public String getFaultDescription()
      Needed to implement the StartupCheck interface. These are not used anywhere anymore as the Startup checks are migrated to the Johnson page.
      Specified by:
      getFaultDescription in interface FaultDescription
      Returns:
      String containing the fault description
    • getHTMLFaultDescription

      @Nullable public String getHTMLFaultDescription()
      Needed to implement the StartupCheck interface These are not used anywhere anymore as the Startup checks are migrated to the Johnson page.
      Specified by:
      getHTMLFaultDescription in interface StartupCheck
      Returns:
      HTML formatted fault description