CVS: jcontainer/loom/engine/src/java/org/jcontainer/loom/components/installer DefaultInstaller.java,1.11,1.12

Peter Donald <pdonald-yCVjj/[email protected]>
Newsgroups gmane.comp.java.jcontainer.cvs
Message-ID <[email protected]>
Update of /cvsroot/jcontainer/jcontainer/loom/engine/src/java/org/jcontainer/loom/components/installer
In directory hogshead.codehaus.org:/tmp/cvs-serv22919/engine/src/java/org/jcontainer/loom/components/installer

Modified Files:
	DefaultInstaller.java 
Log Message:
Dont passing in apps/work/etc directorys via ResourceLocator - rather treat them as configuration variables loaded from kernel.xml


Index: DefaultInstaller.java
===================================================================
RCS file: /cvsroot/jcontainer/jcontainer/loom/engine/src/java/org/jcontainer/loom/components/installer/DefaultInstaller.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- DefaultInstaller.java	29 Oct 2003 21:55:26 -0000	1.11
+++ DefaultInstaller.java	29 Oct 2003 22:20:42 -0000	1.12
@@ -100,9 +100,9 @@
 import java.util.zip.ZipFile;
 import org.jcontainer.dna.AbstractLogEnabled;
 import org.jcontainer.dna.Active;
-import org.jcontainer.dna.Composable;
-import org.jcontainer.dna.MissingResourceException;
-import org.jcontainer.dna.ResourceLocator;
+import org.jcontainer.dna.Configurable;
+import org.jcontainer.dna.Configuration;
+import org.jcontainer.dna.ConfigurationException;
 import org.jcontainer.loom.interfaces.ContainerConstants;
 import org.jcontainer.loom.interfaces.Installer;
 import org.jcontainer.loom.interfaces.LoomException;
@@ -120,7 +120,7 @@
  */
 public class DefaultInstaller
     extends AbstractLogEnabled
-    implements Installer, Composable, Active
+    implements Installer, Configurable, Active
 {
     private static final Resources REZ =
         ResourceManager.getPackageResources( DefaultInstaller.class );
@@ -150,16 +150,15 @@
      */
     private File m_baseDirectory;
 
-    /**
-     * @dna.dependency type="File" qualifier="home"
-     * @dna.dependency type="File" qualifier="apps"
-     */
-    public void compose( ResourceLocator locator )
-        throws MissingResourceException
+    public void configure( final Configuration configuration )
+        throws ConfigurationException
     {
-        final File home = (File)locator.lookup( File.class.getName() + "/home" );
-        m_baseWorkDirectory = new File( home, "work" );
-        m_baseDirectory = (File)locator.lookup( File.class.getName() + "/apps" );
+        final String workDir =
+            configuration.getChild( "base-work-dir" ).getValue();
+        final String appDir =
+            configuration.getChild( "base-application-dir" ).getValue();
+        m_baseWorkDirectory = new File( workDir );
+        m_baseDirectory = new File( appDir );
     }
 
     public void initialize()
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.