Package org.opencms.setup.comptest
Class CmsSetupTests
- java.lang.Object
-
- org.opencms.setup.comptest.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.
-
-
-
Constructor Detail
-
CmsSetupTests
public CmsSetupTests()
Creates a new setup test suite.
-
-
Method Detail
-
getAllTests
public java.util.List<I_CmsSetupTest> getAllTests()
Returns a list of all available tests.- Returns:
- a list of all available tests
-
getTestResults
public java.util.List<CmsSetupTestResult> 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, java.lang.String serverInfo)
Runs all tests.- Parameters:
setupBean
- the CmsSetup bean of the setup wizardserverInfo
- 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 useusedJDK
- The JDK version in usebasePath
- the OpenCms base path
-
-