Revision: 3265
Author: silva.josemanuel1
Date: Tue Feb  2 14:19:38 2010
Log: Added ability to bypass pl.ini checks.
http://code.google.com/p/power-architect/source/detail?r=3265

Modified:
 /trunk/src/ca/sqlpower/architect/ArchitectSessionContextImpl.java

=======================================
--- /trunk/src/ca/sqlpower/architect/ArchitectSessionContextImpl.java Fri Jan 15 15:02:04 2010 +++ /trunk/src/ca/sqlpower/architect/ArchitectSessionContextImpl.java Tue Feb 2 14:19:38 2010
@@ -84,12 +84,16 @@

setPlDotIniPath(ArchitectUtils.checkForValidPlDotIni(getPlDotIniPath(), "Architect"));
     }
+
+ public ArchitectSessionContextImpl(String PlDotIniPath) throws SQLObjectException {
+        this(PlDotIniPath, true);
+    }

     /**
      * Similar to the default constructor, but we can specify a pl.ini path
* ourselves. (This has been created in order to fully automate the JUnit test).
      */
- public ArchitectSessionContextImpl(String PlDotIniPath) throws SQLObjectException { + public ArchitectSessionContextImpl(String PlDotIniPath, boolean checkPath) throws SQLObjectException {
         sessions = new HashSet<ArchitectSession>();

         ArchitectUtils.startup();
@@ -97,8 +101,10 @@
         ArchitectUtils.configureLog4j();

         setPlDotIniPath(PlDotIniPath);
-
- setPlDotIniPath(ArchitectUtils.checkForValidPlDotIni(PlDotIniPath, "Architect"));
+
+        if (checkPath) {
+ setPlDotIniPath(ArchitectUtils.checkForValidPlDotIni(PlDotIniPath, "Architect"));
+        }
     }

     public ArchitectSession createSession() throws SQLObjectException {

Reply via email to