[izpack-changes] r1670 - in izpack-src/trunk: . src/lib/com/izforge/izpack/compiler src/lib/com/izforge/izpack/event

noreply at berlios.de noreply at berlios.de
Tue Jan 2 11:11:27 CET 2007


Author: dreil
Date: 2007-01-02 11:11:23 +0100 (Tue, 02 Jan 2007)
New Revision: 1670

Added:
   izpack-src/trunk/src/lib/com/izforge/izpack/compiler/IPackager.java
   izpack-src/trunk/src/lib/com/izforge/izpack/compiler/PackagerFactory.java
Modified:
   izpack-src/trunk/Versions.txt
   izpack-src/trunk/src/lib/com/izforge/izpack/compiler/Compiler.java
   izpack-src/trunk/src/lib/com/izforge/izpack/compiler/CompilerConfig.java
   izpack-src/trunk/src/lib/com/izforge/izpack/compiler/Packager.java
   izpack-src/trunk/src/lib/com/izforge/izpack/event/CompilerListener.java
   izpack-src/trunk/src/lib/com/izforge/izpack/event/SimpleCompilerListener.java
Log:
Refactoring of packager usage.
Added interface IPackager to support different packager implementations


Modified: izpack-src/trunk/Versions.txt
===================================================================
--- izpack-src/trunk/Versions.txt	2006-12-21 21:06:14 UTC (rev 1669)
+++ izpack-src/trunk/Versions.txt	2007-01-02 10:11:23 UTC (rev 1670)
@@ -26,6 +26,7 @@
 - Use the 'ProgramFiles' environment variable to detect the Windows program files folder path.
   (Markus Schlegel via Julien Ponge).
 - TargetPanel.dir setting bug fix (Markus Schlegel via Julien Ponge).
+- Added support for packaging selection (Dennis Reil)
 
   > 3.9.0 (build 2006.09.25)
 - Fix NullPointerException in CompilerConfig, if you specify a 

Modified: izpack-src/trunk/src/lib/com/izforge/izpack/compiler/Compiler.java
===================================================================
--- izpack-src/trunk/src/lib/com/izforge/izpack/compiler/Compiler.java	2006-12-21 21:06:14 UTC (rev 1669)
+++ izpack-src/trunk/src/lib/com/izforge/izpack/compiler/Compiler.java	2007-01-02 10:11:23 UTC (rev 1670)
@@ -45,6 +45,7 @@
 import com.izforge.izpack.Info;
 import com.izforge.izpack.Pack;
 import com.izforge.izpack.Panel;
+import com.izforge.izpack.compressor.PackCompressor;
 import com.izforge.izpack.util.Debug;
 import com.izforge.izpack.util.VariableSubstitutor;
 
@@ -78,7 +79,7 @@
     protected String output;
 
     /** Collects and packs files into installation jars, as told. */
-    private Packager packager = null;
+    private IPackager packager = null;
 
     /** Error code, set to true if compilation succeeded. */
     private boolean compileFailed = true;
@@ -88,6 +89,10 @@
 
     /** Replaces the properties in the install.xml file prior to compiling */
     private VariableSubstitutor propertySubstitutor;
+    
+    private String compr_format;
+    private int compr_level;
+    private PackagerListener packagerlistener;
 
     /**
      * Set the IzPack home directory
@@ -150,11 +155,33 @@
         // add izpack built in property
         setProperty("izpack.version", IZPACK_VERSION);
         setProperty("basedir", basedir);
+        
+        this.compr_format = compr_format;
+        this.compr_level = compr_level;
+    }
 
-        packager = new Packager(compr_format, compr_level);
-        packager.getCompressor().setCompiler(this);
+    /**
+     * Initializes the given packager class
+     * @param classname
+     * @throws CompilerException
+     */
+    public void initPackager(String classname) throws CompilerException{
+        try {
+            packager = PackagerFactory.getPackager(classname);
+            packager.initPackCompressor(this.compr_format, this.compr_level);
+            PackCompressor compressor = packager.getCompressor();
+            if (compressor != null){
+                compressor.setCompiler(this);
+            }
+            if (this.packagerlistener != null){
+                packager.setPackagerListener(this.packagerlistener);
+            }
+        }
+        catch (Exception e){
+            Debug.trace(e);
+            throw new CompilerException("Error loading packager class: " +  classname);
+        }
     }
