You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@avalon.apache.org by mc...@apache.org on 2003/04/24 14:29:57 UTC

cvs commit: avalon-sandbox/merlin/assembly-spi/src/java/org/apache/avalon/assembly/locator Resolvable.java

mcconnell    2003/04/24 05:29:57

  Modified:    merlin/assembly-spi/src/java/org/apache/avalon/assembly/appliance
                        Appliance.java DependencyGraph.java
               merlin/assembly-spi/src/java/org/apache/avalon/assembly/engine
                        Engine.java RepositoryManager.java
               merlin/assembly-spi/src/java/org/apache/avalon/assembly/engine/model
                        Classpath.java
               merlin/assembly-spi/src/java/org/apache/avalon/assembly/engine/profile
                        package.html
               merlin/assembly-spi/src/java/org/apache/avalon/assembly/engine/type
                        package.html
               merlin/assembly-spi/src/java/org/apache/avalon/assembly/locator
                        Resolvable.java
  Added:       merlin/assembly-spi/src/java/org/apache/avalon/assembly/engine/profile
                        ProfileRepository.java
               merlin/assembly-spi/src/java/org/apache/avalon/assembly/engine/service
                        ServiceRepository.java
               merlin/assembly-spi/src/java/org/apache/avalon/assembly/engine/type
                        TypeRepository.java
               merlin/assembly-spi/src/java/org/apache/avalon/assembly/lifestyle
                        DeploymentException.java DeploymentService.java
  Removed:     merlin/assembly-spi/src/java/org/apache/avalon/assembly/engine/profile
                        ProfileManager.java
               merlin/assembly-spi/src/java/org/apache/avalon/assembly/engine/service
                        ServiceManager.java
               merlin/assembly-spi/src/java/org/apache/avalon/assembly/engine/type
                        TypeManager.java
  Log:
  Updated to reflect terminology changes.
  
  Revision  Changes    Path
  1.7       +19 -2     avalon-sandbox/merlin/assembly-spi/src/java/org/apache/avalon/assembly/appliance/Appliance.java
  
  Index: Appliance.java
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/merlin/assembly-spi/src/java/org/apache/avalon/assembly/appliance/Appliance.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- Appliance.java	20 Apr 2003 12:13:54 -0000	1.6
  +++ Appliance.java	24 Apr 2003 12:29:56 -0000	1.7
  @@ -57,6 +57,8 @@
   import org.apache.avalon.framework.configuration.Configuration;
   import org.apache.avalon.framework.parameters.Parameters;
   import org.apache.avalon.meta.info.DependencyDescriptor;
  +import org.apache.avalon.meta.info.ServiceDescriptor;
  +import org.apache.avalon.meta.info.ReferenceDescriptor;
   import org.apache.avalon.meta.info.StageDescriptor;
   import org.apache.avalon.meta.info.Type;
   import org.apache.avalon.meta.model.ContextDirective;
  @@ -149,9 +151,24 @@
       /**
        * Return the set of runtime dependencies for the type.
        *
  -     * @return the set of runtim dependencies.
  +     * @return the set of runtimedependencies.
        */
       DependencyDescriptor[] getDependencies();
  +
  +    /**
  +     * Return the set of services provides by the appliance.
  +     *
  +     * @return the set of services.
  +     */
  +    ServiceDescriptor[] getServices();
  +
  +    /**
  +     * Return a service descriptor relative to a supplie reference.
  +     *
  +     * @param the service reference descriptor.
  +     * @return the service descriptor.
  +     */
  +    ServiceDescriptor getService( ReferenceDescriptor reference );
   
       /**
        * Return the activation policy for the component.  If TRUE, activation
  
  
  
  1.5       +3 -2      avalon-sandbox/merlin/assembly-spi/src/java/org/apache/avalon/assembly/appliance/DependencyGraph.java
  
  Index: DependencyGraph.java
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/merlin/assembly-spi/src/java/org/apache/avalon/assembly/appliance/DependencyGraph.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- DependencyGraph.java	11 Apr 2003 20:28:31 -0000	1.4
  +++ DependencyGraph.java	24 Apr 2003 12:29:56 -0000	1.5
  @@ -390,7 +390,8 @@
               if( provider != null )
               {
                   visitcomponent( provider, true, done, order );
  -            } else
  +            } 
  +            else
               {
                   if( dependency.isRequired() )
                   {
  
  
  
  1.4       +1 -11     avalon-sandbox/merlin/assembly-spi/src/java/org/apache/avalon/assembly/engine/Engine.java
  
  Index: Engine.java
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/merlin/assembly-spi/src/java/org/apache/avalon/assembly/engine/Engine.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- Engine.java	11 Apr 2003 20:28:32 -0000	1.3
  +++ Engine.java	24 Apr 2003 12:29:56 -0000	1.4
  @@ -98,16 +98,6 @@
               ApplianceContext context, boolean shared ) throws ApplianceException;
   
       /**
  -     * Create a new appliance.
  -     * @param context the appliance context
  -     * @param shared TRUE if this appliance may be shared
  -     * @param nested if TRUE the return appliance is assigned a child logging channel
  -     * @return the appliance
  -     */
  -    Appliance createAppliance(
  -            ApplianceContext context, boolean shared, boolean nested ) throws ApplianceException;
  -
  -    /**
        * Resolve an appliance capable of supporting a service
        * reference.
        *
  
  
  
  1.3       +7 -7      avalon-sandbox/merlin/assembly-spi/src/java/org/apache/avalon/assembly/engine/RepositoryManager.java
  
  Index: RepositoryManager.java
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/merlin/assembly-spi/src/java/org/apache/avalon/assembly/engine/RepositoryManager.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- RepositoryManager.java	11 Apr 2003 20:28:32 -0000	1.2
  +++ RepositoryManager.java	24 Apr 2003 12:29:56 -0000	1.3
  @@ -50,9 +50,9 @@
   
   package org.apache.avalon.assembly.engine;
   
  -import org.apache.avalon.assembly.engine.profile.ProfileManager;
  -import org.apache.avalon.assembly.engine.service.ServiceManager;
  -import org.apache.avalon.assembly.engine.type.TypeManager;
  +import org.apache.avalon.assembly.engine.profile.ProfileRepository;
  +import org.apache.avalon.assembly.engine.service.ServiceRepository;
  +import org.apache.avalon.assembly.engine.type.TypeRepository;
   
   /**
    * An appliance is a class that encapsulates the deployment criteria
  @@ -71,18 +71,18 @@
        * Returns the type repository.
        * @return the repository of available types
        */
  -    TypeManager getTypeManager();
  +    TypeRepository getTypeRepository();
   
       /**
        * Returns the service repository.
        * @return the repository of available services
        */
  -    ServiceManager getServiceManager();
  +    ServiceRepository getServiceRepository();
   
       /**
        * Returns the profile repository.
        * @return the repository of available profiles
        */
  -    ProfileManager getProfileManager();
  +    ProfileRepository getProfileRepository();
   
   }
  
  
  
  1.5       +15 -1     avalon-sandbox/merlin/assembly-spi/src/java/org/apache/avalon/assembly/engine/model/Classpath.java
  
  Index: Classpath.java
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/merlin/assembly-spi/src/java/org/apache/avalon/assembly/engine/model/Classpath.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- Classpath.java	20 Apr 2003 12:13:55 -0000	1.4
  +++ Classpath.java	24 Apr 2003 12:29:56 -0000	1.5
  @@ -58,6 +58,10 @@
   import java.net.URL;
   import java.io.File;
   
  +import org.apache.avalon.assembly.repository.Repository;
  +import org.apache.avalon.assembly.repository.RepositoryException;
  +
  +
   /**
    * <p>A classpath directive that defines the contract for multiple
    * implementations capable of providing jar file URLs to a classloader.</p>
  @@ -76,5 +80,15 @@
        * will be resolved.
        */
       URL[] expand( File system, File home );
  +
  +    /**
  +     * Expand a classpath to an array of URLS.
  +     * @param repository the system repository
  +     * @param base the base directory from which relative classpath entries
  +     * will be resolved.
  +     */
  +    URL[] expand( Repository repository, File base )
  +      throws RepositoryException;
  +
   
   }
  
  
  
  1.2       +1 -1      avalon-sandbox/merlin/assembly-spi/src/java/org/apache/avalon/assembly/engine/profile/package.html
  
  Index: package.html
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/merlin/assembly-spi/src/java/org/apache/avalon/assembly/engine/profile/package.html,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- package.html	13 Mar 2003 01:04:42 -0000	1.1
  +++ package.html	24 Apr 2003 12:29:56 -0000	1.2
  @@ -1,6 +1,6 @@
   
   <body>
   <p>
  -The <code>profile</code> package contains classes and interfaces for the {@link org.apache.avalon.assembly.engine.profile.ProfileManager} and related default implementations supporting the management of a repository of profiles.
  +The <code>profile</code> package contains classes and interfaces for the {@link org.apache.avalon.assembly.engine.profile.ProfileRepository} and related default implementations supporting the management of a repository of profiles.
   </p>
   </body>
  
  
  
  1.1                  avalon-sandbox/merlin/assembly-spi/src/java/org/apache/avalon/assembly/engine/profile/ProfileRepository.java
  
  Index: ProfileRepository.java
  ===================================================================
  /*
  
   ============================================================================
                     The Apache Software License, Version 1.1
   ============================================================================
  
   Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved.
  
   Redistribution and use in source and binary forms, with or without modifica-
   tion, are permitted provided that the following conditions are met:
  
   1. Redistributions of  source code must  retain the above copyright  notice,
      this list of conditions and the following disclaimer.
  
   2. Redistributions in binary form must reproduce the above copyright notice,
      this list of conditions and the following disclaimer in the documentation
      and/or other materials provided with the distribution.
  
   3. The end-user documentation included with the redistribution, if any, must
      include  the following  acknowledgment:  "This product includes  software
      developed  by the  Apache Software Foundation  (http://www.apache.org/)."
      Alternately, this  acknowledgment may  appear in the software itself,  if
      and wherever such third-party acknowledgments normally appear.
  
   4. The names "Jakarta", "Apache Avalon", "Avalon Framework" and
      "Apache Software Foundation"  must not be used to endorse or promote
      products derived  from this  software without  prior written
      permission. For written permission, please contact apache@apache.org.
  
   5. Products  derived from this software may not  be called "Apache", nor may
      "Apache" appear  in their name,  without prior written permission  of the
      Apache Software Foundation.
  
   THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
   INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
   FITNESS  FOR A PARTICULAR  PURPOSE ARE  DISCLAIMED.  IN NO  EVENT SHALL  THE
   APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
   INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
   DING, BUT NOT LIMITED TO, PROCUREMENT  OF SUBSTITUTE GOODS OR SERVICES; LOSS
   OF USE, DATA, OR  PROFITS; OR BUSINESS  INTERRUPTION)  HOWEVER CAUSED AND ON
   ANY  THEORY OF LIABILITY,  WHETHER  IN CONTRACT,  STRICT LIABILITY,  OR TORT
   (INCLUDING  NEGLIGENCE OR  OTHERWISE) ARISING IN  ANY WAY OUT OF THE  USE OF
   THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  
   This software  consists of voluntary contributions made  by many individuals
   on  behalf of the Apache Software  Foundation. For more  information on the
   Apache Software Foundation, please see <http://www.apache.org/>.
  
  */
  
  package org.apache.avalon.assembly.engine.profile;
  
  import org.apache.avalon.assembly.engine.type.UnknownTypeException;
  import org.apache.avalon.framework.configuration.Configuration;
  import org.apache.avalon.meta.info.DependencyDescriptor;
  import org.apache.avalon.meta.info.StageDescriptor;
  import org.apache.avalon.meta.info.Type;
  import org.apache.avalon.meta.model.Profile;
  
  /**
   * A profile manager implemetation provides support for the creation,
   * storage and retrival of component types.
   *
   * @author <a href="mailto:dev@avalon.apache.org">Avalon Development Team</a>
   * @version $Revision: 1.1 $ $Date: 2003/04/24 12:29:56 $
   */
  public interface ProfileRepository
  {
      //==============================================================
      // implemetation
      //==============================================================
  
      /**
       * Load a set of packaged profiles associated with the supplied class.
       * Profiles returned from this operation are not included within the
       * manager.  To register a profile with the manager use the {@link #addProfile}
       * operation.
       *
       * @param type the component type used to locate an packaged profiles
       * @return the set of packaged component profiles
       * @exception ProfileException if an error occurs while loading package profiles
       */
      Profile[] loadProfiles( Type type ) throws ProfileException;
  
      /**
       * Create a profile from a supplied configuration.
       *
       * @param type the component type that the profile qualifies
       * @param config a configuration fragment describing the deployment profile
       * @return the deployment profile
       * @exception ProfileException if an error occurs while attempting to create a profiles
       */
      Profile createProfile( Type type, Configuration config )
              throws ProfileException;
  
      /**
       * Add a set of profiles to the manager.
       * @param profiles the deployment profiles to added to the manager
       * @exception DuplicateProfileException if a profile of the same name
       *   is already registered with the manager and the supplied profile
       *   is a equal or lower in priority
       * @exception ProfileException if a profile verification failure occurs
       * @see #createProfile
       */
      void addProfiles( Profile[] profiles ) throws DuplicateProfileException, ProfileException;
  
      /**
       * Add or replace profile to the manager.
       * @param profile the deployment profile to add to the manager
       * @exception DuplicateProfileException if a profile of the same name
       *   is already registered with the manager and the replacement policy is true
       * @exception ProfileException if a profile verification failure occurs
       * @see #createProfile
       */
      void addProfile( Profile profile ) throws DuplicateProfileException, ProfileException;
  
      /**
       * Add a profile to the manager using the supplied profile and replacement policy
       * @param profile the deployment profile to add to the manager
       * @exception DuplicateProfileException if a profile of the same name
       *   is already registered with the manager and the replacement policy is true
       * @exception ProfileException if a profile verification failure occurs
       * @see #createProfile
       */
      void addProfile( Profile profile, boolean replace )
              throws DuplicateProfileException, ProfileException;
  
      /**
       * Get the preferred profile for a supplied type.
       * @param type the component type
       * @return the profile matching the type
       * @exception UnknownTypeException if the type is unknown to the manager
       */
      Profile getProfile( Type type ) throws UnknownTypeException;
  
      /**
       * Get the set of profiles declared for a particular type.
       * @param type the component type
       * @return the set of profile matching the type.
       * @exception UnknownTypeException if the type is unknown to the manager
       */
      Profile[] getProfiles( Type type ) throws UnknownTypeException;
  
      /**
       * Locate the set of component profiles capable of services the supplied
       * dependency.
       * @param dependency a service dependency descriptor
       * @return a set of profiles capable of servicing the supplied dependency
       */
      Profile[] getProfiles( DependencyDescriptor dependency );
  
      /**
       * Locate the set of component profiles that provide the supplied extension.
       * @param stage a stage descriptor
       * @return a set of types that provide the supplied service
       */
      Profile[] getProfiles( StageDescriptor stage );
  
      /**
       * Locate the set of profiles tied to a type capable of supporting a service
       * referenced by a supplied dependency descriptor using the default selector.
       * @param dependency a service depedency descriptor
       * @return a set of profiles capable of servicing the supplied dependency
       */
      Profile getProfile( DependencyDescriptor dependency );
  
      /**
       * Locate the set of profiles tied to a type capable of supporting a service
       * referenced by a supplied dependency descriptor using a supplied selector.
       * @param dependency a service depedency descriptor
       * @param selector a profile selector
       * @return a set of profiles capable of servicing the supplied dependency
       */
      Profile getProfile(
              DependencyDescriptor dependency, ProfileSelector selector );
  
      /**
       * Locate a profile tied to a type capable of supporting an extension
       * referenced by a supplied stage descriptor usign the default selector.
       * @param stage a stage descriptor
       * @return a set of types that provide the supplied service
       */
      Profile getProfile( StageDescriptor stage );
  
      /**
       * Locate a profile tied to a type capable of supporting an extension
       * referenced by a supplied stage descriptor usign the a suplied selector.
       * @param stage a stage descriptor
       * @param selector a profile selector
       * @return a set of types that provide the supplied service
       */
      Profile getProfile( StageDescriptor stage, ProfileSelector selector );
  
  }
  
  
  
  1.1                  avalon-sandbox/merlin/assembly-spi/src/java/org/apache/avalon/assembly/engine/service/ServiceRepository.java
  
  Index: ServiceRepository.java
  ===================================================================
  /*
  
   ============================================================================
                     The Apache Software License, Version 1.1
   ============================================================================
  
   Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved.
  
   Redistribution and use in source and binary forms, with or without modifica-
   tion, are permitted provided that the following conditions are met:
  
   1. Redistributions of  source code must  retain the above copyright  notice,
      this list of conditions and the following disclaimer.
  
   2. Redistributions in binary form must reproduce the above copyright notice,
      this list of conditions and the following disclaimer in the documentation
      and/or other materials provided with the distribution.
  
   3. The end-user documentation included with the redistribution, if any, must
      include  the following  acknowledgment:  "This product includes  software
      developed  by the  Apache Software Foundation  (http://www.apache.org/)."
      Alternately, this  acknowledgment may  appear in the software itself,  if
      and wherever such third-party acknowledgments normally appear.
  
   4. The names "Jakarta", "Apache Avalon", "Avalon Framework" and
      "Apache Software Foundation"  must not be used to endorse or promote
      products derived  from this  software without  prior written
      permission. For written permission, please contact apache@apache.org.
  
   5. Products  derived from this software may not  be called "Apache", nor may
      "Apache" appear  in their name,  without prior written permission  of the
      Apache Software Foundation.
  
   THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
   INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
   FITNESS  FOR A PARTICULAR  PURPOSE ARE  DISCLAIMED.  IN NO  EVENT SHALL  THE
   APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
   INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
   DING, BUT NOT LIMITED TO, PROCUREMENT  OF SUBSTITUTE GOODS OR SERVICES; LOSS
   OF USE, DATA, OR  PROFITS; OR BUSINESS  INTERRUPTION)  HOWEVER CAUSED AND ON
   ANY  THEORY OF LIABILITY,  WHETHER  IN CONTRACT,  STRICT LIABILITY,  OR TORT
   (INCLUDING  NEGLIGENCE OR  OTHERWISE) ARISING IN  ANY WAY OUT OF THE  USE OF
   THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  
   This software  consists of voluntary contributions made  by many individuals
   on  behalf of the Apache Software  Foundation. For more  information on the
   Apache Software Foundation, please see <http://www.apache.org/>.
  
  */
  
  package org.apache.avalon.assembly.engine.service;
  
  import org.apache.avalon.framework.Version;
  import org.apache.avalon.meta.info.ReferenceDescriptor;
  import org.apache.avalon.meta.info.Service;
  
  /**
   * A service repository provides support for the storage and retrival
   * of service defintions.
   *
   * @author <a href="mailto:dev@avalon.apache.org">Avalon Development Team</a>
   * @version $Revision: 1.1 $ $Date: 2003/04/24 12:29:57 $
   */
  public interface ServiceRepository
  {
      /**
       * Create a services associated from a supplied path.
       *
       * @param clazz the service class
       * @return the service defintions
       * @exception ServiceException if an error occurs during service creation
       */
      Service createService( Class clazz ) throws ServiceException;
  
      /**
       * Create a service instance based on a supplied classname.
       *
       * @param classname the component implementation classname
       * @return the service defintion
       * @exception ServiceException if an error occurs during service creation
       */
      Service createService( String classname ) throws ServiceException;
  
      /**
       * Locate a {@link Service} instances associated with the
       * supplied classname and version. If a service defintion is not
       * found locally, the implementation redirects the request to
       * the parent service manager.
       *
       * @param classname the service class name
       * @param version the service version
       * @return the service matching the supplied classname and version.
       * @exception UnknownServiceException if a matching service cannot be found
       */
      Service getService( String classname, Version version ) throws UnknownServiceException;
  
      /**
       * Locate a {@link Service} instances associated with the
       * supplied referecne descriptor. If a service defintion is not
       * found locally, the implementation redirects the request to
       * the parent service manager.
       *
       * @param classname the service class name
       * @param reference the reference descriptor
       * @return the service matching the supplied descriptor.
       * @exception UnknownServiceException if a matching service cannot be found
       */
      Service getService( ReferenceDescriptor reference )
              throws UnknownServiceException;
  
      /**
       * Add a service to the manager.
       *
       * @param service the service defintion
       * @exception DuplicateServiceException if the service already exists
       * @exception ServiceException if the service definition is invalid
       */
      void addService( Service service )
              throws DuplicateServiceException, ServiceException;
  
  }
  
  
  
  1.3       +1 -1      avalon-sandbox/merlin/assembly-spi/src/java/org/apache/avalon/assembly/engine/type/package.html
  
  Index: package.html
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/merlin/assembly-spi/src/java/org/apache/avalon/assembly/engine/type/package.html,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- package.html	11 Apr 2003 20:30:49 -0000	1.2
  +++ package.html	24 Apr 2003 12:29:57 -0000	1.3
  @@ -1,4 +1,4 @@
   <p>The <code>type</code> package contains classes and interfaces for the
  -{@link org.apache.avalon.assembly.engine.type.TypeManager} and related
  +{@link org.apache.avalon.assembly.engine.type.TypeRepository} and related
   default implementations supporting the management of a repository of
   component types.</p>
  
  
  
  1.1                  avalon-sandbox/merlin/assembly-spi/src/java/org/apache/avalon/assembly/engine/type/TypeRepository.java
  
  Index: TypeRepository.java
  ===================================================================
  /*
  
   ============================================================================
                     The Apache Software License, Version 1.1
   ============================================================================
  
   Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved.
  
   Redistribution and use in source and binary forms, with or without modifica-
   tion, are permitted provided that the following conditions are met:
  
   1. Redistributions of  source code must  retain the above copyright  notice,
      this list of conditions and the following disclaimer.
  
   2. Redistributions in binary form must reproduce the above copyright notice,
      this list of conditions and the following disclaimer in the documentation
      and/or other materials provided with the distribution.
  
   3. The end-user documentation included with the redistribution, if any, must
      include  the following  acknowledgment:  "This product includes  software
      developed  by the  Apache Software Foundation  (http://www.apache.org/)."
      Alternately, this  acknowledgment may  appear in the software itself,  if
      and wherever such third-party acknowledgments normally appear.
  
   4. The names "Jakarta", "Apache Avalon", "Avalon Framework" and
      "Apache Software Foundation"  must not be used to endorse or promote
      products derived  from this  software without  prior written
      permission. For written permission, please contact apache@apache.org.
  
   5. Products  derived from this software may not  be called "Apache", nor may
      "Apache" appear  in their name,  without prior written permission  of the
      Apache Software Foundation.
  
   THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
   INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
   FITNESS  FOR A PARTICULAR  PURPOSE ARE  DISCLAIMED.  IN NO  EVENT SHALL  THE
   APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
   INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
   DING, BUT NOT LIMITED TO, PROCUREMENT  OF SUBSTITUTE GOODS OR SERVICES; LOSS
   OF USE, DATA, OR  PROFITS; OR BUSINESS  INTERRUPTION)  HOWEVER CAUSED AND ON
   ANY  THEORY OF LIABILITY,  WHETHER  IN CONTRACT,  STRICT LIABILITY,  OR TORT
   (INCLUDING  NEGLIGENCE OR  OTHERWISE) ARISING IN  ANY WAY OUT OF THE  USE OF
   THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  
   This software  consists of voluntary contributions made  by many individuals
   on  behalf of the Apache Software  Foundation. For more  information on the
   Apache Software Foundation, please see <http://www.apache.org/>.
  
  */
  
  package org.apache.avalon.assembly.engine.type;
  
  import org.apache.avalon.meta.info.DependencyDescriptor;
  import org.apache.avalon.meta.info.StageDescriptor;
  import org.apache.avalon.meta.info.Type;
  
  /**
   * A type manager implemetation provides support for the creation,
   * storage and retrival of component types.
   *
   * @author <a href="mailto:dev@avalon.apache.org">Avalon Development Team</a>
   * @version $Revision: 1.1 $ $Date: 2003/04/24 12:29:57 $
   */
  public interface TypeRepository
  {
      /**
       * Create a new type instance.  The type instance returned is not
       * registered with the manager.  To register the type the client
       * must explicity declare the type using the {@link #addType}
       * operation.
       *
       * @param clazz the component implementation class
       * @return the component type
       * @exception TypeException is a type creation error occurs
       * @see #addType
       */
      Type createType( Class clazz ) throws TypeException;
  
      /**
       * Create a type instance based on a supplied classname and classloader.
       *
       * @param classname the component implementation classname
       * @return the component type
       * @exception TypeException is a type creation error occurs
       */
      Type createType( String classname ) throws TypeException;
  
      /**
       * Add a type to the manager.
       * @param type the component type description.
       * @exception DuplicateTypeException if the supplied type is already registered
       * @exception TypeException if a type verification failure occurs
       * @see #createType
       */
      void addType( Type type ) throws DuplicateTypeException, TypeException;
  
      /**
       * Locate a {@link Type} instances associated with the
       * supplied implementation classname.
       * @param clazz the component type implementation class.
       * @return the type matching the supplied implementation classname.
       * @exception UnknownTypeException if a matching type cannot be found
       */
      Type getType( Class clazz ) throws UnknownTypeException;
  
      /**
       * Locate a {@link Type} instances associated with the
       * supplied implementation classname.
       * @param classname the component type implementation class name.
       * @return the type matching the supplied implementation classname.
       * @exception UnknownTypeException if a matching type cannot be found
       */
      Type getType( String classname ) throws UnknownTypeException;
  
      /**
       * Locate the set of component types capable of services the supplied
       * dependency.
       * @param dependency a service dependency descriptor
       * @return a set of types capable of servicing the supplied dependency
       */
      Type[] getTypes( DependencyDescriptor dependency );
  
      /**
       * Locate the set of component types that provide the supplied extension.
       * @param stage a stage descriptor
       * @return a set of types that support the supplied stage
       */
      Type[] getTypes( StageDescriptor stage );
  
  }
  
  
  
  1.1                  avalon-sandbox/merlin/assembly-spi/src/java/org/apache/avalon/assembly/lifestyle/DeploymentException.java
  
  Index: DeploymentException.java
  ===================================================================
  /*
  
   ============================================================================
                     The Apache Software License, Version 1.1
   ============================================================================
  
   Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved.
  
   Redistribution and use in source and binary forms, with or without modifica-
   tion, are permitted provided that the following conditions are met:
  
   1. Redistributions of  source code must  retain the above copyright  notice,
      this list of conditions and the following disclaimer.
  
   2. Redistributions in binary form must reproduce the above copyright notice,
      this list of conditions and the following disclaimer in the documentation
      and/or other materials provided with the distribution.
  
   3. The end-user documentation included with the redistribution, if any, must
      include  the following  acknowledgment:  "This product includes  software
      developed  by the  Apache Software Foundation  (http://www.apache.org/)."
      Alternately, this  acknowledgment may  appear in the software itself,  if
      and wherever such third-party acknowledgments normally appear.
  
   4. The names "Jakarta", "Apache Avalon", "Avalon Framework" and
      "Apache Software Foundation"  must not be used to endorse or promote
      products derived  from this  software without  prior written
      permission. For written permission, please contact apache@apache.org.
  
   5. Products  derived from this software may not  be called "Apache", nor may
      "Apache" appear  in their name,  without prior written permission  of the
      Apache Software Foundation.
  
   THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
   INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
   FITNESS  FOR A PARTICULAR  PURPOSE ARE  DISCLAIMED.  IN NO  EVENT SHALL  THE
   APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
   INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
   DING, BUT NOT LIMITED TO, PROCUREMENT  OF SUBSTITUTE GOODS OR SERVICES; LOSS
   OF USE, DATA, OR  PROFITS; OR BUSINESS  INTERRUPTION)  HOWEVER CAUSED AND ON
   ANY  THEORY OF LIABILITY,  WHETHER  IN CONTRACT,  STRICT LIABILITY,  OR TORT
   (INCLUDING  NEGLIGENCE OR  OTHERWISE) ARISING IN  ANY WAY OUT OF THE  USE OF
   THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  
   This software  consists of voluntary contributions made  by many individuals
   on  behalf of the Apache Software  Foundation. For more  information on the
   Apache Software Foundation, please see <http://www.apache.org/>.
  
  */
  
  package org.apache.avalon.assembly.lifecycle;
  
  import org.apache.avalon.framework.CascadingException;
  
  /**
   * Exception to indicate that there was a lifecycle related error.
   *
   * @author <a href="mailto:dev@avalon.apache.org">Avalon Development Team</a>
   * @version $Revision: 1.1 $ $Date: 2003/04/24 12:29:57 $
   */
  public class DeploymentException
          extends CascadingException
  {
  
      /**
       * Construct a new <code>DeploymentException</code> instance.
       *
       * @param message The detail message for this exception.
       */
      public DeploymentException( final String message )
      {
          this( message, null );
      }
  
      /**
       * Construct a new <code>DeploymentException</code> instance.
       *
       * @param message The detail message for this exception.
       * @param throwable the root cause of the exception
       */
      public DeploymentException( final String message, final Throwable throwable )
      {
          super( message, throwable );
      }
  }
  
  
  
  
  1.1                  avalon-sandbox/merlin/assembly-spi/src/java/org/apache/avalon/assembly/lifestyle/DeploymentService.java
  
  Index: DeploymentService.java
  ===================================================================
  /*
  
   ============================================================================
                     The Apache Software License, Version 1.1
   ============================================================================
  
   Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved.
  
   Redistribution and use in source and binary forms, with or without modifica-
   tion, are permitted provided that the following conditions are met:
  
   1. Redistributions of  source code must  retain the above copyright  notice,
      this list of conditions and the following disclaimer.
  
   2. Redistributions in binary form must reproduce the above copyright notice,
      this list of conditions and the following disclaimer in the documentation
      and/or other materials provided with the distribution.
  
   3. The end-user documentation included with the redistribution, if any, must
      include  the following  acknowledgment:  "This product includes  software
      developed  by the  Apache Software Foundation  (http://www.apache.org/)."
      Alternately, this  acknowledgment may  appear in the software itself,  if
      and wherever such third-party acknowledgments normally appear.
  
   4. The names "Jakarta", "Apache Avalon", "Avalon Framework" and
      "Apache Software Foundation"  must not be used to endorse or promote
      products derived  from this  software without  prior written
      permission. For written permission, please contact apache@apache.org.
  
   5. Products  derived from this software may not  be called "Apache", nor may
      "Apache" appear  in their name,  without prior written permission  of the
      Apache Software Foundation.
  
   THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
   INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
   FITNESS  FOR A PARTICULAR  PURPOSE ARE  DISCLAIMED.  IN NO  EVENT SHALL  THE
   APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
   INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
   DING, BUT NOT LIMITED TO, PROCUREMENT  OF SUBSTITUTE GOODS OR SERVICES; LOSS
   OF USE, DATA, OR  PROFITS; OR BUSINESS  INTERRUPTION)  HOWEVER CAUSED AND ON
   ANY  THEORY OF LIABILITY,  WHETHER  IN CONTRACT,  STRICT LIABILITY,  OR TORT
   (INCLUDING  NEGLIGENCE OR  OTHERWISE) ARISING IN  ANY WAY OUT OF THE  USE OF
   THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  
   This software  consists of voluntary contributions made  by many individuals
   on  behalf of the Apache Software  Foundation. For more  information on the
   Apache Software Foundation, please see <http://www.apache.org/>.
  
  */
  
  package org.apache.avalon.assembly.lifecycle;
  
  import org.apache.avalon.assembly.appliance.Appliance;
  
  /**
   * A deployment service is responsible for the deployment of a component
   * in response to a request from a lifestyle manager.
   *
   * @author <a href="mailto:dev@avalon.apache.org">Avalon Development Team</a>
   * @version $Revision: 1.1 $ $Date: 2003/04/24 12:29:57 $
   */
  public interface DeploymentService
  {
       static final String KEY = "urn:assembly:lifecycle.deployment";
  
      /**
       * Deploy an appliance based on a supplied classloader, logging channel and
       * containment context.
       * @param classloader the classloader to use
       * @param appliance the appliance to deploy
       * @param logger the logging channel to assign to the component
       * @return the deployed component
       */
      Object deploy( Appliance appliance, ClassLoader classloader )
              throws DeploymentException;
  
      /**
       * Destroy an appliance.
       * @param object the object to decommission
       */
      void decommission( Appliance appliance, Object object );
  
      /**
       * Destroy an appliance.
       * @param appliance the appliance to destroy
       */
      public void decommission( Appliance appliance, Object instance, boolean disassemble );
  }
  
  
  
  1.4       +4 -4      avalon-sandbox/merlin/assembly-spi/src/java/org/apache/avalon/assembly/locator/Resolvable.java
  
  Index: Resolvable.java
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/merlin/assembly-spi/src/java/org/apache/avalon/assembly/locator/Resolvable.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- Resolvable.java	11 Apr 2003 20:28:33 -0000	1.3
  +++ Resolvable.java	24 Apr 2003 12:29:57 -0000	1.4
  @@ -68,21 +68,21 @@
       /**
        * Resolve a object to a value.
        *
  -     * @param partition the context within the the resolution is applied
  +     * @param source the context within the the resolution is applied
        * @return the resolved object
        * @throws ContextException if an error occurs
        */
  -    Object resolve( Object partition )
  +    Object resolve( Object source )
               throws LocatorException;
   
       /**
        * Resolve a object to a value qualified by a supplied service reference.
        *
  -     * @param partition the context within the the resolution is applied
  +     * @param source the context within the the resolution is applied
        * @param ref the service reference
        * @return the resolved object
        * @throws ContextException if an error occurs
        */
  -    Object resolve( Object partition, String ref )
  +    Object resolve( Object source, String ref )
               throws LocatorException;
   }
  
  
  

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