[validation] Improvements to the BuildValidation abstract class
authorAntonio Moreno <antonio.moreno@openbravo.com>
Tue, 30 Mar 2010 18:39:36 +0200
changeset 6898 0df8fdc4ed4e
parent 6897 d6f0fa8b4070
child 6899 9120b07e771b
[validation] Improvements to the BuildValidation abstract class
src-core/src/org/openbravo/buildvalidation/BuildValidation.java
src-util/diagnostic/.classpath
src-util/diagnostic/.project
src-util/diagnostic/.settings/.jsdtscope
src-util/diagnostic/.settings/org.eclipse.jdt.core.prefs
src-util/diagnostic/.settings/org.eclipse.jst.common.project.facet.core.prefs
src-util/diagnostic/.settings/org.eclipse.wst.common.component
src-util/diagnostic/.settings/org.eclipse.wst.common.project.facet.core.xml
src-util/diagnostic/.settings/org.eclipse.wst.jsdt.ui.superType.container
src-util/diagnostic/.settings/org.eclipse.wst.jsdt.ui.superType.name
src-util/diagnostic/WebContent/META-INF/MANIFEST.MF
src-util/diagnostic/WebContent/WEB-INF/web.xml
src-util/diagnostic/build-create.xml
src-util/diagnostic/build.xml
src-util/diagnostic/build/.keep
src-util/diagnostic/check-ob-perms.sh
src-util/diagnostic/config/diagnostics.properties
src-util/diagnostic/config/log4j.properties
src-util/diagnostic/src/Test.java
src-util/diagnostic/src/org/openbravo/check/Check.java
src-util/diagnostic/src/org/openbravo/task/CheckDB.java
src-util/diagnostic/src/org/openbravo/task/CheckEnvironmentVariables.java
src-util/diagnostic/src/org/openbravo/task/CheckJVMVersion.java
src-util/diagnostic/src/org/openbravo/task/CheckMemory.java
src-util/diagnostic/src/org/openbravo/task/CheckTomcatAntExecution.java
src-util/diagnostic/src/org/openbravo/task/CheckTomcatFilePermissions.java
src-util/diagnostic/src/org/openbravo/task/CheckTomcatMemory.java
src-util/diagnostic/src/org/openbravo/task/CheckTomcatVersion.java
src-util/diagnostic/src/org/openbravo/task/CheckX.java
src-util/diagnostic/src/org/openbravo/task/CompareVersion.java
src-util/diagnostic/src/org/openbravo/utils/PropertiesManager.java
src-util/diagnostic/src/org/openbravo/utils/ServerConnection.java
src-util/diagnostic/src/org/openbravo/utils/Version.java
--- a/src-core/src/org/openbravo/buildvalidation/BuildValidation.java	Tue Mar 30 18:14:26 2010 +0200
+++ b/src-core/src/org/openbravo/buildvalidation/BuildValidation.java	Tue Mar 30 18:39:36 2010 +0200
@@ -1,31 +1,32 @@
 package org.openbravo.buildvalidation;
 
 import java.io.File;
-import java.util.ArrayList;
+import java.util.List;
 
 import org.openbravo.database.CPStandAlone;
 import org.openbravo.database.ConnectionProvider;
 
 public abstract class BuildValidation {
 
-  private ConnectionProvider cp = null;
-  private File basedir;
+  private ConnectionProvider cp;
 
-  public abstract ArrayList<String> execute();
+  public abstract List<String> execute();
 
-  public ConnectionProvider getConnectionProvider() {
-    if (cp == null) {
-      File f = new File("");
-      f = new File(f.getAbsolutePath());
-      File fProp = null;
-      if (new File("../../config/Openbravo.properties").exists())
-        fProp = new File("../../config/Openbravo.properties");
-      else if (new File("../config/Openbravo.properties").exists())
-        fProp = new File("../config/Openbravo.properties");
-      else if (new File("config/Openbravo.properties").exists())
-        fProp = new File("config/Openbravo.properties");
-      cp = new CPStandAlone(fProp.getAbsolutePath());
+  protected ConnectionProvider getConnectionProvider() {
+    if (cp != null) {
+      return cp;
     }
+
+    File f = new File("");
+    f = new File(f.getAbsolutePath());
+    File fProp = null;
+    if (new File("config/Openbravo.properties").exists())
+      fProp = new File("config/Openbravo.properties");
+    else if (new File("../config/Openbravo.properties").exists())
+      fProp = new File("../config/Openbravo.properties");
+    else if (new File("../../config/Openbravo.properties").exists())
+      fProp = new File("../../config/Openbravo.properties");
+    cp = new CPStandAlone(fProp.getAbsolutePath());
     return cp;
   }
 }
\ No newline at end of file