-
     
     /**
      * Returns the packager listener.
@@ -171,7 +198,12 @@
      */
     public void setPackagerListener(PackagerListener listener)
     {
-        packager.setPackagerListener(listener);
+        if (packager != null){
+            packager.setPackagerListener(listener);
+        }
+        else {
+            this.packagerlistener = listener;
+        }
     }
 
     /**
@@ -292,7 +324,7 @@
      * Returns the install packager.
      * @return the install packager.
      */
-    public Packager getPackager()
+    public IPackager getPackager()
     {
         return packager;
     }

Modified: izpack-src/trunk/src/lib/com/izforge/izpack/compiler/CompilerConfig.java
===================================================================
--- izpack-src/trunk/src/lib/com/izforge/izpack/compiler/CompilerConfig.java	2006-12-21 21:06:14 UTC (rev 1669)
+++ izpack-src/trunk/src/lib/com/izforge/izpack/compiler/CompilerConfig.java	2007-01-02 10:11:23 UTC (rev 1670)
@@ -305,7 +305,9 @@
 
         // We get the XML data tree
         XMLElement data = getXMLTree();
-
+        // loads the specified packager
+        loadPackagingInformation(data);
+        
         // Listeners to various events
         addCustomListeners(data);
 
@@ -327,6 +329,30 @@
         compiler.createInstaller();
     }
 
