[izpack-changes] r1896 - in izpack-src/trunk: . src/lib/com/izforge/izpack/installer

noreply at berlios.de noreply at berlios.de
Mon Nov 12 10:02:04 CET 2007


Author: dreil
Date: 2007-11-12 10:02:00 +0100 (Mon, 12 Nov 2007)
New Revision: 1896

Modified:
   izpack-src/trunk/Versions.txt
   izpack-src/trunk/src/lib/com/izforge/izpack/installer/ProcessPanelWorker.java
Log:
Added support for conditions in ProcessPanel 

Modified: izpack-src/trunk/Versions.txt
===================================================================
--- izpack-src/trunk/Versions.txt	2007-11-09 14:33:50 UTC (rev 1895)
+++ izpack-src/trunk/Versions.txt	2007-11-12 09:02:00 UTC (rev 1896)
@@ -53,6 +53,7 @@
 - Tango icons (Julien Ponge)
 - Refreshed installer border images (Julien Ponge)
 - Fixed conditions in PacksPanel/PacksModel (Dennis Reil)
+- Added conditions for jobs in ProcessPanel (Dennis Reil) 
   
   > 3.10.2 (build 2007.05.11)
 

Modified: izpack-src/trunk/src/lib/com/izforge/izpack/installer/ProcessPanelWorker.java
===================================================================
--- izpack-src/trunk/src/lib/com/izforge/izpack/installer/ProcessPanelWorker.java	2007-11-09 14:33:50 UTC (rev 1895)
+++ izpack-src/trunk/src/lib/com/izforge/izpack/installer/ProcessPanelWorker.java	2007-11-12 09:02:00 UTC (rev 1896)
@@ -44,6 +44,8 @@
 import net.n3.nanoxml.XMLElement;
 
 import com.izforge.izpack.Pack;
+import com.izforge.izpack.rules.Condition;
+import com.izforge.izpack.rules.RulesEngine;
 import com.izforge.izpack.util.AbstractUIHandler;
 import com.izforge.izpack.util.AbstractUIProcessHandler;
 import com.izforge.izpack.util.Debug;
@@ -144,7 +146,17 @@
         for (Iterator job_it = spec.getChildrenNamed("job").iterator(); job_it.hasNext();)
         {
             XMLElement job_el = (XMLElement) job_it.next();
-
+            String conditionid = job_el.getAttribute("conditionid");
+            if (conditionid != null){
+              Debug.trace("Condition for job.");
+              Condition cond = RulesEngine.getCondition(conditionid);
+              if ((cond != null) && !cond.isTrue()){
+                Debug.trace("condition is not fulfilled.");
+                // skip, if there is a condition and this condition isn't true
+                continue;
+              }
+            }
+            Debug.trace("Condition is fulfilled or not existent.");
             // ExecuteForPack Patch
             // Check if processing required for pack
             Vector forPacks = job_el.getChildrenNamed("executeForPack");



More information about the izpack-changes mailing list