avalon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dona...@apache.org
Subject cvs commit: jakarta-avalon-phoenix/src/java/org/apache/avalon/phoenix/interfaces Installation.java InstallationException.java Installer.java
Date Sat, 21 Sep 2002 02:36:03 GMT
donaldp     2002/09/20 19:36:03

  Modified:    src/java/org/apache/avalon/phoenix/components/deployer
                        DefaultDeployer.java
  Added:       src/java/org/apache/avalon/phoenix/components/installer
                        DefaultInstaller.java Resources.properties
                        package.html
               src/java/org/apache/avalon/phoenix/interfaces
                        Installation.java InstallationException.java
                        Installer.java
  Removed:     src/java/org/apache/avalon/phoenix/components/deployer/installer
                        Installation.java InstallationException.java
                        Installer.java Resources.properties package.html
  Log:
  Started the process of separating Installer out as a component.
  
  Originally Submitted by: Igor Fedorenko but underwent modification
  
  Revision  Changes    Path
  1.57      +4 -4      jakarta-avalon-phoenix/src/java/org/apache/avalon/phoenix/components/deployer/DefaultDeployer.java
  
  Index: DefaultDeployer.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-phoenix/src/java/org/apache/avalon/phoenix/components/deployer/DefaultDeployer.java,v
  retrieving revision 1.56
  retrieving revision 1.57
  diff -u -r1.56 -r1.57
  --- DefaultDeployer.java	15 Sep 2002 10:20:46 -0000	1.56
  +++ DefaultDeployer.java	21 Sep 2002 02:36:03 -0000	1.57
  @@ -29,9 +29,9 @@
   import org.apache.avalon.framework.service.ServiceException;
   import org.apache.avalon.framework.service.ServiceManager;
   import org.apache.avalon.framework.service.Serviceable;
  -import org.apache.avalon.phoenix.components.deployer.installer.Installation;
  -import org.apache.avalon.phoenix.components.deployer.installer.InstallationException;
  -import org.apache.avalon.phoenix.components.deployer.installer.Installer;
  +import org.apache.avalon.phoenix.interfaces.Installation;
  +import org.apache.avalon.phoenix.interfaces.InstallationException;
  +import org.apache.avalon.phoenix.components.installer.DefaultInstaller;
   import org.apache.avalon.phoenix.interfaces.Application;
   import org.apache.avalon.phoenix.interfaces.ClassLoaderManager;
   import org.apache.avalon.phoenix.interfaces.ConfigurationRepository;
  @@ -65,7 +65,7 @@
   
       private final Assembler m_assembler = new Assembler();
       private final SarVerifier m_verifier = new SarVerifier();
  -    private final Installer m_installer = new Installer();
  +    private final DefaultInstaller m_installer = new DefaultInstaller();
       private final Map m_installations = new Hashtable();
       private LogManager m_logManager;
       private Kernel m_kernel;
  
  
  
  1.6       +389 -175  jakarta-avalon-phoenix/src/java/org/apache/avalon/phoenix/components/installer/DefaultInstaller.java
  
  
  
  
  1.3       +13 -9     jakarta-avalon-phoenix/src/java/org/apache/avalon/phoenix/components/installer/Resources.properties
  
  
  
  
  1.1                  jakarta-avalon-phoenix/src/java/org/apache/avalon/phoenix/components/installer/package.html
  
  Index: package.html
  ===================================================================
  <html><body>
  Installation management resources.
  </body></html>
  
  
  
  1.1                  jakarta-avalon-phoenix/src/java/org/apache/avalon/phoenix/interfaces/Installation.java
  
  Index: Installation.java
  ===================================================================
  /*
   * Copyright (C) The Apache Software Foundation. All rights reserved.
   *
   * This software is published under the terms of the Apache Software License
   * version 1.1, a copy of which has been included with this distribution in
   * the LICENSE.txt file.
   */
  package org.apache.avalon.phoenix.interfaces;
  
  import java.io.File;
  
  /**
   * Descriptor for installation.
   * This descriptor contains all the information relating to
   * installed application. In particular it locates all the
   * jars in Classpath, config files and installation directory.
   *
   * @author <a href="mailto:peter at apache.org">Peter Donald</a>
   * @version $Revision: 1.1 $ $Date: 2002/09/21 02:36:03 $
   */
  public final class Installation
  {
      ///The source of installation (usually a directory in .sar format or a .sar file)
      private final File m_source;
  
      ///Directory in which application is installed
      private final File m_directory;
  
      ///Directory in which application temporary/work data is stored
      private final File m_workDirectory;
  
      ///URL to block configuration data
      private final String m_config;
  
      ///URL to assembly data
      private final String m_assembly;
  
      ///URL to application configuration data
      private final String m_environment;
  
      ///ClassPath for application
      private final String[] m_classPath;
  
      public Installation( final File source,
                           final File directory,
                           final File workDirectory,
                           final String config,
                           final String assembly,
                           final String environment,
                           final String[] classPath )
      {
          m_source = source;
          m_directory = directory;
          m_workDirectory = workDirectory;
          m_config = config;
          m_assembly = assembly;
          m_environment = environment;
          m_classPath = classPath;
      }
  
      /**
       * Get the source of application. (Usually a
       * directory in .sar format or a .sar)
       *
       * @return the source of application
       */
      public File getSource()
      {
          return m_source;
      }
  
      /**
       * Get directory application is installed into.
       *
       * @return the applications base directory
       */
      public File getDirectory()
      {
          return m_directory;
      }
  
      /**
       * Get the directory in which temporary data for this application
       * is stored.
       *
       * @return the work directory for application.
       */
      public File getWorkDirectory()
      {
          return m_workDirectory;
      }
  
      /**
       * Retrieve location of applications config.xml file.
       *
       * @return url to config.xml file
       */
      public String getConfig()
      {
          return m_config;
      }
  
      /**
       * Retrieve location of applications assembly.xml file.
       *
       * @return url to assembly.xml file
       */
      public String getAssembly()
      {
          return m_assembly;
      }
  
      /**
       * Retrieve location of applications environment.xml file.
       *
       * @return url to environment.xml file
       */
      public String getEnvironment()
      {
          return m_environment;
      }
  
      /**
       * Retrieve ClassPath for application.
       *
       * @return the classpath
       */
      public String[] getClassPath()
      {
          return m_classPath;
      }
  }
  
  
  
  1.1                  jakarta-avalon-phoenix/src/java/org/apache/avalon/phoenix/interfaces/InstallationException.java
  
  Index: InstallationException.java
  ===================================================================
  /*
   * Copyright (C) The Apache Software Foundation. All rights reserved.
   *
   * This software is published under the terms of the Apache Software License
   * version 1.1, a copy of which has been included with this distribution in
   * the LICENSE.txt file.
   */
  package org.apache.avalon.phoenix.interfaces;
  
  import org.apache.avalon.framework.CascadingException;
  
  /**
   * Exception to indicate error deploying.
   *
   * @author <a href="mailto:peter at apache.org">Peter Donald</a>
   * @version $Revision: 1.1 $ $Date: 2002/09/21 02:36:03 $
   */
  public final class InstallationException
      extends CascadingException
  {
      /**
       * Construct a new <code>InstallationException</code> instance.
       *
       * @param message The detail message for this exception.
       */
      public InstallationException( final String message )
      {
          this( message, null );
      }
  
      /**
       * Construct a new <code>InstallationException</code> instance.
       *
       * @param message The detail message for this exception.
       * @param throwable the root cause of the exception
       */
      public InstallationException( final String message, final Throwable throwable )
      {
          super( message, throwable );
      }
  }
  
  
  
  1.1                  jakarta-avalon-phoenix/src/java/org/apache/avalon/phoenix/interfaces/Installer.java
  
  Index: Installer.java
  ===================================================================
  /*
   * Copyright (C) The Apache Software Foundation. All rights reserved.
   *
   * This software is published under the terms of the Apache Software License
   * version 1.1, a copy of which has been included with this distribution in
   * the LICENSE.txt file.
   */
  package org.apache.avalon.phoenix.interfaces;
  
  import java.net.URL;
  
  /**
   * A basic service to Install an application.
   *
   * @author <a href="mailto:peter at apache.org">Peter Donald</a>
   */
  public interface Installer
  {
      String ROLE = Installer.class.getName();
  
      /**
       * Install the Sar designated by url.
       *
       * @param url the url of instalation
       * @throws InstallationException if an error occurs
       */
      Installation install( String name, URL url )
          throws InstallationException;
  
      /**
       * Uninstall the Sar designated installation.
       *
       * @param installation the installation
       * @throws InstallationException if an error occurs
       */
      void uninstall( Installation installation )
          throws InstallationException;
  }
  
  
  

--
To unsubscribe, e-mail:   <mailto:avalon-cvs-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:avalon-cvs-help@jakarta.apache.org>


Mime
View raw message