+    private void loadPackagingInformation(XMLElement data) throws CompilerException
+    {
+        notifyCompilerListener("loadPackager", CompilerListener.BEGIN, data);
+        // Initialisation
+        XMLElement root = data.getFirstChildNamed("packaging");
+        String packagerclassname = "com.izforge.izpack.compiler.Packager";
+        String unpackerclassname = "com.izforge.izpack.installer.Unpacker";
+        if (root != null){
+            XMLElement packager = root.getFirstChildNamed("packager");
+            
+            if (packager != null){
+                packagerclassname = requireAttribute(packager, "class");
+            }
+            
+            XMLElement unpacker = root.getFirstChildNamed("unpacker");
+            
+            if (unpacker != null){
+                unpackerclassname = requireAttribute(unpacker, "class");
+            }        
+        }
+        compiler.initPackager(packagerclassname);        
+        notifyCompilerListener("loadPackager", CompilerListener.END, data);        
+    }
+
     public boolean wasSuccessful()
     {
         return compiler.wasSuccessful();
@@ -988,7 +1014,7 @@
         temp.deleteOnExit();
         
         FileOutputStream out = new FileOutputStream(temp);
-        compiler.getPackager().copyStream(zin, out);
+        PackagerHelper.copyStream(zin, out);
         out.close();
         
         pack.addFile(temp, targetdir + "/" + zentry.getName(), osList, override, additionals);
@@ -2180,7 +2206,7 @@
             throws CompilerException
     {
         Iterator i = compilerListeners.iterator();
-        Packager packager = compiler.getPackager();
+        IPackager packager = compiler.getPackager();
         while (i != null && i.hasNext())
         {
             CompilerListener listener = (CompilerListener) i.next();

Added: izpack-src/trunk/src/lib/com/izforge/izpack/compiler/IPackager.java
===================================================================
--- izpack-src/trunk/src/lib/com/izforge/izpack/compiler/IPackager.java	2006-12-21 21:06:14 UTC (rev 1669)
+++ izpack-src/trunk/src/lib/com/izforge/izpack/compiler/IPackager.java	2007-01-02 10:11:23 UTC (rev 1670)
@@ -0,0 +1,177 @@
+/*
+ * IzPack - Copyright 2001-2006 Julien Ponge, All Rights Reserved.
+ * 
+ * http://www.izforge.com/izpack/
+ * http://developer.berlios.de/projects/izpack/
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *     
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.izforge.izpack.compiler;
+
+import java.io.File;
+import java.net.URL;
+import java.util.List;
+import java.util.Properties;
+
+import com.izforge.izpack.CustomData;
+import com.izforge.izpack.GUIPrefs;
+import com.izforge.izpack.Info;
+import com.izforge.izpack.Panel;
+import com.izforge.izpack.compressor.PackCompressor;
+
+/**
+ * Interface for all packager implementations
+ * 
+ * @author Dennis Reil, <Dennis.Reil at reddot.de>
+ */
+public interface IPackager
+{
+
+    /**
+     * Create the installer, beginning with the specified jar. If the name specified does not end in
+     * ".jar", it is appended. If secondary jars are created for packs (if the Info object added has
+     * a webDirURL set), they are created in the same directory, named sequentially by inserting
+     * ".pack#" (where '#' is the pack number) ".jar" suffix: e.g. "foo.pack1.jar". If any file
+     * exists, it is overwritten.
+     */
+    public abstract void createInstaller(File primaryFile) throws Exception;
+
+    /**
+     * Get the PackagerListener.
+     * @return the current PackagerListener
+     */
+    public abstract PackagerListener getPackagerListener();
+
+    /**
+     * Adds a listener.
+     * 
+     * @param listener The listener.
+     */
+    public abstract void setPackagerListener(PackagerListener listener);
+
+    /**
+     * Sets the informations related to this installation.
+     * 
+     * @param info The info section.
+     * @exception Exception Description of the Exception
+     */
+    public abstract void setInfo(Info info) throws Exception;
+
+    /**
+     * Sets the GUI preferences.
+     * 
+     * @param prefs The new gUIPrefs value
+     */
+    public abstract void setGUIPrefs(GUIPrefs prefs);
+
+    /**
+     * Allows access to add, remove and update the variables for the project, which are maintained
+     * in the packager.
+     * 
+     * @return map of variable names to values
+     */
+    public abstract Properties getVariables();
+
+    /**
+     * Add a panel, where order is important. Only one copy of the class files neeed are inserted in
+     * the installer.
+     */
+    public abstract void addPanelJar(Panel panel, URL jarURL);
+
+    /**
+     * Add a custom data like custom actions, where order is important. Only one copy of the class
+     * files neeed are inserted in the installer.
+     * 
+     * @param ca custom action object
+     * @param url the URL to include once
+     */
+    public abstract void addCustomJar(CustomData ca, URL url);
+
+    /**
+     * Adds a pack, order is mostly irrelevant.
+     * 
+     * @param pack contains all the files and items that go with a pack
+     */
+    public abstract void addPack(PackInfo pack);
+
+    /**
+     * Gets the packages list
+     */
+    public abstract List getPacksList();
+
+    /**
+     * Adds a language pack.
+     * 
+     * @param iso3 The ISO3 code.
+     * @param xmlURL The location of the xml local info
+     * @param flagURL The location of the flag image resource
+     */
+    public abstract void addLangPack(String iso3, URL xmlURL, URL flagURL);
+
+    /**
+     * Adds a resource.
+     * 
+     * @param resId The resource Id.
+     * @param url The location of the data
+     */
+    public abstract void addResource(String resId, URL url);
+
+    /**
+     * Adds a native library.
+     * 
+     * @param name The native library name.
+     * @param url The url to get the data from.
+     * @exception Exception Description of the Exception
+     */
+    public abstract void addNativeLibrary(String name, URL url) throws Exception;
+
+    /**
+     * Adds a jar file content to the installer. Package structure is maintained. Need mechanism to
+     * copy over signed entry information.
+     * 
+     * @param jarURL The url of the jar to add to the installer. We use a URL so the jar may be
+     * nested within another.
+     */
+    public abstract void addJarContent(URL jarURL);
+
+    /**
+     * Adds a jar file content to the installer. Package structure is maintained. Need mechanism to
+     * copy over signed entry information. If the given file list is null the hole contents of the
+     * jar file will be copied else only the listed.
+     * 
+     * @param jarURL The url of the jar to add to the installer. We use a URL so the jar may be
+     * nested within another.
+     * @param files to be copied
+     */
+    public abstract void addJarContent(URL jarURL, List files);
+
+    /**
+     * Marks a native library to be added to the uninstaller.
+     * 
+     * @param data the describing custom action data object
+     */
+    public abstract void addNativeUninstallerLibrary(CustomData data);
+
+    /**
+     * Returns the current pack compressor
+     * @return Returns the current pack compressor.
+     */
+    public abstract PackCompressor getCompressor();     
+    
+    /**
+     * 
+     * @param compr_format
+     * @param compr_level
+     */
+    public abstract void initPackCompressor(String compr_format, int compr_level) throws CompilerException;
+}
\ No newline at end of file

Modified: izpack-src/trunk/src/lib/com/izforge/izpack/compiler/Packager.java
===================================================================
--- izpack-src/trunk/src/lib/com/izforge/izpack/compiler/Packager.java	2006-12-21 21:06:14 UTC (rev 1669)
+++ izpack-src/trunk/src/lib/com/izforge/izpack/compiler/Packager.java	2007-01-02 10:11:23 UTC (rev 1670)
@@ -63,7 +63,7 @@
  * @author Julien Ponge
  * @author Chadwick McHenry
  */
-public class Packager
+public class Packager implements IPackager
 {
 
     /** Path to the skeleton installer. */
@@ -144,13 +144,11 @@
         compressor = PackCompressorFactory.get( compr_format);
         compressor.setCompressionLevel(compr_level);
     }
+    
+    
 
-    /**
-     * Create the installer, beginning with the specified jar. If the name specified does not end in
-     * ".jar", it is appended. If secondary jars are created for packs (if the Info object added has
-     * a webDirURL set), they are created in the same directory, named sequentially by inserting
-     * ".pack#" (where '#' is the pack number) ".jar" suffix: e.g. "foo.pack1.jar". If any file
-     * exists, it is overwritten.
+    /* (non-Javadoc)
+     * @see com.izforge.izpack.compiler.IPackager#createInstaller(java.io.File)
      */
     public void createInstaller(File primaryFile) throws Exception
     {
@@ -203,18 +201,15 @@
      * Listener assistance
      **********************************************************************************************/
 
-    /**
-     * Get the PackagerListener.
-     * @return the current PackagerListener
+    /* (non-Javadoc)
+     * @see com.izforge.izpack.compiler.IPackager#getPackagerListener()
      */
     public PackagerListener getPackagerListener()
     {
         return listener;
     }
-    /**
-     * Adds a listener.
-     * 
-     * @param listener The listener.
+    /* (non-Javadoc)
+     * @see com.izforge.izpack.compiler.IPackager#setPackagerListener(com.izforge.izpack.compiler.PackagerListener)
      */
     public void setPackagerListener(PackagerListener listener)
     {
@@ -258,11 +253,8 @@
      * Public methods to add data to the Installer being packed
      **********************************************************************************************/
 
-    /**
-     * Sets the informations related to this installation.
-     * 
-     * @param info The info section.
-     * @exception Exception Description of the Exception
+    /* (non-Javadoc)
+     * @see com.izforge.izpack.compiler.IPackager#setInfo(com.izforge.izpack.Info)
      */
     public void setInfo(Info info) throws Exception
     {
@@ -275,10 +267,8 @@
         }
     }
 
-    /**
-     * Sets the GUI preferences.
-     * 
-     * @param prefs The new gUIPrefs value
+    /* (non-Javadoc)
+     * @see com.izforge.izpack.compiler.IPackager#setGUIPrefs(com.izforge.izpack.GUIPrefs)
      */
     public void setGUIPrefs(GUIPrefs prefs)
     {
@@ -286,20 +276,16 @@
         guiPrefs = prefs;
     }
 
-    /**
-     * Allows access to add, remove and update the variables for the project, which are maintained
-     * in the packager.
-     * 
-     * @return map of variable names to values
+    /* (non-Javadoc)
+     * @see com.izforge.izpack.compiler.IPackager#getVariables()
      */
     public Properties getVariables()
     {
         return variables;
     }
 
-    /**
-     * Add a panel, where order is important. Only one copy of the class files neeed are inserted in
-     * the installer.
+    /* (non-Javadoc)
+     * @see com.izforge.izpack.compiler.IPackager#addPanelJar(com.izforge.izpack.Panel, java.net.URL)
      */
     public void addPanelJar(Panel panel, URL jarURL)
     {
@@ -308,12 +294,8 @@
         // added
     }
 
-    /**
-     * Add a custom data like custom actions, where order is important. Only one copy of the class
-     * files neeed are inserted in the installer.
-     * 
-     * @param ca custom action object
-     * @param url the URL to include once
+    /* (non-Javadoc)
+     * @see com.izforge.izpack.compiler.IPackager#addCustomJar(com.izforge.izpack.CustomData, java.net.URL)
      */
     public void addCustomJar(CustomData ca, URL url)
     {
@@ -322,30 +304,24 @@
         // added
     }
 
-    /**
-     * Adds a pack, order is mostly irrelevant.
-     * 
-     * @param pack contains all the files and items that go with a pack
+    /* (non-Javadoc)
+     * @see com.izforge.izpack.compiler.IPackager#addPack(com.izforge.izpack.compiler.PackInfo)
      */
     public void addPack(PackInfo pack)
     {
         packsList.add(pack);
     }
 
-    /**
-     * Gets the packages list
+    /* (non-Javadoc)
+     * @see com.izforge.izpack.compiler.IPackager#getPacksList()
      */
     public List getPacksList()
     {
         return packsList;
     }
 
-    /**
-     * Adds a language pack.
-     * 
-     * @param iso3 The ISO3 code.
-     * @param xmlURL The location of the xml local info
-     * @param flagURL The location of the flag image resource
+    /* (non-Javadoc)
+     * @see com.izforge.izpack.compiler.IPackager#addLangPack(java.lang.String, java.net.URL, java.net.URL)
      */
     public void addLangPack(String iso3, URL xmlURL, URL flagURL)
     {
@@ -357,11 +333,8 @@
         installerResourceURLMap.put("langpacks/" + iso3 + ".xml", xmlURL);
     }
 
-    /**
-     * Adds a resource.
-     * 
-     * @param resId The resource Id.
-     * @param url The location of the data
+    /* (non-Javadoc)
+     * @see com.izforge.izpack.compiler.IPackager#addResource(java.lang.String, java.net.URL)
      */
     public void addResource(String resId, URL url)
     {
@@ -369,12 +342,8 @@
         installerResourceURLMap.put("res/" + resId, url);
     }
 
-    /**
-     * Adds a native library.
-     * 
-     * @param name The native library name.
-     * @param url The url to get the data from.
-     * @exception Exception Description of the Exception
+    /* (non-Javadoc)
+     * @see com.izforge.izpack.compiler.IPackager#addNativeLibrary(java.lang.String, java.net.URL)
      */
     public void addNativeLibrary(String name, URL url) throws Exception
     {
@@ -383,25 +352,15 @@
     }
 
 
-    /**
-     * Adds a jar file content to the installer. Package structure is maintained. Need mechanism to
-     * copy over signed entry information.
-     * 
-     * @param jarURL The url of the jar to add to the installer. We use a URL so the jar may be
-     * nested within another.
+    /* (non-Javadoc)
+     * @see com.izforge.izpack.compiler.IPackager#addJarContent(java.net.URL)
      */
     public void addJarContent(URL jarURL)
     {
         addJarContent(jarURL, null);
     }
-    /**
-     * Adds a jar file content to the installer. Package structure is maintained. Need mechanism to
-     * copy over signed entry information. If the given file list is null the hole contents of the
-     * jar file will be copied else only the listed.
-     * 
-     * @param jarURL The url of the jar to add to the installer. We use a URL so the jar may be
-     * nested within another.
-     * @param files to be copied
+    /* (non-Javadoc)
+     * @see com.izforge.izpack.compiler.IPackager#addJarContent(java.net.URL, java.util.List)
      */
     public void addJarContent(URL jarURL, List files)
     {
@@ -410,10 +369,8 @@
         includedJarURLs.add(cont);
     }
 
-    /**
-     * Marks a native library to be added to the uninstaller.
-     * 
-     * @param data the describing custom action data object
+    /* (non-Javadoc)
+     * @see com.izforge.izpack.compiler.IPackager#addNativeUninstallerLibrary(com.izforge.izpack.CustomData)
      */
     public void addNativeUninstallerLibrary(CustomData data)
     {
@@ -467,7 +424,7 @@
             String name = (String) i.next();
             InputStream in = ((URL) installerResourceURLMap.get(name)).openStream();
             primaryJarStream.putNextEntry(new org.apache.tools.zip.ZipEntry(name));
-            copyStream(in, primaryJarStream);
+            PackagerHelper.copyStream(in, primaryJarStream);
             primaryJarStream.closeEntry();
             in.close();
         }
@@ -574,7 +531,7 @@
                     long pos = dos.getByteCount(); // get the position
 
                     FileInputStream inStream = new FileInputStream(file);
-                    long bytesWritten = copyStream(inStream, objOut);
+                    long bytesWritten = PackagerHelper.copyStream(inStream, objOut);
 
                     if (bytesWritten != pf.length())
                         throw new IOException("File size mismatch when reading " + file);
@@ -711,7 +668,7 @@
             try
             {
                 out.putNextEntry(new org.apache.tools.zip.ZipEntry(currentName));
-                copyStream(zin, out);
+                PackagerHelper.copyStream(zin, out);
                 out.closeEntry();
                 zin.closeEntry();
                 currentSet.add(currentName);
@@ -724,33 +681,18 @@
             }
         }
     }
-
-    /**
-     * Copies all the data from the specified input stream to the specified output stream.
-     * 
-     * @param in the input stream to read
-     * @param out the output stream to write
-     * @return the total number of bytes copied
-     * @exception IOException if an I/O error occurs
+    
+    /* (non-Javadoc)
+     * @see com.izforge.izpack.compiler.IPackager#getCompressor()
      */
-    protected long copyStream(InputStream in, OutputStream out) throws IOException
-    {
-        byte[] buffer = new byte[5120];
-        long bytesCopied = 0;
-        int bytesInBuffer;
-        while ((bytesInBuffer = in.read(buffer)) != -1)
-        {
-            out.write(buffer, 0, bytesInBuffer);
-            bytesCopied += bytesInBuffer;
-        }
-        return bytesCopied;
-    }
-    /**
-     * Returns the current pack compressor
-     * @return Returns the current pack compressor.
-     */
     public PackCompressor getCompressor()
     {
         return compressor;
     }
+
+    public void initPackCompressor(String compr_format, int compr_level) throws CompilerException
+    {
+        compressor = PackCompressorFactory.get( compr_format);
+        compressor.setCompressionLevel(compr_level);        
+    }
 }

Added: izpack-src/trunk/src/lib/com/izforge/izpack/compiler/PackagerFactory.java
===================================================================
--- izpack-src/trunk/src/lib/com/izforge/izpack/compiler/PackagerFactory.java	2006-12-21 21:06:14 UTC (rev 1669)
+++ izpack-src/trunk/src/lib/com/izforge/izpack/compiler/PackagerFactory.java	2007-01-02 10:11:23 UTC (rev 1670)
@@ -0,0 +1,20 @@
+package com.izforge.izpack.compiler;
+
+/**
+ * Factory class for handling the packager classes 
+ * @author Dennis Reil, <Dennis.Reil at reddot.de>
+ */
+public class PackagerFactory
+{
+    /**
+     * Returns a new instantiation of the specified packager
+     * @param classname
+     * @return
+     * @throws InstantiationException
+     * @throws IllegalAccessException
+     * @throws ClassNotFoundException
+     */
+    public static IPackager getPackager(String classname) throws InstantiationException, IllegalAccessException, ClassNotFoundException{
+        return (IPackager) Class.forName(classname).newInstance();
+    }
+}

Modified: izpack-src/trunk/src/lib/com/izforge/izpack/event/CompilerListener.java
===================================================================
--- izpack-src/trunk/src/lib/com/izforge/izpack/event/CompilerListener.java	2006-12-21 21:06:14 UTC (rev 1669)
+++ izpack-src/trunk/src/lib/com/izforge/izpack/event/CompilerListener.java	2007-01-02 10:11:23 UTC (rev 1670)
@@ -26,7 +26,7 @@
 import net.n3.nanoxml.XMLElement;
 
 import com.izforge.izpack.compiler.CompilerException;
-import com.izforge.izpack.compiler.Packager;
+import com.izforge.izpack.compiler.IPackager;
 
 /**
  * <p>
@@ -68,6 +68,6 @@
      * @param data current install data
      * @param packager current packager object
      */
-    void notify(String position, int state, XMLElement data, Packager packager);
+    void notify(String position, int state, XMLElement data, IPackager packager);
 
 }

