1 31 32 package org.opencms.setup.comptest; 33 34 import org.opencms.main.CmsSystemInfo; 35 import org.opencms.setup.CmsSetupBean; 36 37 import java.io.File ; 38 39 48 public class CmsSetupTestWarFileUnpacked implements I_CmsSetupTest { 49 50 51 public static final String TEST_NAME = "Unpacked WAR File"; 52 53 56 public String getName() { 57 58 return TEST_NAME; 59 } 60 61 64 public CmsSetupTestResult execute(CmsSetupBean setupBean) { 65 66 CmsSetupTestResult testResult = new CmsSetupTestResult(this); 67 68 String basePath = setupBean.getWebAppRfsPath(); 69 if (!basePath.endsWith(File.separator)) { 70 basePath += File.separator; 71 } 72 File file = new File (basePath 73 + CmsSetupBean.FOLDER_WEBINF 74 + CmsSystemInfo.FOLDER_CONFIG 75 + CmsSystemInfo.FILE_PROPERTIES); 76 if (file.exists() && file.canRead() && file.canWrite()) { 77 testResult.setGreen(); 78 testResult.setResult(RESULT_PASSED); 79 } else { 80 testResult.setRed(); 81 testResult.setInfo("OpenCms cannot be installed unless the OpenCms WAR file is unpacked! " 82 + "Please check the settings of your servlet container or unpack the WAR file manually."); 83 testResult.setHelp("WAR file NOT unpacked"); 84 testResult.setResult(RESULT_FAILED); 85 } 86 return testResult; 87 } 88 } 89 | Popular Tags |