Class CmsSetupTests


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

    Since:
    6.0.0
    • Constructor Summary

      Constructors 
      Constructor Description
      CmsSetupTests()
      Creates a new setup test suite.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.List<I_CmsSetupTest> getAllTests()
      Returns a list of all available tests.
      java.util.List<CmsSetupTestResult> getTestResults()
      Returns the test results.
      boolean isGreen()
      Returns true, if the conditions in all tests were fulfilled.
      boolean isRed()
      Returns true if one of the tests found a violated condition.
      boolean isYellow()
      Returns true if one of the tests found a questionable condition.
      void runTests​(CmsSetupBean setupBean)
      Runs all tests.
      void runTests​(CmsSetupBean setupBean, java.lang.String serverInfo)
      Runs all tests.
      protected void setGreen()
      Sets if the conditions in all testes were fulfilled.
      protected void setRed()
      Sets if one of the tests found a violated condition.
      protected void setYellow()
      Sets if one of the tests found a questionable condition.
      protected void writeVersionInfo​(java.lang.String thisEngine, java.lang.String usedJDK, java.lang.String basePath)
      Writes the version info of the used servlet engine and the used JDK to the version.txt.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • CmsSetupTests

        public CmsSetupTests()
        Creates a new setup test suite.

    • Method Detail

      • getAllTests

        public java.util.List<I_CmsSetupTestgetAllTests()
        Returns a list of all available tests.

        Returns:
        a list of all available tests
      • 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,
                             java.lang.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​(java.lang.String thisEngine,
                                        java.lang.String usedJDK,
                                        java.lang.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