Class CmsSetupTests

java.lang.Object
org.opencms.setup.comptest.CmsSetupTests

public class CmsSetupTests extends Object
Runs various tests to give users infos about whether their system is compatible to OpenCms.

Since:
6.0.0
  • Constructor Details

    • CmsSetupTests

      public CmsSetupTests()
      Creates a new setup test suite.

  • Method Details

    • getAllTests

      Returns a list of all available tests.

      Returns:
      a list of all available tests
    • getTestResults

      Returns the test results.

      Returns:
      the test results
    • isGreen

      public boolean isGreen()
      Returns true, if the conditions in all tests were fulfilled.

      Returns:
      true, if the conditions in all tests were fulfilled
    • isRed

      public boolean isRed()
      Returns true if one of the tests found a violated condition. It is assumed that it will be impossible to run OpenCms.

      Returns:
      true if one of the tests violates a condition
    • isYellow

      public boolean isYellow()
      Returns true if one of the tests found a questionable condition. It is possible that OpenCms will not run.

      Returns:
      true if one of the tests found a questionable condition
    • runTests

      public void runTests(CmsSetupBean setupBean)
      Runs all tests.

      Parameters:
      setupBean - the CmsSetup bean of the setup wizard
    • runTests

      public void runTests(CmsSetupBean setupBean, String serverInfo)
      Runs all tests.

      Parameters:
      setupBean - the CmsSetup bean of the setup wizard
      serverInfo - optional server info, if not present the server info is retrieved from the bean
    • setGreen

      protected void setGreen()
      Sets if the conditions in all testes were fulfilled.

    • setRed

      protected void setRed()
      Sets if one of the tests found a violated condition.

    • setYellow

      protected void setYellow()
      Sets if one of the tests found a questionable condition.

    • writeVersionInfo

      protected void writeVersionInfo(String thisEngine, String usedJDK, String basePath)
      Writes the version info of the used servlet engine and the used JDK to the version.txt.

      Parameters:
      thisEngine - The servlet engine in use
      usedJDK - The JDK version in use
      basePath - the OpenCms base path