Modified: izpack-src/trunk/src/lib/com/izforge/izpack/event/SimpleCompilerListener.java
===================================================================
--- izpack-src/trunk/src/lib/com/izforge/izpack/event/SimpleCompilerListener.java	2006-12-21 21:06:14 UTC (rev 1669)
+++ izpack-src/trunk/src/lib/com/izforge/izpack/event/SimpleCompilerListener.java	2007-01-02 10:11:23 UTC (rev 1670)
@@ -26,8 +26,8 @@
 import net.n3.nanoxml.XMLElement;
 
 import com.izforge.izpack.compiler.CompilerException;
+import com.izforge.izpack.compiler.IPackager;
 import com.izforge.izpack.compiler.PackInfo;
-import com.izforge.izpack.compiler.Packager;
 
 /**
  * <p>
@@ -68,7 +68,7 @@
      * @see com.izforge.izpack.compiler.CompilerListener#AfterPack(com.izforge.izpack.compiler.Compiler.Pack,
      * int, com.izforge.izpack.compiler.Packager)
      */
-    public void afterPack(PackInfo pack, int packNumber, Packager packager)
+    public void afterPack(PackInfo pack, int packNumber, IPackager packager)
             throws CompilerException
     {
     }
@@ -79,7 +79,7 @@
      * @see com.izforge.izpack.compiler.CompilerListener#BeforePack(com.izforge.izpack.compiler.Compiler.Pack,
      * int, com.izforge.izpack.compiler.Packager)
      */
-    public void beforePack(PackInfo pack, int packNumber, Packager packager)
+    public void beforePack(PackInfo pack, int packNumber, IPackager packager)
     {
     }
 
@@ -89,7 +89,7 @@
      * @see com.izforge.izpack.compiler.CompilerListener#notify(java.lang.String, int,
      * net.n3.nanoxml.XMLElement, com.izforge.izpack.compiler.Packager)
      */
-    public void notify(String position, int state, XMLElement data, Packager packager)
+    public void notify(String position, int state, XMLElement data, IPackager packager)
     {
     }
 




More information about the izpack-changes mailing list