Return-Path: Delivered-To: apmail-avalon-cvs-archive@avalon.apache.org Received: (qmail 18934 invoked by uid 500); 17 Mar 2003 02:46:28 -0000 Mailing-List: contact cvs-help@avalon.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Avalon CVS List" Reply-To: "Avalon Developers List" Delivered-To: mailing list cvs@avalon.apache.org Received: (qmail 18916 invoked by uid 500); 17 Mar 2003 02:46:28 -0000 Received: (qmail 18909 invoked from network); 17 Mar 2003 02:46:28 -0000 Received: from icarus.apache.org (208.185.179.13) by daedalus.apache.org with SMTP; 17 Mar 2003 02:46:28 -0000 Received: (qmail 29473 invoked by uid 1438); 17 Mar 2003 02:46:27 -0000 Date: 17 Mar 2003 02:46:27 -0000 Message-ID: <20030317024627.29472.qmail@icarus.apache.org> From: mcconnell@apache.org To: avalon-sandbox-cvs@apache.org Subject: cvs commit: avalon-sandbox/merlin/assembly/src/java/org/apache/avalon/assembly/appliance DefaultAppliance.java X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N mcconnell 2003/03/16 18:46:27 Modified: merlin/assembly/src/java/org/apache/avalon/assembly/appliance DefaultAppliance.java Log: Removed notion of appliance features (not used) and added explict operation for resolution of appliance dependencies (enabling classes derived from Appliance to override static type based dependency declarations - a.k.a. dynamic dependency generation) Revision Changes Path 1.2 +23 -21 avalon-sandbox/merlin/assembly/src/java/org/apache/avalon/assembly/appliance/DefaultAppliance.java Index: DefaultAppliance.java =================================================================== RCS file: /home/cvs/avalon-sandbox/merlin/assembly/src/java/org/apache/avalon/assembly/appliance/DefaultAppliance.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- DefaultAppliance.java 13 Mar 2003 01:03:42 -0000 1.1 +++ DefaultAppliance.java 17 Mar 2003 02:46:27 -0000 1.2 @@ -73,7 +73,6 @@ import org.apache.avalon.assembly.lifestyle.LifestyleException; import org.apache.avalon.assembly.lifestyle.LifestyleService; import org.apache.avalon.assembly.lifestyle.LifestyleHandler; -import org.apache.avalon.assembly.lifecycle.AssemblyService; import org.apache.avalon.assembly.locator.Locator; import org.apache.avalon.assembly.locator.Contextualizable; import org.apache.avalon.assembly.locator.LocatorException; @@ -178,11 +177,6 @@ private Map m_context; /** - * The feature map. - */ - private Map m_features = new Hashtable(); - - /** * The lifestyle handler. */ private LifestyleHandler m_handler; @@ -411,6 +405,16 @@ return m_applianceContext.getType(); } + /** + * Return the set of runtime dependencies for the type. + * + * @return the set of runtim dependencies. + */ + public DependencyDescriptor[] getDependencies() + { + return m_applianceContext.getType().getDependencies(); + } + /** * Get the appliance URL. * @return the appliance URL @@ -538,16 +542,6 @@ } /** - * Returns a map of appliance custom features. - * - * @return the feature map - */ - public Map getFeatures() - { - return m_features; - } - - /** * Return the logging categories for the profile. * * @return the logger @@ -720,7 +714,8 @@ catch( Throwable e ) { final String error = - "Unexpected exception while preparing deployment context in appliance: " + this; + "Unexpected exception while preparing deployment context in appliance: " + + this; throw new ApplianceException( error, e ); } @@ -735,7 +730,8 @@ Context source = new DefaultContext( map, m_system ); ContextDirective directive = m_applianceContext.getContextDirective(); RepositoryManager repository = m_engine.getRepository(); - return BUILDER.buildContextMap( m_engine, repository, descriptor, directive, source ); + return BUILDER.buildContextMap( + m_engine, repository, descriptor, directive, source ); } catch( Throwable e ) { @@ -853,6 +849,12 @@ { getLogger().debug( "assembly: " + this ); m_visited.add( this ); + + // + // resolve a supplier for the contextualization phase + // deployment dependency + // + ContextDescriptor context = getType().getContext(); String ext = context.getAttribute( "urn:assembly:lifecycle.context.strategy" ); @@ -893,11 +895,11 @@ } // - // for all of the declared dependencies - make sure the + // for all of the declared runtime dependencies - make sure the // dependency is satisfied // - DependencyDescriptor[] dependencies = getType().getDependencies(); + DependencyDescriptor[] dependencies = getDependencies(); for( int i = 0; i < dependencies.length; i++ ) { DependencyDescriptor dependency = dependencies[ i ]; --------------------------------------------------------------------- To unsubscribe, e-mail: cvs-unsubscribe@avalon.apache.org For additional commands, e-mail: cvs-help@avalon.apache.org