org.opencms.setup.comptest
Class CmsSetupTests

java.lang.Object
  extended byorg.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
Version:
$Revision: 1.2 $
Author:
Thomas Weckert, Michael Moossen

Constructor Summary
CmsSetupTests()
          Creates a new setup test suite.
 
Method Summary
 java.util.List getAllTests()
          Returns a list of all available tests.
 java.util.List getTestResults()
          Returns the test results.
 boolean isGreen()
          Returns true, if the conditions in all testes 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.
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 getAllTests()
Returns a list of all available tests.

Returns:
a list of all available tests

getTestResults

public java.util.List getTestResults()
Returns the test results.

Returns:
the test results

isGreen

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

Returns:
true, if the conditions in all testes 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

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